1990 · Ocean

Darkman

This minisite awaits a maintainer’s check. A model this site has not proven yet worked on it (claude-sonnet-5-5), so a maintainer will measure its listing on one it has (how the check works).

Secrets and faults found in the code of the game, each with the evidence beside it.

01 · Secret

Secret: typing BABY AXE MAN on the title pages lets the space bar skip a level

The title pages check every key press against a list of keys that spells BABY AXE MAN (cheat_check, $1385, which reads the list at $1376 and is called by the title interrupt every frame). A wrong key starts the list again, a right one moves on, and the twelfth right key flips the flag at $0A11. Typing the words a second time flips it back.

With the flag set, the space bar ends the level: $1A0C sets the end-of-play flag when the key code is $20, and the main loop at $179E leaves for the end-of-level code. The flag also takes away game over. The loop goes to the game-over code only when the energy in $43E3 and the flag are both zero, so with the flag set, Darkman keeps playing at no energy. Levels 3 to 6 test the same flag, and the space bar ends them too.

EvidenceWhat was seen
Typed live, on the title pagesAfter each of the twelve keys the list index at $1383 went 1, 2, 3 up to 11, and then back to 0 while $0A11 went from 0 to 1.
Space in play, flag clearThe key code $20 was read and nothing happened.
Space in play, flag setPlay ended and the game went back to the title loop at $0EEF.
Game over with the flag setTraced in the loop at $179E; not tried with energy at zero.

02 · Bug

Bug: starting a sound effect writes stray zeros into the sound chip

For every voice an effect uses, the effect starter play_sound ($B0EE) writes a zero to one of the sound chip's control registers. It finds the register's offset in the three bytes at $B8B4, 00, 07, and 0E, but indexes them with four times the effect number plus the voice, where the voice alone would be right. Effect 0 reads the table by luck and gets the right offset. Every other effect reads bytes that follow the table, and the zero goes wherever that byte points. The chip repeats its registers every 32 bytes, so a stray write at $D464 clears the control register of voice 1, and one at $D477 clears the filter's resonance and voice routing.

The Music tab lists the address each effect writes to. Its player runs the game's own driver on the kit's 6502 simulator, and 18,547 writes over 400 frames of each effect match the page's player register for register, so the stray writes are in the player's output too. Press the effects there to see them.

03 · Secret

Secret: the game holds a fourth tune and an eleventh effect that no level asks for

Level 1's title code starts a tune by calling tune_start ($A164) with X set to six times the tune number. The title pages play tune 3, or tune 1 after a new high score, and the briefing text plays tune 0. Nothing in the game loads X with 12, so tune 2 never starts. It is the only one of the four that ends instead of looping. In the same way, effect 10 plays one note and starts it again every 255 frames, so it never ends, and no level asks for it. Both are on the Music tab, where a button starts each.