Blades of Steel (USA)

Blades of Steel (USA) is on a UxROM board with 131,072 bytes of program. A crawl of 400 steps from power-on kept 32 paths that found new code. Played back over 27,032 frames, they executed 11,184 bytes of it, 9 percent.

What the rules named

The 221 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
$C79A (bank 7)a call38,771
The jump engine: tables 13, jumps through them 38,771
$C2F1 (bank 7)a call36,088
The bank switch: writes 36,082, in the blank 24,351, while drawing 11,731
$C61C (bank 7)a call26,440
The poll: port $4016, reads a frame 16, strobes a frame 4
The poll: port $4017, reads a frame 16, strobes a frame 4
$81B2 (bank 0)a call26,217
The sprite writers: frames it ran in 6,534, writes to the sprite page 733,050
$854C (bank 6)a call16,775
The sound driver: frames it ran in 6,356, writes 16,843
$C022 (bank 7)a call14,297
The palette writers: frames it ran in 13,414, writes 20,854
The picture writer: frames it ran in 13,414, writes 131,927, in the blank 88,304, while drawing 54,203
$C175 (bank 7)a call14,297
The palette writers: frames it ran in 13,414, writes 29,248
$C204 (bank 7)each frame (NMI)13,274
The game inside the interrupt: frames it ran in 13,274, frames in all 16,532, the spin is at $C1FB
$C2A8 (bank 7)a call13,247
The scroll writer: frames it ran in 13,220, writes in the blank 26,438
$8227 (bank 0)a call13,217
Where two things are compared: instructions 2, pairs of bytes 84, bytes in all 22, times compared 43,718, Y positions at $0313,$0314,$0315,$0316,$0317,$0318,$0319,$031A,$031B,$031C,$031D,$031E
$8001 (bank 0)a call13,215
The sprite writers: frames it ran in 13,242, writes to the sprite page 641,249
$82AD (bank 0)a call6,671
The sprite writers: frames it ran in 6,206, writes to the sprite page 97,085
$C512 (bank 7)a table4,722
The bank switch: writes 4,695, in the blank 27, while drawing 4,668
$C42D (bank 7)a call4,205
The bank switch: writes 4,204, in the blank 1,243, while drawing 2,961
$8101 (bank 1)a call2,837
The split: frames it ran in 2,868, scroll writes while drawing 5,672, status reads while drawing 1,474,339
$C2F7 (bank 7)a call2,526
The bank switch: writes 2,526, in the blank 125, while drawing 2,401
$CD6A (bank 7)a table1,820
The bank switch: writes 1,820, in the blank 0, while drawing 1,820
$811A (bank 0)a table1,476
The sprite writers: frames it ran in 1,476, writes to the sprite page 47,232
$C3CB (bank 7)a call389
The bank switch: writes 389, in the blank 0, while drawing 389
$C39F (bank 7)a call316
The bank switch: writes 316, in the blank 0, while drawing 316
$C818 (bank 7)a call153
The bank switch: writes 153, in the blank 0, while drawing 153
$C2DE (bank 7)a call64
The sprite writers: frames it ran in 64, writes to the sprite page 8,192
$C816 (bank 7)a call59
The bank switch: writes 59, in the blank 0, while drawing 59
$C373 (bank 7)a call8
The bank switch: writes 8, in the blank 8, while drawing 0
$C37E (bank 7)a call8
The bank switch: writes 8, in the blank 0, while drawing 8
$C7AF (bank 7)a call58,415
$890A (bank 6)a call30,856
$886A (bank 6)a call29,991
$82BD (bank 6)a call29,985
$85A5 (bank 6)a call15,557
$E095 (bank 7)a call14,808
$C956 (bank 7)a call14,265
$81C3 (bank 6)a call13,247
$8283 (bank 6)a call13,247
$823C (bank 6)a call13,246
$C5E2 (bank 7)a call13,220
$C464 (bank 7)a call13,219
$D7D2 (bank 7)a call12,340
$D8F7 (bank 7)a call12,340
$DE1E (bank 7)a call12,340
$873E (bank 6)a call11,190
$865F (bank 6)a call10,987
$8537 (bank 1)a call8,464
$EBED (bank 7)a call7,491
$8071 (bank 0)a call6,977
$807D (bank 0)a call6,977
$80A3 (bank 0)a call6,977
$85FA (bank 6)a call6,306
$E053 (bank 7)a call6,179
$E0B5 (bank 7)a call6,179
$A569 (bank 0)a call6,170
$86F3 (bank 6)a call5,850
$8001 (bank 1)a call5,672
$8123 (bank 1)a call5,672
$871C (bank 1)a call4,695
$8EAA (bank 1)a call4,695
$9E2B (bank 1)a call4,588
$C48D (bank 7)a table4,237
$800C (bank 1)a call4,205
$C107 (bank 7)a call3,630
$C958 (bank 7)a call3,624
$8EF6 (bank 1)a table2,820
$B390 (bank 0)a call2,468
$B47C (bank 0)a call2,468
$B453 (bank 0)a call2,464
$B562 (bank 0)a call2,464
$857F (bank 1)a call2,382
$A5B2 (bank 0)a table2,364
$8535 (bank 1)a call2,335
$A57F (bank 0)a table2,331
$8E10 (bank 1)a call2,141
$8555 (bank 1)a call2,117
$C95A (bank 7)a call2,102
$893D (bank 6)a call2,046
$8803 (bank 1)a table2,000
$8F2E (bank 1)a table1,828
$8002 (bank 5)a call1,820
$A882 (bank 0)a call1,820
$CD77 (bank 7)a call1,820
$A8A6 (bank 0)a table1,812
$AB4F (bank 0)a call1,812
$C4E4 (bank 7)a table1,802
$8512 (bank 1)a call1,587
$8524 (bank 1)a call1,587
$8532 (bank 1)a call1,514
$8048 (bank 1)a table1,500
$80C0 (bank 0)a call1,476
$A597 (bank 0)a table1,475
$9FEC (bank 1)a call1,398
$856F (bank 1)a call1,286
$A55A (bank 0)a call1,234
$ADB7 (bank 0)a call1,234
$CE3A (bank 7)a call1,234
$9F30 (bank 1)a call1,210
$C114 (bank 7)a call1,072
$82A8 (bank 1)a call1,058
$C8FD (bank 7)a call1,009
$80EA (bank 1)a table968
$84F1 (bank 6)a call859
$88CF (bank 1)a table823
$8095 (bank 1)a table744
$86FE (bank 6)a call732
$85AD (bank 1)a call603
$8DE5 (bank 1)a call555
$8D79 (bank 1)a call542
$83DD (bank 1)a call529
$8C2D (bank 1)a table498
$80BF (bank 1)a table496
$80D0 (bank 1)a table465
$87A2 (bank 1)a table459
$CD16 (bank 7)a table400
$8001 (bank 2)a call389
$8871 (bank 1)a table371
$CE43 (bank 7)a call351
$C15D (bank 7)a call342
$8813 (bank 1)a table340
$871D (bank 6)a call325
$813A (bank 1)a call316
$817A (bank 1)a call316
$8681 (bank 1)a call316
$E1E5 (bank 7)a call316
$E73C (bank 7)a call316
$819B (bank 6)a call306
$88F3 (bank 1)a table290
$C298 (bank 7)a call279
$C2C8 (bank 7)a call279
$8964 (bank 1)a table278
$8795 (bank 6)a table266
$C4B5 (bank 7)a call260
$C641 (bank 7)a call258
$9E2D (bank 1)a call252
$8573 (bank 6)a call247
$87AB (bank 1)a table243
$89B0 (bank 1)a table239
$8C7B (bank 1)a table237
$B7F8 (bank 1)a call236
$C4A9 (bank 7)a table230
$C5C8 (bank 7)a call230
$8578 (bank 1)a call228
$9EB1 (bank 1)a call228
$9EE9 (bank 1)a call228
$C304 (bank 7)a call217
$87C6 (bank 1)a table216
$887C (bank 1)a table187
$881C (bank 1)a table180
$884B (bank 1)a table177
$8893 (bank 1)a table168
$8833 (bank 1)a table160
$888E (bank 6)a table157
$87D0 (bank 6)a table150
$803F (bank 6)a call145
$C31F (bank 7)a call145
$8C3A (bank 1)a table130
$88DB (bank 6)a call126
$88E5 (bank 6)a table126
$8C58 (bank 1)a table123
$9EFB (bank 1)a call114
$9F36 (bank 1)a call114
$879B (bank 6)a table107
$87B4 (bank 6)a table105
$C16A (bank 7)a call104
$D744 (bank 7)a call96
$9F81 (bank 1)a call74
$8003 (bank 6)a call72
$88F1 (bank 6)a call72
$C340 (bank 7)a call72
$87F8 (bank 6)a table70
$8208 (bank 6)a call66
$88DE (bank 6)a call66
$9E3F (bank 1)a call63
$C68C (bank 7)a call54
$8D8A (bank 1)a call51
$B83C (bank 1)a call43
$B844 (bank 1)a call43
$8E02 (bank 1)a call38
$8D46 (bank 1)a call37
$C5D9 (bank 7)a call36
$85C0 (bank 1)a call35
$85E9 (bank 1)a call35
$801D (bank 1)a table32
$C1C5 (bank 7)power-on32
$C28D (bank 7)a call32
$C6E3 (bank 7)a call32
$C7C5 (bank 7)a call32
$C7D1 (bank 7)a call32
$C7D5 (bank 7)a call32
$88CB (bank 6)a table31
$EC72 (bank 7)a call30
$8D57 (bank 1)a call29
$C66C (bank 7)a call29
$873C (bank 1)a table27
$8ED0 (bank 1)a table27
$C2B5 (bank 7)a call27
$C674 (bank 7)a call27
$87EF (bank 6)a table24
$D627 (bank 7)a call24
$8EFF (bank 1)a table20
$88AB (bank 1)a table16
$88DC (bank 1)a table16
$C225 (bank 7)a call15
$883C (bank 6)a table10
$885D (bank 6)a call9
$8CB1 (bank 1)a table8
$946F (bank 0)a call8
$A24A (bank 0)a call8
$A2BF (bank 0)a call8
$A88E (bank 0)a table8
$AC1F (bank 0)a call8
$AC31 (bank 0)a call8
$AC41 (bank 0)a call8
$AC79 (bank 0)a call8
$C68E (bank 7)a call8
$CCD3 (bank 7)a table8
$CCE8 (bank 7)a call8
$D5FF (bank 7)a call8
$D60E (bank 7)a call8
$D6B6 (bank 7)a call8
$D6C1 (bank 7)a call8
$D72D (bank 7)a call8
$E1F1 (bank 7)a call8
$B593 (bank 0)a call6

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
$C1FB (bank 7)
The counting spin: counts in the byte at $0024, turns 20,791,885, turns a frame 1,257, reads of it from outside the loop 32

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
$8112 (bank 0)11$0036
$A56F (bank 0)33$0367, $0369, $036B, $036D
$A888 (bank 0)22$0373
$8011 (bank 1)66$0080
$8724 (bank 1)118$0060
$87A7 (bank 1)22$0061
$8818 (bank 1)22$0061
$8876 (bank 1)33$0061
$88D4 (bank 1)44$0061
$8C32 (bank 1)44$0061
$8EC8 (bank 1)44$0367
$C47A (bank 7)54$0018
$CCAB (bank 7)33$0030

The memory its routines share

602 bytes of memory were written by one routine and read by another, and 93 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
$03121352 down
$03CF121010 down
$031310110 down
$070025557
$02002535
$00002402
$02012293
$02022293
$02032293
$06401285
$0300913
$0701824

What travels with a position

Arrays that at least two routines step through together with an array of positions, across the same range. That is what a table of the things on the screen looks like in memory: one array for each property, one slot for each thing. We can say which arrays hold positions, which of the others get added into them, which is what a speed does, and which pick the way through a jump table, which is what a state or a kind does. What the rest hold is not named yet.

slotsarraysroutinespositions acrosspositions downadded into themchoosing a jumptravelling with them
1343$0312$0300, $0324, $0336
12239$03CF$0410$0367$0301, $0337, $035A, $0367, $0381, $038E, $039B, $03A8, $03B5, $03C2, $03E9, $0403, $0410, $042A, $0437, $0444, $0451, $049F, $04D3, $04ED, $0514, $0589

The 24 busiest shared bytes

bytereads and writesroutines writingroutines reading
$001A20,852,21426
$00E512,422,22966
$00E61,683,62166
$00E41,584,21366
$00001,307,36866
$0004999,04766
$0001991,56966
$0007870,86466
$0005844,91066
$0002698,16466
$0008623,53366
$0003586,35466
$00E2474,63356
$00C4185,76244
$005182,13866
$002172,81266
$000663,94266
$004A60,07765
$004B60,07765
$00F549,73926
$00D249,47644
$00E346,26156
$07E045,70716
$00C344,41632

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

All the games