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 poll: 2
- The idle spin: 1
- The game inside the interrupt: 1
- The jump engine: 8
- The handler kept in memory: 3
- The bank switch: 1
- The picture writer: 1
- The palette writers: 1
- The sprite writers: 1
- The scroll writer: 1
- The sound driver: 1
- The random byte: 1
- Where two things are compared: 4
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.
| at | its name in the listing | entered by | times | what it is, and the evidence |
|---|---|---|---|---|
| $86BE | handlers_86BE | a call | 156,809 | The handler kept in memory: jumps 132,729, places it landed 79, address copied from $0008,$000D,$04B6,$04CF |
| $80EA | poll_80EA | a call | 85,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 |
| $8006 | nmi | each 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 |
| $853E | drain_853E | a call | 38,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 |
| $839E | compare_839E | a call | 38,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 |
| $9C26 | engine_9C26 | a call | 23,178 | The jump engine: tables 3, jumps through them 11,578 |
| $82D9 | compare_82D9 | a call | 18,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 |
| $98C8 | engine_98C8 | a call | 12,712 | The jump engine: tables 4, jumps through them 5,608 |
| $861A | compare_861A | a call | 12,584 | Where two things are compared: instructions 1, pairs of bytes 1, bytes in all 2, times compared 6, X positions at $001E,$0025 |
| $8722 | engine_8722 | a call | 4,678 | The jump engine: tables 9, jumps through them 4,236 |
| $8706 | engine_8706 | a call | 4,674 | The jump engine: tables 36, jumps through them 2,649 |
| $8E3C | random_8E3C | a call | 2,395 | The random byte: frames it ran in 3,325, bytes $00C8, rotates 2, exclusive-ors 1 |
| $A993 | dispatch_A993 | a table | 1,729 | The sound driver: frames it ran in 1,825, writes 4,436 |
| $9543 | engine_9543 | a call | 1,511 | The jump engine: tables 1, jumps through them 2 |
| $8A69 | engine_8A69 | a call | 1,108 | The jump engine: tables 1, jumps through them 6 |
| $90B8 | compare_90B8 | a call | 832 | 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 |
| $A24E | engine_A24E | a call | 186 | The jump engine: tables 1, jumps through them 1 |
| $80A4 | bank_80A4 | a call | 157 | The bank switch: writes 314, in the blank 14, while drawing 300 |
| $80B3 | engine_80B3 | a call | 58 | The jump engine: tables 1, jumps through them 58 |
| $A50B | handlers_A50B | a call | 42 | The handler kept in memory: jumps 223, places it landed 6, address copied from $0002,$0003 |
| $8D16 | dispatch_8D16 | a table | 4 | The handler kept in memory: jumps 404, places it landed 13, address copied from $009D,$009E |
| $81F0 | a call | 305,019 | ||
| $81B6 | a call | 60,620 | ||
| $94FC | a table | 46,208 | ||
| $867E | a call | 38,791 | ||
| $A4E2 | a call | 30,782 | ||
| $9F44 | a table | 25,445 | ||
| $9FA4 | a call | 25,445 | ||
| $9FB6 | a call | 25,445 | ||
| $834D | a call | 24,172 | ||
| $84F3 | a call | 23,271 | ||
| $8044 | a call | 23,207 | ||
| $8DB6 | a table | 23,207 | ||
| $8F86 | a call | 23,178 | ||
| $A462 | a call | 23,178 | ||
| $9BE0 | a call | 23,176 | ||
| $832B | a call | 21,746 | ||
| $8618 | a call | 20,167 | ||
| $9B65 | a table | 19,695 | ||
| $865E | a call | 19,064 | ||
| $A512 | a call | 18,247 | ||
| $A4CD | a call | 17,158 | ||
| $A522 | a call | 16,129 | ||
| $8A70 | a call | 15,516 | ||
| $8151 | a call | 14,523 | ||
| $8A76 | a call | 13,400 | ||
| $8A80 | a call | 13,002 | ||
| $9C1C | a call | 11,578 | ||
| $8A0A | a call | 11,498 | ||
| $8A59 | a call | 11,100 | ||
| $85C4 | a call | 9,698 | ||
| $908B | a table | 9,607 | ||
| $8DC8 | a call | 8,919 | ||
| $8FD6 | a call | 7,457 | ||
| $9E98 | a call | 7,204 | ||
| $8629 | a call | 6,264 | ||
| $88A4 | a table | 5,358 | ||
| $872F | a call | 5,145 | ||
| $8319 | a call | 4,907 | ||
| $84EA | a call | 4,173 | ||
| $9BC3 | a table | 3,473 | ||
| $9899 | a table | 3,355 | ||
| $98A4 | a table | 3,220 | ||
| $98B2 | a table | 3,157 | ||
| $98BD | a table | 2,980 | ||
| $81AA | a call | 2,491 | ||
| $864D | a call | 2,449 | ||
| $A4E6 | a call | 2,364 | ||
| $9E50 | a table | 2,121 | ||
| $9B25 | a table | 2,119 | ||
| $817A | a call | 2,080 | ||
| $818B | a call | 2,080 | ||
| $9AB2 | a table | 2,055 | ||
| $A537 | a table | 2,010 | ||
| $9E62 | a table | 1,834 | ||
| $A36F | a call | 1,798 | ||
| $9E7A | a table | 1,662 | ||
| $A356 | a table | 1,648 | ||
| $95A4 | a table | 1,623 | ||
| $95C4 | a call | 1,623 | ||
| $9E8C | a table | 1,589 | ||
| $862B | a call | 1,572 | ||
| $864F | a call | 1,570 | ||
| $A69B | a table | 1,454 | ||
| $A87C | a table | 1,281 | ||
| $8790 | a table | 1,277 | ||
| $8883 | a table | 1,274 | ||
| $A90E | a table | 1,258 | ||
| $9698 | a call | 1,224 | ||
| $8A65 | a table | 1,108 | ||
| $A1D6 | a table | 894 | ||
| $86CC | a call | 892 | ||
| $9553 | a table | 858 | ||
| $9594 | a call | 858 | ||
| $860F | a call | 843 | ||
| $98A1 | a table | 831 | ||
| $98AC | a table | 807 | ||
| $98BA | a table | 783 | ||
| $952A | a table | 762 | ||
| $98C5 | a table | 760 | ||
| $953D | a table | 749 | ||
| $8D8D | a table | 681 | ||
| $A61D | a table | 558 | ||
| $8678 | a call | 502 | ||
| $8290 | a call | 477 | ||
| $90A5 | a table | 426 | ||
| $90B2 | a table | 406 | ||
| $8505 | a call | 404 | ||
| $8530 | a call | 404 | ||
| $863A | a call | 396 | ||
| $A1C2 | a call | 384 | ||
| $907B | a call | 315 | ||
| $8643 | a call | 256 | ||
| $A7BA | a table | 252 | ||
| $8261 | a call | 223 | ||
| $82B8 | a call | 223 | ||
| $A248 | a call | 212 | ||
| $8244 | a call | 198 | ||
| $986E | a table | 198 | ||
| $A4BD | a table | 198 | ||
| $A1AF | a table | 193 | ||
| $A1BC | a table | 191 | ||
| $866F | a call | 183 | ||
| $9494 | a table | 170 | ||
| $A683 | a table | 166 | ||
| $94CE | a table | 154 | ||
| $A36B | a table | 150 | ||
| $94F0 | a table | 149 | ||
| $94F5 | a table | 149 | ||
| $9883 | a table | 140 | ||
| $A5E1 | a table | 128 | ||
| $9527 | a table | 127 | ||
| $953A | a table | 127 | ||
| $9057 | a table | 121 | ||
| $A208 | a table | 110 | ||
| $86C1 | a call | 109 | ||
| $825C | a call | 104 | ||
| $9066 | a table | 104 | ||
| $A1F6 | a table | 104 | ||
| $95BD | a table | 101 | ||
| $95C1 | a call | 101 | ||
| $811A | a call | 96 | ||
| $94E3 | a table | 92 | ||
| $9075 | a table | 90 | ||
| $A502 | a table | 83 | ||
| $A50A | a table | 83 | ||
| $8716 | a call | 80 | ||
| $9652 | a call | 72 | ||
| $94EB | a table | 62 | ||
| $A605 | a table | 62 | ||
| $86D5 | a call | 56 | ||
| $91B1 | a call | 56 | ||
| $9235 | a call | 56 | ||
| $E100 | a call | 53 | ||
| $A235 | a table | 48 | ||
| $A21B | a table | 47 | ||
| $A242 | a table | 47 | ||
| $852A | a call | 44 | ||
| $A228 | a table | 44 | ||
| $9E5F | a table | 43 | ||
| $87BC | a table | 42 | ||
| $87CA | a table | 42 | ||
| $87D9 | a table | 42 | ||
| $87F1 | a table | 42 | ||
| $8813 | a table | 42 | ||
| $882D | a table | 42 | ||
| $883E | a table | 42 | ||
| $885C | a table | 42 | ||
| $8861 | a table | 42 | ||
| $8868 | a table | 42 | ||
| $887B | a table | 42 | ||
| $A7B0 | a table | 42 | ||
| $8782 | a table | 41 | ||
| $8785 | a table | 41 | ||
| $A4ED | a call | 41 | ||
| $8048 | power-on | 39 | ||
| $8092 | a table | 39 | ||
| $809A | a table | 39 | ||
| $813E | a call | 39 | ||
| $8754 | a table | 39 | ||
| $9BDE | a call | 39 | ||
| $88C8 | a table | 36 | ||
| $95CB | a call | 36 | ||
| $9E4D | a table | 36 | ||
| $9E74 | a table | 36 | ||
| $9AAF | a table | 34 | ||
| $9E89 | a table | 34 | ||
| $889C | a table | 33 | ||
| $821D | a call | 31 | ||
| $9AA1 | a table | 31 | ||
| $89CC | a table | 29 | ||
| $89D1 | a table | 29 | ||
| $89D6 | a table | 29 | ||
| $9B50 | a table | 29 | ||
| $9F31 | a table | 29 | ||
| $9F36 | a table | 29 | ||
| $A7C9 | a call | 29 | ||
| $A7DC | a table | 29 | ||
| $A7E3 | a table | 29 | ||
| $A7EA | a table | 29 | ||
| $A805 | a table | 29 | ||
| $A897 | a table | 29 | ||
| $A929 | a table | 29 | ||
| $90A2 | a table | 28 | ||
| $9F24 | a call | 28 | ||
| $8568 | a call | 27 | ||
| $8927 | a table | 27 | ||
| $8928 | a table | 27 | ||
| $89DC | a call | 27 | ||
| $8A09 | a table | 27 | ||
| $9ACA | a call | 27 | ||
| $9D37 | a call | 27 | ||
| $9EF8 | a call | 27 | ||
| $90AF | a table | 26 | ||
| $9AC4 | a table | 24 | ||
| $9493 | a table | 21 | ||
| $9A84 | a table | 18 | ||
| $A58D | a table | 16 | ||
| $A5B2 | a table | 16 | ||
| $A1F3 | a table | 15 | ||
| $9E43 | a table | 14 | ||
| $A205 | a table | 14 | ||
| $88F0 | a table | 13 | ||
| $9159 | a call | 13 | ||
| $916E | a table | 13 | ||
| $917B | a table | 13 | ||
| $9486 | a call | 13 | ||
| $A1AC | a table | 13 | ||
| $8A8B | a call | 12 | ||
| $8A94 | a table | 12 | ||
| $A1B9 | a table | 12 | ||
| $9054 | a table | 11 | ||
| $9063 | a table | 11 | ||
| $8AA8 | a call | 10 | ||
| $8AB0 | a table | 10 | ||
| $8AB1 | a table | 10 | ||
| $8AB6 | a table | 10 | ||
| $9072 | a table | 10 | ||
| $9BB2 | a table | 10 | ||
| $8AC5 | a table | 9 | ||
| $88FB | a table | 8 | ||
| $890F | a table | 8 | ||
| $8A52 | a table | 8 | ||
| $9481 | a call | 8 | ||
| $A218 | a table | 7 | ||
| $A225 | a table | 7 | ||
| $8917 | a table | 6 | ||
| $A232 | a table | 6 | ||
| $A23F | a table | 6 | ||
| $8953 | a table | 5 | ||
| $8AF7 | a table | 5 | ||
| $891C | a table | 4 | ||
| $8AD1 | a table | 4 | ||
| $8D05 | a table | 4 | ||
| $8D27 | a table | 4 | ||
| $8D30 | a table | 4 | ||
| $8D36 | a table | 4 | ||
| $9FD1 | a call | 4 | ||
| $A12B | a call | 4 | ||
| $A40A | a call | 4 | ||
| $879B | a table | 3 | ||
| $951D | a table | 3 | ||
| $95BA | a table | 3 | ||
| $875F | a table | 2 | ||
| $8945 | a table | 2 | ||
| $8979 | a table | 2 | ||
| $8DB5 | a table | 2 | ||
| $999C | a table | 2 | ||
| $A4C9 | a table | 2 | ||
| $A633 | a table | 2 | ||
| $8DA0 | a table | 1 | ||
| $904A | a table | 1 | ||
| $9975 | a table | 1 | ||
| $9C29 | a table | 1 | ||
| $A1A7 | a table | 1 | ||
| $A1C5 | a table | 1 |
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 |
|---|---|---|
| $80A1 | spin_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.
| at | reached | entries | taken | chosen by the byte at |
|---|---|---|---|---|
| $98AA | by a return | 1 | 1 |
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.
Reaches through an index: those that hold positions, then the longest
| from | bytes reached | instructions | positions it holds |
|---|---|---|---|
| $003F | 25 | 22 | 5 down |
| $000D | 25 | 17 | 13 across |
| $0200 | 253 | 2 | |
| $0300 | 212 | 8 | |
| $0301 | 211 | 4 | |
| $0302 | 193 | 2 | |
| $0201 | 177 | 1 | |
| $0202 | 177 | 1 | |
| $0203 | 177 | 1 | |
| $0773 | 80 | 3 | |
| $0535 | 62 | 3 | |
| $05CD | 44 | 8 |
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.
| slots | arrays | routines | positions across | positions down | added into them | choosing a jump | counted down | travelling with them |
|---|---|---|---|---|---|---|---|---|
| 25 | 5 | 25 | $000D | $003F | $0026, $0058, $0071 |
The 24 busiest shared bytes
| byte | reads and writes | routines writing | routines reading |
|---|---|---|---|
| $0000 | 3,832,705 | 6 | 6 |
| $009E | 1,765,306 | 6 | 6 |
| $009D | 1,765,286 | 4 | 6 |
| $0450 | 1,548,190 | 3 | 4 |
| $0094 | 1,032,023 | 3 | 3 |
| $0001 | 942,470 | 6 | 6 |
| $0095 | 727,004 | 3 | 3 |
| $0002 | 619,366 | 6 | 6 |
| $0451 | 594,190 | 5 | 6 |
| $0097 | 519,015 | 2 | 1 |
| $0098 | 385,524 | 1 | 6 |
| $0005 | 379,892 | 2 | 6 |
| $00B1 | 255,097 | 4 | 2 |
| $0006 | 193,856 | 4 | 6 |
| $0025 | 163,118 | 3 | 6 |
| $0007 | 139,445 | 4 | 6 |
| $044B | 137,742 | 6 | 6 |
| $0099 | 122,733 | 1 | 6 |
| $003E | 121,721 | 2 | 3 |
| $041F | 117,721 | 6 | 6 |
| $0438 | 117,719 | 6 | 6 |
| $04F9 | 117,194 | 6 | 6 |
| $04FA | 114,323 | 6 | 6 |
| $04FB | 114,305 | 6 | 6 |
This page shows none of the game's bytes. The listing these figures were read from stays with the cartridge.