Defender II (USA)
Defender II (USA) is on a NROM board with 16,384 bytes of program. A crawl of 6,400 steps from power-on kept 84 paths that found new code. Played back over 227,944 frames, they executed 9,444 bytes of it, 58 percent.
What the rules named
- The poll: 2
- The wait for the frame: 1
- The picture writer: 1
- The palette writers: 2
- The sprite writers: 15
- The scroll writer: 1
- The split: 2
- The sound driver: 1
- The random byte: 2
- Where two things are compared: 3
The 136 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.
| at | its name in the listing | entered by | times | what it is, and the evidence |
|---|---|---|---|---|
| $C40D | random_C40D | a call | 11,226,345 | The random byte: frames it ran in 59,272, bytes $001D,$001E,$001F,$0020,$0021,$0022,$0023,$0024,$0025,$0026,$0027, rotates 11, exclusive-ors 1 |
| $C59C | compare_C59C | a call | 1,898,695 | Where two things are compared: instructions 4, pairs of bytes 44, bytes in all 30, times compared 33,369, X positions at $0016,$03C3,$03CD,$0583,$058D,$05A3,$05C3,$0663,$0683, Y positions at $001D,$001E,$03C1,$03CC,$040C,$0411,$042C,$0431,$0451,$0471,$0491,$04AC |
| $C47C | sprites_C47C | a call | 336,176 | The sprite writers: frames it ran in 26,887, writes to the sprite page 2,203,688 |
| $C448 | poll_C448 | a call | 117,414 | The poll: port $4016, reads a frame 8, strobes a frame 0 The poll: port $4017, reads a frame 8, strobes a frame 0 |
| $C120 | drain_C120 | a call | 58,788 | The palette writers: frames it ran in 58,707, writes 568 The scroll writer: frames it ran in 58,707, writes in the blank 117,414 The picture writer: frames it ran in 58,707, writes 132,402, in the blank 131,756, while drawing 646 |
| $F880 | sound_F880 | a call | 58,696 | The sound driver: frames it ran in 56,763, writes 117,389 |
| $CBD4 | sprites_CBD4 | a call | 58,693 | The sprite writers: frames it ran in 58,597, writes to the sprite page 12,213 |
| $DB46 | compare_DB46 | a call | 52,636 | Where two things are compared: instructions 3, pairs of bytes 2, bytes in all 3, times compared 88,886, Y positions at $03C1,$05A1,$05C1 |
| $C144 | split_C144 | a call | 33,477 | The split: frames it ran in 33,477, scroll writes while drawing 17,678, status reads while drawing 1,039,246 |
| $E814 | sprites_E814 | a call | 28,981 | The sprite writers: frames it ran in 28,981, writes to the sprite page 399,303 |
| $E4D8 | random_E4D8 | a call | 26,342 | The random byte: frames it ran in 26,322, bytes $0005,$0006, rotates 10, exclusive-ors 1 |
| $DC7B | sprites_DC7B | a call | 26,320 | The sprite writers: frames it ran in 26,320, writes to the sprite page 210,560 |
| $E029 | sprites_E029 | a call | 26,320 | The sprite writers: frames it ran in 26,320, writes to the sprite page 105,280 |
| $E7AA | sprites_E7AA | a call | 26,320 | The sprite writers: frames it ran in 26,320, writes to the sprite page 263,200 |
| $D950 | sprites_D950 | a call | 26,318 | The sprite writers: frames it ran in 26,318, writes to the sprite page 1,008 |
| $DA1B | sprites_DA1B | a call | 15,328 | The sprite writers: frames it ran in 958, writes to the sprite page 15,328 |
| $E9E6 | sprites_E9E6 | a call | 11,346 | The sprite writers: frames it ran in 1,891, writes to the sprite page 18,910 |
| $E9C7 | sprites_E9C7 | a call | 7,564 | The sprite writers: frames it ran in 1,891, writes to the sprite page 18,910 |
| $C603 | sprites_C603 | a call | 4,017 | The sprite writers: frames it ran in 2,850, writes to the sprite page 3,888 |
| $E9BA | sprites_E9BA | a call | 2,893 | The sprite writers: frames it ran in 2,221, writes to the sprite page 34,716 |
| $CA8E | sprites_CA8E | a call | 403 | The sprite writers: frames it ran in 403, writes to the sprite page 103,168 |
| $C0D7 | split_C0D7 | a call | 327 | The palette writers: frames it ran in 490, writes 5,852 The split: frames it ran in 490, scroll writes while drawing 650, status reads while drawing 5,996 |
| $DDD6 | compare_DDD6 | a call | 182 | Where two things are compared: instructions 1, pairs of bytes 2, bytes in all 3, times compared 2, X positions at $001E,$001F,$04D3 |
| $C983 | reset | power-on | 84 | The sprite writers: frames it ran in 59,440, writes to the sprite page 21,504 |
| $CF50 | sprites_CF50 | a call | 68 | The sprite writers: frames it ran in 136, writes to the sprite page 272 |
| $E76B | a call | 397,928 | ||
| $DB1D | a call | 185,083 | ||
| $DC17 | a call | 100,624 | ||
| $CAA1 | each frame (NMI) | 59,272 | ||
| $D2CF | a call | 59,272 | ||
| $D6D8 | a call | 59,202 | ||
| $C073 | a call | 58,707 | ||
| $C087 | a call | 58,707 | ||
| $C434 | a call | 58,707 | ||
| $CEE8 | a call | 58,696 | ||
| $FA4C | a call | 58,696 | ||
| $C3CC | a call | 54,198 | ||
| $D73C | a call | 52,636 | ||
| $D7EA | a call | 52,636 | ||
| $DBF1 | a call | 52,636 | ||
| $E31D | a call | 52,636 | ||
| $E5A8 | a call | 48,486 | ||
| $D90D | a call | 35,212 | ||
| $CE5B | a call | 29,466 | ||
| $CE1D | a call | 29,026 | ||
| $D449 | a call | 29,025 | ||
| $CD4D | a call | 28,981 | ||
| $DEE9 | a call | 28,750 | ||
| $E6D5 | a call | 26,853 | ||
| $E6E1 | a call | 26,797 | ||
| $D1DD | a call | 26,583 | ||
| $D91A | a call | 26,320 | ||
| $DE78 | a call | 26,320 | ||
| $E47A | a call | 26,320 | ||
| $CD89 | a call | 26,318 | ||
| $CF11 | a call | 26,318 | ||
| $D098 | a call | 26,318 | ||
| $D4E9 | a call | 26,318 | ||
| $D5E8 | a call | 26,318 | ||
| $D726 | a call | 26,318 | ||
| $D7D0 | a call | 26,318 | ||
| $D867 | a call | 26,318 | ||
| $D8CD | a call | 26,318 | ||
| $DB2B | a call | 26,318 | ||
| $DBC1 | a call | 26,318 | ||
| $DC49 | a call | 26,318 | ||
| $DC62 | a call | 26,318 | ||
| $DCCA | a call | 26,318 | ||
| $DE22 | a call | 26,318 | ||
| $DE99 | a call | 26,318 | ||
| $DEB3 | a call | 26,318 | ||
| $DF77 | a call | 26,318 | ||
| $DFC8 | a call | 26,318 | ||
| $E046 | a call | 26,318 | ||
| $E240 | a call | 26,318 | ||
| $E306 | a call | 26,318 | ||
| $E3D1 | a call | 26,318 | ||
| $E5C1 | a call | 26,318 | ||
| $E611 | a call | 26,318 | ||
| $E6BE | a call | 26,318 | ||
| $E6F8 | a call | 26,318 | ||
| $E888 | a call | 26,318 | ||
| $D6ED | a call | 5,326 | ||
| $D709 | a call | 5,326 | ||
| $E45D | a call | 5,305 | ||
| $CE51 | a call | 4,753 | ||
| $F89C | a call | 4,390 | ||
| $C24C | a call | 4,149 | ||
| $F8BD | a call | 3,902 | ||
| $F8F9 | a call | 3,258 | ||
| $DBB2 | a call | 3,014 | ||
| $C139 | a call | 2,663 | ||
| $DA03 | a call | 1,916 | ||
| $F8D4 | a call | 1,848 | ||
| $F8D8 | a call | 1,410 | ||
| $F8FF | a call | 848 | ||
| $C092 | a call | 806 | ||
| $E140 | a call | 696 | ||
| $E14C | a call | 588 | ||
| $C3E2 | a call | 587 | ||
| $D6CC | a call | 568 | ||
| $D6EA | a call | 519 | ||
| $F89E | a call | 420 | ||
| $DA75 | a call | 378 | ||
| $DA98 | a call | 378 | ||
| $C24E | a call | 206 | ||
| $DA8A | a call | 198 | ||
| $D1A8 | a call | 185 | ||
| $DE0E | a call | 182 | ||
| $C346 | a call | 180 | ||
| $DAD9 | a call | 177 | ||
| $F8DF | a call | 159 | ||
| $F898 | a call | 127 | ||
| $DAA7 | a call | 126 | ||
| $DAB1 | a call | 126 | ||
| $DABE | a call | 126 | ||
| $C324 | a call | 120 | ||
| $C177 | a call | 103 | ||
| $C183 | a call | 103 | ||
| $F894 | a call | 98 | ||
| $DDC3 | a call | 91 | ||
| $D072 | a call | 83 | ||
| $D17B | a call | 83 | ||
| $C1F8 | a call | 72 | ||
| $F8EA | a call | 68 | ||
| $DA40 | a call | 63 | ||
| $C303 | a call | 60 | ||
| $F8AE | a call | 38 | ||
| $CE91 | a call | 37 | ||
| $F8BA | a call | 26 | ||
| $C261 | a call | 20 | ||
| $C27E | a call | 20 | ||
| $C355 | a call | 20 | ||
| $CEC4 | a call | 20 | ||
| $F8A7 | a call | 13 | ||
| $D12F | a call | 5 |
Where it waits
Loops a rule named that sit inside a routine and are not themselves a place the code is entered.
| at | its name in the listing | what it is, and the evidence |
|---|---|---|
| $CA6A | wait_CA6A | The wait for the frame: waits on the byte at $00A2, times entered 26,403, turns 11,199,943, calls on each turn 1, writes of it under the frame interrupt 52,661, frames in all 59,524 |
The memory its routines share
547 bytes of memory were written by one routine and read by another, and 29 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 |
|---|---|---|---|
| $0560 | 117 | 1 | 4 across, 5 down |
| $0660 | 21 | 6 | 1 across, 2 down |
| $001D | 11 | 8 | 2 across, 2 down |
| $0012 | 6 | 1 | 1 across |
| $0000 | 256 | 6 | |
| $029C | 48 | 8 | |
| $00A0 | 48 | 1 | |
| $0299 | 48 | 1 | |
| $0214 | 37 | 1 | |
| $0380 | 32 | 3 | |
| $00D1 | 31 | 2 | |
| $0244 | 29 | 1 |
The 24 busiest shared bytes
| byte | reads and writes | routines writing | routines reading |
|---|---|---|---|
| $0000 | 44,488,857 | 6 | 6 |
| $001D | 44,100,665 | 2 | 6 |
| $001E | 44,047,134 | 2 | 6 |
| $001F | 33,028,773 | 2 | 6 |
| $0021 | 33,005,949 | 2 | 6 |
| $0020 | 33,002,451 | 2 | 5 |
| $0027 | 28,408,882 | 2 | 3 |
| $0026 | 27,295,106 | 2 | 3 |
| $0024 | 26,963,381 | 2 | 3 |
| $0023 | 25,181,293 | 2 | 4 |
| $0022 | 19,047,074 | 2 | 4 |
| $0025 | 17,807,231 | 2 | 3 |
| $0001 | 16,604,303 | 6 | 6 |
| $0002 | 12,733,192 | 6 | 6 |
| $0004 | 12,568,039 | 6 | 6 |
| $0003 | 12,455,666 | 6 | 6 |
| $0007 | 5,395,881 | 6 | 6 |
| $0006 | 3,658,666 | 6 | 6 |
| $0005 | 1,760,388 | 6 | 6 |
| $0019 | 706,930 | 3 | 6 |
| $03E0 | 686,032 | 6 | 6 |
| $03F0 | 685,681 | 6 | 6 |
| $001B | 594,981 | 3 | 3 |
| $0010 | 425,155 | 6 | 6 |
This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.