gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > no$gba question

#56708 - wiz - Mon Oct 10, 2005 6:53 pm

Hi,

I tried some of my programs in the no$gba emulator and I saw the option to view "errors", where it lists my roms as "unstable! contains hidden bugs" and suggests I should use the debug version - its only $15 but I fear I wouldnt understand what to do with the debugger to find the "bugs".

any obvious ideas what these errors, the emulator reports, could be?

and is it worth while buying the debug version?

#56709 - tepples - Mon Oct 10, 2005 7:00 pm

Mostly these bugs involve writing where you shouldn't. How many bugs per second are you getting after one minute of typical runtime?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#56716 - wiz - Mon Oct 10, 2005 7:09 pm

not that many, about 12, but thats because theres lots of errors in one go..

what you said makes sense as it does seem to be errors on reading data, sometimes when I read from the save data (SRAM?) I notice it goes up and other times when I read from ROM.. like map data - I think it could be reading outside the constant array? I will test that.

No new errors on the count when things are left standing, just when reading it seems.

it couldnt be something like not typecasting in places..?

#56718 - tepples - Mon Oct 10, 2005 7:15 pm

Are you making sure to read and write SRAM only in 8-bit chunks (signed char or unsigned char) and only from code running in RAM (not from code running in ROM)? You can solve both of these problems by running all your SRAM access through bytecpy() from the Beginners' FAQ and then making sure bytecpy() is put in EWRAM.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#56845 - wiz - Tue Oct 11, 2005 10:36 pm

hi tepples,

sorry for the delay, I finally figured out what it was. Thankfully there was nothing wrong with the SRAM functions as finally I managed to pin point it to the "hidesprite" routine of mine which I used to clear, and re-write, the text on screen. apparently I wasnt checking that the sprite in question was not > 127 when I set the oam entry.

cheers for your thoughts!