Getting started

All you need to reproduce this disassembly is Python 3, GNU make and Pasmo. The cartridge image does not travel in this repository: bring your own.

penguinadventure.rom    131,072 bytes
sha256                  525608aa990e1a19285edc98dec3f0aa11339d8a17641c89df3966845d10cc6a

With that file at the root of the repository:

make            # listing, verification, consistency and tests

What each step does

targetwhat it does
make listadogenerates the sixteen .asm files from the binary, the notes and the seeds
make verifyreassembles each bank and the whole ROM, and compares the sha256
make sanitychecks that not one byte is left unassigned to code or data
make testthe 30 tests
make densidadhow many instructions carry a comment, bank by bank
make cifrasrewrites the numbers in both READMEs by counting over the tree
make imagenesdraws the 35 PNGs from the ROM
make webgenerates the HTML pages and checks the links

make verify is the one that decides. It must print OK: reproducible byte a byte seventeen times: once for each of the sixteen banks and once for the whole ROM. If one fails, the listing is lying.

Where everything is

Why the notes live outside the listing

Because the listing is regenerated whole every time. If the comments lived inside the .asm, any change to the tracing would lose them. Living in the .notes, anchored to their address, they survive the listing being rebuilt.

And out of that comes a check that is not cosmetic: tools/valida_c.py verifies that every comment lands on the first byte of an instruction. One anchored mid-instruction never appears in the listing, and nobody notices it was lost.