Search found 2689 matches

by Stef
Fri Jan 12, 2018 12:25 pm
Forum: SGDK
Topic: Tile Map Code
Replies: 19
Views: 935

Re: Tile Map Code

It isn't compressed. Speed isn't my problem though. It runs quite fast. I tried using -1 compression instead of NONE, and wow, it was much slower. The problem is that VDP_loadTileSet produces garbled graphics. ... On the left is what happens if I use VDP_loadTileSet (loaded after VDP_drawImageEx). ...
by Stef
Fri Jan 12, 2018 8:38 am
Forum: SGDK
Topic: Tile Map Code
Replies: 19
Views: 935

Re: Tile Map Code

Are your data compressed ? if yes then you need to unpack your tileset first otherwise it will do it at each VDP_loadTileSet(..) call. That can bring a *big* speed improvement. Also reloading tiles each time is slow by definition as you're loading them in VRAM. Can't you load all tiles then just mod...
by Stef
Thu Jan 11, 2018 1:41 pm
Forum: SGDK
Topic: Do you need tutorials ?
Replies: 30
Views: 8220

Re: Do you need tutorials ?

Best way to learn SGDK is looking into the provided samples (in the sample folder).
The "sprite" sample is specially useful for sprite / background basic operations =)
by Stef
Thu Jan 11, 2018 1:32 pm
Forum: SGDK
Topic: Tile Map Code
Replies: 19
Views: 935

Re: Tile Map Code

VDP_drawImageEx is slow as it upload the tiles each time, you should probably use VDP_loadTileSet(..) first then use VDP_setMapEx(..). Normally you can find several examples about how to use these methods efficiently on the forum as we already discusses many time about it ;) Some examples : http://g...
by Stef
Wed Jan 10, 2018 9:10 am
Forum: SGDK
Topic: Can't Seem to Display Sprites to the Screen
Replies: 3
Views: 251

Re: Can't Seem to Display Sprites to the Screen

You need to initialize the sprite engine before using it : SPR_init(0,0,0); That will initialize it with default parameters, trying to use it without initialization may end to unpredictable result ! Then you have to remove the animation part of your sprite definition as you don't want to animate let...
by Stef
Wed Jan 10, 2018 9:05 am
Forum: SGDK
Topic: Tile Map Code
Replies: 19
Views: 935

Re: Tile Map Code

Definitely not easy to see where can be the problem from the code, it misses the variables declaration, we don't know how much you allocated for the string, we also don't know how much text you write to it. It can be the issue. Also strclr(..) is totally useless if you are just writing the string af...
by Stef
Tue Jan 09, 2018 9:42 am
Forum: SGDK
Topic: Can't Seem to Display Sprites to the Screen
Replies: 3
Views: 251

Re: Can't Seem to Display Sprites to the Screen

So you want to display the logo as several sprites (and not in the background) right ? First : you don't need to declare the palette separately, SPRITE resource already contains it ;) Secondly : you need to use the appropriate frame of your sprite, you don't need to manually deal with tile index. He...
by Stef
Mon Jan 08, 2018 9:19 am
Forum: Megadrive/Genesis
Topic: Developing a new engine
Replies: 6
Views: 647

Re: Developing a new engine

One reminder about the 32X - the 68K->SH2 DMA is flakey. You either need to not use it, or to add error checking and retries to the code. If you look at 32X games that use it, they transfe r the data in small chunks, checksum the data and check the checksum after the data is transferred, have timeo...
by Stef
Wed Jan 03, 2018 9:19 am
Forum: SGDK
Topic: Animation Sample
Replies: 5
Views: 341

Re: Animation Sample

rescomp indeed requires 4bpp (16 colors) or 8bpp images.
You can probably reduce the rom size using FAST compression mode (decompression should be fast enough to preserve a good frame rate) :)
by Stef
Wed Dec 27, 2017 11:05 am
Forum: SGDK
Topic: Can't compile a project in gendev.
Replies: 8
Views: 432

Re: Can't compile a project in gendev.

Oh sorry i didn't know, well in fact i don't use it myself do i'm not the best to help you. I recommend you to check topics discussing about it as this one : http://gendev.spritesmind.net/forum/viewtopic.php?t=2304 Maybe you can find a solution in them, also you can try to contact kubilus directly f...
by Stef
Wed Dec 27, 2017 11:00 am
Forum: SGDK
Topic: SPR_addSpriteEx Flags
Replies: 3
Views: 268

Re: SPR_addSpriteEx Flags

Oh you're right, you should be ab le to do it from addSpriteEx(..), i forgot you had the spriteIndex parameter in it, my bad... Well in fact it should work with your first code : sprites[i+4] = SPR_addSpriteEx(&character_kaylin_mouth, Party[i][1]+32, Party[i][2]+64, TILE_ATTR(PAL1, TRUE, FALSE, FALS...
by Stef
Tue Dec 26, 2017 10:07 am
Forum: SGDK
Topic: SPR_addSpriteEx Flags
Replies: 3
Views: 268

Re: SPR_addSpriteEx Flags

When you pass to manual allocation you need to use the following method : SPR_setSpriteTableIndex(Sprite) To give the hardware sprite index to use for this sprite. You need to ensure you have enough available hard sprite at this position to fit the number of hard sprite requirement for this sprite, ...
by Stef
Tue Dec 26, 2017 10:02 am
Forum: SGDK
Topic: Can't compile a project in gendev.
Replies: 8
Views: 432

Re: Can't compile a project in gendev.

If you are using linux then you should use the Gendev which is basically SGDK for linux :
https://github.com/kubilus1/gendev
by Stef
Tue Dec 26, 2017 10:00 am
Forum: SGDK
Topic: Sprite issue with first SGDK project
Replies: 6
Views: 967

Re: Sprite issue with first SGDK project

That is a know issue, currently rescomp doesn't "optimize" sprite cutting, that is something i plan to work out soon as it's a problem both for VRAM occupation and DMA bandwidth usage.
by Stef
Fri Dec 08, 2017 9:32 am
Forum: Video Display Processor
Topic: Horizontal Scroll Mode question
Replies: 3
Views: 398

Re: Horizontal Scroll Mode question

If you are transferring more than 7 KB per frame then definitely that is a problem as your DMA would extend in active period and make the whole thing slow down a lot (as transfer are much slower in active period). What you can do is to extend the blank area, for instance you blank 16 lines at top an...