1984 · Adventure International for Commodore

The Incredible Hulk

This minisite was contributed by air. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/the-incredible-hulk with me to Gold.

A password for winning, four saved games shipped on the disk with two of them sharing one file, and a test card among the pictures that no item can show.

01 · The end

Winning gives a password that this game never asks for

With all seventeen gems in the fuzzy area, SCORE typed there brings the Chief Examiner, who gives a word to keep.

The Chief Examiner at his desk; the text reads: Chief Examiner appears and says: Save this password: ARIA
In the emulator, after SCORE in the fuzzy area with the gems put there. The room was set by a poke, so the text above SCORE is still the first room's.

The actions read by the page from the database in the listing. The game prints the password's quotation marks as hyphens, because its printing routine ($66A5) turns every " into -.

SCORE is action 202, and six more actions, each going on into the next, make it one long rule. Action 202 is written to swap the player's room with saved room 0, which holds the fuzzy area, so that "is here" would mean "is in the fuzzy area". It also sets the counter, a number the actions can test, to 4. Actions 203 to 206 test the gems in groups of five, four, four and four. Each takes one from the counter only when the one before it did. If the counter reaches 0, action 207 prints message 84, pauses twice and shows picture 87, the Chief Examiner at his desk with the gems in front of him. Action 208 swaps back, puts the counter back, describes the room and gives the score, which ends the game when every treasure is in the fuzzy area. The manual says nothing of a password, and nothing in the game asks for one.

The swap never happens. Command 80 ($56A6) puts the saved room in, saves the player's room, and then jumps to the routine that sets the room ($5754) with the player's room still in hand, so the player stays put and "is here" keeps meaning the room they stand in. SCORE typed anywhere but the fuzzy area still wins the game when the gems are there, since the score itself counts that room, but the Chief Examiner never comes. Leave all seventeen gems in another room and type SCORE there, and he comes and gives the password, while the score says 0 treasures are stored.

02 · Saved games

Secret: the disk came with four saved games

Each save area, A to D, is a file on the game's own disk, and Commodore's disk shipped with all four full. Choose one to see the room it restores.

Drawn by the page from each saved game's room and item places, with the same room drawing as the Rooms tab, which test_pictures.js holds to the game's own. Each file is 574 bytes of the game's state, $1C00-$1E3D, and ends in the database's check byte, 1, which the game tests before it restores one ($6F7A).

A save writes the state to the file @0: and the area's letter, then .S, the letters shifted, so that they show in the directory as Á.Ó to Ä.Ó. Three of the four on the disk are games under way. Areas A and D hold the field with Bruce as the Hulk, carrying the mirror, the chair, a gem and the fan. Area B holds the fuzzy area, the Hulk with one gem. Area C holds the starting position. They are games in progress, saved on the disk before it was copied for sale.

03 · The save areas

Bug: save areas A and D are one save

On Commodore's disk the directory entries for A and D point at the same three blocks, and the disk's map of used blocks lists those blocks as free.

AreaDirectory nameFirst blockBlocksIn the block map
AÁ.Ótrack 32, sector 43free
BÂ.Ótrack 4, sector 203used
CÃ.Ótrack 4, sector 163used
DÄ.Ótrack 32, sector 43free

Read from the 1984 disk's directory and block map with kit/c64/disk.py. Tested in the emulator on fresh copies of the disk: a game saved to area B, and another to area C, each went into track 32 sectors 4, 14 and 6, and afterwards areas A and D both restored it.

A save replaces the area's file with the drive's @0: command. It writes the new file into free blocks, points the directory entry at them and frees the old ones. Since A's and D's blocks are listed as free, the first save made on the disk, to any area, goes into them, and from then on A and D both hold that save. A 1986 release of the game on disk, which adds a menu program, has areas A to C only, each with blocks of its own.

04 · The colours

The last item drawn colours the whole room

Every item's piece carries four colours of its own in its header, and drawing it sets the colours of the whole picture.

Both drawn by the page with its copy of the game's decoder. In the emulator, after the dome was drawn, the screen bytes read $26, the sign's red and blue, and after the cavern $86, the cage's; the pictures alone give $86 and $8E.

The decoder ($7A9A) fills all 800 bytes of the screen's colours and of colour RAM from the header of whatever it draws, a room or an item, because each picture has one set of four colours. The items are drawn after the room, from the first item to the last, so the colours that stay are those of the highest-numbered item with a picture in the room. In the dome that is the sign, item 53, whose first colour is red where the dome's is orange. In the cavern it is the cage, item 47, whose blue replaces the light blue of the cavern's own picture. Of the six rooms with pieces at the start, only the dome and the cavern change colour.

05 · The test card

Secret: a test card no item can show

The last piece on the disk, B01250R, is bars of colour, numbered 250.

Drawn by the page from the file on the disk.

A piece's number is an item's, and the items run from 0 to 54. The table of pieces drawn differently in some rooms ($7A0E) adds only 13, 70 and 72. Nothing in the program asks for 250, so the game never loads this file. It shows three of its colours as bars on a ground of the fourth, a picture for checking colours. The colour test the game shows at the start has bars of red, yellow, blue and green.

06 · The demonstration

Secret: D starts a game that plays itself

The question before the game starts reads "Do you want to restore a previously saved game? (Yes, No, Demo)", and D is an answer the manual leaves out.

The script, read by the page from $7DAD, one typed line to a row. Each * is a pause. In the emulator, D started the game again from the colour test and typed these lines into the parser a character at a time.

With D, the line reader ($679E) takes its keys from this script instead of the keyboard ($7D64), with a wait of 5,000 counts before each one. The pause at the end of a page waits about a second instead of for a key. A real key pressed during the demonstration ends it and starts the game again. The script tries a few commands in the chair, looks round the dome, reads the sign, and takes the gem, the mirror, the fan, the chair and the ring. Then it walks east and out, reads the sign there and quits. A zero at its end sends it back to the start.

07 · The exit

Secret: a character that leaves the game for BASIC

The line reader checks every key against character $FF ($6844). On that one it turns the picture off and waits for raster line 128. Then it switches its own interrupt off, puts back the one of the KERNAL, the C64's built-in operating system, and runs a BRK instruction, which on a C64 ends at BASIC's READY. The C64's keyboard never produces $FF, so a player cannot reach it. It looks like a way out for the programmer while testing. In the emulator, $FF put straight into the keyboard queue at the prompt gave a cleared screen and READY.

08 · Waiting

V gives the automatic actions two turns

V is a command the manual does not list. It returns from the parser with the verb still 0 ($6D72), and the main loop runs the actions for verb 0, which are the automatic ones. Then the turn ends and runs them again, as every turn does. So each automatic action, with its chance in a hundred, gets two tries for one V. In the emulator, with counting checkpoints, one V ran the action table ($5B06) twice.

09 · The parser

A one-letter move ignores the rest of the line

N, S, E, W, U and D are moves on their own, and the parser ($6D7A) returns as soon as it finds the letter, before it looks at a second word. So E XYZZY walks east, where GO EAST XYZZY gets "Use 1 or 2 words only!" and GO XYZZY gets "Don't know what -XYZZY- is." In the emulator, E XYZZY in the dome went into the tunnel. The How it works tab has the parser to type into.

10 · Leftovers

Pieces of the source code inside the program

Two stretches of the program hold the remains of the assembler's own files, saved into memory with the program. The assembler is the tool that turned the programmer's source code into the program.

Read by the page from the listing's bytes, with bit 7 cleared and line ends shown as |.

At $5A11 are lines of the source that build the table of jumps at $5400, each with its line number counting in tens from 1860. At $7A1B is part of the symbol table: GREADK0, SCRN, VICINIT and SETIRQ, the last two five bytes before the routines that set up the video chip and the interrupt in this program ($661C, $6B23), so they come from an earlier assembly. The names in capitals that the program's routines carry on the Source code tab, such as SETHLI, PUTZ and READK, are from these pieces. The program also holds "ADVENTURE over!" ($5805), which nothing prints: QUIT ends with "Now Hit-Y".