Getting started

A commented disassembly of Hole in One, the golf game HAL Laboratory released for the MSX in 1984: a 16 KB cartridge mapped into page 2 (0x8000-0xBFFF). It reassembles into the exact ROM, byte for byte, and every one of its 16,384 bytes is accounted for.

The cartridge is not here

No repository distributes the game. Put your own dump in the root as holeinone.rom, 16384 bytes, sha256

14311cc241c53b6ebbf3b0d18101405a5584a259ab0fa265391abe2b791b9eab

make comprueba checks it.

Nor is the tape

The three extra courses come from the Hole In One Extension Course tape (HAL, 1985), which is not distributed either. Put your two sides in the root as extension-course-a.cas and extension-course-b.cas, sha256

A  14ddc079e3bf4c6acf6fb55d0583ccc271de792fe2cab0ccb88d8bd9fbd0224f
B  1e69119111e290d309f16ab6186c32942ead098f32117b94edc8fccf3a46facf

tests/test_cinta.py checks them, and make web redraws the three courses from them. Without the tape those tests fail on purpose: a test that skips checks nothing.

What each command does

make            traces the flow, builds the listing, reassembles it and runs the tests
make verify     the test that decides: reassembling must give the ROM back
make sanity     that not one byte is left unexplained, and no data comes out as code
make densidad   how much is commented, routine by routine
make web        rebuilds this site, drawing the images from the ROM

How it is put together

The listing is not edited by hand: tools/mkasm.py builds it from a flow trace and a file of notes anchored to addresses, so the comments survive a re-trace. The tracer follows the flow from the entry points; the ones it cannot work out by itself - the interrupt hook and the BASIC command hook - are declared in src/holeinone.entries, each with its reason.

The images are not captures either: tools/graficos.py draws them by running in Python the same decompressors and the same script interpreter the Z80 runs. If a range or a format were wrong, noise would come out instead of the course.