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.

C/C++ > Interrupts result in only white screen from rom

#4624 - guilt - Sat Apr 05, 2003 6:49 am

I've attempted to dl and compile the code from thepernproject for his mode7 demo, which uses interrupts. The elf in the zip, when objcopy'ed to a gba binary works just fine. However, when I try to compile it myself (and this is true of all code that I have ever tried to compile that involves interrupts) I get a rom that just displays a white screen and doesn't seem to respond to input. I have yet to find a decent tool to let me watch the PC and see what it does, but was hoping not to have to go that low level (I see enough raw memory and assembly at work).

I compiled the toolchain myself for linux and have had plenty of success writing c for this thing without the gba. I'm using both visualboy advance sdl for linux and the windows version (my windows box is faster). Also, I've tried every amalgamation of compiler directives and crtS.s and lnkscript that I can think of and have had no luck.

So if anyone with a similar setup (or without) that can point me to compiling instructions that work, or perhaps a decent somewhat graphical debugger so that I can see the pc (and how to generate an assembly with the instructions numbered), either would help a lot. Thanks,

The code that I'm trying to compile atm is at
http://www.thepernproject.com/English/mode7.zip

Lastly, I still quite new to the gbadev game, so I apoligize if this should be obvious or is well known/documented. I googled for a few hours, have read everything relavant I can find, and looked around these forums for a bit and haven't een able to solve this yet. Thanks again,

guilt

#4650 - I.C.E - Sun Apr 06, 2003 10:58 am

I downloaded it and it works with my project files. I think your problem is that you don't have a correct crt0. I have looked at the sources and I have seen IntrTable[] so I guess you must at least have __SingleInterrupts active in your crt0.

Btw, for a graphical debugger I would suggest ddd which is a graphical front end of gdb http://www.gnu.org/software/ddd/
_________________
To this day, many C programmers believe that "strong typing" just means pounding extra hard on the keyboard.
- Peter van der Linden