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 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.

atits name in the listingentered bytimeswhat it is, and the evidence
$C9D2 (bank 7)b7_bank_C9D2a call529,567
The bank switch: writes 2,646,883, in the blank 548,326, while drawing 2,098,557
$8605 (bank 3)b3_sound_8605a call342,785
The sound driver: frames it ran in 95,798, writes 135,084
$CA0F (bank 7)b7_sprites_CA0Fa call231,173
The sprite writers: frames it ran in 55,863, writes to the sprite page 5,029,996
$C024 (bank 7)b7_poll_C024a call208,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_C072a call109,816
The jump engine: tables 2, jumps through them 109,816
$C364 (bank 7)b7_nmieach frame (NMI)103,798
The scroll writer: frames it ran in 103,798, writes in the blank 206,587
$C3FC (bank 7)b7_drain_C3FCa call103,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_C968a call103,575
The bank switch: writes 1,033,532, in the blank 1,033,532, while drawing 0
$C0CC (bank 7)b7_sprites_C0CCa call55,854
The sprite writers: frames it ran in 55,854, writes to the sprite page 2,636,250
$C168 (bank 7)b7_bank_C168a call30,428
The bank switch: writes 151,954, in the blank 0, while drawing 151,954
$C0C7 (bank 7)b7_sprites_C0C7a call978
The sprite writers: frames it ran in 837, writes to the sprite page 62,592
$C9BE (bank 7)b7_bank_C9BEa call820
The bank switch: writes 4,100, in the blank 1,105, while drawing 2,995
$FFF3 (bank 7)b7_irqan 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_C34Ea call2
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 call826,082
$9C9A (bank 6)a call721,396
$856F (bank 3)a call342,854
$C046 (bank 7)a call208,556
$9A70 (bank 6)a call109,786
$9AB2 (bank 6)a call108,658
$C053 (bank 7)a call103,575
$C9E8 (bank 7)a call103,575
$E0A8 (bank 7)a call103,575
$8000 (bank 3)a call103,570
$C000 (bank 7)a call101,868
$8510 (bank 6)a table100,468
$D1C3 (bank 7)a call97,786
$D29F (bank 7)a call35,723
$DD69 (bank 7)a call35,215
$9C0A (bank 6)a call30,428
$CA86 (bank 7)a call30,428
$8000 (bank 6)a call30,409
$84AF (bank 6)a call30,409
$E840 (bank 7)a call30,409
$EB45 (bank 7)a call30,409
$9AE9 (bank 6)a call29,947
$A857 (bank 5)a call23,867
$A8E8 (bank 5)a call14,722
$A974 (bank 5)a call14,722
$88DC (bank 6)a table8,190
$A87A (bank 5)a call6,474
$DEC0 (bank 7)a call5,268
$DEE1 (bank 7)a call5,268
$DF0F (bank 7)a call5,268
$DFAE (bank 7)a call5,126
$E04A (bank 7)a call5,126
$8891 (bank 3)a call3,468
$991E (bank 6)a call3,328
$9988 (bank 6)a call3,328
$A8C1 (bank 5)a call2,623
$A900 (bank 5)a call2,623
$A92F (bank 5)a call1,903
$A947 (bank 5)a call1,903
$862B (bank 6)a table1,128
$9ADD (bank 6)a call1,128
$C088 (bank 7)a call938
$80C8 (bank 3)a call803
$C091 (bank 7)a call769
$C3C5 (bank 7)a call694
$80F3 (bank 3)a call677
$C144 (bank 7)a call462
$E871 (bank 7)a call438
$C379 (bank 7)a call265
$E32F (bank 7)a call234
$8009 (bank 5)a call223
$C13F (bank 7)a call223
$B63A (bank 6)a call207
$C09A (bank 7)a call159
$C106 (bank 7)a call159
$8003 (bank 4)a call153
$D23A (bank 7)a call152
$E12D (bank 7)a call152
$DF5F (bank 7)a call142
$DFFD (bank 7)a call142
$8527 (bank 3)a call58
$CF5C (bank 7)a call30
$CF74 (bank 7)a table28
$E17B (bank 7)a call26
$E307 (bank 7)a call19
$8006 (bank 4)a call6
$8049 (bank 3)a call2
$D114 (bank 7)a table2

Where it waits

Loops a rule named that sit inside a routine and are not themselves a place the code is entered.

atits name in the listingwhat 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.

atreachedentriestakenchosen by the byte at
$84C5 (bank 6)after a call323$0012, $030E, $031E, $032E
$CF62 (bank 7)after a call72$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.

004080C0$0000$0100$0200$0300$0400$0500$0600$0700
The console's 2,048 bytes of memory, one row for each 256. A tick under a row is one of the 24 busiest shared bytes. The second row is the page the processor keeps its stack in. Reaches through an index that belong to no table are not drawn: the loops that clear memory reach nearly every byte.

Reaches through an index: those that hold positions, then the longest

frombytes reachedinstructionspositions it holds
$030025617
$02002566
$070025518
$00002401
$04001283
$030F11310
$03091137
$030A1137
$030B1137
$030C1137
$030E1133
$0308976

The 24 busiest shared bytes

bytereads and writesroutines writingroutines reading
$00107,459,52666
$00F56,834,96246
$00115,981,49666
$00205,213,26822
$00215,212,15022
$00124,466,57466
$00133,163,03866
$00EF2,326,24852
$001B1,547,60062
$00161,537,20162
$00171,423,08761
$00ED1,413,83236
$00CF1,356,28155
$00001,311,20666
$00011,055,27466
$0015885,32866
$00C8791,84134
$0087582,44953
$0014549,91264
$0084536,54843
$0089517,82332
$0030327,32733
$04FB301,76636
$04F9297,51936

This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.

All the games