; Bally Astrocade 'Dogpatch' - ZMAC Version ; Hand/dz80 disassembly - Adam Trionfo ; Version 1.34 - Nov. 30, 2003 ; ; Version .01 - November 12, 2001 ; ; This disassembly has a LONG way to go, however... ; when this is assembled it IS 100% the same as ; the actual Dogpatch cartridge. ; ; Assemble with Zmac, the Z80 cross-assembler: ; ; zmac -i -m -o -x ; ; For example, to assemble this Astrocade Z-80 program: ; ; zmac -i -m -o dogdis.bin -x dogdis.lst dogdis.asm ; ; ; ; Version .02 - February 6, 2008 - Richard C Degler ; ; Added comments in [brackets] ; ; Removed most decimal notation ; Removed "Called from" debug notes ; ; Changed most $nn & $1nnn's to system labels (see HVGLIB.H) ; Changed all $2nnn's to L2nnn labels [to show undeclared's] ; Changed all $4nnn's to screen variable names (see EQUates ; for variables and HVGLIB.H for structure names and offsets) INCLUDE "HVGLIB.H" L1885 EQU $1885 ; system sound effect label TCVECT EQU $4E10 ; Tin Can target Vector Block TCSTAT EQU TCVECT+VBSTAT ; $4E11 vector Status TCTIMB EQU TCVECT+VBTIMB ; $4E12 vector Time Base TCDXL EQU TCVECT+VBDXL ; $4E13 vector Delta X Lo TCDXH EQU TCVECT+VBDXH ; $4E14 vector Delta X Hi TCXPOS EQU TCVECT+VBXH ; $4E16 vector X Position TCXCHK EQU TCVECT+VBXCHK ; $4E17 vector X Checks TCDYL EQU TCVECT+VBDYL ; $4E18 vector Delta Y Lo TCDYH EQU TCVECT+VBDYH ; $4E19 vector Delta Y Hi TCYPOS EQU TCVECT+VBYH ; $4E1B vector Y Position TCYCHK EQU TCVECT+VBYCHK ; $4E1C vector Y Checks P1VECT EQU $4E1D ; Player One shot Vector Block P1STAT EQU P1VECT+VBSTAT ; $4E1E vector Status P1DLTX EQU P1VECT+VBDXL ; $4E20 vector Delta X P1XPOS EQU P1VECT+VBXH ; $4E23 vector X Position P1YPOS EQU P1VECT+VBYH ; $4E28 vector Y Position P2VECT EQU $4E2A ; Player Two shot Vector Block P2STAT EQU P2VECT+VBSTAT ; $4E2B vector Status P2DLTX EQU P2VECT+VBDXL ; $4E2D vector Delta X P2XPOS EQU P2VECT+VBXH ; $4E30 vector X Position P2YPOS EQU P2VECT+VBYH ; $4E35 vector Y Position P1DATA EQU $4E37 ; Player One VWRITR data byte P2DATA EQU $4E38 ; Player Two VWRITR data byte P1ANGL EQU $4E39 ; Player One Knob position byte P1STEP EQU $4E3A ; Player One arm&gun index byte ; $4E3B to $4E40 - 6 skipped bytes, except these two ; flags - undeclared but used as offset 7 from DATA ; P1FLAG EQU $4E3E P1DATA+VBXCHK vector X Checks ; P2FLAG EQU $4E3F P2DATA+VBXCHK vector X Checks P2ANGL EQU $4E41 ; Player Two Knob position byte P2STEP EQU $4E42 ; Player Two arm&gun index byte ODEVEN EQU $4E43 ; Frame 0 / 1 byte BONUSS EQU $4E44 ; BONUS Score byte P1SCOR EQU $4E45 ; Player One SCORE word P2SCOR EQU $4E47 ; Player Two SCORE word ; 4E49 to 4E4F - 7 extra bytes cleared MSTACK EQU $4F12 ; Goes into $4FD0 MUZSP STACKP EQU $4FA0 ; STACK Pointer ; reminder: ENDSCR EQU $4FF4 ; Number of cans to count down ORG FIRSTC ; First Byte of cartridge ; All cartridges that use the menu must have $55 as the ; first byte, see Bally ROM source $0CDE for check of ; this byte. A capital "U" is $55. DB "U" ; User Cartridge Sentinel ; O.S. Menu data structure DW MENUST ; Next menu link DW L2756 ; Address of "DOGPATCH" menu text DW L2007 ; Jump here if item selected ; Start of Dogpatch Main Program L2007: SYSSUK GETPAR ; Get Option/Menu Selection DW L26CB ; Prompt - '# of cans' DB $82 ; Digits [Zero Suppress 2 digits] DW ENDSCR ; Parameter - Variable Address ; End Score = # of Cans LD SP,STACKP ; Load SP [$4FA0 - below system RAM area] ; Color, Horizontal and Vertical blanking setup ; - Vertical Blank starts on line 180 ; - Horizontal Color Boundary is [60] ; - Background Color is [same as COL3R] ; DNA manual page 88 has lots of details on this section LD HL,L274E ; Start add. of COLTBL to send to ; eight color regs. LD B,$08 ; Count for OTIR instruction LD C,$0B ; Port 11 for OTIR instruction OTIR ; Reset color registers ; Room for variables in the purple (hidden) area of the screen LD A,$B4 ; Load A with 90 dec. (180/2) for OUT (VERBL),A ; Port 10 - Vertical Blank line LD A,$CF ; 15 dec. for HORIZX/4 [& 3 for border color] OUT (HORCB),A ; Port 9 - Horizontal Color Boundary SYSSUK FILL ; Do Clear Screen [AND variables] DW NORMEM ; Top of screen DW $0E50 ; Fill for 3664 bytes [BYTEPL*91.6 lines] DB $00 ; Fill with zeroes ; No Interrupt Routine in this game so this dosn't do anything LD A,$B4 ; Load A with 180 dec. OUT (INLIN),A ; Set Interrupt Line LD A,$80 ; Load A with 128 dec. [VBSACT flag] LD (TCSTAT),A ; $4E11 now holds $80 [TCSTAT = active] ; Load Registers for Loop LD C,$20 ; for Magic X-OR setup LD DE,$000D ; Quantum for vector blocks LD A,$01 ; for flags setup LD B,$03 ; loop counter LD IX,TCVECT ; [ 1st VECTOR BLOCK at $4E10 for tin can ; 2nd VECTOR BLOCK at $4E1D for player 1 shot ; 3rd VECTOR BLOCK at $4E2A for player 2 shot ] ; Loop to fill RAM areas. Loop runs [3] times. L203F: LD (IX+$00),C ; Put $20 in IX [VBMR = XOR] LD (IX+$02),A ; Put $01 in IX [VBTIMB = INCREMENTED BY USER] LD (IX+$07),A ; Put $01 in IX [VBXCHK = VBCLMT] LD (IX+$0C),A ; Put $01 in IX [VBYCHK = VBCLMT] ADD IX,DE ; IX + $000D [short vector blocks] DJNZ L203F ; $F0 (-$10) Decrement B (is it 0?) ; Display Player 1 character SYSSUK WRIT ; Screen Write DB $04 ; X coordinate DB $40 ; Y coordinate DB $03 ; X Pattern Size DB $18 ; Y Pattern Size DB $00 ; Magic Register [to PLOP] DW L2496 ; Pattern Address of Player One ; Display Player 2 character SYSSUK WRIT ; Screen Write DB $90 ; X coordinate DB $40 ; Y coordinate DB $03 ; X Pattern Size DB $18 ; Y Pattern Size DB $00 ; Magic Register [to PLOP] DW L24DE ; Pattern Address of Player Two ; Display Computer "Can Tosser" character SYSSUK WRIT ; Screen Write DB $50 ; X co-ordinate DB $4A ; Y co-ordinate DB $02 ; X Pattern Size DB $10 ; Y Pattern Size DB $00 ; Magic Register [to PLOP] DW L2526 ; Pattern Address of Computer L206A: LD A,(ENDSCR) ; Place # of Cans into A OR A ; OR A with A [to set flags] JR NZ,L20CA ; Jump on Not Zero (+$5A) LD HL,(P1SCOR) ; [player 1 score] LD DE,(P2SCOR) ; [player 2 score] OR A ; OR A with A [set flags again] SBC HL,DE ; [compare for tie] JR Z,L208D ; Jump on Zero (+$11) JR NC,L2082 ; (+$04) [player 1 won] LD E,$66 ; $66 into E JR L2084 ; (+$02) [player 2 won] L2082: ; Display "Winner" (if NOT tied at end) LD E,$0A ; X Coordinates L2084: LD D,$32 ; Y Coordinates LD C,$0C ; Standard Options [Color 3 on 0] LD HL,L259F ; "WINNER" text address SYSTEM STRDIS ; Display "Winner" L208D: CALL L245A ; [Draw "Game Over, Boys"] LD HL,CT1 ; Counter Timer 1 at $4FD6 LD A,$FF LD (HL),A ; [Set debounce time to 4.25 secs.] L2096: ; [Wait for CT1 decay (takes less than a second ??)] LD A,(HL) OR A JR NZ,L2096 ; $FC (-$04) [ignore any inputs] LD HL,$3000 ; [Set delay timer set for 3.4 mins.] L209D: ; [outer input loop] LD B,$08 LD C,$10 ; [Ports 16 thru 23 checked] L20A1: ; [inner keys/joystick read loop] IN A,(C) AND $3F ; [All Keys Mask] JP NZ,$0000 ; [Reset Game on keypress or any joystick] INC C DJNZ L20A1 ; $F6 (-$0A) [eight times] LD A,(CT1) ; [short loop finished ?] OR A JR NZ,L209D ; $EC (-$14) LD A,L ; [long delay over ?] OR H JR NZ,L20C2 ; (+$0D) LD A,$00 ; [Color = Black] LD B,$08 LD C,$00 ; [Ports 0 thru 7 written to] L20BB: ; [color blanking loop] OUT (C),A INC C DJNZ L20BB ; $FB (-$05) [eight times] JR L209D ; $DB (-$25) [outer loop forever] L20C2: ; [bypass blanking until HL counted down] LD A,$01 LD (CT1),A ; [Set CT1 to 1/60th sec.] DEC HL JR L209D ; $D3 (-$2D) [repeat outer loop] L20CA: ; Launch a Tin Can LD A,(ENDSCR) DEC A ; [Number of Cans-1] DAA ; [Decimal Adjust A for BCD] LD (ENDSCR),A ; [Save in $4FF4] ; Display # of Cans remaining SYSSUK DISNUM ; Display BCD number DB $39 ; X DB $50 ; Y DB $0C ; Options [Color 3 on 0] DB $82 ; Extended options DW ENDSCR ; Number address = $4FF4 CALL L23BA ; [Get gun angles & draw arms] CALL L244C ; [Draw "BONUS"] LD HL,L2546 CALL L2336 ; [Draw tosser arm down with can] LD B,$14 L20E8: EXX CALL L2455 ; [Draw "GET READY BOYS"] CALL L23BA ; [Get gun angles & draw arms] EXX DJNZ L20E8 ; $F6 (-$0A) [twenty times] SYSSUK RECTAN ; Paint rectangle [Erase "GET READY BOYS"] DB $18 ; X co-ordinate DB $14 ; Y co-ordinate DB $78 ; X size DB $08 ; Y size DB $00 ; Color Mask LD HL,L254E CALL L2336 ; [Draw tosser arm midway with can] LD B,$02 L2101: EXX CALL L23BA ; [Get gun angles & draw arms] EXX DJNZ L2101 ; $F9 (-$07) [twice] LD HL,L2556 CALL L2336 ; [Draw tosser arm up with can] LD B,$02 L2110: EXX CALL L23BA ; [Get gun angles & draw arms] EXX DJNZ L2110 ; $F9 (-$07) [twice] LD HL,L255E CALL L2336 ; [Draw tosser arm up without can] EI ; [interrupts already enabled by system!] LD A,$FC ; [Initialize can moving up] LD (TCDYH),A ; [VBDYH delta Y = -4] LD A,$4D ; [Initialize can X position] LD (TCXPOS),A ; [VBXH] LD A,$44 ; [Initialize can Y position] LD (TCYPOS),A ; [VBYH] CALL L2466 ; [Draw can above empty arm] XOR A LD (BONUSS),A ; [no bonus score yet] L2134: LD A,(CT1) ; [Kill some time?] NOP OR A JR NZ,L2134 ; $F9 (-$07) LD A,$01 LD (CT1),A ; [Delay next time around] CALL L2466 ; [Draw can] LD A,(ODEVEN) INC A LD (ODEVEN),A ; [Frame Counter+1] BIT 0,A JP NZ,L21B0 ; [Skip Move Can on Odd Frames] LD HL,L2640 ; Limit table [for tin can] LD IX,TCVECT ; Vector Address SYSTEM VECT ; Vector Object in two dim. CALL L227E ; [Apply gravity to tin can] LD A,(TCYCHK) BIT 3,A ; [VBCLAT = at Y limit?] JR Z,L216B ; (+$09) XOR A LD (TCDXH),A ; [Turn off delta X] CALL L22A1 ; [Play DROP CAN music] JR L218A ; (+$1F) L216B: LD A,(TCXCHK) BIT 3,A ; [VBCLAT = at X limit?] JR Z,L21B0 ; (+$3E) LD A,(TCXPOS) CP $50 ; [Left side or right?] JR C,L21A7 ; (+$2E) CALL L2342 ; [Score 10 points for Player One] LD IX,P1SCOR L2180: LD A,(BONUSS) LD D,A CALL L2369 ; [Add Bonus to Successful Player] CALL L2290 ; [Play SCORE Music] L218A: XOR A LD (BONUSS),A ; [Clear Bonus Score] CALL L237F ; [Show all scores] CALL L22AD ; Do [VWRITR Routine for player 1] CALL L22B6 ; Do VWRITR Routine [for player 2] XOR A LD (P1DATA),A ; [Clear p1 data byte] LD (P2DATA),A ; [Clear p2 data byte] LD (P1STAT),A ; [Clear p1 status] LD (P2STAT),A ; [Clear p2 status] JP L206A ; [All finished, go back to toss another can] L21A7: CALL L234B ; [Score 10 points for Player Two] LD IX,P2SCOR JR L2180 ; $D0 (-$30) L21B0: CALL L2466 ; [Still in play - draw can] CALL L23BA ; [Get gun angles & draw arms] LD B,$02 ; [Do two players] LD IX,P1DATA LD IY,P1STAT IN A,($10) ; [Read handle 1] L21C2: BIT 4,A ; [trigger?] JP Z,L21E4 LD A,(IX+$07) ; [DATA+VBXCHK ?] OR A JP NZ,L21E8 INC (IX+$07) ; [set DATA+VBXCHK] BIT 7,(IY+$00) ; [VBSTAT = VBSACT ?] JR NZ,L21E8 ; (+$11) SET 7,(IY+$00) ; [VBSTAT = VBSACT] LD (IX+$00),$00 ; [Clear player DATA byte] ; Call Sound Effect from Gunfight CALL L1885 JR L21E8 ; (+$04) L21E4: LD (IX+$07),$00 ; [no trigger clear DATA+VBXCHK] L21E8: DEC B JP Z,L21F7 ; [Out if both players done] LD DE,$000D ADD IY,DE ; [Switch to p2 VBSTAT] INC IX ; [to $4E38 for p2] IN A,($11) ; [Read handle 2] JR L21C2 ; $CB (-$35) L21F7: CALL L22AD ; Do [VWRITR Routine for player 1] LD HL,L268F ; Limit table [player 1] LD IX,P1VECT ; Vector Address SYSTEM VECT ; Vector Object in two dim. LD IY,L22AD ; Pointer to [VWRITR Routine for player 1] LD HL,P1DATA LD IX,P1VECT CALL L2398 ; [Draw player 1 pellets] LD A,(P1STAT) BIT 7,A ; [P1 VBSTAT = VBSACT ?] JR Z,L2238 ; (+$20) LD D,$FF ; flag for Collision Routine to clear LD A,(P1XPOS) LD B,A LD A,(P1YPOS) CALL L230E ; [Test for Collision of P1 shot and tin can] BIT 7,D JR NZ,L2238 ; (+$10) [Shot missed] CALL L22C5 ; [Kick can away from Player One] CALL L22AD ; Do [VWRITR Routine for player 1] CALL L2359 ; [Score a point for p1] XOR A LD (P1STAT),A ; [P1 VBSTAT = inactive] LD (P1DATA),A ; [Clear p1 DATA] L2238: CALL L22B6 ; Do VWRITR Routine [for player 2] LD HL,L26AF ; Limit table [player 2] LD IX,P2VECT ; Vector Address SYSTEM VECT ; Vector Object in two dim. LD IX,P2VECT LD HL,P2DATA LD IY,L22B6 ; Pointer to VWRITR Routine [for player 2] CALL L2398 ; [Draw player 2 pellets] LD A,(P2STAT) BIT 7,A ; [P2 VBSTAT = VBSACT ?] JP Z,L2134 ; [Repeat next CT1 loop] LD D,$FF ; flag for Collision Routine to clear LD A,(P2XPOS) LD B,A LD A,(P2YPOS) CALL L230E ; [Test for Collision of P2 shot and tin can] BIT 7,D JP NZ,L2134 ; [Repeat next CT1 loop if shot missed] CALL L22D5 ; [Kick can away from Player Two] CALL L22B6 ; Do VWRITR Routine [for player 2] CALL L2361 ; [Score a point for p2] XOR A LD (P2STAT),A ; [P2 VBSTAT = inactive] LD (P2DATA),A ; [Clear p2 DATA] JP L2134 ; [Repeat next CT1 loop] L227E: ; [Apply Gravity to tin can] Routine LD HL,(TCDYL) LD A,(TCYPOS) ; [based on altitude] LD B,A LD A,$50 ; [above top of cans counter] SUB B LD E,A ; [distance = baseline-TCYPOS] LD D,$00 ADD HL,DE LD (TCDYL),HL ; [TCDYL+distance] RET L2290: ; Start Music Routine #1 LD HL,L247F ; Music Score Address [SCORE] JR L2298 ; (+$03) L2295: ; Start Music Routine #2 LD HL,L2475 ; Music Score Address [HIT CAN] L2298: LD A,$0C ; Voices to Start With [C only] LD IX,MSTACK ; $4F12 into Music SP SYSTEM BMUSIC RET L22A1: ; Start Music Routine #3 LD HL,L248B ; Music Score Address [DROP CAN] LD IX,MSTACK ; $4F12 into Music SP LD A,$FE ; Voices to Start With [Vibrato, C, B & A] SYSTEM BMUSIC RET L22AD: ; [VWRITR Routine for player 1 shot] LD A,(P1DATA) LD IX,P1VECT ; Vector Address JR L22BD ; (+$07) L22B6: ; VWRITR Routine [for player 2 shot] LD A,(P2DATA) LD IX,P2VECT ; Vector Address L22BD: OR A RET Z ; [Don't draw if DATA off] LD HL,L2745 ; Pellet Pattern Address SYSTEM VWRITR RET L22C5: ; [Kick Can away from Player One] Routine LD DE,$0080 ; [0.5 adds to] LD HL,$0100 ; [Delta X = 1] LD A,(TCXPOS) SUB $A0 NEG JP L22DE L22D5: ; [Kick Can away from Player Two] Routine LD DE,$FF80 ; [0.5 subtracts from] LD HL,$FF00 ; [Delta X = negative 1] LD A,(TCXPOS) L22DE: CP $1E ; [Can passed over other player?] L22E0: JR C,L22E7 ; (+$05) ADD HL,DE SUB $1E ; [Faster X if nearer to player's gun] JR L22E0 ; $F9 (-$07) L22E7: LD (TCDXL),HL ; [Save Can Delta X] LD A,(BONUSS) ; [Add another Bonus point] INC A OR A DAA ; [Decimal Adjust A for BCD] LD (BONUSS),A CALL L2295 ; [Play HIT CAN Music] LD DE,$FF80 ; [0.5 subtracts from] LD HL,$FF00 ; [Delta Y = negative 1] LD A,(TCYPOS) CP $14 ; [Can too close to the top?] L2301: JP C,L230A ADD HL,DE SUB $14 ; [Faster Y if closer to the ground] JP L2301 L230A: LD (TCDYL),HL ; [Kick Can higher] RET L230E: ; [Test for Collision of Shot and Tin Can] Routine LD C,A ; [Shot Y was in A] LD A,(TCXPOS) SUB B ; [Shot X was in B] JP M,L231C CP $06 RET NC JP L2321 L231C: NEG CP $06 RET NC L2321: LD A,(TCYPOS) ; [X was +- 6 pixels ...] SUB C JP M,L232E CP $06 RET NC JP L2333 L232E: NEG CP $06 RET NC L2333: LD D,$00 ; [... and Y was +- 6 pixels] RET ; [Shot Hit Can, Return D cleared as flag] L2336: ; [Draw Can Tosser's swing arm] Routine XOR A ; PLOP LD B,$08 ; Y Pattern Size LD C,$01 ; X Pattern Size LD D,$4A ; Y Coordinate LD E,$4B ; X Coordinate SYSTEM WRIT RET L2342: ; [Score 10 points for player 1] Routine LD HL,$FF80 LD IX,P1SCOR JR L2352 ; (+$07) L234B: ; [Score 10 points for player 2] Routine LD HL,$0080 LD IX,P2SCOR L2352: LD (TCDXL),HL ; [Next Can tossed towards player that hit it over] LD D,$10 JR L2369 ; (+$10) L2359: ; [Score a point for p2] Routine LD IX,P1SCOR LD D,$01 JR L2369 ; (+$08) L2361: ; [Score a point for p2] Routine LD IX,P2SCOR LD D,$01 JR L2369 ; (+$00) L2369: ; [Adjust player BCD score] Subroutine LD L,(IX+$00) ; [x00 to x99] LD H,(IX+$01) ; [00nn - 99nn] LD A,L OR A ADC A,D ; [add Point(s) to Lower Score] DAA ; [Decimal Adjust Low byte] LD L,A LD A,$00 ADC A,H ; [add Upper Score to Carry] DAA ; [Decimal Adjust Hi byte] LD H,A LD (IX+$00),L LD (IX+$01),H L237F: ; Display [All Scores] Routine SYSSUK DISNUM ; [Player 1 score] DB $0F ; X DB $03 ; Y DB $04 ; Options [Color 2 on 0] DB $84 ; Extended Options [Zero Suppress 4 digits] DW P1SCOR ; Number Address SYSSUK DISNUM ; [Player 2 score] DB $70 ; X DB $03 ; Y DB $04 ; Options [Color 2 on 0] DB $84 ; Extended Options [Zero Suppress 4 digits] DW P2SCOR ; Number Address SYSSUK DISNUM ; [Bonus score] DB $48 ; X DB $08 ; Y DB $0C ; Options [Color 3 on 0] DB $82 ; Extended Options [Zero Suppress 2 digits] DW BONUSS ; Number Address RET L2398: ; [Draw Player Shot (if onscreen)] Routine LD (IX+$02),$01 ; [VBTIMB] BIT 3,(IX+$07) ; [VBXCHK = VBCLAT?] JP NZ,L23B3 BIT 3,(IX+$0C) ; [VBYCHK = VBCLAT?] JP NZ,L23B3 BIT 7,(IX+$01) ; [VBSTAT = VBSACT?] RET Z ; [if NOT active] LD (HL),$01 ; [set DATA] JP (IY) ; [Jump using Pointer to VWRITR Routine] L23B3: LD (IX+$01),$00 ; [X or Y at limit - clear VBSTAT] LD (HL),$00 ; [and clear player DATA byte] RET L23BA: ; [Get Arm/gun Angles and Draw] Routine IN A,(POT0) AND $E0 LD HL,P1ANGL ; [Player 1 changed angle?] CP (HL) JR Z,L23E4 ; (+$20) LD (HL),A ; [Save P1ANGL for old angle] INC HL RRCA RRCA LD (HL),A ; [Save angle/4 as P1STEP] XOR A LD B,$0C ; H LD C,$0C ; W LD D,$40 ; Y LD E,$0D ; X SYSTEM RECTAN ; [Blank old gun & arm] LD A,(P1ANGL) ; [reload angle] LD E,A XOR A LD D,A LD HL,L2566 ; [Player 1 arm pattern base] ADD HL,DE ; [in 8 steps, $20 apart] LD D,$40 ; Y LD E,$0D ; X SYSTEM WRITR ; [Redraw arm & gun] L23E4: ; [Lookup Player One shot deltas] LD A,(P1STAT) BIT 7,A ; [Shot already moving?] JR NZ,L2403 ; (+$18) LD A,(P1STEP) ; [offset (0 to 7) * 8] LD BC,$0004 ; [byte count] LD E,A XOR A LD D,A LD HL,L275F ; [P1 vector angle table] ADD HL,DE ; [with offset added in] LD DE,P1DLTX LDIR ; [Move four bytes] INC DE ; [Point to P1DLTY] LD BC,$0004 ; [byte count again] LDIR ; [Move four more bytes] L2403: IN A,(POT1) AND $E0 LD HL,P2ANGL ; [Player 2 changed angle?] CP (HL) JR Z,L242D ; (+$20) LD (HL),A ; [Save P2ANGL for old angle] INC HL RRCA RRCA LD (HL),A ; [Save angle/4 as P2STEP] XOR A LD B,$0C ; H LD C,$0C ; W LD D,$40 ; Y LD E,$87 ; X SYSTEM RECTAN ; [Blank old gun & arm] LD A,(P2ANGL) ; [Reload angle] LD E,A XOR A LD D,A LD HL,L2655 ; [Player 2 arm pattern base] ADD HL,DE ; [in 8 steps, $20 apart] LD D,$40 ; Y LD E,$87 ; X SYSTEM WRITR ; [Redraw arm & gun] L242D: ; [Lookup Player Two shot deltas] LD A,(P2STAT) BIT 7,A ; [Shot already moving?] RET NZ ; [Done] LD A,(P2STEP) ; [offset (0 to 7) * 8] LD BC,$0004 ; [byte count] LD E,A XOR A LD D,A LD HL,L279F ; [P2 vector angle table] ADD HL,DE ; [with offset added in] LD DE,P2DLTX LDIR ; [Move four bytes] INC DE ; [Point to P2DLTY] LD BC,$0004 ; [byte count again] LDIR ; [Move four more bytes] RET L244C: ; [Display "Bonus" Subroutine] LD HL,L2620 ; "BONUS" Text LD D,$00 ; Y LD E,$3E ; X JR L2461 ; (+$0C) L2455: ; [Display "Get Ready, Boys" Subroutine] LD HL,L2576 ; "GET READY BOYS" Text JR L245D ; (+$03) L245A: ; [Display "Game Over, Boys" Subroutine] LD HL,L2664 ; "GAME OVER, BOYS" Text L245D: LD D,$14 ; Y Coordinate LD E,$18 ; X Coordinate L2461: LD C,$C ; Standard Options [Color 3 on 0] SYSTEM STRDIS RET L2466: ; VWRITR Subroutine [draw tin can & set VTIMB to 1] LD HL,L27DF ; Pattern Address LD IX,TCVECT ; Vector Address SYSTEM VWRITR LD A,$01 LD (TCTIMB),A ; [VBTIMB = INCREMENTED BY USER] RET L2475: ; Music Score #1 [HIT CAN] MASTER $A1 VOLUME $FF, $FF NOTE1 $04,$02 NOTE1 $02,$50 QUIET L247F: ; Music Score #2 [SCORE] MASTER $FF VOLUME $FF, $FF NOTE1 $19,$03 NOTE1 $13,$06 NOTE1 $0C,$0C QUIET L248B: ; Music Score #3 [DROP CAN] MASTER $FF VOLUME $FF, $FF NOTE4 $30,$30,$12,$34,$56 QUIET ; Characters ; ; Pattern for Left Character L2496: DB $01,$50,$00 ; 000000010101000000000000 - . . . 1 1 1 . . . . . . DB $01,$55,$00 ; 000000010101010100000000 - . . . 1 1 1 1 1 . . . . DB $15,$55,$40 ; 000101010101010101000000 - . 1 1 1 1 1 1 1 1 . . . DB $02,$A8,$00 ; 000000101010100000000000 - . . . 2 2 2 2 . . . . . DB $02,$88,$00 ; 000000101000100000000000 - . . . 2 2 . 2 . . . . . DB $02,$AA,$00 ; 000000101010101000000000 - . . . 2 2 2 2 2 . . . . DB $02,$A8,$00 ; 000000101010100000000000 - . . . 2 2 2 2 . . . . . DB $00,$A0,$00 ; 000000001010000000000000 - . . . . 2 2 . . . . . . DB $14,$01,$40 ; 000101000000000101000000 - . 1 1 . . . . 1 1 . . . DB $54,$01,$40 ; 010100000000000101000000 - 1 1 . . . . . 1 1 . . . DB $54,$01,$40 ; 010101000000000101000000 - 1 1 1 . . . . 1 1 . . . DB $04,$01,$00 ; 000001000000000100000000 - . . 1 . . . . 1 . . . . DB $05,$01,$00 ; 000001010000000100000000 - . . 1 1 . . . 1 . . . . DB $05,$41,$00 ; 000001010100000100000000 - . . 1 1 1 . . 1 . . . . DB $05,$55,$54 ; 000001010101010101010100 - . . 1 1 1 1 1 1 1 1 1 . DB $05,$55,$54 ; 000001010101010101010100 - . . 1 1 1 1 1 1 1 1 1 . DB $05,$55,$54 ; 000001010101010101010100 - . . 1 1 1 1 1 1 1 1 1 . DB $01,$50,$14 ; 000000010101000000010100 - . . . 1 1 1 . . . 1 1 . DB $01,$50,$14 ; 000000010101000000010100 - . . . 1 1 1 . . . 1 1 . DB $01,$50,$14 ; 000000010101000000010100 - . . . 1 1 1 . . . 1 1 . DB $01,$50,$14 ; 000000010101000000010100 - . . . 1 1 1 . . . 1 1 . DB $55,$50,$14 ; 010101010101000000010100 - 1 1 1 1 1 1 . . . 1 1 . DB $55,$50,$14 ; 010101010101000000010100 - 1 1 1 1 1 1 . . . 1 1 . DB $40,$00,$15 ; 010000000000000000010101 - 1 . . . . . . . . 1 1 1 ; ; ; Pattern for Right Character L24DE: DB $00,$05,$40 ; 000000000000010101000000 - . . . . . . 1 1 1 . . . DB $00,$55,$40 ; 000000000101010101000000 - . . . . 1 1 1 1 1 . . . DB $01,$55,$54 ; 000000010101010101010100 - . . . 1 1 1 1 1 1 1 1 . DB $00,$2A,$80 ; 000000000010101010000000 - . . . . . 2 2 2 2 . . . DB $00,$22,$80 ; 000000000010001010000000 - . . . . . 2 . 2 2 . . . DB $00,$AA,$80 ; 000000001010101010000000 - . . . . 2 2 2 2 2 . . . DB $00,$2A,$80 ; 000000000010101010000000 - . . . . . 2 2 2 2 . . . DB $00,$0A,$00 ; 000000000000101000000000 - . . . . . . 2 2 . . . . DB $01,$40,$14 ; 000000010100000000010100 - . . . 1 1 . . . . 1 1 . DB $01,$40,$15 ; 000000010100000000010101 - . . . 1 1 . . . . 1 1 1 DB $01,$40,$15 ; 000000010100000000010101 - . . . 1 1 . . . . 1 1 1 DB $00,$40,$10 ; 000000000100000000010000 - . . . . 1 . . . . 1 . . DB $00,$40,$50 ; 000000000100000001010000 - . . . . 1 . . . 1 1 . . DB $00,$41,$50 ; 000000000100000101010000 - . . . . 1 . . 1 1 1 . . DB $15,$55,$50 ; 000101010101010101010000 - . 1 1 1 1 1 1 1 1 1 . . DB $15,$55,$50 ; 000101010101010101010000 - . 1 1 1 1 1 1 1 1 1 . . DB $15,$55,$50 ; 000101010101010101010000 - . 1 1 1 1 1 1 1 1 1 . . DB $14,$05,$40 ; 000101000000010101000000 - . 1 1 . . . 1 1 1 . . . DB $14,$05,$40 ; 000101000000010101000000 - . 1 1 . . . 1 1 1 . . . DB $14,$05,$40 ; 000101000000010101000000 - . 1 1 . . . 1 1 1 . . . DB $14,$05,$40 ; 000101000000010101000000 - . 1 1 . . . 1 1 1 . . . DB $14,$05,$55 ; 000101000000010101010101 - . 1 1 . . . 1 1 1 1 1 1 DB $14,$05,$55 ; 000101000000010101010101 - . 1 1 . . . 1 1 1 1 1 1 DB $54,$00,$01 ; 010101000000000000000001 - 1 1 1 . . . . . . . . 1 ; Pattern for Computer "Can Tosser" L2526: DB $05,$40 ; 0000010101000000 - . . 1 1 1 . . . DB $15,$50 ; 0001010101010000 - . 1 1 1 1 1 . . DB $0A,$80 ; 0000101010000000 - . . 2 2 2 . . . DB $0A,$80 ; 0000101010000000 - . . 2 2 2 . . . DB $02,$00 ; 0000001000000000 - . . . 2 . . . . DB $55,$55 ; 0101010101010101 - 1 1 1 1 1 1 1 1 DB $55,$55 ; 0101010101010101 - 1 1 1 1 1 1 1 1 DB $15,$51 ; 0001010101010001 - . 1 1 1 1 1 . 1 DB $15,$51 ; 0001010101010001 - . 1 1 1 1 1 . 1 DB $15,$51 ; 0001010101010001 - . 1 1 1 1 1 . 1 DB $3F,$F0 ; 0011111111110000 - . 1 1 1 1 1 . . DB $3F,$F0 ; 0011111111110000 - . 1 1 1 1 1 . . DB $3C,$F0 ; 0011110011110000 - . 1 1 . 1 1 . . DB $3C,$F0 ; 0011110011110000 - . 1 1 . 1 1 . . DB $3C,$F0 ; 0011110011110000 - . 1 1 . 1 1 . . DB $3C,$F0 ; 0011110011110000 - . 1 1 . 1 1 . . L2546: ; Pattern [arm down with can] DB $00 ; 00000000 - . . . . DB $00 ; 00000000 - . . . . DB $00 ; 00000000 - . . . . DB $00 ; 00000000 - . . . . DB $00 ; 00000000 - . . . . DB $F5 ; 11110101 - 3 3 1 1 DB $F5 ; 11110101 - 3 3 1 1 DB $F0 ; 11110101 - 3 3 . . L254E: ; Pattern [arm midway with can] DB $00 ; 00000000 - . . . . DB $00 ; 00000000 - . . . . DB $FC ; 11111100 - 3 3 3 . DB $FC ; 11111100 - 3 3 3 . DB $FC ; 11111100 - 3 3 3 . DB $15 ; 00010101 - . 1 1 1 DB $15 ; 00010101 - . 1 1 1 DB $00 ; 00000000 - . . . . L2556: ; Pattern [arm up with can] DB $3F ; 00111111 - . 3 3 3 DB $3F ; 00111111 - . 3 3 3 DB $3F ; 00111111 - . 3 3 3 DB $04 ; 00000100 - . . 1 . DB $04 ; 00000100 - . . 1 . DB $05 ; 00000101 - . . 1 1 DB $05 ; 00000101 - . . 1 1 DB $00 ; 00000000 - . . . . L255E: ; Pattern [arm up without can] DB $04 ; 00000100 - . . 1 . DB $04 ; 00000100 - . . 1 . DB $04 ; 00000100 - . . 1 . DB $04 ; 00000100 - . . 1 . DB $04 ; 00000100 - . . 1 . DB $05 ; 00000101 - . . 1 1 DB $05 ; 00000101 - . . 1 1 DB $00 ; 00000000 - . . . . L2566: ; [Pattern P1 arm and gun base position 0] DB $00 ; No X Offset DB $08 ; 8 pixel Y Offset DB $03 ; 3 Bytes Wide DB $04 ; 4 Bytes High DB $7F,$FF,$FF ; 011111111111111111111111 - 1 3 3 3 3 3 3 3 3 3 3 3 DB $50,$05,$00 ; 010100000000010100000000 - 1 1 . . . . 1 1 . . . . DB $54,$14,$00 ; 010101000001010000000000 - 1 1 1 . . 1 1 . . . . . DB $15,$54,$00 ; 000101010101010000000000 - . 1 1 1 1 1 1 . . . . . L2576: ; "GET READY BOYS" string DB 'G','E','T',' ' DB 'R','E','A','D','Y' DB ' ','B','O','Y','S' DB $00 ; End string DB $00 ; [empty byte] ; [$2586 - Pattern P1 arm and gun position 1] DB $00 ; No X Offset DB $05 ; 5 pixel Y Offset DB $03 ; 3 Bytes Wide DB $07 ; 7 Bytes High DB $00,$00,$0F ; 000000000000000000001111 - . . . . . . . . . . 3 3 DB $00,$03,$F0 ; 000000000000001111110000 - . . . . . . . 3 3 3 . . DB $00,$FD,$00 ; 000000001111110100000000 - . . . . 3 3 3 1 . . . . DB $5F,$05,$00 ; 010111110000010100000000 - 1 1 3 3 . . 1 1 . . . . DB $54,$05,$00 ; 010101000000010000000000 - 1 1 1 . . . 1 . . . . . DB $55,$55,$00 ; 010101010101010100000000 - 1 1 1 1 1 1 1 1 . . . . DB $15,$36,$00 ; 000101010011011000000000 - . 1 1 1 . 3 1 2 . . . . - crap! L259F: ; "WINNER" string DB 'W','I','N','N','E','R' DB $00 ; End string ; [$25A6 - Pattern P1 arm and gun position 2] DB $00 ; No X Offset DB $02 ; 2 pixel Y Offset DB $03 ; 3 Bytes Wide DB $09 ; 9 Bytes High DB $00,$00,$03 ; 000000000000000000000011 - . . . . . . . . . . . 3 DB $00,$00,$3F ; 000000000000000000111111 - . . . . . . . . . 3 3 3 DB $00,$03,$C0 ; 000000000000001111000000 - . . . . . . . 3 3 . . . DB $00,$0D,$00 ; 000000000000110100000000 - . . . . . . 3 1 . . . . DB $00,$F5,$00 ; 000000001111010100000000 - . . . . 3 3 1 1 . . . . DB $0F,$05,$00 ; 000011110000010100000000 - . . 3 3 . . 1 1 . . . . DB $54,$05,$00 ; 010101000000010100000000 - 1 1 1 . . . 1 1 . . . . DB $55,$55,$00 ; 010101010101010100000000 - 1 1 1 1 1 1 1 1 . . . . DB $55,$54,$00 ; 010101010101010000000000 - 1 1 1 1 1 1 1 . . . . . DB $00 ; [scratch byte] ; [$25C6 - Pattern P1 arm and gun position 3] DB $00 ; No X Offset DB $02 ; 2 pixel Y Offset DB $03 ; 3 Bytes Wide DB $09 ; 9 Bytes High DB $00,$00,$3C ; 000000000000000000111100 - . . . . . . . . . 3 3 . DB $00,$03,$C0 ; 000000000000001111000000 - . . . . . . . 3 3 . . . DB $00,$0F,$00 ; 000000000000111100000000 - . . . . . . 3 3 . . . . DB $00,$3D,$00 ; 000000000011110100000000 - . . . . . 3 3 1 . . . . DB $00,$C5,$00 ; 000000001100010100000000 - . . . . 3 . 1 1 . . . . DB $03,$C5,$00 ; 000000111100010100000000 - . . . 3 3 . 1 1 . . . . DB $5F,$05,$00 ; 010111110000010100000000 - 1 1 3 3 . . 1 1 . . . . DB $55,$55,$00 ; 010101010101010100000000 - 1 1 1 1 1 1 1 1 . . . . DB $55,$55,$00 ; 010101010101010100000000 - 1 1 1 1 1 1 1 1 . . . . DB $00 ; [buffer byte] ; [$25E6 - Pattern P1 arm and gun position 4] DB $00 ; No X Offset DB $02 ; 2 pixel Y Offset DB $03 ; 3 Bytes Wide DB $09 ; 9 Bytes High DB $00,$03,$C0 ; 000000000000001111000000 - . . . . . . . 3 3 . . . DB $00,$0F,$00 ; 000000000000111100000000 - . . . . . . 3 3 . . . . DB $00,$3C,$00 ; 000000000011110000000000 - . . . . . 3 3 . . . . . DB $00,$F4,$00 ; 000000001111010000000000 - . . . . 3 3 1 . . . . . DB $00,$D4,$00 ; 000000001101010000000000 - . . . . 3 1 1 . . . . . DB $03,$14,$00 ; 000000110001010000000000 - . . . 3 . 1 1 . . . . . DB $5C,$14,$00 ; 010111000001010000000000 - 1 1 3 . . 1 1 . . . . . DB $55,$54,$00 ; 010101010101010000000000 - 1 1 1 1 1 1 1 . . . . . DB $55,$54,$00 ; 010101010101010000000000 - 1 1 1 1 1 1 1 . . . . . DB $00 ; [filler byte] ; [$2606 - Pattern P1 arm and gun position 5] DB $00 ; No X Offset DB $00 ; No Y Offset DB $02 ; 2 Bytes Wide DB $0B ; 11 Bytes High DB $00,$03 ; 0000000000000011 - . . . . . . . 3 DB $00,$0C ; 0000000000001100 - . . . . . . 3 . DB $00,$30 ; 0000000000110000 - . . . . . 3 . . DB $00,$30 ; 0000000000110000 - . . . . . 3 . . DB $00,$D0 ; 0000000011010000 - . . . . 3 1 . . DB $00,$D0 ; 0000000011010000 - . . . . 3 1 . . DB $03,$40 ; 0000001101000000 - . . . 3 1 . . . DB $03,$40 ; 0000001101000000 - . . . 3 1 . . . DB $5C,$40 ; 0101110001000000 - 1 1 3 . 1 . . . DB $55,$50 ; 0101010101010000 - 1 1 1 1 1 1 . . DB $55,$50 ; 0101010101010000 - 1 1 1 1 1 1 . . L2620: ; "BONUS" string DB 'B','O','N','U','S' DB $00 ; End string ; [$2626 - Pattern P1 arm and gun position 6] DB $00 ; No X Offset DB $00 ; No Y Offset DB $02 ; 2 Bytes Wide DB $0B ; 11 Bytes High DB $00,$30 ; 0000000000110000 - . . . . . 3 . . DB $00,$C0 ; 0000000011000000 - . . . . 3 . . . DB $00,$C0 ; 0000000011000000 - . . . . 3 . . . DB $00,$C0 ; 0000000011000000 - . . . . 3 . . . DB $03,$40 ; 0000001101000000 - . . . 3 1 . . . DB $03,$40 ; 0000001101000000 - . . . 3 1 . . . DB $0C,$40 ; 0000110001000000 - . . 3 . 1 . . . DB $0C,$40 ; 0000110001000000 - . . 3 . 1 . . . DB $5C,$40 ; 0101110001000000 - 1 1 3 . 1 . . . DB $55,$40 ; 0101010101000000 - 1 1 1 1 1 . . . DB $55,$40 ; 0101010101000000 - 1 1 1 1 1 . . . L2640: ; Limit Table [for Tin Can] DB $02 ; X Lower Limit DB $9A ; X Upper Limit DB $06 ; Y Lower Limit DB $50 ; Y Upper Limit DB $00 ; [2 blank bytes] DB $00 ; [$2646 - Pattern P1 arm and gun position 7] DB $00 ; No X Offset DB $00 ; No Y Offset DB $01 ; 1 Byte Wide DB $0B ; 11 Bytes High DB $30 ; 00110000 - . 3 . . DB $30 ; 00110000 - . 3 . . DB $30 ; 00110000 - . 3 . . DB $30 ; 00110000 - . 3 . . DB $34 ; 00110100 - . 3 1 . DB $34 ; 00110100 - . 3 1 . DB $34 ; 00110100 - . 3 1 . DB $34 ; 00110100 - . 3 1 . DB $54 ; 01010100 - 1 1 1 . DB $54 ; 01010100 - 1 1 1 . DB $54 ; 01010100 - 1 1 1 . L2655: ; [Pattern P2 arm and gun base position 0] DB $08 ; 8 pixel X Offset DB $00 ; No Y Offset DB $01 ; 1 Byte Wide DB $0B ; 11 Bytes High DB $30 ; 00110000 - . 3 . . DB $30 ; 00110000 - . 3 . . DB $30 ; 00110000 - . 3 . . DB $30 ; 00110000 - . 3 . . DB $70 ; 01110000 - 1 3 . . DB $70 ; 01110000 - 1 3 . . DB $70 ; 01110000 - 1 3 . . DB $70 ; 01110000 - 1 3 . . DB $75 ; 01110101 - 1 3 1 1 DB $55 ; 01010101 - 1 1 1 1 DB $55 ; 01010101 - 1 1 1 1 L2664: ; "GAME OVER BOYS" string DB 'G','A','M','E' DB ' ','O','V','E','R' DB ' ','B','O','Y','S' DB $00 ; End string DB $00 ; [2 unneeded bytes] DB $00 ; [$2675 - Pattern P2 arm and gun position 1] DB $04 ; 4 pixel X Offset DB $00 ; No Y Offset DB $02 ; 2 Bytes Wide DB $0B ; 11 Bytes High DB $0C,$00 ; 0000110000000000 - . . 3 . . . . . DB $0C,$00 ; 0000110000000000 - . . 3 . . . . . DB $03,$00 ; 0000001100000000 - . . . 3 . . . . DB $03,$00 ; 0000001100000000 - . . . 3 . . . . DB $03,$00 ; 0000001100000000 - . . . 3 . . . . DB $01,$C0 ; 0000000111000000 - . . . 1 3 . . . DB $01,$C0 ; 0000000111000000 - . . . 1 3 . . . DB $01,$C0 ; 0000000111000000 - . . . 1 3 . . . DB $01,$35 ; 0000000100110101 - . . . 1 . 3 1 1 DB $01,$55 ; 0000000101010101 - . . . 1 1 1 1 1 DB $01,$55 ; 0000000101010101 - . . . 1 1 1 1 1 L268F: ; Limit Table [for Player 1] DB $00 ; X Lower Limit DB $90 ; X Upper Limit DB $05 ; Y Lower Limit DB $58 ; Y Upper Limit DB $00 ; [2 unused bytes] DB $00 ; [$2695 - Pattern P2 arm and gun position 2] DB $04 ; 4 pixel X Offset DB $00 ; No Y Offset DB $02 ; 2 Bytes Wide DB $0B ; 11 Bytes High DB $C0,$00 ; 1100000000000000 - 3 . . . . . . . DB $30,$00 ; 0011000000000000 - . 3 . . . . . . DB $30,$00 ; 0011000000000000 - . 3 . . . . . . DB $0C,$00 ; 0000110000000000 - . . 3 . . . . . DB $0C,$00 ; 0000110000000000 - . . 3 . . . . . DB $07,$00 ; 0000011100000000 - . . 1 3 . . . . DB $04,$C0 ; 0000010011000000 - . . 1 . 3 . . . DB $04,$C0 ; 0000010011000000 - . . 1 . 3 . . . DB $04,$35 ; 0000010000110101 - . . 1 . . 3 1 1 DB $05,$55 ; 0000010101010101 - . . 1 1 1 1 1 1 DB $05,$55 ; 0000010101010101 - . . 1 1 1 1 1 1 L26AF: ; Limit table [for Player 2] DB $10 ; X Lower Limit DB $A0 ; X Upper Limit DB $05 ; Y Lower Limit DB $58 ; Y Upper Limit DB $00 ; [2 spare bytes] DB $00 ; [$26B5 - Pattern P2 arm and gun position 3] DB $04 ; 4 pixel X Offset DB $02 ; 2 pixel Y Offset DB $02 ; 2 Bytes Wide DB $09 ; 9 Bytes High DB $C0,$00 ; 1100000000000000 - 3 . . . . . . . DB $30,$00 ; 0011000000000000 - . 3 . . . . . . DB $3C,$00 ; 0011110000000000 - . 3 3 . . . . . DB $1F,$00 ; 0001111100000000 - . 1 3 3 . . . . DB $17,$00 ; 0001011100000000 - . 1 1 3 . . . . DB $14,$C0 ; 0001010011000000 - . 1 1 . 3 . . . DB $14,$35 ; 0001010000110101 - . 1 1 . . 3 1 1 DB $15,$55 ; 0001010101010101 - . 1 1 1 1 1 1 1 DB $15,$55 ; 0001010101010101 - . 1 1 1 1 1 1 1 L26CB: ; "# OF CANS" string DB '#',' ','O','F',' ' DB 'C','A','N','S' DB $00 ; End string ; [$26D5 - Pattern P2 arm and gun position 4] DB $00 ; No X Offset DB $02 ; 2 pixel Y Offset DB $03 ; 3 Bytes Wide DB $09 ; 9 Bytes High DB $0F,$00,$00 ; 000011110000000000000000 - . . 3 3 . . . . . . . . DB $03,$F0,$00 ; 000000111111000000000000 - . . . 3 3 3 . . . . . . DB $00,$30,$00 ; 000000000011000000000000 - . . . . . 3 . . . . . . DB $00,$1C,$00 ; 000000000001110000000000 - . . . . . 1 3 . . . . . DB $00,$17,$00 ; 000000000001011100000000 - . . . . . 1 1 3 . . . . DB $00,$14,$F0 ; 000000000001010011110000 - . . . . . 1 1 . 3 3 . . DB $00,$14,$35 ; 000000000001010000110101 - . . . . . 1 1 . . 3 1 1 DB $00,$15,$55 ; 000000000001010101010101 - . . . . . 1 1 1 1 1 1 1 DB $00,$15,$55 ; 000000000001010101010101 - . . . . . 1 1 1 1 1 1 1 DB $00 ; [loose byte] ; [$26F5 - Pattern P2 arm and gun position 5] DB $00 ; No X Offset DB $02 ; 2 pixel Y Offset DB $03 ; 3 Bytes Wide DB $09 ; 9 Bytes High DB $F0,$00,$00 ; 111100000000000000000000 - 3 3 . . . . . . . . . . DB $3C,$00,$00 ; 001111000000000000000000 - . 3 3 . . . . . . . . . DB $03,$00,$00 ; 000000110000000000000000 - . . . 3 . . . . . . . . DB $00,$F0,$00 ; 000000001111000000000000 - . . . . 3 3 . . . . . . DB $00,$5C,$00 ; 000000000101110000000000 - . . . . 1 1 3 . . . . . DB $00,$53,$C0 ; 000000000101001111000000 - . . . . 1 1 . 3 3 . . . DB $00,$50,$35 ; 000000000101000000110101 - . . . . 1 1 . . . 3 1 1 DB $00,$55,$55 ; 000000000101010101010101 - . . . . 1 1 1 1 1 1 1 1 DB $00,$55,$55 ; 000000000101010101010101 - . . . . 1 1 1 1 1 1 1 1 DB $00 ; [stray byte] ; [$2715 - Pattern P2 arm and gun position 6] DB $00 ; No X Offset DB $05 ; 5 pixel Y Offset DB $03 ; 3 Bytes Wide DB $07 ; 7 Bytes High DB $F0,$00,$00 ; 111100000000000000000000 - 3 3 . . . . . . . . . . DB $0F,$00,$00 ; 000011110000000000000000 - . . 3 3 . . . . . . . . DB $00,$F3,$00 ; 000000001111001100000000 - . . . . 3 3 . 3 . . . . - gap!! DB $00,$53,$F5 ; 000000000101001111110101 - . . . . 1 1 . 3 3 3 1 1 DB $00,$50,$15 ; 000000000101000000010101 - . . . . 1 1 . . . 1 1 1 DB $00,$55,$55 ; 000000000101010101010101 - . . . . 1 1 1 1 1 1 1 1 DB $00,$15,$54 ; 000000000001010101010100 - . . . . . 1 1 1 1 1 1 . DB $01 ; [7 bytes of junk] DB $3E DB $0A DB $01 DB $3E DB $01 DB $01 ; [$2735 - Pattern P2 arm and gun position 7] DB $00 ; No X Offset DB $08 ; 8 pixel Y Offset DB $03 ; 3 Bytes Wide DB $04 ; 4 Bytes High DB $FF,$FF,$FD ; 111111111111111111111101 - 3 3 3 3 3 3 3 3 3 3 3 1 DB $00,$50,$05 ; 000000000101000000000101 - . . . . 1 1 . . . . 1 1 DB $00,$14,$15 ; 000000000001010000010101 - . . . . . 1 1 . . 1 1 1 DB $00,$15,$54 ; 000000000001010101010100 - . . . . . 1 1 1 1 1 1 . L2745: ; [shotgun blast pellets] DB $00 ; No X Offset DB $00 ; No Y Offset DB $01 ; 1 Byte Wide DB $05 ; 5 Bytes High DB $C0 ; 11000000B - 3 . . . - Pellets Pattern DB $0C ; 00001100B - . . 3 . DB $C0 ; 11000000B - 3 . . . DB $03 ; 00000011B - . . . 3 DB $30 ; 00110000B - . 3 . . L274E: ; 8 Bytes COLTBL - Color Table for Color Register ; Left side of Horizontal Color Boundary DB $22 ; COL3L - Border (purple) DB $64 ; COL2L - Head (orange) DB $74 ; COL1L - Body (gold) DB $07 ; COL0L - Background (white) ; Right side of Horizontal Color Boundary DB $22 ; COL3R - Border (purple) DB $64 ; COL2R - Head (orange) DB $C8 ; COL1R - Body (green) DB $07 ; COL0R - Background (white) L2756: ; "DOGPATCH" string DB 'D','O','G','P','A','T','C','H' DB $00 ; End string L275F: ; [vector angle table P1 base position 0] DB $00,$05 ; [P1DXL,P1DXH] DB $00,$1F ; [P1XL,P1XH] DB $80,$FF ; [P1DYL,P1DYH] DB $00,$48 ; [P1YL,P1YH] ; [$2767 - vector angle table P1 position 1] DB $BE,$04 DB $00,$1F DB $6C,$FE DB $00,$44 ; [$276F - vector angle table P1 position 2] DB $29,$04 DB $00,$1F DB $3B,$FD DB $00,$40 ; [$2777 - vector angle table P1 position 3] DB $A3,$03 DB $00,$1F DB $92,$FC DB $00,$3C ; [$277F - vector angle table P1 position 4] DB $2E,$03 DB $00,$1B DB $24,$FC DB $00,$3A ; [$2787 - vector angle table P1 position 5] DB $8A,$02 DB $00,$17 DB $B8,$FB DB $00,$3A ; [$278F - vector angle table P1 position 6] DB $A9,$01 DB $00,$13 DB $4B,$FB DB $00,$3A ; [$2797 - vector angle table P1 position 7] DB $50,$00 DB $00,$0F DB $90,$FB DB $00,$3A L279F: ; [Player Two vector angle table position 0] DB $80,$FF ; [P2DXL,P2DXH] DB $00,$8D ; [P2XL,P2XH] DB $90,$FB ; [P2DYL,P2DYH] DB $00,$3A ; [P2YL,P2YH] ; [$27A7 - vector angle table P2 position 1] DB $5C,$FE DB $00,$89 DB $4B,$FB DB $00,$3A ; [$27AF - vector angle table P2 position 2] DB $7B,$FD DB $00,$85 DB $B8,$FB DB $00,$3A ; [$27B7 - vector angle table P2 position 3] DB $D0,$FC DB $00,$81 DB $B8,$FB DB $00,$3A ; [$27BF - vector angle table P2 position 4] DB $52,$FC DB $00,$7D DB $92,$FC DB $00,$3C ; [$27C7 - vector angle table P2 position 5] DB $D8,$FB DB $00,$7D DB $3B,$FD DB $00,$40 ; [$27CF - vector angle table P2 position 6] DB $48,$FB DB $00,$7D DB $6C,$FE DB $00,$44 ; [$27D7 - vector angle table P2 position 7] DB $90,$FB DB $00,$7D DB $80,$FF DB $00,$48 L27DF: ; Pattern for tin can DB $00 ; No X Offset DB $00 ; No Y Offset DB $01 ; 1 Byte Wide DB $04 ; 4 Bytes High DB $FF ; 11111111 - 3 3 3 3 - Can Pattern DB $FF ; 11111111 - 3 3 3 3 DB $FF ; 11111111 - 3 3 3 3 DB $FF ; 11111111 - 3 3 3 3 ; [$27E7 - 25 left over bytes] DB $00 DB $00 DB $01 DB $02 DB $01 DB $04 DB $02 DB $06 DB $02 DB $08 DB $03 DB $0A DB $03 DB $0C DB $04 DB $0E DB $05 DB $10 DB $05 DB $12 DB $05 DB $14 DB $05 DB $16 DB $05 ; Last Byte ; End of 2k ROM