Hole in One is a 16 KB HAL Laboratory cartridge from 1984, mapped into page 2 (0x8000-0xBFFF), with no bank switching.
The AB header at 0x8000 puts INIT at 0x8028 and, on top of that, STATEMENT at 0x8010. The second is the hook the BIOS calls when the BASIC interpreter meets a statement it does not recognise, and here it compares the four bytes of the incoming command against the text GOLF, stored right between the two hooks, at 0x8024.
So the cartridge registers a command: from BASIC you type GOLF and the game starts without having to power-cycle the machine.
The first thing INIT does is check row 7 of the keyboard with SNSMAT. If that key is down it returns without initialising anything, and the machine stays in BASIC with the GOLF command already registered.
SCREEN 2 set up by the BIOS with INIGRP, with the tables where they usually go: patterns at 0x0000, names at 0x1800, sprite attributes at 0x1B00, colour at 0x2000 and sprite patterns at 0x3800. The eight VDP registers read off the emulator confirm it: 02 E2 06 FF 03 36 07 01.
The game hooks its own routine into H.TIMI, writing a jp into 0xFD9F by hand, and from there it flags each new frame and steps the sound along.
| bytes | ||
|---|---|---|
| traced code | 6,065 | 37.02 % |
| identified data | 10,319 | 62.98 % |
| unexplained | 0 | 0.00 % |