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 poll: 2
- The wait for the frame: 1
- The jump engine: 1
- The bank switch: 7
- The picture writer: 1
- The palette writers: 1
- The sprite writers: 8
- The scroll writer: 1
- The sound driver: 1
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.
| at | entered by | times | what it is, and the evidence |
|---|---|---|---|
| $D385 (bank 7) | a call | 6,474 | The jump engine: tables 6, jumps through them 6,458 |
| $D367 (bank 7) | a call | 4,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 call | 2,477 | The bank switch: writes 12,385, in the blank 12,090, while drawing 295 |
| $8000 (bank 6) | a call | 2,431 | The sound driver: frames it ran in 2,372, writes 4,862 |
| $C032 (bank 7) | a call | 2,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 call | 2,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 call | 1,607 | The sprite writers: frames it ran in 1,626, writes to the sprite page 102,848 |
| $B574 (bank 5) | a call | 1,421 | The sprite writers: frames it ran in 1,421, writes to the sprite page 5,684 |
| $B596 (bank 5) | a call | 1,421 | The sprite writers: frames it ran in 1,421, writes to the sprite page 17,052 |
| $B678 (bank 5) | a table | 852 | The sprite writers: frames it ran in 852, writes to the sprite page 36,740 |
| $A8CF (bank 5) | a call | 732 | The sprite writers: frames it ran in 751, writes to the sprite page 4,297 |
| $A918 (bank 5) | a call | 732 | The sprite writers: frames it ran in 701, writes to the sprite page 3,333 |
| $A8C1 (bank 5) | a call | 23 | The sprite writers: frames it ran in 23, writes to the sprite page 5,888 |
| $BF9D (bank 5) | a call | 23 | The bank switch: writes 115, in the blank 0, while drawing 115 |
| $BFB1 (bank 5) | a call | 23 | The bank switch: writes 115, in the blank 0, while drawing 115 |
| $FF70 (bank 7) | power-on | 23 | The bank switch: writes 92, in the blank 92, while drawing 0 |
| $FF9D (bank 7) | a call | 23 | The bank switch: writes 115, in the blank 115, while drawing 0 |
| $FFB1 (bank 7) | a call | 23 | The bank switch: writes 115, in the blank 115, while drawing 0 |
| $D250 (bank 7) | a call | 19 | The sprite writers: frames it ran in 19, writes to the sprite page 1,197 |
| $BAB8 (bank 5) | a call | 12,768 | |
| $821B (bank 6) | a call | 2,431 | |
| $826A (bank 6) | a call | 2,431 | |
| $D346 (bank 7) | a call | 2,431 | |
| $A6D9 (bank 5) | a call | 2,428 | |
| $D174 (bank 7) | a call | 2,428 | |
| $D168 (bank 7) | a call | 2,412 | |
| $B8D2 (bank 5) | a call | 1,923 | |
| $B22D (bank 5) | a table | 1,565 | |
| $B5EA (bank 5) | a call | 1,282 | |
| $B623 (bank 5) | a call | 1,282 | |
| $B663 (bank 5) | a call | 1,282 | |
| $B5B5 (bank 5) | a call | 1,227 | |
| $B3CF (bank 5) | a table | 886 | |
| $810F (bank 6) | a call | 881 | |
| $8116 (bank 6) | a call | 881 | |
| $A6F0 (bank 5) | a table | 847 | |
| $A737 (bank 5) | a table | 732 | |
| $B242 (bank 5) | a table | 679 | |
| $B261 (bank 5) | a table | 641 | |
| $B502 (bank 5) | a call | 641 | |
| $B5D8 (bank 5) | a call | 641 | |
| $B603 (bank 5) | a call | 641 | |
| $B63C (bank 5) | a call | 641 | |
| $B529 (bank 5) | a call | 586 | |
| $815A (bank 6) | a call | 369 | |
| $8167 (bank 6) | a call | 369 | |
| $BA6F (bank 5) | a call | 126 | |
| $D261 (bank 7) | a call | 82 | |
| $D263 (bank 7) | a call | 82 | |
| $D266 (bank 7) | a call | 82 | |
| $8147 (bank 6) | a call | 72 | |
| $8120 (bank 6) | a call | 69 | |
| $AF1F (bank 5) | a table | 69 | |
| $818C (bank 6) | a call | 57 | |
| $BA40 (bank 5) | a call | 57 | |
| $8293 (bank 6) | a call | 42 | |
| $B24E (bank 5) | a table | 36 | |
| $814F (bank 6) | a call | 29 | |
| $A6A0 (bank 5) | a call | 23 | |
| $A70F (bank 5) | a table | 23 | |
| $A72E (bank 5) | a table | 23 | |
| $ADE0 (bank 5) | a call | 23 | |
| $AF2B (bank 5) | a table | 23 | |
| $AF34 (bank 5) | a table | 23 | |
| $B960 (bank 5) | a call | 23 | |
| $D281 (bank 7) | a call | 23 | |
| $D29C (bank 7) | a call | 23 | |
| $B40A (bank 5) | a table | 19 | |
| $B412 (bank 5) | a table | 17 |
Where it waits
Loops a rule named that sit inside a routine and are not themselves a place the code is entered.
| at | what 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.
| at | entries | taken | chosen by the byte at |
|---|---|---|---|
| $A6DF (bank 5) | 2 | 2 | $076C |
| $A705 (bank 5) | 4 | 4 | $0736 |
| $B236 (bank 5) | 2 | 2 | $0736 |
| $B248 (bank 5) | 3 | 3 | $073B |
| $B3D5 (bank 5) | 3 | 3 | $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
| from | bytes reached | instructions | positions it holds |
|---|---|---|---|
| $0200 | 256 | 2 | |
| $0300 | 256 | 1 | |
| $0400 | 256 | 1 | |
| $0500 | 256 | 1 | |
| $0600 | 256 | 1 | |
| $0700 | 256 | 1 | |
| $0000 | 224 | 2 | |
| $0267 | 108 | 3 | |
| $02D3 | 44 | 3 | |
| $0302 | 34 | 2 | |
| $00E0 | 32 | 1 | |
| $0305 | 30 | 1 |
The 24 busiest shared bytes
| byte | reads and writes | routines writing | routines reading |
|---|---|---|---|
| $0736 | 3,683,826 | 6 | 6 |
| $0000 | 328,819 | 6 | 6 |
| $0002 | 162,053 | 6 | 6 |
| $0001 | 127,993 | 6 | 6 |
| $00F5 | 117,068 | 3 | 5 |
| $0006 | 115,064 | 5 | 3 |
| $0003 | 64,397 | 6 | 5 |
| $000A | 51,224 | 4 | 2 |
| $0008 | 41,306 | 4 | 2 |
| $000C | 19,769 | 4 | 6 |
| $000D | 19,768 | 6 | 6 |
| $00FF | 19,383 | 3 | 4 |
| $00F7 | 18,661 | 2 | 5 |
| $0007 | 15,754 | 3 | 2 |
| $000B | 13,091 | 4 | 2 |
| $001A | 9,733 | 4 | 4 |
| $0012 | 9,619 | 3 | 3 |
| $0302 | 7,741 | 5 | 5 |
| $00EA | 7,358 | 4 | 2 |
| $001D | 7,088 | 3 | 2 |
| $00E9 | 5,120 | 3 | 3 |
| $0303 | 4,339 | 4 | 5 |
| $0304 | 4,339 | 4 | 5 |
| $0305 | 4,339 | 4 | 5 |
This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.