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