Zelda II - The Adventure of Link (USA)

Zelda II - The Adventure of Link (USA) is on a MMC1 board with 131,072 bytes of program. A crawl of 400 steps from power-on kept 23 paths that found new code. Played back over 13,103 frames, they executed 3,334 bytes of it, 3 percent.

What the rules named

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

atentered bytimeswhat it is, and the evidence
$D385 (bank 7)a call6,474
The jump engine: tables 6, jumps through them 6,458
$D367 (bank 7)a call4,862
The poll: port $4016, reads a frame 16, strobes a frame 4
The poll: port $4017, reads a frame 16, strobes a frame 4
$FFCC (bank 7)a call2,477
The bank switch: writes 12,385, in the blank 12,090, while drawing 295
$8000 (bank 6)a call2,431
The sound driver: frames it ran in 2,372, writes 4,862
$C032 (bank 7)a call2,431
The bank switch: writes 12,155, in the blank 11,860, while drawing 295
$C07B (bank 7)each frame (NMI)2,431
The scroll writer: frames it ran in 2,431, writes in the blank 9,606
$D2EC (bank 7)a call2,431
The palette writers: frames it ran in 2,431, writes 1,344
The picture writer: frames it ran in 2,431, writes 57,502, in the blank 39,752, while drawing 17,750
$D24C (bank 7)a call1,607
The sprite writers: frames it ran in 1,626, writes to the sprite page 102,848
$B574 (bank 5)a call1,421
The sprite writers: frames it ran in 1,421, writes to the sprite page 5,684
$B596 (bank 5)a call1,421
The sprite writers: frames it ran in 1,421, writes to the sprite page 17,052
$B678 (bank 5)a table852
The sprite writers: frames it ran in 852, writes to the sprite page 36,740
$A8CF (bank 5)a call732
The sprite writers: frames it ran in 751, writes to the sprite page 4,297
$A918 (bank 5)a call732
The sprite writers: frames it ran in 701, writes to the sprite page 3,333
$A8C1 (bank 5)a call23
The sprite writers: frames it ran in 23, writes to the sprite page 5,888
$BF9D (bank 5)a call23
The bank switch: writes 115, in the blank 0, while drawing 115
$BFB1 (bank 5)a call23
The bank switch: writes 115, in the blank 0, while drawing 115
$FF70 (bank 7)power-on23
The bank switch: writes 92, in the blank 92, while drawing 0
$FF9D (bank 7)a call23
The bank switch: writes 115, in the blank 115, while drawing 0
$FFB1 (bank 7)a call23
The bank switch: writes 115, in the blank 115, while drawing 0
$D250 (bank 7)a call19
The sprite writers: frames it ran in 19, writes to the sprite page 1,197
$BAB8 (bank 5)a call12,768
$821B (bank 6)a call2,431
$826A (bank 6)a call2,431
$D346 (bank 7)a call2,431
$A6D9 (bank 5)a call2,428
$D174 (bank 7)a call2,428
$D168 (bank 7)a call2,412
$B8D2 (bank 5)a call1,923
$B22D (bank 5)a table1,565
$B5EA (bank 5)a call1,282
$B623 (bank 5)a call1,282
$B663 (bank 5)a call1,282
$B5B5 (bank 5)a call1,227
$B3CF (bank 5)a table886
$810F (bank 6)a call881
$8116 (bank 6)a call881
$A6F0 (bank 5)a table847
$A737 (bank 5)a table732
$B242 (bank 5)a table679
$B261 (bank 5)a table641
$B502 (bank 5)a call641
$B5D8 (bank 5)a call641
$B603 (bank 5)a call641
$B63C (bank 5)a call641
$B529 (bank 5)a call586
$815A (bank 6)a call369
$8167 (bank 6)a call369
$BA6F (bank 5)a call126
$D261 (bank 7)a call82
$D263 (bank 7)a call82
$D266 (bank 7)a call82
$8147 (bank 6)a call72
$8120 (bank 6)a call69
$AF1F (bank 5)a table69
$818C (bank 6)a call57
$BA40 (bank 5)a call57
$8293 (bank 6)a call42
$B24E (bank 5)a table36
$814F (bank 6)a call29
$A6A0 (bank 5)a call23
$A70F (bank 5)a table23
$A72E (bank 5)a table23
$ADE0 (bank 5)a call23
$AF2B (bank 5)a table23
$AF34 (bank 5)a table23
$B960 (bank 5)a call23
$D281 (bank 7)a call23
$D29C (bank 7)a call23
$B40A (bank 5)a table19
$B412 (bank 5)a table17

Where it waits

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

atwhat it is, and the evidence
$C010 (bank 7)
The wait for the frame: waits on the byte at $0736, times entered 19, turns 3,680,259, writes of it under the frame interrupt 174, frames in all 2,603

The jump engine's tables

Each table sits right after a call to the engine. 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.

atentriestakenchosen by the byte at
$A6DF (bank 5)22$076C
$A705 (bank 5)44$0736
$B236 (bank 5)22$0736
$B248 (bank 5)33$073B
$B3D5 (bank 5)33$073B

The memory its routines share

660 bytes of memory were written by one routine and read by another, and 25 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

frombytes reachedinstructionspositions it holds
$02002562
$03002561
$04002561
$05002561
$06002561
$07002561
$00002242
$02671083
$02D3443
$0302342
$00E0321
$0305301

The 24 busiest shared bytes

bytereads and writesroutines writingroutines reading
$07363,683,82666
$0000328,81966
$0002162,05366
$0001127,99366
$00F5117,06835
$0006115,06453
$000364,39765
$000A51,22442
$000841,30642
$000C19,76946
$000D19,76866
$00FF19,38334
$00F718,66125
$000715,75432
$000B13,09142
$001A9,73344
$00129,61933
$03027,74155
$00EA7,35842
$001D7,08832
$00E95,12033
$03034,33945
$03044,33945
$03054,33945

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

All the games