Paperboy (USA)

Paperboy (USA) is on a CNROM board with 32,768 bytes of program. A crawl of 8,000 steps from power-on kept 39 paths that found new code. Played back over 101,779 frames, they executed 9,018 bytes of it, 28 percent.

What the rules named

The 276 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
$86BEhandlers_86BEa call156,809
The handler kept in memory: jumps 132,729, places it landed 79, address copied from $0008,$000D,$04B6,$04CF
$80EApoll_80EAa call85,719
The poll: port $4016, reads a frame 13, strobes a frame 5
The poll: port $4017, reads a frame 8, strobes a frame 5
$8006nmieach frame (NMI)39,502
The game inside the interrupt: frames it ran in 39,502, frames in all 39,619, the spin is at $80A1
The scroll writer: frames it ran in 39,502, writes in the blank 77,486
$853Edrain_853Ea call38,791
The palette writers: frames it ran in 38,791, writes 1,585
The picture writer: frames it ran in 38,791, writes 9,666, in the blank 7,582, while drawing 2,084
$839Ecompare_839Ea call38,770
Where two things are compared: instructions 2, pairs of bytes 77, bytes in all 19, times compared 210,252, X positions at $0019,$001A,$001B,$001C,$001D,$001E,$001F,$0020,$0021,$0022,$0023,$0024, Y positions at $004F,$0050,$0051,$0052,$0057,$07D5
The sprite writers: frames it ran in 38,796, writes to the sprite page 4,871,921
$9C26engine_9C26a call23,178
The jump engine: tables 3, jumps through them 11,578
$82D9compare_82D9a call18,575
Where two things are compared: instructions 2, pairs of bytes 7, bytes in all 9, times compared 17,237, X positions at $001D,$001E,$001F,$0020,$0025, Y positions at $0050,$0051,$0052,$0057
$98C8engine_98C8a call12,712
The jump engine: tables 4, jumps through them 5,608
$861Acompare_861Aa call12,584
Where two things are compared: instructions 1, pairs of bytes 1, bytes in all 2, times compared 6, X positions at $001E,$0025
$8722engine_8722a call4,678
The jump engine: tables 9, jumps through them 4,236
$8706engine_8706a call4,674
The jump engine: tables 36, jumps through them 2,649
$8E3Crandom_8E3Ca call2,395
The random byte: frames it ran in 3,325, bytes $00C8, rotates 2, exclusive-ors 1
$A993dispatch_A993a table1,729
The sound driver: frames it ran in 1,825, writes 4,436
$9543engine_9543a call1,511
The jump engine: tables 1, jumps through them 2
$8A69engine_8A69a call1,108
The jump engine: tables 1, jumps through them 6
$90B8compare_90B8a call832
Where two things are compared: instructions 1, pairs of bytes 3, bytes in all 4, times compared 822, X positions at $001E,$001F,$0020,$0025
$A24Eengine_A24Ea call186
The jump engine: tables 1, jumps through them 1
$80A4bank_80A4a call157
The bank switch: writes 314, in the blank 14, while drawing 300
$80B3engine_80B3a call58
The jump engine: tables 1, jumps through them 58
$A50Bhandlers_A50Ba call42
The handler kept in memory: jumps 223, places it landed 6, address copied from $0002,$0003
$8D16dispatch_8D16a table4
The handler kept in memory: jumps 404, places it landed 13, address copied from $009D,$009E
$81F0a call305,019
$81B6a call60,620
$94FCa table46,208
$867Ea call38,791
$A4E2a call30,782
$9F44a table25,445
$9FA4a call25,445
$9FB6a call25,445
$834Da call24,172
$84F3a call23,271
$8044a call23,207
$8DB6a table23,207
$8F86a call23,178
$A462a call23,178
$9BE0a call23,176
$832Ba call21,746
$8618a call20,167
$9B65a table19,695
$865Ea call19,064
$A512a call18,247
$A4CDa call17,158
$A522a call16,129
$8A70a call15,516
$8151a call14,523
$8A76a call13,400
$8A80a call13,002
$9C1Ca call11,578
$8A0Aa call11,498
$8A59a call11,100
$85C4a call9,698
$908Ba table9,607
$8DC8a call8,919
$8FD6a call7,457
$9E98a call7,204
$8629a call6,264
$88A4a table5,358
$872Fa call5,145
$8319a call4,907
$84EAa call4,173
$9BC3a table3,473
$9899a table3,355
$98A4a table3,220
$98B2a table3,157
$98BDa table2,980
$81AAa call2,491
$864Da call2,449
$A4E6a call2,364
$9E50a table2,121
$9B25a table2,119
$817Aa call2,080
$818Ba call2,080
$9AB2a table2,055
$A537a table2,010
$9E62a table1,834
$A36Fa call1,798
$9E7Aa table1,662
$A356a table1,648
$95A4a table1,623
$95C4a call1,623
$9E8Ca table1,589
$862Ba call1,572
$864Fa call1,570
$A69Ba table1,454
$A87Ca table1,281
$8790a table1,277
$8883a table1,274
$A90Ea table1,258
$9698a call1,224
$8A65a table1,108
$A1D6a table894
$86CCa call892
$9553a table858
$9594a call858
$860Fa call843
$98A1a table831
$98ACa table807
$98BAa table783
$952Aa table762
$98C5a table760
$953Da table749
$8D8Da table681
$A61Da table558
$8678a call502
$8290a call477
$90A5a table426
$90B2a table406
$8505a call404
$8530a call404
$863Aa call396
$A1C2a call384
$907Ba call315
$8643a call256
$A7BAa table252
$8261a call223
$82B8a call223
$A248a call212
$8244a call198
$986Ea table198
$A4BDa table198
$A1AFa table193
$A1BCa table191
$866Fa call183
$9494a table170
$A683a table166
$94CEa table154
$A36Ba table150
$94F0a table149
$94F5a table149
$9883a table140
$A5E1a table128
$9527a table127
$953Aa table127
$9057a table121
$A208a table110
$86C1a call109
$825Ca call104
$9066a table104
$A1F6a table104
$95BDa table101
$95C1a call101
$811Aa call96
$94E3a table92
$9075a table90
$A502a table83
$A50Aa table83
$8716a call80
$9652a call72
$94EBa table62
$A605a table62
$86D5a call56
$91B1a call56
$9235a call56
$E100a call53
$A235a table48
$A21Ba table47
$A242a table47
$852Aa call44
$A228a table44
$9E5Fa table43
$87BCa table42
$87CAa table42
$87D9a table42
$87F1a table42
$8813a table42
$882Da table42
$883Ea table42
$885Ca table42
$8861a table42
$8868a table42
$887Ba table42
$A7B0a table42
$8782a table41
$8785a table41
$A4EDa call41
$8048power-on39
$8092a table39
$809Aa table39
$813Ea call39
$8754a table39
$9BDEa call39
$88C8a table36
$95CBa call36
$9E4Da table36
$9E74a table36
$9AAFa table34
$9E89a table34
$889Ca table33
$821Da call31
$9AA1a table31
$89CCa table29
$89D1a table29
$89D6a table29
$9B50a table29
$9F31a table29
$9F36a table29
$A7C9a call29
$A7DCa table29
$A7E3a table29
$A7EAa table29
$A805a table29
$A897a table29
$A929a table29
$90A2a table28
$9F24a call28
$8568a call27
$8927a table27
$8928a table27
$89DCa call27
$8A09a table27
$9ACAa call27
$9D37a call27
$9EF8a call27
$90AFa table26
$9AC4a table24
$9493a table21
$9A84a table18
$A58Da table16
$A5B2a table16
$A1F3a table15
$9E43a table14
$A205a table14
$88F0a table13
$9159a call13
$916Ea table13
$917Ba table13
$9486a call13
$A1ACa table13
$8A8Ba call12
$8A94a table12
$A1B9a table12
$9054a table11
$9063a table11
$8AA8a call10
$8AB0a table10
$8AB1a table10
$8AB6a table10
$9072a table10
$9BB2a table10
$8AC5a table9
$88FBa table8
$890Fa table8
$8A52a table8
$9481a call8
$A218a table7
$A225a table7
$8917a table6
$A232a table6
$A23Fa table6
$8953a table5
$8AF7a table5
$891Ca table4
$8AD1a table4
$8D05a table4
$8D27a table4
$8D30a table4
$8D36a table4
$9FD1a call4
$A12Ba call4
$A40Aa call4
$879Ba table3
$951Da table3
$95BAa table3
$875Fa table2
$8945a table2
$8979a table2
$8DB5a table2
$999Ca table2
$A4C9a table2
$A633a table2
$8DA0a table1
$904Aa table1
$9975a table1
$9C29a table1
$A1A7a table1
$A1C5a table1

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
$80A1spin_80A1
The idle spin: turns 271,492,681, turns a frame 6,852

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
$98AAby a return11

The memory its routines share

762 bytes of memory were written by one routine and read by another, and 52 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$07001X11Y11
The console's 2,048 bytes of memory, one row for each 256. A numbered span is a column of one of the object tables drawn below, counted in the same order, as long as the table and filled as it is there. Where a table's columns overlap, its things lie one after another, each with all its properties, so the table is one outline with a mark where each property starts. 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
$003F25225 down
$000D251713 across
$02002532
$03002128
$03012114
$03021932
$02011771
$02021771
$02031771
$0773803
$0535623
$05CD448

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, which pick the way through a jump table, which is what a state or a kind does, and which are only ever counted down, which is what a timer does. What the rest hold is not named yet.

04812162024$000DX$0026$003FY$0058$0071
Table 1: 5 arrays of up to 25 slots that 25 routines step through together. Each column is an array at its address and each row a slot, so one thing on the screen is one row across all of them. X and Y are positions, and the darker squares are the slots a rule saw compared. + is added into a position, which is what a speed does. → chose a jump, which is what a state or a kind does. ↓ is only ever counted down, which is what a timer does. A plain outline travels with them and is not named yet.
slotsarraysroutinespositions acrosspositions downadded into themchoosing a jumpcounted downtravelling with them
25525$000D$003F$0026, $0058, $0071

The 24 busiest shared bytes

bytereads and writesroutines writingroutines reading
$00003,832,70566
$009E1,765,30666
$009D1,765,28646
$04501,548,19034
$00941,032,02333
$0001942,47066
$0095727,00433
$0002619,36666
$0451594,19056
$0097519,01521
$0098385,52416
$0005379,89226
$00B1255,09742
$0006193,85646
$0025163,11836
$0007139,44546
$044B137,74266
$0099122,73316
$003E121,72123
$041F117,72166
$0438117,71966
$04F9117,19466
$04FA114,32366
$04FB114,30566

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

All the games