The .ihx file is an intel hex file which is a readable and parse-able representation of the bytes that should be in the processor's memory. Makebin, as Philipp suggests, can turn it into a binary blob. For a real gameboy (not a simulator) you probably need to burn it to an eeprom or flash memory. It depends on your programmer (software) if you can read this intel hex directly, need to pack it with packihx or need to convert it. The same goes for a simulator, I guess.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i have read in the wiki that sdcc is a gameboy compiler
but dose anyone know to compile a c file into a gameboy executable?
i know that gbdk exists but its old unmaintained and some of the source code is under non-free/libre licenses
i am running the latest version of sdcc on a modern 64-bit gnu/linux system(ubuntu 14.04 based)
thanks in advance if you know the answer to my question
Last edit: tom lukeywood 2015-05-24
-mgbz80
when i try the command sdcc main.c -mgbz80
i just get these files:
main.asm main.lst main.sym
main.map main.ihx main.noi
main.lk main.rel
are any of them executable?
what would i need to do to get a executable .gb file?
btw this is the c source i used as a test:
int main(){
int i = 8;
i = 9;
return 0;
}
makebin -Z main.ihx main.gb
The .ihx file is an intel hex file which is a readable and parse-able representation of the bytes that should be in the processor's memory. Makebin, as Philipp suggests, can turn it into a binary blob. For a real gameboy (not a simulator) you probably need to burn it to an eeprom or flash memory. It depends on your programmer (software) if you can read this intel hex directly, need to pack it with packihx or need to convert it. The same goes for a simulator, I guess.
thanks alot it works!!
now i can make my gameboy emulator display random crap on the screen by loads of values to random places in memory!
now all i need is a stranded libary
have a pointless gameboy rom in thanks!
and source code under a foss license: