Search found 3107 matches

by Stef
Thu May 19, 2022 7:37 pm
Forum: Demos
Topic: WIP Satan Claus - Mega Drive / Genesis / 32x
Replies: 5
Views: 204

Re: WIP Satan Claus - Mega Drive / Genesis / 32x

Looks like a nice platform / puzzle game :) do you make everything yourself ??
by Stef
Tue Apr 19, 2022 9:06 am
Forum: SGDK
Topic: Dynamically modify a Map
Replies: 7
Views: 918

Re: Dynamically modify a Map

To be honest i'm checking this forum less and less as most of the support is given through my discord server where lot of people can reply : https://discord.gg/CeJtKmyT The sonic example won't help much here as it's still based on a Map resource even with setTileMapEx(..) The easiest way to deal wit...
by Stef
Sun Apr 03, 2022 4:12 pm
Forum: SGDK
Topic: Dynamically modify a Map
Replies: 7
Views: 918

Re: Dinamicaly modify a Map

MAP_xxx methods aren't made for dynamic maps. If you need to modify map then indeed you will need to handle it by yourself and use lower level methods as VDP_setTileMapEx(..) :)
by Stef
Fri Mar 18, 2022 5:15 am
Forum: SGDK
Topic: Bank switching with SGDK
Replies: 6
Views: 1683

Re: Bank switching with SGDK

I want to make my ROM with more than 4Mb work (at the moment I have a crash with an illegal function). I opened the config.h file and changed ENABLE_BANK_SWITCH to 1, adding support for switching banks. Then I ran the build_lib.bat file from the root of my SGDK by double clicking on the file. It lo...
by Stef
Tue Feb 08, 2022 9:56 am
Forum: SGDK
Topic: SGDK memory allocation
Replies: 1
Views: 591

Re: SGDK memory allocation

Hi,

It will temporary consume RAM if your GFX data are compressed as it needs memory to store GFX data unpacked before sending to VRAM.
by Stef
Fri Feb 04, 2022 8:44 am
Forum: SGDK
Topic: Best way to access nibbles
Replies: 2
Views: 511

Re: Best way to access nibbles

You can also use bit fields in a structure, but as Cero said, nibble manipulation aren't really fast.
I think that using boolean logic operation directly on your u16 variable is the fastest way to go:

Code: Select all

var = (var & 0xF0FF) | 0x0300;
To change nibble 2 for instance
by Stef
Tue Jan 04, 2022 10:35 am
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 845
Views: 698074

Re: Sega Genesis Dev Kit (SGDK)

The first problem I see in your code is the way you handle string in C. String requires a NULL ending character so you always need to allocate one extra character in your variable. Also you don't need to specify it when using strxxx methods as it does add it for you, so correct code is as follow : /...
by Stef
Sun Jan 02, 2022 9:12 pm
Forum: SGDK
Topic: Sprites map are not compressed in VRAM
Replies: 1
Views: 1770

Re: Sprites map are not compressed in VRAM

SGDK does not handle the duplicate / flip optimization on sprite tiles for various reasons. It's much more tricky to handle as the optimization can work only on (hardware) sprite basis and so they should have the same size. It can somehow work if you fix the sprite size and also for single hardware ...
by Stef
Tue Dec 14, 2021 8:14 pm
Forum: SGDK
Topic: Disable automatic animations for statically loaded sprites
Replies: 3
Views: 876

Re: Disable automatic animations for statically loaded sprites

Well, that shouldn't give specific troubles, as soon you use the setVRAMTileIndex(..) according to it.
But if your sprite sheet only use a single row, be careful to not use more than 256 frames then.
by Stef
Wed Dec 08, 2021 10:13 pm
Forum: SGDK
Topic: Disable automatic animations for statically loaded sprites
Replies: 3
Views: 876

Re: Disable automatic animations for statically loaded sprites

I'm not sure of what you're doing exactly.
You said you have all your sprites are presented in a single row ? I don't understand, that means the sprite->animInd is always 0 ?
Also "statically" loaded sprites also require the use of setFrame(..) method at same time you're doing the setVRAMTileIndex(..)
by Stef
Mon Dec 06, 2021 4:01 pm
Forum: SGDK
Topic: help with black screen
Replies: 8
Views: 1594

Re: help with black screen

Note that recent SGDK version are also more stable in general, so here depending on which version you are, you may also work with the old SGDK bugs too :-/
by Stef
Sun Dec 05, 2021 9:32 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 845
Views: 698074

Re: Sega Genesis Dev Kit (SGDK)

Hi, Your code is correct :) If your IMAGE isn't compressed then Map *mymap = unpackMap(background.map, NULL); will still work as in case there is no compression unpackMap will do a simple copy and allocate destination if set to NULL so you should even keep the MEM_free(mymap); But i'm speaking about...
by Stef
Sun Dec 05, 2021 2:27 pm
Forum: SGDK
Topic: Sprites are not loaded in new version SGDK
Replies: 4
Views: 1150

Re: Sprites are not loaded in new version SGDK

Oh sorry the method is called SYS_doVBlankProcess() !
by Stef
Sun Dec 05, 2021 2:26 pm
Forum: SGDK
Topic: help with black screen
Replies: 8
Views: 1594

Re: help with black screen

To be honest handling correctly soft reset without resetting everything can be tricky, it's easy to miss some uninitialized variables !
by Stef
Sat Dec 04, 2021 10:21 pm
Forum: SGDK
Topic: help with black screen
Replies: 8
Views: 1594

Re: help with black screen

I will say it's probably an issue with variable initialization / initialized state.
But why just don't do a "hard reset" on completion ? so you're sure to restart in a perfect initialized state :)