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 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.

atits name in the listingentered bytimeswhat it is, and the evidence
$C40Drandom_C40Da call11,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
$C59Ccompare_C59Ca call1,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
$C47Csprites_C47Ca call336,176
The sprite writers: frames it ran in 26,887, writes to the sprite page 2,203,688
$C448poll_C448a call117,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
$C120drain_C120a call58,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
$F880sound_F880a call58,696
The sound driver: frames it ran in 56,763, writes 117,389
$CBD4sprites_CBD4a call58,693
The sprite writers: frames it ran in 58,597, writes to the sprite page 12,213
$DB46compare_DB46a call52,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
$C144split_C144a call33,477
The split: frames it ran in 33,477, scroll writes while drawing 17,678, status reads while drawing 1,039,246
$E814sprites_E814a call28,981
The sprite writers: frames it ran in 28,981, writes to the sprite page 399,303
$E4D8random_E4D8a call26,342
The random byte: frames it ran in 26,322, bytes $0005,$0006, rotates 10, exclusive-ors 1
$DC7Bsprites_DC7Ba call26,320
The sprite writers: frames it ran in 26,320, writes to the sprite page 210,560
$E029sprites_E029a call26,320
The sprite writers: frames it ran in 26,320, writes to the sprite page 105,280
$E7AAsprites_E7AAa call26,320
The sprite writers: frames it ran in 26,320, writes to the sprite page 263,200
$D950sprites_D950a call26,318
The sprite writers: frames it ran in 26,318, writes to the sprite page 1,008
$DA1Bsprites_DA1Ba call15,328
The sprite writers: frames it ran in 958, writes to the sprite page 15,328
$E9E6sprites_E9E6a call11,346
The sprite writers: frames it ran in 1,891, writes to the sprite page 18,910
$E9C7sprites_E9C7a call7,564
The sprite writers: frames it ran in 1,891, writes to the sprite page 18,910
$C603sprites_C603a call4,017
The sprite writers: frames it ran in 2,850, writes to the sprite page 3,888
$E9BAsprites_E9BAa call2,893
The sprite writers: frames it ran in 2,221, writes to the sprite page 34,716
$CA8Esprites_CA8Ea call403
The sprite writers: frames it ran in 403, writes to the sprite page 103,168
$C0D7split_C0D7a call327
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
$DDD6compare_DDD6a call182
Where two things are compared: instructions 1, pairs of bytes 2, bytes in all 3, times compared 2, X positions at $001E,$001F,$04D3
$C983resetpower-on84
The sprite writers: frames it ran in 59,440, writes to the sprite page 21,504
$CF50sprites_CF50a call68
The sprite writers: frames it ran in 136, writes to the sprite page 272
$E76Ba call397,928
$DB1Da call185,083
$DC17a call100,624
$CAA1each frame (NMI)59,272
$D2CFa call59,272
$D6D8a call59,202
$C073a call58,707
$C087a call58,707
$C434a call58,707
$CEE8a call58,696
$FA4Ca call58,696
$C3CCa call54,198
$D73Ca call52,636
$D7EAa call52,636
$DBF1a call52,636
$E31Da call52,636
$E5A8a call48,486
$D90Da call35,212
$CE5Ba call29,466
$CE1Da call29,026
$D449a call29,025
$CD4Da call28,981
$DEE9a call28,750
$E6D5a call26,853
$E6E1a call26,797
$D1DDa call26,583
$D91Aa call26,320
$DE78a call26,320
$E47Aa call26,320
$CD89a call26,318
$CF11a call26,318
$D098a call26,318
$D4E9a call26,318
$D5E8a call26,318
$D726a call26,318
$D7D0a call26,318
$D867a call26,318
$D8CDa call26,318
$DB2Ba call26,318
$DBC1a call26,318
$DC49a call26,318
$DC62a call26,318
$DCCAa call26,318
$DE22a call26,318
$DE99a call26,318
$DEB3a call26,318
$DF77a call26,318
$DFC8a call26,318
$E046a call26,318
$E240a call26,318
$E306a call26,318
$E3D1a call26,318
$E5C1a call26,318
$E611a call26,318
$E6BEa call26,318
$E6F8a call26,318
$E888a call26,318
$D6EDa call5,326
$D709a call5,326
$E45Da call5,305
$CE51a call4,753
$F89Ca call4,390
$C24Ca call4,149
$F8BDa call3,902
$F8F9a call3,258
$DBB2a call3,014
$C139a call2,663
$DA03a call1,916
$F8D4a call1,848
$F8D8a call1,410
$F8FFa call848
$C092a call806
$E140a call696
$E14Ca call588
$C3E2a call587
$D6CCa call568
$D6EAa call519
$F89Ea call420
$DA75a call378
$DA98a call378
$C24Ea call206
$DA8Aa call198
$D1A8a call185
$DE0Ea call182
$C346a call180
$DAD9a call177
$F8DFa call159
$F898a call127
$DAA7a call126
$DAB1a call126
$DABEa call126
$C324a call120
$C177a call103
$C183a call103
$F894a call98
$DDC3a call91
$D072a call83
$D17Ba call83
$C1F8a call72
$F8EAa call68
$DA40a call63
$C303a call60
$F8AEa call38
$CE91a call37
$F8BAa call26
$C261a call20
$C27Ea call20
$C355a call20
$CEC4a call20
$F8A7a call13
$D12Fa call5

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
$CA6Await_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.

004080C0$0000$0100$0200$0300$0400$0500$0600$0700
The console's 2,048 bytes of memory, one row for each 256. A dark square is a position a rule saw compared. 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
$056011714 across, 5 down
$06602161 across, 2 down
$001D1182 across, 2 down
$0012611 across
$00002566
$029C488
$00A0481
$0299481
$0214371
$0380323
$00D1312
$0244291

The 24 busiest shared bytes

bytereads and writesroutines writingroutines reading
$000044,488,85766
$001D44,100,66526
$001E44,047,13426
$001F33,028,77326
$002133,005,94926
$002033,002,45125
$002728,408,88223
$002627,295,10623
$002426,963,38123
$002325,181,29324
$002219,047,07424
$002517,807,23123
$000116,604,30366
$000212,733,19266
$000412,568,03966
$000312,455,66666
$00075,395,88166
$00063,658,66666
$00051,760,38866
$0019706,93036
$03E0686,03266
$03F0685,68166
$001B594,98133
$0010425,15566

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

All the games