Battle Chess (USA)

Battle Chess (USA) is on a MMC1 board with 262,144 bytes of program. A crawl of 6,400 steps from power-on kept 49 paths that found new code. Played back over 183,069 frames, they executed 9,181 bytes of it, 4 percent.

What the rules named

The 186 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
$C160 (bank 15)b15_bank_C160a call147,239
The bank switch: writes 736,195, in the blank 1,740, while drawing 734,455
$C4EF (bank 15)b15_nmieach frame (NMI)36,863
The scroll writer: frames it ran in 37,100, writes in the blank 66,538
$D42F (bank 15)b15_sprites_D42Fa call36,706
The sprite writers: frames it ran in 36,944, writes to the sprite page 9,243,994
$C764 (bank 15)b15_poll_C764a call36,665
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)b15_drain_C6D0a call33,105
The palette writers: frames it ran in 33,105, writes 1,059,360
The picture writer: frames it ran in 33,105, writes 1,059,360, in the blank 1,059,360, while drawing 0
$D4A0 (bank 15)b15_sprites_D4A0a call17,363
The sprite writers: frames it ran in 14,724, writes to the sprite page 373,400
$8000 (bank 14)b14_sound_8000a call16,986
The random byte: frames it ran in 16,985, bytes $0690, rotates 1, exclusive-ors 1
The sound driver: frames it ran in 16,985, writes 58
$D05E (bank 15)b15_sprites_D05Ea call14,799
The sprite writers: frames it ran in 14,796, writes to the sprite page 29,592
$C35F (bank 15)b15_wait_C35Fa call14,300
The wait for the frame: waits on the byte at $0030, times entered 14,297, turns 52,330,296, writes of it under the frame interrupt 48,944, frames in all 39,849
$C9FD (bank 15)b15_palette_C9FDa call537
The palette writers: frames it ran in 489, writes 5,024
$CD8F (bank 15)b15_sprites_CD8Fa call162
The sprite writers: frames it ran in 963, writes to the sprite page 41,185
$C099 (bank 15)b15_sprites_C099a call157
The sprite writers: frames it ran in 609, writes to the sprite page 40,192
$C000 (bank 15)b15_resetpower-on49
The bank switch: writes 392, in the blank 392, while drawing 0
The sprite writers: frames it ran in 19,560, writes to the sprite page 12,544
$C174 (bank 15)b15_bank_C174a call49
The bank switch: writes 245, in the blank 245, while drawing 0
$E67B (bank 15)b15_handlers_E67Ba call11
The handler kept in memory: jumps 11, places it landed 2, address copied from $04B3
$C7CD (bank 15)b15_sprites_C7CDa call5
The sprite writers: frames it ran in 5,495, writes to the sprite page 20
$C156 (bank 15)a call41,153
$D3BE (bank 15)a call36,709
$C63C (bank 15)a call36,706
$D3E2 (bank 15)a call36,662
$DD3C (bank 15)a call24,108
$DD55 (bank 15)a call17,712
$D36F (bank 15)a call17,330
$CCC8 (bank 15)a call16,986
$807A (bank 14)a call16,979
$8091 (bank 14)a call16,935
$CC8D (bank 15)a call14,799
$E2A1 (bank 15)a call14,799
$E2BE (bank 15)a call14,799
$C79D (bank 15)a call14,271
$C343 (bank 15)a call12,212
$9819 (bank 0)a call12,192
$97E5 (bank 0)a call12,020
$97A7 (bank 0)a call12,009
$9CC1 (bank 0)a call12,009
$80CA (bank 14)a call7,577
$80E9 (bank 14)a call7,396
$81EB (bank 14)a call7,396
$CA93 (bank 15)a call6,132
$D8EA (bank 15)a call5,832
$EA8A (bank 15)a call5,316
$EAA3 (bank 15)a call5,312
$E2EB (bank 15)a call5,292
$C567 (bank 15)a call4,432
$DC7C (bank 15)a call4,018
$E357 (bank 15)a call4,000
$C149 (bank 15)a call3,911
$D93C (bank 15)a call3,888
$E727 (bank 15)a table3,807
$DBE8 (bank 15)a call2,132
$8D99 (bank 0)a call2,094
$8A98 (bank 0)a call2,079
$DC39 (bank 15)a call1,886
$D9C9 (bank 15)a call1,711
$DA3C (bank 15)a call1,353
$DAED (bank 15)a call1,353
$8283 (bank 14)a call1,310
$EB70 (bank 15)a call1,211
$CAD3 (bank 15)a call1,120
$DB52 (bank 15)a call1,066
$DD73 (bank 15)a call1,066
$DD7F (bank 15)a call1,066
$82A9 (bank 14)a call943
$DB9D (bank 15)a call943
$DD6D (bank 15)a call943
$DD79 (bank 15)a call943
$8355 (bank 14)a call686
$D980 (bank 15)a call648
$C103 (bank 15)a call608
$C367 (bank 15)a call525
$C0EF (bank 15)a call404
$C0F8 (bank 15)a call404
$C931 (bank 15)a call295
$C9C7 (bank 15)a call295
$CDE1 (bank 15)a call270
$CDD6 (bank 15)a call269
$99ED (bank 0)a call266
$C0E0 (bank 15)a call264
$8372 (bank 14)a call257
$CEE1 (bank 15)a call200
$8C9A (bank 0)a call196
$8C6E (bank 0)a call190
$C04C (bank 15)a call158
$C13E (bank 15)a call158
$C074 (bank 15)a call157
$C143 (bank 15)a call157
$8115 (bank 14)a call153
$8CCC (bank 0)a call146
$CAC5 (bank 15)a call125
$814E (bank 13)a call123
$CACA (bank 15)a call123
$E6B2 (bank 15)a table120
$818E (bank 13)a call117
$C0D3 (bank 15)a call113
$CA5A (bank 15)a call110
$E1DF (bank 15)a call110
$CA85 (bank 15)a call104
$817F (bank 13)a call94
$EA66 (bank 15)a call88
$880C (bank 0)a call87
$CE13 (bank 15)a call87
$CE67 (bank 15)a call87
$CEF1 (bank 15)a call87
$CFC8 (bank 15)a call87
$D00C (bank 15)a call87
$E1FC (bank 15)a call87
$E23B (bank 15)a call87
$E373 (bank 15)a call87
$E3DF (bank 15)a call87
$8231 (bank 13)a table84
$EA78 (bank 15)a call83
$E6D6 (bank 15)a table60
$E6DF (bank 15)a table60
$C8C0 (bank 15)a call59
$80B9 (bank 14)a call51
$CCC0 (bank 15)a call51
$E4E4 (bank 15)a table51
$8A16 (bank 0)a call49
$C01F (bank 15)an interrupt (IRQ)49
$C3B7 (bank 15)a call49
$EB1F (bank 15)a call49
$822B (bank 13)a table48
$EB43 (bank 15)a call48
$821A (bank 13)a table47
$C3BE (bank 15)a call47
$EA02 (bank 15)a call44
$EA32 (bank 15)a call44
$8CFB (bank 13)a call42
$8D2B (bank 13)a call42
$8FAE (bank 13)a call42
$9698 (bank 0)a call42
$96B7 (bank 0)a call42
$E87F (bank 15)a call42
$EAFD (bank 15)a call42
$96F0 (bank 0)a call41
$D7FA (bank 15)a call41
$D826 (bank 15)a call41
$8A4F (bank 0)a call40
$8076 (bank 13)a call39
$8086 (bank 13)a table39
$9C63 (bank 0)a call39
$8108 (bank 14)a call28
$8D41 (bank 0)a call24
$CC9F (bank 15)a call24
$8A54 (bank 0)a call19
$8081 (bank 13)a call14
$995D (bank 0)a call13
$8B65 (bank 0)a call11
$8D7C (bank 0)a call11
$9EB1 (bank 0)a call11
$E558 (bank 15)a table11
$E669 (bank 15)a table11
$8C53 (bank 0)a call10
$9DA1 (bank 0)a table8
$9DE4 (bank 0)a call8
$80AA (bank 14)a call7
$CCBA (bank 15)a call7
$8AF9 (bank 0)a call4
$8B36 (bank 0)a call4
$82F6 (bank 13)a call3
$8BCC (bank 0)a call3
$9DB3 (bank 0)a table3
$9E48 (bank 0)a call3
$CE87 (bank 15)a call3
$E1ED (bank 15)a call3
$8071 (bank 13)a table2
$808F (bank 13)a table2
$8098 (bank 13)a table2
$809C (bank 13)a table2
$80C7 (bank 13)a table2
$80D6 (bank 13)a table2
$813F (bank 13)a call2
$8254 (bank 13)a call2
$8296 (bank 13)a call2
$8309 (bank 13)a call2
$8323 (bank 13)a call2
$8383 (bank 13)a call2
$8396 (bank 13)a call2
$839E (bank 13)a call2
$844D (bank 13)a call2
$8D10 (bank 13)a call2
$914E (bank 0)a table2
$E8DD (bank 15)a call2
$91E4 (bank 0)a table1
$921D (bank 0)a table1
$9286 (bank 0)a call1

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
$C150 (bank 15)b15_wait_C150
The wait for the frame: waits on the byte at $03E9, times entered 2,915, turns 10,771,895, writes of it under the frame interrupt 66,466, frames in all 39,849
$C3B9 (bank 15)b15_wait_C3B9
The wait for the frame: waits on the byte at $0030, times entered 48, turns 18,393,403, writes of it under the frame interrupt 48,944, frames in all 39,849
$C3C0 (bank 15)b15_wait_C3C0
The wait for the frame: waits on the byte at $0663, times entered 46, turns 11,162,932, writes of it under the frame interrupt 586,640, frames in all 39,849
$C3CA (bank 15)b15_wait_C3CA
The wait for the frame: waits on the byte at $0663, times entered 41, turns 2,904,578, writes of it under the frame interrupt 586,640, frames in all 39,849
$C568 (bank 15)b15_wait_C568
The wait for the frame: waits on the byte at $002B, times entered 5,642, turns 4,163,468, writes of it under the frame interrupt 3,437, frames in all 39,849
$C8B2 (bank 15)b15_wait_C8B2
The wait for the frame: waits on the byte at $03E9, times entered 5,463, turns 7,798,908, writes of it under the frame interrupt 66,466, frames in all 39,849
$D82A (bank 15)b15_wait_D82A
The wait for the frame: waits on the byte at $002B, times entered 648, turns 1,981,370, writes of it under the frame interrupt 3,437, frames in all 39,849
$DA9B (bank 15)b15_wait_DA9B
The wait for the frame: waits on the byte at $002B, times entered 1,353, turns 2,074,721, writes of it under the frame interrupt 3,437, frames in all 39,849

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
$E6C4 (bank 15)through a pointer22$04B3

The memory its routines share

714 bytes of memory were written by one routine and read by another, and 99 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
$07002566
$02002563
$00002561
$03002561
$04002561
$05002561
$06002561
$000423116
$05601201
$00051131
$000A1131
$000B1131

The 24 busiest shared bytes

bytereads and writesroutines writingroutines reading
$03E918,692,19524
$066314,965,64536
$002B8,278,31566
$000B5,920,51966
$005D1,590,57454
$00321,397,30266
$0664802,41634
$0033549,84266
$0007492,30266
$006F433,91666
$000E410,52666
$00A4279,29955
$00A2267,92256
$00A3267,46856
$007B203,66666
$00A6196,17956
$0004168,39366
$005F132,95844
$0026129,17366
$0390123,32666
$0393123,32666
$0391122,75266
$0394122,75266
$000D120,00866

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

All the games