Defender II (USA)
Defender II (USA) is on a NROM board with 16,384 bytes of program. A crawl of 400 steps from power-on kept 45 paths that found new code. Played back over 27,325 frames, they executed 8,161 bytes of it, 50 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: 1
- The sound driver: 1
- The random byte: 2
- Where two things are compared: 2
The 133 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 |
|---|---|---|---|
| $C40D | a call | 3,267,810 | The random byte: frames it ran in 16,690, bytes $001D,$001E,$001F,$0020,$0021,$0022,$0023,$0024,$0025,$0026,$0027, rotates 11, exclusive-ors 1 |
| $C59C | a call | 521,931 | Where two things are compared: instructions 4, pairs of bytes 15, bytes in all 15, times compared 3,953, X positions at $03C3,$03CD,$0583,$058D,$0683, Y positions at $001E,$03C1,$03CC,$0411,$042C,$0431,$0451,$04D1,$0581,$058C |
| $C47C | a call | 90,100 | The sprite writers: frames it ran in 7,326, writes to the sprite page 579,648 |
| $C448 | a call | 32,816 | The poll: port $4016, reads a frame 8, strobes a frame 0 The poll: port $4017, reads a frame 8, strobes a frame 0 |
| $D2CF | a call | 16,690 | The random byte: frames it ran in 16,690, bytes $0002, rotates 2, exclusive-ors 1 |
| $C120 | a call | 16,443 | The palette writers: frames it ran in 16,408, writes 98 The scroll writer: frames it ran in 16,408, writes in the blank 32,816 The picture writer: frames it ran in 16,408, writes 35,506, in the blank 35,226, while drawing 280 |
| $F880 | a call | 16,402 | The sound driver: frames it ran in 15,800, writes 32,803 |
| $CBD4 | a call | 16,401 | The sprite writers: frames it ran in 16,413, writes to the sprite page 1,719 |
| $DB46 | a call | 14,500 | Where two things are compared: instructions 3, pairs of bytes 2, bytes in all 3, times compared 25,005, Y positions at $03C1,$05A1,$05C1 |
| $E814 | a call | 7,565 | The sprite writers: frames it ran in 7,565, writes to the sprite page 99,610 |
| $D950 | a call | 7,250 | The sprite writers: frames it ran in 7,250, writes to the sprite page 448 |
| $DC7B | a call | 7,250 | The sprite writers: frames it ran in 7,250, writes to the sprite page 58,000 |
| $E029 | a call | 7,250 | The sprite writers: frames it ran in 7,250, writes to the sprite page 29,000 |
| $E7AA | a call | 7,250 | The sprite writers: frames it ran in 7,250, writes to the sprite page 72,500 |
| $DA1B | a call | 6,512 | The sprite writers: frames it ran in 407, writes to the sprite page 6,512 |
| $E9E6 | a call | 4,038 | The sprite writers: frames it ran in 673, writes to the sprite page 6,730 |
| $E9C7 | a call | 2,692 | The sprite writers: frames it ran in 673, writes to the sprite page 6,730 |
| $C603 | a call | 1,389 | The sprite writers: frames it ran in 789, writes to the sprite page 1,680 |
| $E9BA | a call | 1,041 | The sprite writers: frames it ran in 800, writes to the sprite page 12,492 |
| $CA8E | a call | 205 | The sprite writers: frames it ran in 205, writes to the sprite page 52,480 |
| $C0D7 | a call | 157 | The palette writers: frames it ran in 244, writes 2,860 The split: frames it ran in 244, scroll writes while drawing 314, status reads while drawing 2,794 |
| $C983 | power-on | 45 | The sprite writers: frames it ran in 16,780, writes to the sprite page 11,520 |
| $CF50 | a call | 35 | The sprite writers: frames it ran in 70, writes to the sprite page 140 |
| $E76B | a call | 90,938 | |
| $DB1D | a call | 36,604 | |
| $DC17 | a call | 28,884 | |
| $CAA1 | each frame (NMI) | 16,690 | |
| $D6D8 | a call | 16,656 | |
| $C073 | a call | 16,408 | |
| $C087 | a call | 16,408 | |
| $C434 | a call | 16,408 | |
| $CEE8 | a call | 16,402 | |
| $FA4C | a call | 16,402 | |
| $C3CC | a call | 16,383 | |
| $E5A8 | a call | 14,761 | |
| $D73C | a call | 14,500 | |
| $D7EA | a call | 14,500 | |
| $DBF1 | a call | 14,500 | |
| $E31D | a call | 14,500 | |
| $D90D | a call | 9,724 | |
| $CE5B | a call | 7,727 | |
| $D1DD | a call | 7,608 | |
| $C144 | a call | 7,584 | |
| $CE1D | a call | 7,584 | |
| $D449 | a call | 7,583 | |
| $DEE9 | a call | 7,580 | |
| $CD4D | a call | 7,565 | |
| $E6D5 | a call | 7,322 | |
| $E6E1 | a call | 7,314 | |
| $E4D8 | a call | 7,259 | |
| $CD89 | a call | 7,250 | |
| $CF11 | a call | 7,250 | |
| $D098 | a call | 7,250 | |
| $D4E9 | a call | 7,250 | |
| $D5E8 | a call | 7,250 | |
| $D726 | a call | 7,250 | |
| $D7D0 | a call | 7,250 | |
| $D867 | a call | 7,250 | |
| $D8CD | a call | 7,250 | |
| $D91A | a call | 7,250 | |
| $DB2B | a call | 7,250 | |
| $DBC1 | a call | 7,250 | |
| $DC49 | a call | 7,250 | |
| $DC62 | a call | 7,250 | |
| $DCCA | a call | 7,250 | |
| $DE22 | a call | 7,250 | |
| $DE78 | a call | 7,250 | |
| $DE99 | a call | 7,250 | |
| $DEB3 | a call | 7,250 | |
| $DF77 | a call | 7,250 | |
| $DFC8 | a call | 7,250 | |
| $E046 | a call | 7,250 | |
| $E240 | a call | 7,250 | |
| $E306 | a call | 7,250 | |
| $E3D1 | a call | 7,250 | |
| $E47A | a call | 7,250 | |
| $E5C1 | a call | 7,250 | |
| $E611 | a call | 7,250 | |
| $E6BE | a call | 7,250 | |
| $E6F8 | a call | 7,250 | |
| $E888 | a call | 7,250 | |
| $F89C | a call | 1,895 | |
| $F8BD | a call | 1,751 | |
| $E45D | a call | 1,469 | |
| $F8F9 | a call | 1,330 | |
| $C24C | a call | 1,186 | |
| $DA03 | a call | 814 | |
| $F8D4 | a call | 716 | |
| $DBB2 | a call | 687 | |
| $F8D8 | a call | 614 | |
| $CE51 | a call | 606 | |
| $C092 | a call | 410 | |
| $C139 | a call | 315 | |
| $F8FF | a call | 250 | |
| $DA75 | a call | 168 | |
| $DA98 | a call | 168 | |
| $C346 | a call | 153 | |
| $C24E | a call | 104 | |
| $C324 | a call | 102 | |
| $C3E2 | a call | 98 | |
| $D6CC | a call | 98 | |
| $DAD9 | a call | 93 | |
| $DA8A | a call | 85 | |
| $D6EA | a call | 84 | |
| $F8DF | a call | 83 | |
| $D1A8 | a call | 82 | |
| $DAA7 | a call | 56 | |
| $DAB1 | a call | 56 | |
| $DABE | a call | 56 | |
| $F898 | a call | 56 | |
| $C177 | a call | 52 | |
| $C183 | a call | 52 | |
| $C303 | a call | 51 | |
| $D072 | a call | 35 | |
| $D17B | a call | 35 | |
| $DDD6 | a call | 30 | |
| $DE0E | a call | 30 | |
| $D6ED | a call | 29 | |
| $D709 | a call | 29 | |
| $DA40 | a call | 28 | |
| $C1F8 | a call | 27 | |
| $F894 | a call | 23 | |
| $C261 | a call | 17 | |
| $C27E | a call | 17 | |
| $C355 | a call | 17 | |
| $CE91 | a call | 17 | |
| $CEC4 | a call | 17 | |
| $DDC3 | a call | 15 | |
| $F8AE | a call | 9 | |
| $F89E | a call | 7 | |
| $F8A7 | a call | 5 | |
| $F8BA | a call | 5 | |
| $D12F | 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 |
|---|---|
| $CA6A | The wait for the frame: waits on the byte at $00A2, times entered 7,294, turns 3,260,517, calls on each turn 1, writes of it under the frame interrupt 14,500, frames in all 16,825 |
The memory its routines share
449 bytes of memory were written by one routine and read by another, and 26 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 | 2 across, 4 down |
| $001D | 11 | 6 | 1 down |
| $0000 | 256 | 6 | |
| $029C | 48 | 8 | |
| $00A0 | 48 | 1 | |
| $0214 | 37 | 1 | |
| $0380 | 32 | 3 | |
| $0299 | 32 | 1 | |
| $00D1 | 31 | 2 | |
| $0244 | 29 | 1 | |
| $0331 | 27 | 21 | |
| $00D0 | 16 | 1 |
The 24 busiest shared bytes
| byte | reads and writes | routines writing | routines reading |
|---|---|---|---|
| $0000 | 12,506,198 | 6 | 6 |
| $001D | 12,416,065 | 2 | 6 |
| $001E | 12,401,456 | 2 | 6 |
| $001F | 9,299,278 | 2 | 5 |
| $0021 | 9,292,225 | 2 | 5 |
| $0020 | 9,292,022 | 2 | 4 |
| $0024 | 7,680,198 | 2 | 3 |
| $0026 | 7,445,395 | 2 | 3 |
| $0027 | 7,213,516 | 2 | 3 |
| $0023 | 6,249,409 | 2 | 3 |
| $0001 | 4,541,760 | 6 | 6 |
| $0002 | 3,386,531 | 6 | 6 |
| $0003 | 3,180,201 | 6 | 6 |
| $0004 | 3,158,748 | 6 | 6 |
| $0025 | 1,916,648 | 2 | 3 |
| $0022 | 1,664,479 | 2 | 3 |
| $0007 | 1,426,073 | 6 | 6 |
| $0006 | 945,320 | 6 | 6 |
| $0005 | 454,744 | 6 | 6 |
| $03E0 | 188,912 | 6 | 6 |
| $03F0 | 188,830 | 4 | 6 |
| $0019 | 184,790 | 3 | 6 |
| $001B | 159,623 | 2 | 3 |
| $0010 | 120,504 | 6 | 6 |
This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.