Recommended Posts

I was working on my code for the GBA a while ago, and (it seems) all of a sudden I''m causing some sort of error. The compiler (g++ from DevKitAdvance, and I''ve tried GCC too) doesn''t give me any errors, but it doesn''t work at all on any emulator, or hardware. Unfortunately, I can''t seem to figure out what caused it to happen. I''ve tried commenting out most of the code, and it still doesn''t work. The only clue I have is the pop up error VisualBoy Advance gives me (over and over and over...) "Unimplemented opcode 0c1b041b from 080009ac" Those numbers change every time it pops one up (endlessly) But my question is, what exactly does that mean? I can''t fix an error I don''t understand...
-Arek the Absolute

0

Share this post

Link to post

Share on other sites

Haven''t ever done any console development myself, but it sounds like you may have a problem with a pointer somewhere. Maybe you''ve got a pointer that''s overwriting the code area and replacing it with some bytes that translate to unimplemented opcodes?

0

Share this post

Link to post

Share on other sites

I don''t know... That MAY be the case, but I can''t seem to find any area where it applies. It may or may not be a coincidence, but I have noticed I can stop the error by never enabling interrupts. Unfortunately, that''s no real solution because interrupts are absolutely critical to this app...

-Arek the Absolute

0

Share this post

Link to post

Share on other sites

It seems the cause of all this is the -mthumb and -mthumb-interwork flags I''m giving the compiler. If I don''t give the compiler those flags, I don''t have the problem. I suppose that''s something I can live with, but can anyone manage to explain what''s going on with that? Is there any way I can get things to work with those flags on? Anyone else experienced this?

-Arek the Absolute

0

Share this post

Link to post

Share on other sites

If you use the -mthumb-interwork option, you should make sure that you are using the proper crtbegin.o, crtend.o and crt0.o. I think that the ones that should be used with the -mthumb-interwork option are to be found in the \devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\interworkcatalog, or (I''m not really sure, you can try and see which one that is correct) in \devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\thumb\interworkWhen you compile your crt0.s you must add the -mthumb-interwork switch (and also the -mthumb? I don''t know) and then that one will be compiled correctly. (But gcc should warn you if you don''t use the proper crtbegin.o etc.) Perhaps you already have done all this correctly, in that case I don''t know what the error might be. You haven''t forgot to place crt0.o first in your list of object files? (well, if this was the case the program wouldn''t start at all... but as you say, it does so this shouldn''t be the problem ?)

By the way, does anyone know if it matters if I only use the -mthumb-interwork option or if I use both -mthumb and -mthumb-interowrk ?