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.

Coding > Unsupported BIOS function 31?

#18750 - gotenks06 - Sat Apr 03, 2004 7:40 pm

I'm new to GBA programming, although I have been using C and C++ for a while. I'm used to using Dev-cpp to just press F9, and my program is made and run. I remember seeing a post showing how to integrate devkitadv with Dev-cpp, but it's not working right, and I'd rather not bother with it. I'm getting my games to compile with this batch file (I edit it when I need to).
Code:

gcc -o first.elf first.c
objcopy -O binary first.elf first.bin
pause

It compiles with no errors, but when I run them with VisualBoy Advance, I get two seperate errors for each file. First of all, I don't know what an elf file is and how its different from a gba file and why I can't just make a gba file or an elf file, instead of both. Also, I don't know what the binary file is for. When I run the binary file in VBA, I get the error Unsupported BIOS function 31 called from 0800006c. A BIOS file is needed in order to get correct behavior. I don't get why it says that because other ROMS work with VBA without any problems. When I try running the gba file (when I add it to the batch file), I get the same message. With the ELF file, I get the message Not a valid ELF file. This happens with every game I try to make with my own BAT files, including everything from http://www.loirak.com/gameboy/gbatutor.html, even when I copy and paste everything including the batch file, and get the header files from other sites (because that site doesn't have them).

I've searched for ages without finding the solutions. Please help!

#18751 - gotenks06 - Sat Apr 03, 2004 9:32 pm

I fixed the problem. It ended up I was unintentionally using a different version of GCC.