01 · source code
Secret: the first load still holds a page of the programmer’s source code
Source code is what a programmer types: instructions in words, with names for everything and notes to themselves. A program called an assembler turns it into the numbers the C64 runs. Games almost never ship with any of it. Hammerfist’s first load does. Inside it sit 478 characters of plain text: the middle of a source file, cut off in mid-word.
The text is not left over from some other program. Its 22 lines assemble to the very bytes at $158A, the routine that gets the next picture of each of the eight sprites ready, the movable pictures the video chip draws over the scenery. Line for line, the two match below.
| The source text at $1200 | The game’s code at $158A |
|---|
| MULTISETUP | LDX #$07 | ;Repeat for all sprites | $158A | A2 07 | LDX #$07 |
| !1 | LDA S.SWAPNOW,X | ;Is it time for new values for that sprite | $158C | BD 50 03 | LDA $0350,X |
| BEQ !3 | | $158F | F0 55 | BEQ $15E6 |
| LDA S.XPOS,X | | $1591 | BD 00 03 | LDA $0300,X |
| STA CS.XPOS,X | | $1594 | 9D 58 03 | STA $0358,X |
| LDA S.XPOSMSB,X | | $1597 | BD 08 03 | LDA $0308,X |
| STA CS.XPOSMSB,X | | $159A | 9D 60 03 | STA $0360,X |
| LDA S.YPOS,X | | $159D | BD 10 03 | LDA $0310,X |
| STA CS.YPOS,X | | $15A0 | 9D 68 03 | STA $0368,X |
| LDA S.COLR,X | | $15A3 | BD 18 03 | LDA $0318,X |
| STA CS.COLR,X | | $15A6 | 9D 70 03 | STA $0370,X |
| LDA S.DEFNUM,X | | $15A9 | BD 20 03 | LDA $0320,X |
| STA CS.DEFNUM,X | | $15AC | 9D 78 03 | STA $0378,X |
| LDA S.DEFNUM2,X | | $15AF | BD 28 03 | LDA $0328,X |
| STA CS.DEFNUM2,X | | $15B2 | 9D 80 03 | STA $0380,X |
| LDA S.PRIOR,X | | $15B5 | BD 30 03 | LDA $0330,X |
| STA CS.PRIOR,X | | $15B8 | 9D 88 03 | STA $0388,X |
| LDA S.MUX,X | | $15BB | BD 40 03 | LDA $0340,X |
| STA CS.MUX,X | | $15BE | 9D 90 03 | STA $0390,X |
| LDA S.SAMEDATA,X | ;Use same data so don't swap bank yet | $15C1 | BD 48 03 | LDA $0348,X |
| BNE !10 | | $15C4 | D0 09 | BNE $15CF |
| LDA #BANKNUMBER | ;Swap bank s | $15C6 | A9 14 | LDA #$14 |
So the page tells us the programmer’s own names for things. MULTISETUP is the routine. A name starting with S. holds a sprite’s next values, waiting to be shown: S.XPOS is its next position across the screen, S.COLR its colour, S.DEFNUM its picture. CS.XPOS and the other CS. names hold the values on screen now. BANKNUMBER is 20. The note “Use same data so don’t swap bank yet” explains a test that a listing alone could only describe.
The text ended up there because nothing cleared that stretch of memory before the game was saved, and the game only uses it later, for things that change during play. Each line ends with a carriage return and a line feed, the pair a PC uses in its text files, so the source was probably typed on a PC and not on a C64.
The text runs from $1200 to $13DD. The game first uses that memory once play starts, for what it remembers about rooms and enemies.
03 · unused music
Secret: the loading disk carries three tunes that nothing plays
The first disk side holds a music routine with seven tunes. While the game loads, it plays tune 4 behind the loading picture. Tunes 1, 6, and 7 are the title tune, the in-play tune and the area-complete jingle, the same three that the game carries in its own loads. Tunes 2, 3, and 5 are heard nowhere: the game’s own loads hold no copy of them, and the loading screen plays only tune 4. They are Wally Beben’s, written in the same style, and they play here from the disk’s own bytes.
Sound effects have spares too. Four of the game’s eighteen effects, numbers 3, 5, 12, and 17, are never asked for by any of the four loads, and number 17 makes no sound at all. They play with the others on How it works.
Each button runs the loading disk’s own music routine at $EC4F. Tunes 1, 6, and 7 write the same notes to the sound chip as the game’s copies, frame for frame.
04 · room shortcut
Secret: typing YCY into the high-score table turns F3 into a room skip
The manual says F3 selects “no weapon”, the plain punch. Straight after that bit of code, the game keeps a second one that moves you on to the next doorway of the area. A single instruction skips past it. Typing the right initials into the high-score table rewrites that instruction, so the shortcut runs.
- Score enough to reach the high-score table. The lowest entry starts at 2,000.
- Enter your initials as:
YCY
- Start the next game. Each press of F3 now puts you at the next doorway entrance in the area’s list, without walking there. Keep pressing to go round them all.
The change is to the code in memory, so it lasts through further game overs. Each load brings a fresh copy of the code from disk, so the shortcut is gone once the next area loads. Every load has its own copy of the check, though, so a new high score with YCY turns it on again.
The initials check is at $8325. It changes the byte at $98C1 from $F0, “branch if equal”, which skips the shortcut, to $D0, “branch if not equal”, which lets it run. The shortcut itself is at $98C3.
05 · safe final charge
Secret: in the very last room, overcharging a body is safe
A recharge point adds two energy points a step, up to 224. One step more and the body explodes: its energy drops to zero and the game swaps you to the other body. Every step also costs two points of score. The last room of the game is different. There, a charge past the top leaves the body full at 224, swaps you over without an explosion, and costs nothing.
Any other room
The last room
The last room is room 7 of the fourth load. Its test is at $913C and $9162; the other loads’ recharge step is at $9159.