Mike Tyson's Punch-Out!! (Japan, USA) (En)
Mike Tyson's Punch-Out!! (Japan, USA) (En) is on a MMC2 board with 131,072 bytes of program. A crawl of 400 steps from power-on kept 51 paths that found new code. Played back over 58,111 frames, they executed 16,633 bytes of it, 13 percent.
What the rules named
- The poll: 2
- The wait for the frame: 5
- The jump engine: 3
- The bank switch: 21
- The picture writer: 1
- The palette writers: 1
- The sprite writers: 16
- The scroll writer: 1
- The sound driver: 1
The 181 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 |
|---|---|---|---|
| $AFA4 (bank 13) | a call | 137,386 | The poll: port $4016, reads a frame 31, strobes a frame 0 The poll: port $4017, reads a frame 31, strobes a frame 0 |
| $A008 (bank 13) | each frame (NMI) | 47,458 | The bank switch: writes 86, in the blank 86, while drawing 0 |
| $AA3C (bank 13) | a call | 37,998 | The bank switch: writes 37,993, in the blank 37,446, while drawing 547 |
| $AA40 (bank 13) | a call | 37,579 | The bank switch: writes 37,574, in the blank 37,022, while drawing 552 |
| $A9DF (bank 13) | a call | 37,491 | The bank switch: writes 37,459, in the blank 37,459, while drawing 0 The scroll writer: frames it ran in 37,491, writes in the blank 74,977 |
| $AA6A (bank 13) | a call | 37,026 | The bank switch: writes 36,975, in the blank 36,035, while drawing 940 |
| $A7A6 (bank 13) | a call | 36,849 | The sprite writers: frames it ran in 35,353, writes to the sprite page 4 |
| $F40B (bank 13) | a call | 22,658 | The sound driver: frames it ran in 22,335, writes 45,316 |
| $AA48 (bank 13) | a call | 1,712 | The bank switch: writes 1,708, in the blank 0, while drawing 1,708 |
| $BDB5 (bank 13) | a call | 1,638 | The sprite writers: frames it ran in 1,638, writes to the sprite page 56,486 |
| $AF0B (bank 13) | a call | 1,213 | The palette writers: frames it ran in 1,213, writes 38,807 The picture writer: frames it ran in 1,213, writes 38,807, in the blank 38,807, while drawing 0 |
| $BE1A (bank 13) | a call | 1,137 | The sprite writers: frames it ran in 1,137, writes to the sprite page 7,057 |
| $AED4 (bank 13) | a call | 675 | The jump engine: tables 4, jumps through them 675 |
| $CC8B (bank 13) | a call | 580 | The sprite writers: frames it ran in 343, writes to the sprite page 12,792 |
| $D176 (bank 13) | a call | 580 | The sprite writers: frames it ran in 299, writes to the sprite page 9,284 |
| $D305 (bank 13) | a call | 572 | The sprite writers: frames it ran in 299, writes to the sprite page 4,576 |
| $AA44 (bank 13) | a call | 570 | The bank switch: writes 570, in the blank 18, while drawing 552 |
| $C978 (bank 13) | a call | 558 | The sprite writers: frames it ran in 321, writes to the sprite page 25,884 |
| $AA87 (bank 13) | a call | 552 | The bank switch: writes 552, in the blank 0, while drawing 552 |
| $9134 (bank 7) | a call | 363 | The jump engine: tables 1, jumps through them 363 |
| $BEFF (bank 13) | a call | 144 | The sprite writers: frames it ran in 72, writes to the sprite page 972 |
| $AF38 (bank 13) | a call | 138 | The sprite writers: frames it ran in 232, writes to the sprite page 35,323 |
| $AA5C (bank 13) | a call | 121 | The bank switch: writes 121, in the blank 0, while drawing 121 |
| $BF3C (bank 13) | a call | 102 | The bank switch: writes 102, in the blank 0, while drawing 102 |
| $BF55 (bank 13) | a call | 102 | The bank switch: writes 408, in the blank 36, while drawing 372 |
| $AA64 (bank 13) | a call | 82 | The bank switch: writes 82, in the blank 0, while drawing 82 |
| $AA54 (bank 13) | a call | 69 | The bank switch: writes 69, in the blank 60, while drawing 9 |
| $860F (bank 11) | a call | 65 | The jump engine: tables 2, jumps through them 65 |
| $A000 (bank 13) | an interrupt (IRQ) | 51 | The sprite writers: frames it ran in 10,834, writes to the sprite page 21,760 |
| $AA50 (bank 13) | a call | 51 | The bank switch: writes 51, in the blank 0, while drawing 51 |
| $B666 (bank 13) | a call | 49 | The bank switch: writes 49, in the blank 0, while drawing 49 The sprite writers: frames it ran in 98, writes to the sprite page 196 |
| $B6A1 (bank 13) | a call | 49 | The bank switch: writes 49, in the blank 0, while drawing 49 |
| $D134 (bank 13) | a call | 44 | The sprite writers: frames it ran in 22, writes to the sprite page 352 |
| $AF3A (bank 13) | a call | 37 | The sprite writers: frames it ran in 37, writes to the sprite page 3,552 |
| $BBAA (bank 13) | a call | 36 | The bank switch: writes 36, in the blank 0, while drawing 36 |
| $BCBE (bank 13) | a call | 36 | The bank switch: writes 180, in the blank 0, while drawing 180 |
| $BF36 (bank 13) | a call | 36 | The bank switch: writes 36, in the blank 0, while drawing 36 |
| $D34F (bank 13) | a call | 26 | The sprite writers: frames it ran in 22, writes to the sprite page 208 |
| $C976 (bank 13) | a call | 22 | The sprite writers: frames it ran in 22, writes to the sprite page 2,314 |
| $AA9F (bank 13) | a call | 18 | The bank switch: writes 18, in the blank 18, while drawing 0 |
| $AF43 (bank 13) | a call | 9 | The sprite writers: frames it ran in 9, writes to the sprite page 108 |
| $A800 (bank 13) | a call | 2 | The bank switch: writes 2, in the blank 0, while drawing 2 |
| $B001 (bank 13) | a call | 85,765 | |
| $8000 (bank 8) | a call | 37,579 | |
| $8025 (bank 8) | a call | 37,579 | |
| $80CA (bank 8) | a call | 37,579 | |
| $84B1 (bank 8) | a call | 37,579 | |
| $88E2 (bank 8) | a call | 37,579 | |
| $8012 (bank 7) | a call | 37,446 | |
| $AF73 (bank 13) | a call | 37,446 | |
| $A774 (bank 13) | a call | 37,401 | |
| $F412 (bank 13) | a call | 22,583 | |
| $F472 (bank 13) | a call | 22,502 | |
| $F463 (bank 13) | a call | 22,415 | |
| $B021 (bank 13) | a call | 17,705 | |
| $AF8D (bank 13) | a call | 17,197 | |
| $AFBD (bank 13) | a call | 17,153 | |
| $AF02 (bank 13) | a call | 13,077 | |
| $BC1F (bank 13) | a call | 2,941 | |
| $F429 (bank 13) | a call | 2,070 | |
| $BF9E (bank 13) | a call | 1,975 | |
| $F400 (bank 13) | a call | 1,961 | |
| $F422 (bank 13) | a call | 1,564 | |
| $8006 (bank 7) | a call | 1,425 | |
| $AF2E (bank 13) | a call | 1,415 | |
| $C041 (bank 13) | a call | 993 | |
| $C113 (bank 13) | a call | 989 | |
| $F41E (bank 13) | a call | 936 | |
| $BF99 (bank 13) | a call | 694 | |
| $A09A (bank 13) | a call | 596 | |
| $8000 (bank 7) | a call | 552 | |
| $8003 (bank 7) | a call | 552 | |
| $8003 (bank 11) | a call | 552 | |
| $8006 (bank 11) | a call | 552 | |
| $8009 (bank 7) | a call | 552 | |
| $8009 (bank 11) | a call | 552 | |
| $800C (bank 7) | a call | 552 | |
| $800F (bank 7) | a call | 552 | |
| $8015 (bank 7) | a call | 552 | |
| $A7C4 (bank 13) | a call | 552 | |
| $B034 (bank 13) | a call | 552 | |
| $B049 (bank 13) | a call | 552 | |
| $B069 (bank 13) | a call | 552 | |
| $B10A (bank 13) | a call | 552 | |
| $B196 (bank 13) | a call | 552 | |
| $B457 (bank 13) | a call | 552 | |
| $B530 (bank 13) | a call | 552 | |
| $C291 (bank 13) | a call | 552 | |
| $C3D9 (bank 13) | a call | 552 | |
| $C440 (bank 13) | a call | 552 | |
| $C4E7 (bank 13) | a call | 552 | |
| $C890 (bank 13) | a call | 552 | |
| $B549 (bank 13) | a table | 543 | |
| $C850 (bank 13) | a call | 486 | |
| $AF04 (bank 13) | a call | 408 | |
| $90FF (bank 6) | a call | 394 | |
| $9158 (bank 7) | a call | 374 | |
| $C24A (bank 13) | a call | 212 | |
| $9151 (bank 7) | a call | 192 | |
| $AE9B (bank 13) | a call | 182 | |
| $C079 (bank 13) | a call | 173 | |
| $C09D (bank 13) | a call | 173 | |
| $8B54 (bank 7) | a call | 167 | |
| $C0BB (bank 13) | a call | 147 | |
| $BEB3 (bank 13) | a call | 144 | |
| $C0E0 (bank 13) | a call | 138 | |
| $BF21 (bank 13) | a call | 129 | |
| $AA1D (bank 13) | a call | 125 | |
| $C105 (bank 13) | a call | 108 | |
| $AA6E (bank 13) | a call | 104 | |
| $AA0A (bank 13) | a call | 102 | |
| $8B19 (bank 7) | a table | 97 | |
| $BF7E (bank 13) | a call | 96 | |
| $8B50 (bank 7) | a table | 95 | |
| $BD9B (bank 13) | a call | 93 | |
| $BF0D (bank 13) | a call | 93 | |
| $BC5F (bank 13) | a call | 92 | |
| $BEE1 (bank 13) | a call | 85 | |
| $AEA5 (bank 13) | a call | 83 | |
| $F4EF (bank 13) | a call | 80 | |
| $8AF0 (bank 7) | a table | 73 | |
| $8B39 (bank 7) | a table | 72 | |
| $BEC9 (bank 13) | a call | 72 | |
| $C85C (bank 13) | a call | 72 | |
| $AEF8 (bank 13) | a call | 63 | |
| $8906 (bank 8) | a call | 53 | |
| $801E (bank 7) | a call | 51 | |
| $9000 (bank 6) | a call | 51 | |
| $9030 (bank 6) | a call | 51 | |
| $A75B (bank 13) | a call | 51 | |
| $800E (bank 9) | a call | 49 | |
| $A9D1 (bank 13) | a call | 45 | |
| $B6CB (bank 13) | a call | 44 | |
| $BFAE (bank 13) | a call | 44 | |
| $BFB2 (bank 13) | a call | 44 | |
| $F518 (bank 13) | a call | 37 | |
| $AA06 (bank 13) | a call | 36 | |
| $AAE5 (bank 13) | a call | 36 | |
| $AB4E (bank 13) | a call | 36 | |
| $AE89 (bank 13) | a call | 36 | |
| $BAE3 (bank 13) | a call | 36 | |
| $BE96 (bank 13) | a call | 36 | |
| $BEA1 (bank 13) | a call | 36 | |
| $BEED (bank 13) | a call | 36 | |
| $BFAA (bank 13) | a call | 36 | |
| $BFF2 (bank 13) | a call | 36 | |
| $C720 (bank 13) | a table | 36 | |
| $C784 (bank 13) | a table | 36 | |
| $910B (bank 7) | a call | 26 | |
| $8B1E (bank 7) | a table | 22 | |
| $C58D (bank 13) | a table | 22 | |
| $8000 (bank 11) | a call | 18 | |
| $8363 (bank 11) | a table | 18 | |
| $C118 (bank 13) | a call | 18 | |
| $83AE (bank 11) | a table | 17 | |
| $83A7 (bank 11) | a table | 13 | |
| $C5F9 (bank 13) | a table | 13 | |
| $802D (bank 7) | a call | 9 | |
| $83F4 (bank 11) | a table | 9 | |
| $85D1 (bank 11) | a call | 9 | |
| $AB58 (bank 13) | a call | 9 | |
| $AE5F (bank 13) | a call | 9 | |
| $AF5B (bank 13) | a call | 9 | |
| $B5A9 (bank 13) | a table | 9 | |
| $BED9 (bank 13) | a call | 9 | |
| $8DF4 (bank 7) | a call | 8 | |
| $C670 (bank 13) | a table | 8 | |
| $C70C (bank 13) | a table | 8 | |
| $A4C6 (bank 13) | a call | 7 | |
| $8027 (bank 7) | a call | 5 | |
| $8E3D (bank 7) | a call | 5 | |
| $8493 (bank 11) | a table | 4 | |
| $84BE (bank 11) | a table | 4 | |
| $8ADD (bank 7) | a table | 4 | |
| $BFF6 (bank 13) | a call | 4 | |
| $8021 (bank 7) | a call | 3 | |
| $8024 (bank 7) | a call | 3 | |
| $802A (bank 7) | a call | 3 | |
| $AEF1 (bank 13) | a call | 2 | |
| $801B (bank 7) | a call | 1 | |
| $8E15 (bank 7) | a call | 1 |
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 |
|---|---|
| $A8A9 (bank 13) | The wait for the frame: waits on the byte at $00D9, times entered 36, turns 1,101, calls on each turn 2, writes of it under the frame interrupt 15,815, frames in all 47,611 |
| $A90B (bank 13) | The wait for the frame: waits on the byte at $0000, times entered 9, turns 525, calls on each turn 1, writes of it under the frame interrupt 9, frames in all 47,611 |
| $ABF1 (bank 13) | The wait for the frame: waits on the byte at $0392, times entered 9, turns 855, calls on each turn 2, writes of it under the frame interrupt 18, frames in all 47,611 |
| $AF06 (bank 13) | The wait for the frame: waits on the byte at $001F, times entered 13,653, turns 164,891,623, writes of it under the frame interrupt 74,942, frames in all 47,611 |
| $BF83 (bank 13) | The wait for the frame: waits on the byte at $04C8, times entered 96, turns 2,710, calls on each turn 1, writes of it under the frame interrupt 379, frames in all 47,611 |
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 |
|---|---|---|---|
| $8AC2 (bank 7) | 1 | 6 | |
| $8338 (bank 11) | 15 | 3 | |
| $83B2 (bank 11) | 12 | 3 | |
| $B53F (bank 13) | 4 | 2 | $0000 |
| $C562 (bank 13) | 16 | 4 | |
| $C724 (bank 13) | 3 | 1 |
The memory its routines share
330 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 |
|---|---|---|---|
| $0200 | 256 | 8 | |
| $020D | 241 | 34 | |
| $020C | 241 | 21 | |
| $020E | 241 | 19 | |
| $020F | 241 | 12 | |
| $020B | 241 | 11 | |
| $0208 | 241 | 6 | |
| $0000 | 240 | 2 | |
| $0201 | 125 | 3 | |
| $0500 | 109 | 1 | |
| $05A0 | 96 | 1 | |
| $0202 | 69 | 4 |
The 24 busiest shared bytes
| byte | reads and writes | routines writing | routines reading |
|---|---|---|---|
| $00E1 | 3,732,186 | 6 | 6 |
| $00E0 | 2,434,603 | 6 | 6 |
| $00D0 | 233,153 | 3 | 5 |
| $001E | 190,950 | 3 | 6 |
| $0010 | 159,979 | 5 | 6 |
| $00F2 | 112,875 | 3 | 2 |
| $00F4 | 109,407 | 5 | 3 |
| $00F5 | 108,307 | 2 | 4 |
| $0700 | 93,423 | 2 | 4 |
| $0701 | 92,715 | 2 | 3 |
| $0725 | 84,286 | 1 | 6 |
| $00F0 | 75,403 | 3 | 3 |
| $00F3 | 75,340 | 3 | 2 |
| $00F1 | 75,303 | 2 | 2 |
| $00D2 | 61,486 | 2 | 3 |
| $06C1 | 58,446 | 1 | 2 |
| $0004 | 55,435 | 2 | 3 |
| $06A4 | 51,651 | 2 | 3 |
| $06A6 | 51,633 | 2 | 3 |
| $0020 | 41,007 | 4 | 3 |
| $0410 | 39,538 | 6 | 6 |
| $0012 | 38,256 | 3 | 3 |
| $00D9 | 38,218 | 3 | 4 |
| $0014 | 37,851 | 4 | 2 |
This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.