given a rom.gb
file, romdecoder
prints out all the information included in the rom header, and produces a rom.asm
file containing the bytes from addr 0x0150
to EOF
reverse-parsed (disassembled) into Z80 ASM instructions.
romdecoder.cpp
the main source file, it decodes the rom header and calls the bytes to Z80-ASM instructions decoder.licensecodes.h
contains the functions to translate bytes into rom license codes.z80asm.h
contains all the functions to parse bytes into Z80-ASM instructions.
compiled and tested with Microsoft cl version 19.34.31937 for x64
gameboy rom header format:
gameboy Z80 ASM instruction set (and decoding algorithm):
- https://imrannazar.com/Gameboy-Z80-Opcode-Map
- https://gb-archive.github.io/salvage/decoding_gbz80_opcodes/Decoding%20Gamboy%20Z80%20Opcodes.html
Z80 ASM documentation: