Search found 2801 matches

by Stef
Thu Dec 13, 2018 9:31 am
Forum: SGDK
Topic: Sprite Engine Problem
Replies: 5
Views: 131

Re: Sprite Engine Problem

I eventually could do that but i don't like much having different code (and actually duplicate code) depending situation (sometime you don't really have the choice though), i prefer a more generic code handling as much cases as possible. Well to be honest i think i will try to evaluate how much 16 i...
by Stef
Wed Dec 12, 2018 9:33 am
Forum: SGDK
Topic: Sprite Engine Problem
Replies: 5
Views: 131

Re: Sprite Engine Problem

Maybe i should get back to the original limit (it was 20 at first) or even extend to 32 hard sprites but honestly using 32 hard sprites for a single meta sprite is a bit extreme ! At worst you can always use several meta sprite for your giant sprite but i know it somehow defeat the meta sprite featu...
by Stef
Mon Dec 10, 2018 9:22 am
Forum: SGDK
Topic: Sprite Engine Problem
Replies: 5
Views: 131

Re: Sprite Engine Problem

Oh it looks like you're just above one of the limit of the sprite engine: Each (meta) sprite cannot have more than 16 internal hard sprites, this is a limitation so i can fit all visibility bit in a 16 bit variable which make sprite processing a bit faster. So here you need 18 hard sprites (which ai...
by Stef
Tue Dec 04, 2018 8:54 am
Forum: SGDK
Topic: XGM Driver issue
Replies: 21
Views: 642

Re: XGM Driver issue

Yeah, GCC optimizations can become insane in some ways, you have to think about all edge cases and put volatile where it need to be. In fact any memory touched (read or write) by something else that the 68000 (VDP, Z80, DMA...) should be declared as volatile.
by Stef
Tue Dec 04, 2018 8:50 am
Forum: Blabla
Topic: 3D printed cart....new paths ?
Replies: 7
Views: 1280

Re: 3D printed cart....new paths ?

I don't have any 3D printer but thanks a lot for sharing your model :D
I hope that will help people to build their own MD cart !
by Stef
Mon Dec 03, 2018 8:13 am
Forum: SGDK
Topic: XGM Driver issue
Replies: 21
Views: 642

Re: XGM Driver issue

Well done ! I've to admit i don't really understand why it requires the volatile keyword at this location specifically. We are just writing to Z80 RAM, normally volatile is important on read access except if it keep track of previous written values eventually but shouldn't be the case here... Anyway...
by Stef
Mon Nov 26, 2018 9:47 am
Forum: SGDK
Topic: dealing with matrices (arrays)
Replies: 32
Views: 2392

Re: dealing with matrices (arrays)

Haha, really glad you were able to fix all that, well done :)
by Stef
Thu Nov 22, 2018 9:32 pm
Forum: Sound
Topic: New Documentation: An authoritative reference on the YM2612
Replies: 859
Views: 329569

Re: New Documentation: An authoritative reference on the YM2612

I can confirm DAC can be updated at more than 26 Khz, i don't know why people keep repeating that... maybe it depends from the system version but at least i was able to do 32 Khz on both MD1 and the MD2 and i'm confident we can get as high than 53 Khz. I think the 26 Khz mistake come from a driver u...
by Stef
Thu Nov 22, 2018 9:27 pm
Forum: SGDK
Topic: Collision sprites help
Replies: 4
Views: 149

Re: Collision sprites help

You can actually use the collision structure of SGDK ut i think it would be more straightforward to design your own, with your own collision code :lol:
by Stef
Thu Nov 22, 2018 3:09 pm
Forum: SGDK
Topic: Collision sprites help
Replies: 4
Views: 149

Re: Collision sprites help

Unfortunately Collision support is not completed in SGDK, so you have the structure but no method to use it yet :-/
So in the meantime you have to handle that with your own structure and code.
by Stef
Thu Nov 22, 2018 12:25 pm
Forum: SGDK
Topic: dealing with matrices (arrays)
Replies: 32
Views: 2392

Re: dealing with matrices (arrays)

Better to do it in this way: VDP_setWindowAddress(0xB000); VDP_setSpriteListAddress(0xBC00); VDP_setHScrollTableAddress(0xB800); VDP_setBPlanAddress(0xC000); VDP_setAPlanAddress(0xE000); VDP_setPlanSize(64, 64); Normally having the sprite table at 0xBC00 should be alright so i guess the problem is s...
by Stef
Tue Nov 20, 2018 4:26 pm
Forum: SGDK
Topic: XGM Driver issue
Replies: 21
Views: 642

Re: XGM Driver issue

newer GCC gets really much better now ;) - Later GCC 2.x were very fast for 68k - GCC 3.4.X were ok - GCC 4.X and 5.X were quite bad for 68k - GCC 6.X fixed many problems and is already very fast for 68k (with -03 opt level at least) and it seems than GCC 7.X and 8.X can even do better (not much i g...
by Stef
Tue Nov 20, 2018 10:19 am
Forum: SGDK
Topic: General SGDK questions
Replies: 14
Views: 797

Re: General SGDK questions

When you enable compression for your IMAGE resource in rescomp, it will compress both the tiles data and the tilemap. If you choose BEST compression, you can expect about 40-50% compression ratio on the tiles / tilemap data but then you need to unpack data at level start as the compression is too sl...
by Stef
Mon Nov 19, 2018 3:25 pm
Forum: SGDK
Topic: XGM Driver issue
Replies: 21
Views: 642

Re: XGM Driver issue

Ohh.. again a compiler optimization issue, generally optimization issue are caused by missing "volatile" keyword on port access. It also may be related to your "wait" loops. I observed for instance that in some situation the VDP_waitVSync() method may be optimized by the compiler so that the next li...
by Stef
Mon Nov 19, 2018 10:32 am
Forum: Megadrive/Genesis
Topic: SGDK VDP_setTileMapXY / sample/sprite
Replies: 2
Views: 151

Re: SGDK VDP_setTileMapXY / sample/sprite

I'm not really sure of what you're trying to do but did you had a look on VDP_setMap(..) and VDP_setMapEx(..) methods ? i think that is what you need here.