SGDK questions: palettes... BMP... Collision, sprites
Moderator: Stef
You didn't get what Stef said:
. The checksum error reported by the emulator is just an information telling you that the checksum field in the ROM header does not match the checksum as calculated by the emulator using sega checksum calculation routine.
. It doesn't have any effect unless the ROM you are using does exact same checksum verification routine in software (some games use their own routines and will display that message in emulator as well but still works nomally) in which case it will usually throw you out to a software error screen (usually plain red screen with official games). This will happen on both emulator / real hardware because it is a software error.
. Real console hardware itself does not calculate any checksum so if your ROM does not care about it (and it probably doesn't), you do not have to care about "fixing" checksums.
Your problem seems to be related to Address Error exception which is different: basically, you are trying to access words or longwords from an odd address, which throw out an exception on real hardware. Most emulators does not check address alignment for optimization purpose but I think Regen does so you could use it to test your work.
. The checksum error reported by the emulator is just an information telling you that the checksum field in the ROM header does not match the checksum as calculated by the emulator using sega checksum calculation routine.
. It doesn't have any effect unless the ROM you are using does exact same checksum verification routine in software (some games use their own routines and will display that message in emulator as well but still works nomally) in which case it will usually throw you out to a software error screen (usually plain red screen with official games). This will happen on both emulator / real hardware because it is a software error.
. Real console hardware itself does not calculate any checksum so if your ROM does not care about it (and it probably doesn't), you do not have to care about "fixing" checksums.
Your problem seems to be related to Address Error exception which is different: basically, you are trying to access words or longwords from an odd address, which throw out an exception on real hardware. Most emulators does not check address alignment for optimization purpose but I think Regen does so you could use it to test your work.
Thanks a lot, I got it.Eke wrote:You didn't get what Stef said:
. The checksum error reported by the emulator is just an information telling you that the checksum field in the ROM header does not match the checksum as calculated by the emulator using sega checksum calculation routine.
. It doesn't have any effect unless the ROM you are using does exact same checksum verification routine in software (some games use their own routines and will display that message in emulator as well but still works nomally) in which case it will usually throw you out to a software error screen (usually plain red screen with official games). This will happen on both emulator / real hardware because it is a software error.
. Real console hardware itself does not calculate any checksum so if your ROM does not care about it (and it probably doesn't), you do not have to care about "fixing" checksums.
Your problem seems to be related to Address Error exception which is different: basically, you are trying to access words or longwords from an odd address, which throw out an exception on real hardware. Most emulators does not check address alignment for optimization purpose but I think Regen does so you could use it to test your work.

Regen emulator did not show any Address Error exception, i did not find the settings to configure this, i'll try the debug version.
EDIT: cool i got the error working on regen:

It shows just when a sprite is about to be loaded. Thanks

EDIT2: Foud the error, it looks like there is something wrong with the SPR function, adding the following line, causes the error:
Code: Select all
SPR_update(&objects, 10);
Found the exact error, if you use this line, and there are not 10 sprites loaded, it will show the error:Stef wrote:I plan to make a new version soon which fix some smalls issues and about others improvements. Still i am surprised of this "address error" as all sprite code is in C and there is few chance to trigger this exception...
Just to be sure, is your 'objects' structure big enough ?
Code: Select all
SPR_update(&objects, 10);

I found another error in sprites, this one occurs when setting animations. For example, in this code, an error makes the emulator to go black screen when i set the second animation (1):
Code: Select all
while (1){
if (A == 0) SPR_setAnim(&sprites[0], 0); //no problem
if (A == 600) SPR_setAnim(&sprites[0], 1); // black screen
A++;
}
EDIT: Loading all sprites in order, without leaving any block empty, solved these errors, still get a lock up system error, if changing animation of some sprites.