Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 1.23 KB

README.md

File metadata and controls

18 lines (11 loc) · 1.23 KB

Disassembler for CHIP-8 roms

A CHIP-8 disassembler written in Zig.

The produced assembly code format is taken from Cowgod's Chip-8 Technical Reference.

This project is purely educational and allowed me to learn more about Zig and emulation.

Algorithm

CHIP-8 executables don't have any metadata associated and hence don't have data and code sections clearly separated within the executable. So me must first decide if each two-bytes datum is an instruction or data blob. We do this traversing the control flow graph of the ROM by branching on jump and call instructions. Everything that is not reached during this traversal is considered to be data.

Sources