Double Dribble (USA) (Rev 1)

Double Dribble (USA) (Rev 1) is on a UxROM board with 131,072 bytes of program. A crawl of 400 steps from power-on kept 26 paths that found new code. Played back over 18,226 frames, they executed 15,960 bytes of it, 12 percent.

What the rules named

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

atentered bytimeswhat it is, and the evidence
$80E8 (bank 2)a call35,346
The sprite writers: frames it ran in 7,194, writes to the sprite page 801,499
$C159 (bank 7)a call32,337
The bank switch: writes 32,337, in the blank 7,304, while drawing 25,033
$C314 (bank 7)a call14,556
The poll: port $4016, reads a frame 16, strobes a frame 4
The poll: port $4017, reads a frame 16, strobes a frame 4
$80ED (bank 1)a call11,915
The sound driver: frames it ran in 3,912, writes 7,083
$C41C (bank 7)a call10,745
The jump engine: tables 7, jumps through them 10,745
$C15E (bank 7)a call7,462
The bank switch: writes 7,462, in the blank 7,304, while drawing 158
$C036 (bank 7)each frame (NMI)7,307
The game inside the interrupt: frames it ran in 7,369, frames in all 7,726, the spin is at $C02B
$C100 (bank 7)a call7,307
The sprite writers: frames it ran in 7,307, writes to the sprite page 29,228
$D350 (bank 7)a call7,307
The scroll writer: frames it ran in 7,307, writes in the blank 13,946
$CB63 (bank 7)a call7,278
The palette writers: frames it ran in 7,278, writes 1,936
The picture writer: frames it ran in 7,278, writes 5,565, in the blank 5,565, while drawing 0
$824B (bank 2)a call7,276
Where two things are compared: instructions 1, pairs of bytes 32, bytes in all 10, times compared 31,550, Y positions at $03C2,$03C3,$03C4,$03C5,$03C6,$03C7,$03CA,$03CB,$03CE,$03E0
$8209 (bank 2)a call7,254
Where two things are compared: instructions 1, pairs of bytes 23, bytes in all 9, times compared 14,824, Y positions at $03C2,$03C3,$03C4,$03C6,$03C8,$03C9,$03CA,$03CB,$03CE
$8154 (bank 2)a call7,252
The sprite writers: frames it ran in 7,252, writes to the sprite page 256,366
$C165 (bank 7)a call183
The bank switch: writes 183, in the blank 26, while drawing 157
$C10C (bank 7)a call42
The sprite writers: frames it ran in 68, writes to the sprite page 10,752
$ACB6 (bank 0)a call3
Where two things are compared: instructions 1, pairs of bytes 1, bytes in all 2, times compared 19, Y positions at $03E0,$041E
$C43A (bank 7)a call65,297
$847D (bank 1)a call11,934
$8493 (bank 1)a call9,020
$C0F3 (bank 7)a call7,503
$D371 (bank 7)a call7,307
$8029 (bank 1)a call7,281
$807A (bank 1)a call7,281
$81C9 (bank 2)a call7,278
$C2E6 (bank 7)a call7,278
$C339 (bank 7)a call7,278
$C355 (bank 7)a call7,278
$C187 (bank 7)a call7,252
$C77F (bank 7)a call7,252
$CDA4 (bank 7)a table3,356
$C35A (bank 7)a call2,428
$C1BF (bank 7)a table2,407
$CE05 (bank 7)a table2,174
$C783 (bank 7)a call1,579
$C220 (bank 7)a table1,447
$C27D (bank 7)a call1,201
$83B2 (bank 1)a call1,117
$CDFD (bank 7)a table916
$8436 (bank 1)a call760
$CD9B (bank 7)a call625
$8128 (bank 1)a call507
$83E9 (bank 1)a table489
$810D (bank 1)a call443
$A73C (bank 1)a call336
$A7BF (bank 1)a call260
$C785 (bank 7)a call260
$83C0 (bank 1)a table233
$D31F (bank 7)a table204
$C724 (bank 7)a call185
$C549 (bank 7)a call180
$9CF6 (bank 0)a call179
$AA20 (bank 0)a call152
$9B42 (bank 0)a call141
$A896 (bank 0)a call130
$9CA0 (bank 0)a call99
$CBE0 (bank 7)a call92
$8491 (bank 0)a call90
$8BC5 (bank 0)a table80
$A84C (bank 0)a call80
$C16A (bank 7)a call63
$C17B (bank 7)a call63
$CC99 (bank 7)a call63
$8340 (bank 1)a table57
$C450 (bank 7)a call56
$C3C5 (bank 7)a call53
$8397 (bank 1)a table52
$843A (bank 1)a call52
$89B2 (bank 0)a call50
$91A6 (bank 0)a call50
$9EBD (bank 0)a call50
$AB53 (bank 0)a call45
$AB72 (bank 0)a call45
$9FA3 (bank 0)a call41
$C141 (bank 7)a call41
$9D2D (bank 0)a call34
$AAEE (bank 0)a call34
$A85A (bank 0)a call30
$C0E0 (bank 7)a call29
$CD6F (bank 7)a call29
$D33F (bank 7)a call29
$C001 (bank 7)power-on26
$C0B9 (bank 7)a call26
$C128 (bank 7)a call26
$C135 (bank 7)a call26
$C1AD (bank 7)a table26
$C38A (bank 7)a call26
$C4FA (bank 7)a call26
$CEB6 (bank 7)a call26
$9A87 (bank 0)a call23
$9EA5 (bank 0)a call23
$AA4A (bank 0)a call22
$B11F (bank 0)a call22
$B3E9 (bank 0)a call22
$852F (bank 0)a call20
$93AE (bank 0)a call20
$949F (bank 0)a call20
$94A5 (bank 0)a call20
$955E (bank 0)a call20
$9583 (bank 0)a call20
$95E0 (bank 0)a call20
$993A (bank 0)a call20
$9E70 (bank 0)a call20
$AAA8 (bank 0)a call20
$AAC4 (bank 0)a call20
$AADB (bank 0)a call20
$AC7F (bank 0)a call20
$B51D (bank 0)a call20
$CDC7 (bank 7)a table20
$CE90 (bank 7)a call20
$8488 (bank 1)a call19
$914E (bank 0)a call19
$9B84 (bank 0)a call19
$9BB0 (bank 0)a call19
$AE25 (bank 0)a table19
$B377 (bank 0)a call19
$B473 (bank 0)a call19
$C251 (bank 7)a table16
$C392 (bank 7)a call16
$C3BC (bank 7)a call16
$CE0D (bank 7)a table16
$CE25 (bank 7)a table14
$8DD2 (bank 0)a table10
$9977 (bank 0)a call10
$9E90 (bank 0)a call10
$9F26 (bank 0)a table10
$9F70 (bank 0)a call10
$A5D0 (bank 0)a table10
$AA07 (bank 0)a call10
$B503 (bank 0)a call10
$9C06 (bank 0)a call8
$C694 (bank 7)a call8
$8131 (bank 1)a call6
$84C1 (bank 1)a call6
$9C0B (bank 0)a call6
$A539 (bank 1)a call6
$C6A5 (bank 7)a call6
$C6AD (bank 7)a call6
$D311 (bank 7)a call6
$A631 (bank 1)a table4
$9381 (bank 0)a call3
$945A (bank 0)a call3
$A4EB (bank 1)a table3
$B035 (bank 0)a call3
$C110 (bank 7)a call3
$C547 (bank 7)a call3
$CEB8 (bank 7)a table3
$CEEA (bank 7)a table3
$CF1C (bank 7)a table3
$CF47 (bank 7)a table3
$D2C3 (bank 7)a call3
$9490 (bank 0)a call2
$9395 (bank 0)a call1
$B017 (bank 0)a table1
$B501 (bank 0)a call1

Where it waits

Loops a rule named that sit inside a routine and are not themselves a place the code is entered.

atwhat it is, and the evidence
$C02B (bank 7)
The counting spin: counts in the byte at $0063, turns 8,544,182, turns a frame 1,105, reads of it from outside the loop 2

The jump engine's tables

Each table sits right after a call to the engine. 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.

atentriestakenchosen by the byte at
$89C0 (bank 0)132$0347, $0348, $0349, $034A
$9F00 (bank 0)191$0342
$A01C (bank 0)542$0342, $0343, $0344, $0345
$AC91 (bank 0)112$0340
$A4D5 (bank 1)42$0480
$C199 (bank 7)65$0018
$CDA9 (bank 7)910$002A

The memory its routines share

460 bytes of memory were written by one routine and read by another, and 66 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

frombytes reachedinstructionspositions it holds
$03C0161711 down
$04101571 down
$03E01221 down
$02002534
$00002402
$02012012
$02022011
$02032011
$07007334
$03001610
$03101610
$03201610

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

slotsarraysroutinespositions acrosspositions downadded into themchoosing a jumptravelling with them
161113$03C0, $0410$0300, $0320, $0330, $0350, $0360, $0370, $03B0, $03D0, $0460
1263$03E0$0390, $03A0, $03F0, $0430, $0440

The 24 busiest shared bytes

bytereads and writesroutines writingroutines reading
$001A8,576,75026
$00633,374,45433
$0000906,79066
$0005864,32646
$0001715,57666
$0008712,53266
$0009712,32366
$0003669,01366
$0002614,83466
$0004500,15266
$0013247,16954
$001179,60866
$032067,49966
$001864,71166
$032163,68566
$001061,40666
$032660,95766
$032560,27866
$032259,79466
$032359,79466
$032459,79466
$032759,79466
$032A59,79466
$032859,79366

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

All the games