Skip to content

Latest commit

 

History

249 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retrodisasm

CI Codecov Release Go Reference License LLM assisted: human reviewed

A tracing disassembler for retro systems that generates bit-perfect, reassemblable assembly source.

Features

  • Execution-flow tracing - Differentiates code from data through program-flow analysis
  • Bit-perfect reassembly - Generated assembly reassembles to the exact same binary
  • Readable output - Omits trailing zero bytes and replaces known RAM addresses with descriptive aliases
  • Multiple systems - Supports NES and CHIP-8 input with automatic detection
  • Multiple assemblers - Generates source for different assembler toolchains
  • Batch verification - Processes and verifies multiple ROMs in one command
  • Banked output - Writes PRG banks inline or as separate assembly files
  • CHR-ROM export - Extracts graphics data into an included .chr file

Supported Systems

System Architecture Guide
CHIP-8 CHIP-8 VM CHIP-8 guide
NES 6502 NES guide

Quick Start

Installation

Download a binary for Linux, macOS, or Windows from Releases, or install from source with Go 1.25 or newer:

go install github.com/retroenv/retrodisasm@latest

Basic Usage

The tool auto-detects the system from file extensions (.nes, .ch8, .rom):

retrodisasm -o output.asm input.nes      # NES ROM
retrodisasm -o output.asm input.ch8      # CHIP-8 ROM

Reassemble and compare NES output with the original ROM:

retrodisasm -verify input.nes

Process and verify a collection of ROMs:

retrodisasm -verify -batch "roms/*.nes"

Export CHR-ROM to a separate file referenced by the generated assembly:

retrodisasm -chr -o output.asm input.nes

Apply shared game annotations for names, comments and code/data hints:

retrodisasm -annotations game.ini -o output.asm input.nes

See the annotation guide for the file format and browse community-maintained profiles in disasmdb.

Example output (NES):

Reset:
  sei                            ; $8000 78
  cld                            ; $8001 D8
  lda #$10                       ; $8002 A9 10
  sta PPU_CTRL                   ; $8004 8D 00 20
...

See the command-line reference for all options. Reassembly and automatic verification require the toolchain for the selected output format; see the assembler setup guide for compatibility and installation instructions.

About

A tracing disassembler for retro systems written in Golang

Topics

Resources

Stars

35 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages