Skip to content

mmuszkow/gb-disasm

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
src
 
 
 
 
vs
 
 
 
 

gb-disasm

GameBoy ROMs disassembler.

Usage: ./gb-disasm <ROM> -s <HEX> -b <BANK> -a -nc -nj
<ROM> -> obligatory, ROM file to be disassembled
  -s  -> optional, start address (PC), default is 0x100
  -e  -> optional, end adress (PC), default is 0x8000
  -b  -> optional, memory bank number, default is 1
  -a  -> optional, print assembly, default is print binary dump
  -nc -> optional, don't follow call instructions, default is to follow
  -nj -> optional, don't follow jump instructions, default is to follow

It is not finished and can disassemble only parts of the ROMs binaries. I didn't test it extensively on ROMs with MBC (Memory Bank Controller).

Most of the code is autogenerated by script (generator.py) that uses opcodes table (opcodes.html) to generate parsing code in C.

To compile it on linux, in src directory execute gcc main.c -O2 -o gb-disasm.