Page 2 of 2
Posted: Sun Apr 27, 2014 11:14 am
by Stef
You don't have to take care the checksum as the boot code does not calculate it. If your code does not work on real hardware i think it is related to another problem (maybe a SGDK one) !
Posted: Sun Apr 27, 2014 11:45 am
by Mills
I fixed the roms using Fix CheckSum, Now the emulator does not complain about it, Hope they work on a real console, waiting for someone who will test them on the everdrive.
Posted: Tue Apr 29, 2014 7:08 am
by Eke
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.
Posted: Tue Apr 29, 2014 10:38 am
by Mills
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.
Thanks a lot, I got it.
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:
Posted: Tue Apr 29, 2014 12:36 pm
by Stef
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 ?
Posted: Tue Apr 29, 2014 1:14 pm
by Mills
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 ?
Found the exact error, if you use this line, and there are not 10 sprites loaded, it will show the error:
If you loaded 10 sprites, no error. But i tested with lots of sprites and it also shows the error, maybe i filled up the vram

.
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++;
}
Regen does not show any special error, just goes black screen and pops up debugger window. I can take a screenshot of the window, it may have some usefull data i can't understand.
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.