Skip to content

Haruno19/gameboy-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gameboy-decoder

how it works

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.

src files

  • 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.

environment

compiled and tested with Microsoft cl version 19.34.31937 for x64

soruces and docs used

gameboy rom header format:

gameboy Z80 ASM instruction set (and decoding algorithm):

Z80 ASM documentation: