Battle Chess (USA)
Battle Chess (USA) is on a MMC1 board with 262,144 bytes of program. A crawl of 400 steps from power-on kept 29 paths that found new code. Played back over 23,529 frames, they executed 7,626 bytes of it, 3 percent.
What the rules named
- The poll: 2
- The wait for the frame: 8
- The bank switch: 3
- The picture writer: 1
- The palette writers: 2
- The sprite writers: 6
- The scroll writer: 1
- The sound driver: 1
The 148 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 |
|---|---|---|---|
| $C160 (bank 15) | a call | 47,597 | The bank switch: writes 237,985, in the blank 1,020, while drawing 236,965 |
| $C4EF (bank 15) | each frame (NMI) | 11,271 | The scroll writer: frames it ran in 11,414, writes in the blank 18,154 |
| $D42F (bank 15) | a call | 11,178 | The sprite writers: frames it ran in 11,321, writes to the sprite page 2,813,343 |
| $C764 (bank 15) | a call | 11,152 | The poll: port $4016, reads a frame 8, strobes a frame 2 The poll: port $4017, reads a frame 8, strobes a frame 2 |
| $C6D0 (bank 15) | a call | 8,977 | The palette writers: frames it ran in 8,977, writes 287,264 The picture writer: frames it ran in 8,977, writes 287,264, in the blank 287,264, while drawing 0 |
| $D4A0 (bank 15) | a call | 3,570 | The sprite writers: frames it ran in 1,933, writes to the sprite page 58,768 |
| $D05E (bank 15) | a call | 1,879 | The sprite writers: frames it ran in 1,877, writes to the sprite page 3,754 |
| $8000 (bank 14) | a call | 1,877 | The sound driver: frames it ran in 1,877, writes 33 |
| $C35F (bank 15) | a call | 1,540 | The wait for the frame: waits on the byte at $0030, times entered 1,538, turns 3,941,011, writes of it under the frame interrupt 14,052, frames in all 13,029 |
| $C9FD (bank 15) | a call | 319 | The palette writers: frames it ran in 291, writes 3,040 |
| $C099 (bank 15) | a call | 95 | The sprite writers: frames it ran in 367, writes to the sprite page 24,320 |
| $CD8F (bank 15) | a call | 95 | The sprite writers: frames it ran in 564, writes to the sprite page 24,064 |
| $C000 (bank 15) | power-on | 29 | The bank switch: writes 232, in the blank 232, while drawing 0 The sprite writers: frames it ran in 4,754, writes to the sprite page 7,424 |
| $C174 (bank 15) | a call | 29 | The bank switch: writes 145, in the blank 145, while drawing 0 |
| $C156 (bank 15) | a call | 16,628 | |
| $DD3C (bank 15) | a call | 14,700 | |
| $C63C (bank 15) | a call | 11,178 | |
| $D3BE (bank 15) | a call | 11,178 | |
| $D3E2 (bank 15) | a call | 11,152 | |
| $DD55 (bank 15) | a call | 10,800 | |
| $D8EA (bank 15) | a call | 3,528 | |
| $D36F (bank 15) | a call | 3,460 | |
| $EA8A (bank 15) | a call | 3,264 | |
| $EAA3 (bank 15) | a call | 3,264 | |
| $C567 (bank 15) | a call | 2,686 | |
| $DC7C (bank 15) | a call | 2,450 | |
| $C149 (bank 15) | a call | 2,380 | |
| $D93C (bank 15) | a call | 2,352 | |
| $CC8D (bank 15) | a call | 1,879 | |
| $E2A1 (bank 15) | a call | 1,879 | |
| $E2BE (bank 15) | a call | 1,879 | |
| $807A (bank 14) | a call | 1,877 | |
| $CCC8 (bank 15) | a call | 1,877 | |
| $8091 (bank 14) | a call | 1,844 | |
| $E2EB (bank 15) | a call | 1,835 | |
| $E357 (bank 15) | a call | 1,753 | |
| $E727 (bank 15) | a table | 1,640 | |
| $C79D (bank 15) | a call | 1,526 | |
| $8D99 (bank 0) | a call | 1,304 | |
| $DBE8 (bank 15) | a call | 1,300 | |
| $8A98 (bank 0) | a call | 1,294 | |
| $DC39 (bank 15) | a call | 1,150 | |
| $D9C9 (bank 15) | a call | 1,039 | |
| $DA3C (bank 15) | a call | 825 | |
| $DAED (bank 15) | a call | 825 | |
| $EB70 (bank 15) | a call | 768 | |
| $80CA (bank 14) | a call | 763 | |
| $CAD3 (bank 15) | a call | 686 | |
| $80E9 (bank 14) | a call | 664 | |
| $81EB (bank 14) | a call | 664 | |
| $DB52 (bank 15) | a call | 650 | |
| $DD73 (bank 15) | a call | 650 | |
| $DD7F (bank 15) | a call | 650 | |
| $DB9D (bank 15) | a call | 575 | |
| $DD6D (bank 15) | a call | 575 | |
| $DD79 (bank 15) | a call | 575 | |
| $CA93 (bank 15) | a call | 566 | |
| $D980 (bank 15) | a call | 392 | |
| $C103 (bank 15) | a call | 369 | |
| $C367 (bank 15) | a call | 351 | |
| $8283 (bank 14) | a call | 297 | |
| $C343 (bank 15) | a call | 241 | |
| $C0EF (bank 15) | a call | 239 | |
| $C0F8 (bank 15) | a call | 239 | |
| $9819 (bank 0) | a call | 232 | |
| $97E5 (bank 0) | a call | 217 | |
| $97A7 (bank 0) | a call | 215 | |
| $9CC1 (bank 0) | a call | 215 | |
| $C931 (bank 15) | a call | 176 | |
| $C9C7 (bank 15) | a call | 176 | |
| $CDE1 (bank 15) | a call | 161 | |
| $CDD6 (bank 15) | a call | 160 | |
| $C0E0 (bank 15) | a call | 157 | |
| $8C9A (bank 0) | a call | 122 | |
| $CEE1 (bank 15) | a call | 120 | |
| $8C6E (bank 0) | a call | 118 | |
| $8115 (bank 14) | a call | 99 | |
| $8CCC (bank 0) | a call | 98 | |
| $C04C (bank 15) | a call | 96 | |
| $C13E (bank 15) | a call | 96 | |
| $C074 (bank 15) | a call | 95 | |
| $C143 (bank 15) | a call | 95 | |
| $82A9 (bank 14) | a call | 87 | |
| $8355 (bank 14) | a call | 87 | |
| $CAC5 (bank 15) | a call | 77 | |
| $CACA (bank 15) | a call | 77 | |
| $E6B2 (bank 15) | a table | 76 | |
| $E1DF (bank 15) | a call | 67 | |
| $C0D3 (bank 15) | a call | 65 | |
| $CA5A (bank 15) | a call | 64 | |
| $CA85 (bank 15) | a call | 63 | |
| $EA66 (bank 15) | a call | 52 | |
| $880C (bank 0) | a call | 51 | |
| $CE13 (bank 15) | a call | 51 | |
| $CE67 (bank 15) | a call | 51 | |
| $CEF1 (bank 15) | a call | 51 | |
| $CFC8 (bank 15) | a call | 51 | |
| $D00C (bank 15) | a call | 51 | |
| $E1FC (bank 15) | a call | 51 | |
| $E23B (bank 15) | a call | 51 | |
| $E373 (bank 15) | a call | 51 | |
| $E3DF (bank 15) | a call | 51 | |
| $EA78 (bank 15) | a call | 51 | |
| $C8C0 (bank 15) | a call | 38 | |
| $E6D6 (bank 15) | a table | 38 | |
| $E6DF (bank 15) | a table | 38 | |
| $80B9 (bank 14) | a call | 33 | |
| $CCC0 (bank 15) | a call | 33 | |
| $E4E4 (bank 15) | a table | 33 | |
| $8A16 (bank 0) | a call | 29 | |
| $C01F (bank 15) | an interrupt (IRQ) | 29 | |
| $C3B7 (bank 15) | a call | 29 | |
| $EB1F (bank 15) | a call | 29 | |
| $EB43 (bank 15) | a call | 28 | |
| $C3BE (bank 15) | a call | 27 | |
| $8CFB (bank 13) | a call | 26 | |
| $8D2B (bank 13) | a call | 26 | |
| $8FAE (bank 13) | a call | 26 | |
| $9698 (bank 0) | a call | 26 | |
| $96B7 (bank 0) | a call | 26 | |
| $E87F (bank 15) | a call | 26 | |
| $EA02 (bank 15) | a call | 26 | |
| $EA32 (bank 15) | a call | 26 | |
| $EAFD (bank 15) | a call | 26 | |
| $96F0 (bank 0) | a call | 25 | |
| $D7FA (bank 15) | a call | 25 | |
| $D826 (bank 15) | a call | 25 | |
| $8A4F (bank 0) | a call | 24 | |
| $9C63 (bank 0) | a call | 23 | |
| $CC9F (bank 15) | a call | 17 | |
| $8D41 (bank 0) | a call | 16 | |
| $8A54 (bank 0) | a call | 14 | |
| $8C53 (bank 0) | a call | 10 | |
| $8B65 (bank 0) | a call | 7 | |
| $8D7C (bank 0) | a call | 7 | |
| $99ED (bank 0) | a call | 4 | |
| $8BCC (bank 0) | a call | 3 | |
| $CE87 (bank 15) | a call | 3 | |
| $E1ED (bank 15) | a call | 3 | |
| $8AF9 (bank 0) | a call | 2 | |
| $8B36 (bank 0) | a call | 2 | |
| $914E (bank 0) | a table | 2 | |
| $9DA1 (bank 0) | a table | 2 | |
| $9DE4 (bank 0) | a call | 2 | |
| $E558 (bank 15) | a table | 2 | |
| $E669 (bank 15) | a table | 2 | |
| $E67B (bank 15) | a call | 2 | |
| $995D (bank 0) | 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 |
|---|---|
| $C150 (bank 15) | The wait for the frame: waits on the byte at $03E9, times entered 1,790, turns 6,623,410, writes of it under the frame interrupt 18,110, frames in all 13,029 |
| $C3B9 (bank 15) | The wait for the frame: waits on the byte at $0030, times entered 28, turns 10,692,043, writes of it under the frame interrupt 14,052, frames in all 13,029 |
| $C3C0 (bank 15) | The wait for the frame: waits on the byte at $0663, times entered 26, turns 5,429,565, writes of it under the frame interrupt 178,432, frames in all 13,029 |
| $C3CA (bank 15) | The wait for the frame: waits on the byte at $0663, times entered 26, turns 1,907,047, writes of it under the frame interrupt 178,432, frames in all 13,029 |
| $C568 (bank 15) | The wait for the frame: waits on the byte at $002B, times entered 3,454, turns 2,557,546, writes of it under the frame interrupt 2,101, frames in all 13,029 |
| $D82A (bank 15) | The wait for the frame: waits on the byte at $002B, times entered 392, turns 1,199,685, writes of it under the frame interrupt 2,101, frames in all 13,029 |
| $DA9B (bank 15) | The wait for the frame: waits on the byte at $002B, times entered 825, turns 1,265,075, writes of it under the frame interrupt 2,101, frames in all 13,029 |
The memory its routines share
634 bytes of memory were written by one routine and read by another, and 90 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 |
|---|---|---|---|
| $0700 | 256 | 6 | |
| $0200 | 256 | 3 | |
| $0000 | 256 | 1 | |
| $0300 | 256 | 1 | |
| $0400 | 256 | 1 | |
| $0500 | 256 | 1 | |
| $0600 | 256 | 1 | |
| $0004 | 231 | 3 | |
| $0560 | 120 | 1 | |
| $0005 | 113 | 1 | |
| $000A | 113 | 1 | |
| $000B | 113 | 1 |
The 24 busiest shared bytes
| byte | reads and writes | routines writing | routines reading |
|---|---|---|---|
| $0663 | 7,603,828 | 3 | 4 |
| $03E9 | 6,660,505 | 2 | 3 |
| $002B | 5,046,928 | 6 | 6 |
| $005D | 972,091 | 5 | 4 |
| $0032 | 769,770 | 6 | 6 |
| $0033 | 314,887 | 6 | 6 |
| $000E | 248,477 | 6 | 6 |
| $0007 | 187,291 | 6 | 6 |
| $0664 | 177,111 | 3 | 3 |
| $00A4 | 169,179 | 5 | 5 |
| $00A2 | 162,186 | 5 | 6 |
| $00A3 | 161,908 | 5 | 6 |
| $006F | 123,519 | 5 | 5 |
| $00A6 | 118,747 | 5 | 6 |
| $0390 | 75,198 | 6 | 6 |
| $0393 | 75,198 | 6 | 6 |
| $0391 | 74,848 | 6 | 6 |
| $0394 | 74,848 | 6 | 6 |
| $0004 | 73,769 | 6 | 5 |
| $000D | 70,586 | 6 | 6 |
| $000F | 54,720 | 6 | 6 |
| $0026 | 41,758 | 6 | 6 |
| $000C | 41,309 | 6 | 6 |
| $00A5 | 35,226 | 5 | 4 |
This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.