Oh no! Some styles failed to load. 😵 Please try reloading this page
Menu â–¾ â–´

is sdcc a gameboy compiler?

2015-05-24
2015-05-26
  • tom lukeywood

    tom lukeywood - 2015-05-24

    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
  • Philipp Klaus Krause

    -mgbz80

     
  • tom lukeywood

    tom lukeywood - 2015-05-24

    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;
    }

     
  • Philipp Klaus Krause

    makebin -Z main.ihx main.gb

     
  • Maarten Brock

    Maarten Brock - 2015-05-25

    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.

     
  • tom lukeywood

    tom lukeywood - 2015-05-26

    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!

     
  • tom lukeywood

    tom lukeywood - 2015-05-26

    and source code under a foss license:

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign Up No, Thank you