Every keyboard read in the game is OUT ($FD),A and then IN A,($FE) with the
same A, the half-rows to read. OUT (n),A puts A on the top half of the address
bus, so the port is A * 256 + $FD. A 48K ignores it. A 128K takes any port
with bits 15 and 1 clear as its paging port $7FFD, so every A with bit 7 clear
is a paging write. The title tune's key test (
play_tune_until_key) reads with A nought,
which pages the 128's editor ROM in -- harmless, since the game never calls the
ROM. But the menu's test for B (
menu_keys) reads $7F on every pass of the menu,
and so do the pause test (
test_pause_keys) on every pass of play and the keyboard
method's reads of the bottom right half-row; and a joystick's special key
reads $7E. $7F puts RAM bank 7 at $C000, where everything from $C000 up is,
shows the second screen, and locks the paging.
Watched in SkoolKit's 128K machine, the game put in RAM paged as a 128 in 128
mode leaves a machine-code program: the writes to the paging port were
$00 to port $00FD and then $7F to port $7FFD. The menu came up after the first; at the second, on the menu's
first pass, the call
menu_loop makes next, to
random, ran
into bank 7, and the machine ran off into the ROM; no game started. On a 128
the game must be run in 48 mode.
The pokes have
the five OUTs to remove.