Fester's Quest (USA)
Fester's Quest (USA) is on a MMC1 board with 131,072 bytes of program. A crawl of 8,000 steps from power-on kept 221 paths that found new code. Played back over 314,881 frames, they executed 13,207 bytes of it, 10 percent.
What the rules named
- The poll: 2
- The wait for the frame: 5
- The jump engine: 1
- The bank switch: 5
- The picture writer: 1
- The palette writers: 1
- The sprite writers: 4
- The scroll writer: 1
- The sound driver: 1
The 82 routines the runs entered
Every place the game's code was entered, by a call, an interrupt or a jump through a table. The ones a rule named come first, with what the rule saw, and their names in the listing say what they are: a poll, an engine, a drain.
| at | its name in the listing | entered by | times | what it is, and the evidence |
|---|---|---|---|---|
| $C9D2 (bank 7) | b7_bank_C9D2 | a call | 529,567 | The bank switch: writes 2,646,883, in the blank 548,326, while drawing 2,098,557 |
| $8605 (bank 3) | b3_sound_8605 | a call | 342,785 | The sound driver: frames it ran in 95,798, writes 135,084 |
| $CA0F (bank 7) | b7_sprites_CA0F | a call | 231,173 | The sprite writers: frames it ran in 55,863, writes to the sprite page 5,029,996 |
| $C024 (bank 7) | b7_poll_C024 | a call | 208,560 | The poll: port $4016, reads a frame 16, strobes a frame 4 The poll: port $4017, reads a frame 16, strobes a frame 4 |
| $C072 (bank 7) | b7_engine_C072 | a call | 109,816 | The jump engine: tables 2, jumps through them 109,816 |
| $C364 (bank 7) | b7_nmi | each frame (NMI) | 103,798 | The scroll writer: frames it ran in 103,798, writes in the blank 206,587 |
| $C3FC (bank 7) | b7_drain_C3FC | a call | 103,575 | The palette writers: frames it ran in 103,575, writes 1,333,017 The picture writer: frames it ran in 103,575, writes 1,333,017, in the blank 1,333,017, while drawing 0 |
| $C968 (bank 7) | b7_bank_C968 | a call | 103,575 | The bank switch: writes 1,033,532, in the blank 1,033,532, while drawing 0 |
| $C0CC (bank 7) | b7_sprites_C0CC | a call | 55,854 | The sprite writers: frames it ran in 55,854, writes to the sprite page 2,636,250 |
| $C168 (bank 7) | b7_bank_C168 | a call | 30,428 | The bank switch: writes 151,954, in the blank 0, while drawing 151,954 |
| $C0C7 (bank 7) | b7_sprites_C0C7 | a call | 978 | The sprite writers: frames it ran in 837, writes to the sprite page 62,592 |
| $C9BE (bank 7) | b7_bank_C9BE | a call | 820 | The bank switch: writes 4,100, in the blank 1,105, while drawing 2,995 |
| $FFF3 (bank 7) | b7_irq | an interrupt (IRQ) | 221 | The bank switch: writes 442, in the blank 442, while drawing 0 The sprite writers: frames it ran in 31,752, writes to the sprite page 56,576 |
| $C34E (bank 7) | b7_wait_C34E | a call | 2 | The wait for the frame: waits on the byte at $00F5, times entered 2, turns 36, calls on each turn 1, writes of it under the frame interrupt 3,647,761, frames in all 104,461 |
| $81A3 (bank 3) | a call | 826,082 | ||
| $9C9A (bank 6) | a call | 721,396 | ||
| $856F (bank 3) | a call | 342,854 | ||
| $C046 (bank 7) | a call | 208,556 | ||
| $9A70 (bank 6) | a call | 109,786 | ||
| $9AB2 (bank 6) | a call | 108,658 | ||
| $C053 (bank 7) | a call | 103,575 | ||
| $C9E8 (bank 7) | a call | 103,575 | ||
| $E0A8 (bank 7) | a call | 103,575 | ||
| $8000 (bank 3) | a call | 103,570 | ||
| $C000 (bank 7) | a call | 101,868 | ||
| $8510 (bank 6) | a table | 100,468 | ||
| $D1C3 (bank 7) | a call | 97,786 | ||
| $D29F (bank 7) | a call | 35,723 | ||
| $DD69 (bank 7) | a call | 35,215 | ||
| $9C0A (bank 6) | a call | 30,428 | ||
| $CA86 (bank 7) | a call | 30,428 | ||
| $8000 (bank 6) | a call | 30,409 | ||
| $84AF (bank 6) | a call | 30,409 | ||
| $E840 (bank 7) | a call | 30,409 | ||
| $EB45 (bank 7) | a call | 30,409 | ||
| $9AE9 (bank 6) | a call | 29,947 | ||
| $A857 (bank 5) | a call | 23,867 | ||
| $A8E8 (bank 5) | a call | 14,722 | ||
| $A974 (bank 5) | a call | 14,722 | ||
| $88DC (bank 6) | a table | 8,190 | ||
| $A87A (bank 5) | a call | 6,474 | ||
| $DEC0 (bank 7) | a call | 5,268 | ||
| $DEE1 (bank 7) | a call | 5,268 | ||
| $DF0F (bank 7) | a call | 5,268 | ||
| $DFAE (bank 7) | a call | 5,126 | ||
| $E04A (bank 7) | a call | 5,126 | ||
| $8891 (bank 3) | a call | 3,468 | ||
| $991E (bank 6) | a call | 3,328 | ||
| $9988 (bank 6) | a call | 3,328 | ||
| $A8C1 (bank 5) | a call | 2,623 | ||
| $A900 (bank 5) | a call | 2,623 | ||
| $A92F (bank 5) | a call | 1,903 | ||
| $A947 (bank 5) | a call | 1,903 | ||
| $862B (bank 6) | a table | 1,128 | ||
| $9ADD (bank 6) | a call | 1,128 | ||
| $C088 (bank 7) | a call | 938 | ||
| $80C8 (bank 3) | a call | 803 | ||
| $C091 (bank 7) | a call | 769 | ||
| $C3C5 (bank 7) | a call | 694 | ||
| $80F3 (bank 3) | a call | 677 | ||
| $C144 (bank 7) | a call | 462 | ||
| $E871 (bank 7) | a call | 438 | ||
| $C379 (bank 7) | a call | 265 | ||
| $E32F (bank 7) | a call | 234 | ||
| $8009 (bank 5) | a call | 223 | ||
| $C13F (bank 7) | a call | 223 | ||
| $B63A (bank 6) | a call | 207 | ||
| $C09A (bank 7) | a call | 159 | ||
| $C106 (bank 7) | a call | 159 | ||
| $8003 (bank 4) | a call | 153 | ||
| $D23A (bank 7) | a call | 152 | ||
| $E12D (bank 7) | a call | 152 | ||
| $DF5F (bank 7) | a call | 142 | ||
| $DFFD (bank 7) | a call | 142 | ||
| $8527 (bank 3) | a call | 58 | ||
| $CF5C (bank 7) | a call | 30 | ||
| $CF74 (bank 7) | a table | 28 | ||
| $E17B (bank 7) | a call | 26 | ||
| $E307 (bank 7) | a call | 19 | ||
| $8006 (bank 4) | a call | 6 | ||
| $8049 (bank 3) | a call | 2 | ||
| $D114 (bank 7) | a table | 2 |
Where it waits
Loops a rule named that sit inside a routine and are not themselves a place the code is entered.
| at | its name in the listing | what it is, and the evidence |
|---|---|---|
| $A800 (bank 4) | b4_wait_A800 | The wait for the frame: waits on the byte at $00F5, times entered 256, turns 745, calls on each turn 1, writes of it under the frame interrupt 3,647,761, frames in all 104,461 |
| $A825 (bank 5) | b5_wait_A825 | The wait for the frame: waits on the byte at $00ED, times entered 956, turns 952, calls on each turn 9, writes of it under the frame interrupt 206,611, frames in all 104,461 |
| $B6B2 (bank 6) | b6_wait_B6B2 | The wait for the frame: waits on the byte at $0080, times entered 4, turns 1,024, calls on each turn 1, writes of it under the frame interrupt 1,813, frames in all 104,461 |
| $C004 (bank 7) | b7_wait_C004 | The wait for the frame: waits on the byte at $00F0, times entered 103,499, turns 382,776,872, writes of it under the frame interrupt 103,319, frames in all 104,461 |
The tables it jumps through
A table of addresses the game picks one from. Some sit right after a call to a jump engine; others are anywhere in the cartridge, and we find them by where the address the game jumped through was loaded from. Some games jump by pushing an address and returning to it, and some keep a table as two, the low bytes of its addresses in one place and the high bytes in another; both are found the same way. An entry is counted as far as the runs saw one taken; the true table may be longer. The last column is the byte of memory whose value picked the entry, where we could follow it: the game's mode, or what one of its objects is doing.
| at | reached | entries | taken | chosen by the byte at |
|---|---|---|---|---|
| $84C5 (bank 6) | after a call | 32 | 3 | $0012, $030E, $031E, $032E |
| $CF62 (bank 7) | after a call | 7 | 2 | $04EB |
The memory its routines share
390 bytes of memory were written by one routine and read by another, and 49 places were reached through an index, which is what a table or a set of object slots in memory looks like.
Reaches through an index: those that hold positions, then the longest
| from | bytes reached | instructions | positions it holds |
|---|---|---|---|
| $0300 | 256 | 17 | |
| $0200 | 256 | 6 | |
| $0700 | 255 | 18 | |
| $0000 | 240 | 1 | |
| $0400 | 128 | 3 | |
| $030F | 113 | 10 | |
| $0309 | 113 | 7 | |
| $030A | 113 | 7 | |
| $030B | 113 | 7 | |
| $030C | 113 | 7 | |
| $030E | 113 | 3 | |
| $0308 | 97 | 6 |
The 24 busiest shared bytes
| byte | reads and writes | routines writing | routines reading |
|---|---|---|---|
| $0010 | 7,459,526 | 6 | 6 |
| $00F5 | 6,834,962 | 4 | 6 |
| $0011 | 5,981,496 | 6 | 6 |
| $0020 | 5,213,268 | 2 | 2 |
| $0021 | 5,212,150 | 2 | 2 |
| $0012 | 4,466,574 | 6 | 6 |
| $0013 | 3,163,038 | 6 | 6 |
| $00EF | 2,326,248 | 5 | 2 |
| $001B | 1,547,600 | 6 | 2 |
| $0016 | 1,537,201 | 6 | 2 |
| $0017 | 1,423,087 | 6 | 1 |
| $00ED | 1,413,832 | 3 | 6 |
| $00CF | 1,356,281 | 5 | 5 |
| $0000 | 1,311,206 | 6 | 6 |
| $0001 | 1,055,274 | 6 | 6 |
| $0015 | 885,328 | 6 | 6 |
| $00C8 | 791,841 | 3 | 4 |
| $0087 | 582,449 | 5 | 3 |
| $0014 | 549,912 | 6 | 4 |
| $0084 | 536,548 | 4 | 3 |
| $0089 | 517,823 | 3 | 2 |
| $0030 | 327,327 | 3 | 3 |
| $04FB | 301,766 | 3 | 6 |
| $04F9 | 297,519 | 3 | 6 |
This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.