 rem +---------------------+-----------------------------+------------------------------------+
 rem | /TURBO 2600\        |created with bB v1.0 	  \		|   |   |             |
 rem +---------------------+-------------------------------+		|   |   |	      +
 rem | by Steve Engelhardt |Multisprite Kernel		    \		|   |   |	     /|
 rem | v1.0 (4/26/2007)    |16K Build          		     \ 		|   |   |	    / |
 rem +---------------------+----------------------------------+         |   |   |          +--|
 rem | A Racing game for the Atari 2600.                       \        |   |   |         /   |
 rem | It's *not* a clone of the orignal Turbo. :)              \      /    |    \       /    |
 rem +-----------------------------------------------------------+    /     |     \     +-----|
 rem | //Free Space					          \  /      |      \   /      |
 rem +-------------------------------------------------------------+/       |       \ +-------|
 rem |   182 bytes of ROM space left in bank 1	 	            \       |        /        |
 rem |   613 bytes of ROM space left in bank 2		             \      |       /         |
 rem |   949 bytes of ROM space left in bank 3		              \     |      /          |
 rem |   196 bytes of ROM space left in bank 4		               \    |     /           |
 rem +------------------------------------------------------------------+   |    +------------|
 rem |   AtariAge Thread:	                                         \  |   /             |
 rem |   http://www.atariage.com/forums/index.php?showtopic=105243        \ |  /              |
 rem +---------------------------------------------------------------------+| +---------------|
 rem | //Ideas for future improvements:					    \/                |		      
 rem +-----------------------------------------------------------------------+----------------+
 rem | nighttime driving - make cars appear on screen further down for greater difficulty     |
 rem | title song? - I may experiment with inline asm for this one using a sid2tia binary file|
 rem | Change colors on different day/night progressions				      |
 rem | adjust car colors duing day/night						      |
 rem | Ideas: Smaller, animated tires (may not be enough space for that), more solid	      |
 rem +----------------------------------------------------------------------------------------+
 rem | 											      |
 rem |                                    _._						      |
 rem |                               _.-="_-         _					      |
 rem |                          _.-="   _-          | ||"""""""---._______     __..	      |
 rem |              ___.===""""-.______-,,,,,,,,,,,,`-''----" """""       """""  __'          |
 rem |       __.--""     __        ,'                   o \           __        [__|          |
 rem |  __-""=======.--""  ""--.=================================.--""  ""--.=======]         |
 rem | ]       [w] : /        \ : |========================|    : /        \ :  [w] ]         |
 rem | [___________:|          |: |========================|    :|          |:   _-"          |
 rem |  \__________: \        / :_|=======================/_____: \        / :__-"            |
 rem |  -----------'  ""____""  `-------------------------------'  ""____""                   |
 rem |                                                                                        |
 rem +----------------------------------------------------------------------------------------+
 rem | Difficulty Levels:							  	      |
 rem +----------------------------------------------------------------------------------------+
 rem |B/W switch									      |
 rem |  color mode - oncoming traffic moves at normal speed				      |
 rem |  b/w mode - oncoming traffic will move twice as fast				      |
 rem |Left Difficulty									      |
 rem |  B - normal damage								      |
 rem |  A - your car takes 3 times as much damage with each hit.			      |
 rem |Right Difficulty									      |
 rem |  B - Normal Workbench operation 							      |
 rem |  A - Workbench will only be open when you are VERY low on gasoline.  You'll have to    |
 rem |      time it just right.								      |
 rem |         Hint:  time how long it takes for you to run out of gas when you get down to   |
 rem |                one bar left. when there is one bar on the screen, you'll have to       |
 rem |                wait about 1/2 the time it takes before you run out.  This definitely   |
 rem |                adds a level of challenge - timing is everything. :evil:                |
 rem |											      |
 rem |      Workbench will always be closed when you have less than 10 damage, which is       |
 rem |      right before the first time your car changes color.				      |
 rem +----------------------------------------------------------------------------------------+
 rem 
 includesfile multisprite_bankswitch.inc : rem
 set kernel multisprite
 set romsize 16k
begin
 if joy0fire then goto startgame
titlescreen
 rem +----------------------------------------------------------------------------------------+
 rem |TITLESCREEN									      |
 rem +----------------------------------------------------------------------------------------+
 rem |   titlescreen is done entirely in asm.  This code was adapted		 	      |
 rem |   from Nick Bensema's "How to draw a playfield". I changed it			      |
 rem |   to use a higher resolution playfield, reflected instead of			      |
 rem |   asymmetrical, added a routine to jump out to the bB program			      |
 rem |   when you hit fire, and added a sprite.						      |
 rem +----------------------------------------------------------------------------------------+
 asm
Temp       = $80
PlayfieldY = $90

Start
	SEI 			; Disable Interrupts
	CLD  			; Clear the BCD Math Bit
	LDX  #$FF		;
	TXS 			; Set the stack to the beginning
	LDA #0
				;-------------------------------
				; CLEAR TIA/MEMORY REGISTERS
X1      STA 0,X			;  This is a loop that counts
	DEX			;  down (DEX) & clears the
	BNE X1			;  registers
				;-------------------------------
				;
	JSR  GameInit		;Set Data Direction Registers
MainLoop			;
	JSR  VerticalBlank 	;Execute Vertical Blank
	JSR  CheckSwitches 	;Check the console switches
	JSR  GameCalc      	;Do Game Caluculations (During VBLANK)
	JSR  DrawScreen    	;Draw the Screen
	JSR  OverScan      	;Do more game calucations during overscan
	JMP  MainLoop    	;Jump back to main loop to continue in an endless loop
				;
				;Note: VBLANK blanks TIA's output for that scanline
				;      VSYNC moves to the next scanline 
VerticalBlank  			;
	LDX  #0			;
	LDA  #2			;
	STA  WSYNC  		;
	STA  WSYNC		;
	STA  WSYNC		;
	STA  VSYNC 		;Begin Vertical Sync
	STA  WSYNC 		;First Line of VSYNC
	STA  WSYNC 	        ;Second Line of VSYNC
				;----------------------
			        ;VBLANK TIMING
	LDA  #44       		; 37 Scanlines of VBLANK time, each Scanline uses 76 Cycles
	STA  TIM64T		; 37*76=2888 (-14 to set timer/WSYNC) = 2876 cycles.
			  	; 2880/64 = about 44.
				;----------------------
	LDA #0			;Clear Collision Latches
	STA CXCLR		;
				;----------------------
				;End the VSYNC period.
	STA  WSYNC 		;Third Line of VSYNC
	STA  VSYNC 		; 
	RTS  			; Begin scanning again (RTS=ReturnToScan?)
CheckSwitches 
       LDA INPT4	        ; Load Input
       BMI ButtonNotPressed     ; skip to sub if !joy0fire
       LDA #28
       STA COLUBK
; ----------------------------------------------------------------------------
; CLEAR MEM & START batari Basic Game
;
; I had to add all of the stuff below in order to clear everything out
; before the game starts.  It then jumps back to the bBasic "begin" subroutine
; when the joystick button is pressed.
; ----------------------------------------------------------------------------
	SEI 			; Disable Interrupts
	CLD  			; Clear the BCD Math Bit
	LDX  #$FF		;
	TXS 			; Set the stack to the beginning
	lda #0			;
ClearMem			;
	sta 0,X			;
	dex			;
	bne ClearMem		;
	lda #$00    		;
	sta COLUBK  		;
        lda #00			;
	sta COLUP0		;
			 	; clear collision latches again
	LDA #0			;
	STA CXCLR		;

       BNE .begin  ; put a dot in front of the subroutine name to call a bB sub.
 
ButtonNotPressed
       RTS
; ---------------------end buttonpress sub------------------------------------

GameCalc 
	RTS			;
DrawScreen			;Screen Drawing Routines
        LDA INTIM		;
	BNE DrawScreen		;
	STA WSYNC		;
	STA VBLANK  		;
	LDA  #1			;Change to 1 or 2 for Reflected/Asymmetrical PF
	STA  CTRLPF		;Playfield Register
	LDY #191 		;
ScanLoop 
	; ------------------------Draw Sprite------------------
        ; Load up the Turbo title sprite
	lda $28		;Load this value into A
 	sta COLUP0	;Store this as the color for the sprite
 	lda  Sprite-1,X ;Load Sprite Graphic
	sta  GRP0       ;Display it     
        ; ------------------------end draw sprite--------------
	TYA			;
	SEC                     ;
	SBC PlayfieldY		;
	LSR   			;Add another LSR or two to decrease the screen resolution.
	TAX			;
	LDA PFData0,X           ;Load up PFData0
	STA WSYNC               ;
	STA PF0                	;
	LDA PFLColor,X          ;Load up the colors for PFData0
	STA COLUP0              ;
	STA COLUPF              ;
	LDA PFData1,X           ;Load up PFData1
	STA PF1                 ;
	LDA PFRColor,X          ;Load up the colors for PFData1
	STA COLUP1              ;
	LDA PFData2,X           ;Load up PFData2
	STA PF2                 ;
	DEY			;
	BNE ScanLoop		;
				;---------------------
	LDA #2			;Clear all Registers
	STA WSYNC  		;
				;---------------------
				;
	STA VBLANK 		;Make TIA output invisible
				;
	STY PF0			;
	STY PF1			;
	STY PF1			;
	STY GRP0		;
	STY GRP1		;
	STY ENAM0		;
	STY ENAM1		;
	STY ENABL		;
	RTS			;
OverScan   			;
	LDX #30			;
KillLines			;
	STA WSYNC		;
	DEX			;
	BNE KillLines		;
	RTS			;
GameInit			;
				;
        LDA #0			;
	STA PlayfieldY		;
	RTS			;

;
;Sprite and Playfield Graphics
;

Sprite
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%01111110
        .byte #%11111111
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11111111
        .byte #%01111110
        .byte #%00000000
        .byte #%11111110
        .byte #%11111111
        .byte #%11000011
        .byte #%11000011
        .byte #%11111110
        .byte #%11111110
        .byte #%11000011
        .byte #%11000011
        .byte #%11111111
        .byte #%11111110
        .byte #%00000000
        .byte #%11000011
        .byte #%11000110
        .byte #%11001100
        .byte #%11111110
        .byte #%11111111
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11111111
        .byte #%11111110
        .byte #%00000000
        .byte #%01111110
        .byte #%11111111
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%11000011
        .byte #%00000000
        .byte #%00011000
        .byte #%00011000
        .byte #%00011000
        .byte #%00011000
        .byte #%00011000
        .byte #%00011000
        .byte #%00011000
        .byte #%11111111
        .byte #%11111111

PFData0
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000




        .byte #%00010000
        .byte #%00100000
        .byte #%01000000
        .byte #%10000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%11110000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%10010000
        .byte #%11010000
        .byte #%00010000
        .byte #%01010000
        .byte #%00010000
        .byte #%01010000
        .byte #%00010000
        .byte #%01010000
        .byte #%00010000
        .byte #%11110000

PFData1
        .byte #%00000111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00111111
        .byte #%00111111
        .byte #%00011111
        .byte #%00111111
        .byte #%00111111
        .byte #%00100000
        .byte #%00100000
        .byte #%00100111
        .byte #%00100111
        .byte #%00100111
        .byte #%00100111
        .byte #%00100000
        .byte #%00100000
        .byte #%00010000
        .byte #%00001111
        .byte #%00000010
        .byte #%00000010
        .byte #%01111111
        .byte #%01111111
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000


        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%10000000
        .byte #%01000000
        .byte #%00100000
        .byte #%00010000
        .byte #%00001000
        .byte #%00000100
        .byte #%00000010
        .byte #%00000001
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%11111111
        .byte #%00101000
        .byte #%00101010
        .byte #%00101000
        .byte #%00101010
        .byte #%11101000
        .byte #%00101010
        .byte #%00101000
        .byte #%00101010
        .byte #%11101000
        .byte #%00101010
        .byte #%00101000
        .byte #%00101111
        .byte #%11100010
        .byte #%00100010
        .byte #%00101010
        .byte #%00100010
        .byte #%11101010
        .byte #%00100010
        .byte #%00101010
        .byte #%11100010
        .byte #%10001010
        .byte #%10000010
        .byte #%10101010
        .byte #%10000010
        .byte #%11111110
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000

PFData2
        .byte #%00000111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%00001111
        .byte #%11111111
        .byte #%11111111
        .byte #%11111111
        .byte #%11111111
        .byte #%11111111
        .byte #%01000000
        .byte #%11000000
        .byte #%00011111
        .byte #%00011111
        .byte #%00011111
        .byte #%00011111
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%11111111
        .byte #%00000110
        .byte #%00000110
        .byte #%11111111
        .byte #%11111111
        .byte #%00000001
        .byte #%00000010
        .byte #%00000010
        .byte #%00000100
        .byte #%00000100
        .byte #%11111000
        .byte #%00000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%10000000


        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%10000000
        .byte #%10000000
        .byte #%10000000
        .byte #%00000000
        .byte #%00000000
        .byte #%10000001
        .byte #%10000010
        .byte #%00000100
        .byte #%00001000
        .byte #%10010000
        .byte #%00100000
        .byte #%01000000
        .byte #%11111111
        .byte #%00010101
        .byte #%01010111
        .byte #%00010101
        .byte #%01010111
        .byte #%00010101
        .byte #%01010111
        .byte #%00010101
        .byte #%01010111
        .byte #%00010101
        .byte #%11110111
        .byte #%00100101
        .byte #%10100111
        .byte #%00100101
        .byte #%10100111
        .byte #%00100101
        .byte #%10111111
        .byte #%00101001
        .byte #%10101111
        .byte #%00101001
        .byte #%11101111
        .byte #%00001001
        .byte #%00001111
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
        .byte #%00000000
;
;Color Table
;--------------------------
;GRAY		=	$00
;GOLD		=	$10
;ORANGE		=	$20
;BURNTORANGE	=	$30
;RED		=	$40
;PURPLE		=	$50
;PURPLEBLUE	=	$60
;BLUE		=	$70
;BLUE2		=	$80
;LIGHTBLUE	=	$90
;TURQUOISE	=	$A0
;GREEN		=	$B0
;BROWNGREEN	=	$C0
;TANGREEN	=	$D0
;TAN		=	$E0
;BROWN		=	$F0
;--------------------------
;
; PLAYFIELD COLORS
;
PFLColor ; Left side of screen
       .byte $00,$08,$08,$08,$06,$04,$02,$02
       .byte $02,$12,$10,$16,$16,$16,$16,$16
       .byte $40,$40,$40,$40,$16,$16,$16,$16

;next line includes wing color
       .byte $22,$22,$20,$20,$16,$16,$16,$16
;first byte is the top of the car's wing
       .byte $16,$16,$02,$02,$02,$02,$02,$02
       .byte $02,$02,$02,$02,$02,$02,$02,$02

PFRColor ; Right side of screen
       .byte $02,$02,$02,$02,$02,$02,$02,$02
       .byte $02,$02,$02,$02,$02,$02,$04,$04
;fifth from the right is the horizon line
       .byte $06,$06,$08,$80,$88,$88,$84,$84

;bottom three are entirely on the cityscape
       .byte $82,$82,$90,$90,$90,$90,$90,$90
       .byte $90,$90,$90,$90,$90,$90,$90,$90
       .byte $90,$90,$90,$90,$90,$90,$90,$90
end
 rem +----------------------------------------------------------------------------------------+
 rem INITIALIZE/SET bB VARIABLES
 rem
 rem   I did my best to comment these as I was making the game
 rem   however some may be missing or incorrect.  I need to
 rem   review them again.
 rem +----------------------------------------------------------------------------------------+
init
 a=44 : rem enemy car Y starting position / frame switcher
 b=0  : rem frame counter for changing playfield
 c=70 : rem enemy car X starting position
 d=0  : rem flag for enemy car moves left
 e=0  : rem flag for enemy car moves right
 f=0  : rem flag for enemy car moves straight
 g=250: rem Gas gauge counter
 h=83 : rem gas gauge Y Placement
 i=0  : rem pit marker counter
 j=0  : rem "in the pit" flag
 k=0  : rem counter - keep track of time for difficulty increase
 l=0  : rem titlescreen colubk change
 m=152: rem titlescreen colupf change
 n=25 : rem X Value of Rain
 o=84 : rem Y Value of Rain
 p=75 : rem player car X Position (Y position never changes)
 q=70 : rem used in Pitstop
 r=65 : rem used in Pitstop
 s=0  : rem "In the Tunnel" flag
 t=0  : rem frame counter for car movement
 u=0  : rem used as a counter to cycle colors (not currently in use)
 v=0  : rem missile counter
 w=0  : rem damage counter
 x=10 : rem Counter number - when to switch to frame 2
 y=20 : rem Counter number - when to switch to frame 3
 z=30 : rem Counter number - when to switch to frame 4
 rem dim rand16=n

 rem
 rem     Assign Colors
 rem 
 COLUP0=2:COLUP4=2:COLUPF=152
 NewCOLUP1=126
 COLUP1=126
 COLUP2=126
 COLUP3=28
 COLUP5=14
 rem +----------------------------------------------------------------------------------------+
 rem     MAIN GAME LOOP BEGIN
 rem +----------------------------------------------------------------------------------------+
main
 rem
 rem  skip to cardestroyed subroutine if damage exceeds 29
 rem
 if w>29 then goto cardestroyed bank3
 rem +----------------------------------------------------------------------------------------+
 rem     AUDIO
 rem +----------------------------------------------------------------------------------------+
 rem  sound an alarm when your gas gets low, skip engine sound for a few seconds
 rem
 if g>86 && g<91 then AUDF0=12:AUDC0=5:AUDV0=8:goto audskip3
 if joy0up then goto audskip
 if joy0down then goto audskip
 AUDF0=18:AUDC0=14:AUDV0=10
audskip
 if joy0up then AUDF0=12:AUDC0=14:AUDV0=10
 if joy0down then AUDF0=24:AUDC0=14:AUDV0=10
audskip3
carcolor
 if k>0 && k<7 then goto skipcar
 COLUP0=2
 COLUP4=2
skipcar
 scorecolor=144
 rem
 rem     NUSIZ
 rem
 rem  set sprite sizes
 rem
 NUSIZ0=$30
 NUSIZ1=$35
 NewNUSIZ=$05
 NUSIZ2=$35
 NUSIZ3=$28
 NUSIZ4=$30
 NUSIZ5=$00
 rem +----------------------------------------------------------------------------------------+
 rem  Enemy car sprite movement / size changing
 rem +----------------------------------------------------------------------------------------+
 rem  change the size of the sprite to get bigger as it moves down the road
 rem
 rem  t is the car frame counter.  It's there to make sure the car doesn't switch paths
 rem  before it gets to the bottom of the screen.
 rem
 rem  the d,e,f variables are flags that keep the car on the same path for the duration
 rem  that t is less than 3.
 rem
 goto traffic bank2
trafficret
 rem move left
ml 
 if a>35 then c=c-1:goto enemy1
 if a>25 && a<36 then c=c-1:goto enemy2
 if a>15 && a<26 then c=c-1:goto enemy3
 if a>2 && a<16 then c=c-1:goto enemy4
 if a>0 && a<3 then goto enemyblank
 t=t+1 : rem increase car frame counter by one
 d=1   : rem set car movement path flag
 goto carret
 rem
 rem move right
mr 
 if a>35 then c=c+1:goto enemy1
 if a>25 && a<36 then c=c+1:goto enemy2
 if a>15 && a<26 then c=c+1:goto enemy3
 if a>2 && a<16 then c=c+1:goto enemy4
 if a>0 && a<3 then goto enemyblank
 t=t+1 : rem increase car frame counter by one
 e=1   : rem set car movement path flag
 goto carret
 rem
 rem move straight
ms
 if a>35 then goto enemy1
 if a>25 && a<36 then goto enemy2
 if a>15 && a<26 then goto enemy3
 if a>2 && a<16 then goto enemy4
 if a>0 && a<3 then goto enemyblank
 t=t+1 : rem increase car frame counter by one
 f=1   : rem set car movement path flag
 goto carret
 rem
 rem
 rem
carret
 rem
 rem if enemy car Y position goes below 1, reset it to top of the road
 rem  changed to 3 from 1 - was causing the score to jump a little
 rem
 if a<3 then a=44
 rem
 rem if enemy car Y position is at the top of the screen, reset to middle
 rem
 if a>43 then c=70
 rem +----------------------------------------------------------------------------------------+
 rem   DEFINE SPRITES
 rem +----------------------------------------------------------------------------------------+
 rem
 rem  Left side of Player car 
 rem
 player2:
 %00111100
 %00111100
 %01111111
 %10000000
 %10000000
 %10000000
 %01111111
 %00010000
 %00001000
 %00000111
end
 rem
 rem  Right side of Player car
 rem
 player1:
 %00111100
 %00111100
 %11111110
 %00000001
 %00000001
 %00000001
 %11111110
 %00001000
 %00010000
 %11100000
end

 rem
 rem  Left side of Player car 
 rem
 rem player2:
 rem %00111000
 rem %00111000
 rem %01111111
 rem %10000000
 rem %10000000
 rem %10000000
 rem %01111111
 rem %00100000
 rem %00010000
 rem %00001111
 remend
 rem 
 rem  Right side of Player car
 rem 
 rem player1:
 rem %00011100
 rem %00011100
 rem %11111110
 rem %00000001
 rem %00000001
 rem %00000001
 rem %11111110
 rem %00000100
 rem %00001000
 rem %11110000
 remend

 rem
 rem  The word 'gas'
 rem
 player5:
  %11111100
  %00000100
  %11111100
  %10000000
  %11111100
  %00000000
  %10000100
  %10000100
  %11111100
  %10000100
  %11111100
  %00000000
  %11111100
  %10000100
  %10011100
  %10000000
  %11111100
end
 rem
 rem  reduce Y value of enemy car by 1
 rem
 a=a-1
 rem
 rem  B/W switch
 rem    color mode - oncoming traffic moves at normal speed
 rem    b/w mode - oncoming traffic will move twice as fast
 rem
 if switchbw then a=a-1
 rem
 rem +----------------------------------------------------------------------------------------+
 rem     Difficulty Progression							   
 rem +----------------------------------------------------------------------------------------+
 rem
 rem  The idea is to make the game harder the further into it you get.
 rem  I believe I'm going to use the number of tank fillups as a gauge to how
 rem  far along you are in the game. Every time your tank is near empty, 
 rem  1 tick will be added to a game counter.
 rem
 rem   Ideas:
 rem    1) Make the cars come at you faster after every <x> number of fillups
 rem    2) Season changes - add snow or rain.
 rem    3) Make the car's handling more sluggish in snow/rain
 rem
 rem   Problems:
 rem    1) Unless you enable fixed point math, there isn't much variance you
 rem         can add in the speed or handling. I haven't been able to get fixed point
 rem         math to work with the bB multisprite kernel.
 rem    2) Changing the entire background for snow would require color changes
 rem         to make all sprites visible on a white background
 rem
 rem
 if g>87 && g<90 then k=k+1 : rem if gas gets down to 87-->90, increase difficulty counter by 1
 rem
 rem +--Change screen from day to night--+
 rem
 rem   There are 5 distinct day/night progressions that can be independently changed.
 rem   They are currently all identical as of version .27.  The only simple change that
 rem   could be made would be to change the colors for each day, or change how often the
 rem   tunnel appears.
 rem 
 rem   difficulty level changes pretty much follow gas fillups.  It was the easiest way to do it.
 rem
 rem   added the missile/0 statement to make sure all the rain is gone from the screen
 rem   when the screen changes.  There was a single missile left stuck on the screen
 rem
 rem   extra challenges:  at night, the car skids around
 rem                      at the peak of daylight, the screen is washed out with "glare" 
 rem
 if k>1 && k<4 then COLUP0=2:COLUP4=2:COLUPF=4:COLUBK=0:goto rain bank3
 rem tunnel sequence runs here
 if k>3 && k<6 then COLUP0=2:COLUP4=2:COLUPF=144:COLUBK=0:missile0x=0:missile0y=0
 if k>5 && k<8 then COLUP0=24:COLUP4=24:COLUPF=152:COLUBK=2
 if k>7 && k<10 then COLUP0=24:COLUP4=24:COLUPF=154:COLUBK=2
 if k>9 && k<12 then COLUP0=26:COLUP4=26:COLUPF=156:COLUBK=6
 if k>11 && k<14 then COLUP0=28:COLUP4=28:COLUPF=158:COLUBK=10
 if k>13 && k<16 then COLUP0=24:COLUP4=26:COLUPF=156:COLUBK=6
 if k>15 && k<18 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 if k>17 && k<20 then COLUP0=2:COLUP4=2:COLUPF=144:COLUBK=0:goto rain bank3
 rem tunnel sequence runs here
 if k>19 && k<22 then COLUP0=2:COLUP4=2:COLUPF=4:COLUBK=0:missile0x=0:missile0y=0
 if k>21 && k<24 then COLUP0=24:COLUP4=24:COLUPF=152:COLUBK=2
 if k>23 && k<26 then COLUP0=24:COLUP4=24:COLUPF=154:COLUBK=2
 if k>25 && k<28 then COLUP0=26:COLUP4=26:COLUPF=156:COLUBK=4
 if k>27 && k<30 then COLUP0=28:COLUP4=28:COLUPF=158:COLUBK=6
 if k>29 && k<32 then COLUP0=24:COLUP4=26:COLUPF=156:COLUBK=4
 if k>31 && k<34 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 if k>33 && k<36 then COLUP0=2:COLUP4=2:COLUPF=144:COLUBK=0:goto rain bank3
 rem tunnel sequence runs here
 if k>35 && k<38 then COLUP0=2:COLUP4=2:COLUPF=4:COLUBK=0:missile0x=0:missile0y=0
 if k>37 && k<40 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 if k>39 && k<42 then COLUP0=26:COLUP4=26:COLUPF=156:COLUBK=4
 if k>41 && k<44 then COLUP0=28:COLUP4=28:COLUPF=158:COLUBK=6
 if k>43 && k<46 then COLUP0=24:COLUP4=26:COLUPF=156:COLUBK=4
 if k>45 && k<48 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 if k>47 && k<50 then COLUP0=2:COLUP4=2:COLUPF=144:COLUBK=0:goto rain bank3
 rem tunnel sequence runs here
 if k>49 && k<52 then COLUP0=2:COLUP4=2:COLUPF=4:COLUBK=0:missile0x=0:missile0y=0
 if k>51 && k<54 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 if k>53 && k<56 then COLUP0=26:COLUP4=26:COLUPF=156:COLUBK=4
 if k>55 && k<58 then COLUP0=28:COLUP4=28:COLUPF=158:COLUBK=6
 if k>57 && k<60 then COLUP0=24:COLUP4=26:COLUPF=156:COLUBK=4
 if k>59 && k<62 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 if k>61 && k<64 then COLUP0=2:COLUP4=2:COLUPF=144:COLUBK=0:goto rain bank3
 rem tunnel sequence runs here
 if k>63 && k<66 then COLUP0=2:COLUP4=2:COLUPF=4:COLUBK=0:missile0x=0:missile0y=0
 if k>65 && k<68 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 if k>67 && k<70 then COLUP0=26:COLUP4=26:COLUPF=156:COLUBK=4
 if k>69 && k<72 then COLUP0=28:COLUP4=28:COLUPF=158:COLUBK=6
 if k>71 && k<74 then COLUP0=24:COLUP4=26:COLUPF=156:COLUBK=4
 if k>73 && k<76 then COLUP0=26:COLUP4=24:COLUPF=154:COLUBK=2
 rem
 rem
 rem Difficulty is reset to beginning after k=75
 rem
 if k>75 then k=1
rainreturn
 rem +-------------------------------------------------------------------------------------+
 rem
 rem
 rem   Left side of car 
 rem
 player2x=p:player2y=10
 rem
 rem   Right side of car
 rem
 player1x=p+16:player1y=10
 rem
 rem   show taillights on player car
 rem
 rem  a ridiculously inefficient way to flash both taillights at the same time
 rem  I'll revise this later when I'm low on space
 rem   -- no need to revise now, it's been moved to bank3 :)
 rem
 goto tlflash bank3
flashreturn
 rem
 rem   Enemy car
 rem
 player0x=c:player0y=a
 player4x=c+13:player4y=a-2
 rem +----------------------------------------------------------------------------------------+
 rem   Gasoline Gauge
 rem +----------------------------------------------------------------------------------------+
 if b>26 then g=g-1
 if g>210 then COLUP3=206:h=84:goto gasgauge1 bank3
 if g>170 && g<211 then COLUP3=206:h=83:goto gasgauge2 bank3
 if g>140 && g<171 then COLUP3=28:h=82:goto gasgauge3 bank3
 if g>100 && g<141 then COLUP3=28:h=81:goto gasgauge4 bank3
 if g>60  && g<101 then COLUP3=72:h=80:goto gasgauge5 bank3
 if g<61 then COLUP3=72:h=79:goto gasgauge6 bank3
gasreturn
 rem
 player3x=11:player3y=h
 rem
 rem   The Word 'GAS'
 rem
 player5x=13:player5y=75
 rem
 rem +----------------------------------------------------------------------------------------+
 rem   Display Pit Marker
 rem +----------------------------------------------------------------------------------------+
 if g>90 then goto signreturn:rem if you've got alot of gas, skip the road sign
 goto dispsign bank3
signreturn

 rem +----------------------------------------------------------------------------------------+
 rem    SPEED
 rem +----------------------------------------------------------------------------------------+
 rem      This seems like a strange way to accomplish speed changes,
 rem      but changing the number of drawscreens is a simple way to speed up
 rem      or slow down the game, and it doesn't use too many cycles (at least not yet!)
 rem
 drawscreen
 rem
 rem    if the joystick is not being pushed up, an additional drawscreen is called
 rem
 if !joy0up then drawscreen
 rem
 rem    if the joystick is being pushed down, two additional drawscreens are called 
 rem    to slow things down
 rem
 if joy0down then drawscreen:drawscreen
 rem
 rem
 rem     Frame Counter
 rem
 b=b+1
 rem
 rem     Joystick routine
 rem
 if joy0left then p=p-2
 if joy0right then p=p+2
 if collision(player1,ball) then j=1:b=0:goto pitstop bank3
 rem +----------------------------------------------------------------------------------------+
 rem     Change Frame
 rem +----------------------------------------------------------------------------------------+
 rem       In certain places, the tunnel will appear.  I added G>100 so that the gas station
 rem       never appears when you are in the tunnel.
 rem
 if k>3 && k<6 && g>100 then goto thetunnel
 if k>19 && k<22 && g>100 then goto thetunnel
 if k>35 && k<38 && g>100 then goto thetunnel
 if k>49 && k<52 && g>100 then goto thetunnel
 if k>63 && k<66 && g>100 then goto thetunnel 
 if k>63 && k<66 && g>100 then goto thetunnel
 if k>77 && k<80 && g>100 then goto thetunnel
 if k>93 && k<96 && g>100 then goto thetunnel
 if k>107 && k<110 && g>100 then goto thetunnel
 rem
 rem    display normal city frames
 rem
 if b=x then goto frame1
 if b=y then goto frame2
 if b=z then goto frame3
 goto skiptunnel
 rem
 rem    display tunnel frames
 rem
thetunnel
 if b=x then goto one bank3
 if b=y then goto two bank3
 if b=z then goto three bank3
skiptunnel
 rem
 rem    Reset Frame Counter
 rem
 if b>30 then score=score+10:b=0
 rem +----------------------------------------------------------------------------------------+
 rem     Collision Detection / Movement restriction
 rem +----------------------------------------------------------------------------------------+
 if p<25 then p=p+4
 if p>120 then p=p-4
 if collision(player1,playfield) && p<80 then p=p+4
 if collision(player1,playfield) && p>80 then p=p-4
 rem
 rem    detect a collision with an enemy car
 rem 
 rem     Notes:
 rem       Left side of Player car 
 rem        player2x=p:player2y=10
 rem
 rem       Right side of Player car
 rem        player1x=p+16:player1y=10
 rem
 rem       Enemy Car
 rem        player0x=c:player0y=a
 rem
 if collision(player0,player1) then AUDF1=8:AUDC1=31:AUDV1=10:a=a+10:w=w+1
 if !switchleftb && collision(player0,player1) then AUDF1=8:AUDC1=31:AUDV1=10:a=a+10:w=w+2
 if !collision(player0,player1) then AUDV1=0
 rem
 rem    Damage counter 
 rem
 rem       if you change this, change it in the pit subroutine also.
 rem
 if w>9 && w<15 then NewCOLUP1=148:COLUP2=148
 if w>14 && w<20 then NewCOLUP1=196:COLUP2=196
 if w>19 && w<25 then NewCOLUP1=26:COLUP2=26
 if w>24 && w<30 then NewCOLUP1=70:COLUP2=70

 rem
 rem    If your gas runs out, you die as well.  For now, same deal - if it
 rem    reaches 0, you die and just jump back to the title
 rem
 if g<1 then goto cardestroyed bank3
 rem 
 rem +----------------------------------------------------------------------------------------+
 rem  END Main Game Loop
 rem +----------------------------------------------------------------------------------------+
 goto main 





frame1
 pfheight=0
 playfield:
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ........X.......
 .......XXX......
 ......XXXXX.....
 ......XXXXX.....
 ......XXXXX.....
 ......X...X.....
 ......XXXXX.....
 ......XXXXXX....
 ......XXXXXXX...
 X.....X...XXXX..
 XX....XXXXXXXX..
 XXX...XXXXXXXX..
 XXXX..XXXXX..X..
 XXXX..X...XXXX..
 ...X.XXXXXX..X..
 XXXXXXXXXXXXXX..
 XXXX...XXXX..X..
 ...X...X..XXXX..
 XXXX...XXXX..X.X
 XXXXXXXXXXXXXXXX
 ...X...XXXX..XXX
 XXXX...X..XXXXXX
 XXXX...XXXX.X...
 ..XXXXXXXXXXX...
 XXXXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 ..XXXX.XXXX.X...
 XXXXXXXXXXXXX...
 XXXXXX.XXXX.X...
 ..XXXX.X..XXXXXX
 XXXXXX.XXXX.X...
 XXXXXXXXXXXXX...
 ..XXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 XXXXXXXXXXXXXXXX
 ................
 ................
 ..............X.
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ...........X....
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ........X.......
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 .....X..........
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ..X.............
 ................
 ................
 ................
 ................
 ................
 ................
end
 rem drawscreen
 goto main

frame2
 pfheight=0
 playfield:
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ........X.......
 .......XXX......
 ......XXXXX.....
 ......XXXXX.....
 ......XXXXX.....
 ......X...X.....
 ......XXXXX.....
 ......XXXXXX....
 ......XXXXXXX...
 X.....X...XXXX..
 XX....XXXXXXXX..
 XXX...XXXXXXXX..
 XXXX..XXXXX..X..
 XXXX..X...XXXX..
 ...X.XXXXXX..X..
 XXXXXXXXXXXXXX..
 XXXX...XXXX..X..
 ...X...X..XXXX..
 XXXX...XXXX..X.X
 XXXXXXXXXXXXXXXX
 ...X...XXXX..XXX
 XXXX...X..XXXXXX
 XXXX...XXXX.X...
 ..XXXXXXXXXXX...
 XXXXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 ..XXXX.XXXX.X...
 XXXXXXXXXXXXX...
 XXXXXX.XXXX.X...
 ..XXXX.X..XXXXXX
 XXXXXX.XXXX.X...
 XXXXXXXXXXXXX...
 ..XXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 XXXXXXXXXXXXXXXX
 ................
 ................
 ................
 ................
 .............X..
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ..........X.....
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 .......X........
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ....X...........
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 .X..............
 ................
 ................
 ................
end
 rem drawscreen
 goto main

frame3
 pfheight=0
 playfield:
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ........X.......
 .......XXX......
 ......XXXXX.....
 ......XXXXX.....
 ......XXXXX.....
 ......X...X.....
 ......XXXXX.....
 ......XXXXXX....
 ......XXXXXXX...
 X.....X...XXXX..
 XX....XXXXXXXX..
 XXX...XXXXXXXX..
 XXXX..XXXXX..X..
 XXXX..X...XXXX..
 ...X.XXXXXX..X..
 XXXXXXXXXXXXXX..
 XXXX...XXXX..X..
 ...X...X..XXXX..
 XXXX...XXXX..X.X
 XXXXXXXXXXXXXXXX
 ...X...XXXX..XXX
 XXXX...X..XXXXXX
 XXXX...XXXX.X...
 ..XXXXXXXXXXX...
 XXXXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 ..XXXX.XXXX.X...
 XXXXXXXXXXXXX...
 XXXXXX.XXXX.X...
 ..XXXX.X..XXXXXX
 XXXXXX.XXXX.X...
 XXXXXXXXXXXXX...
 ..XXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 XXXXXXXXXXXXXXXX
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ............X...
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 .........X......
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ......X.........
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ...X............
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 X...............
end
 rem drawscreen
 rem
 rem after exiting the pitstop, I display this frame to make a more smooth transition
 rem back to the road.  J is always equal to 1 when you're in the pitstop.
 rem
 if w>29 then goto destroyreturn bank3
 if g<1 then goto destroyreturn bank3
 if j=1 then goto frame3return bank3
 goto main




enemy1
 player0:
 %00000111
 %00000111
 %00000000
 %00000000
 %00000000
 %00000000
end 
 player4:
 %11100000
 %11100000
 %00000000
 %00000000
 %00000000
 %00000000
end 
 goto carret

enemy2
 player0:
 %00000100
 %00001111
 %00001000
 %00000111
 %00000000
 %00000000
end 
 player4:
 %00100000
 %11110000
 %00010000
 %11100000
 %00000000
 %00000000
end 
 goto carret

enemy3
 player0:
 %00001100
 %00011111
 %00011111
 %00010000
 %00001111
 %00000000
 %00000000
end 
 player4:
 %00110000
 %11111000
 %11111000
 %00001000
 %11110000
 %00000000
 %00000000
end 
 goto carret

enemy4
 player0:
 %01110000
 %01110000
 %11111111
 %10000000
 %11111111
 %11111111
 %01000000
 %00100000
 %00011111
end 
 player4:
 %00001110
 %00001110
 %11111111
 %00000001
 %11111111
 %11111111
 %00000010
 %00000100
 %11111000
end
 goto carret

enemyblank
 player0:
 %00000000
end 
 player4:
 %00000000
end 
 goto carret


startgame
 player0:
 %00000000
end
 player1:
 %00000000
end
 player2:
 %00000000
end
 player3:
 %00000000
end
 player4:
 %00000000
end
 player5:
 %00000000
end
 COLUP0=0
 NewCOLUP1=0
 COLUP2=0
 COLUP3=0
 COLUP4=0
 COLUP5=0
 COLUBK=0
 COLUPF=0	

 pfheight=0
 playfield:
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ........X.......
 .......XXX......
 ......XXXXX.....
 ......XXXXX.....
 ......XXXXX.....
 ......X...X.....
 ......XXXXX.....
 ......XXXXXX....
 ......XXXXXXX...
 X.....X...XXXX..
 XX....XXXXXXXX..
 XXX...XXXXXXXX..
 XXXX..XXXXX..X..
 XXXX..X...XXXX..
 ...X.XXXXXX..X..
 XXXXXXXXXXXXXX..
 XXXX...XXXX..X..
 ...X...X..XXXX..
 XXXX...XXXX..X.X
 XXXXXXXXXXXXXXXX
 ...X...XXXX..XXX
 XXXX...X..XXXXXX
 XXXX...XXXX.X...
 ..XXXXXXXXXXX...
 XXXXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 ..XXXX.XXXX.X...
 XXXXXXXXXXXXX...
 XXXXXX.XXXX.X...
 ..XXXX.X..XXXXXX
 XXXXXX.XXXX.X...
 XXXXXXXXXXXXX...
 ..XXXX.XXXX.X...
 XXXXXX.X..XXXXXX
 XXXXXXXXXXXXXXXX
 ................
 ................
 ................
 .............X..
 ................
 ................
 ................
 ................
 ................
 ...........X....
 ................
 ................
 ................
 ................
 ................
 .........X......
 ................
 ................
 ................
 ................
 ................
 .......X........
 ................
 ................
 ................
 ................
 ................
 .....X..........
 ................
 ................
 ................
 ................
 ................
 ...X............
 ................
 ................
 ................
 ................
 ................
 .X..............
 ................
 ................
 ................
 ................
end
 drawscreen
 goto init





 rem +-------------------------------------------------------------------------------------+
 rem |             		        BEGIN BANK 2					   |
 rem +-------------------------------------------------------------------------------------+
 rem
 bank 2

 rem
 rem    TITLESCREEN SUBROUTINE
 rem

 U=U+1

 CTRLPF=$31

 AUDV0=0

 rem if joy0right then l=l+1
 rem if l>254 then l=0
 COLUBK=l

 rem if joy0left then m=m+1
 rem if m>254 then m=0
 COLUPF=m

 rem NUSIZ1=$10
 rem COLUP1=u
 missile0x=0:missile0y=0
 missile0x=0:missile0y=0
 rem missile1x=110:missile1y=79

 rem if u=1 then missile1x=111:missile1y=79
 rem if  =2 then missile1x=110:missile1y=79
 rem if u=3 then missile1x=111:missile1y=79
 rem if u=4 then missile1x=110:missile1y=79
 rem if u=5 then missile1x=111:missile1y=79
 rem if u=6 then missile1x=110:missile1y=79

 if u<28 then ballx=61:bally=62
 if u>27 then ballx=0:bally=0
 if u>67 then u=0

 
 player0:
  %11100000
  %00100000
  %11100000
  %10000111
  %11100100
  %00000111
  %11100100
  %00100111
  %11100000
  %10000101
  %11100110
  %00000111
  %11100101
  %10000111
  %11100000
  %10000111
  %11100010
  %00000010
  %10100010
  %11000111
  %11100000
  %10100100
  %11100100
  %00000110
  %10000100
  %10000111
  %11100000
  %10100000
  %11100000
end

  player1:
  %00010000
  %00010000
  %00010000
  %00111000
end
  player2:
  %00110000
  %01001000
  %01001000
  %01001000
end
  player3:
  %01001100
  %01011000
  %01110000
  %01111100
  %01000100
  %01111000
end
  player4:
  %01111100
  %01000010
  %01000010
  %01111100
  %01000010
  %01000010
  %01111100
end
  player5:
  %01111110
  %10000001
  %10000001
  %10000001
  %10000001
  %10000001
  %10000001
  %01111110
end

 if w>1 then scorecolor=64
 rem COLUPF=64
 NewCOLUP1=62
 COLUP0=28
 COLUP2=62
 COLUP3=62
 COLUP4=62
 COLUP5=62

 NewNUSIZ=$05
 NUSIZ2=$05
 NUSIZ3=$05
 NUSIZ4=$05
 NUSIZ5=$05
 
 player0x=16:player0y=45
 player1x=79:player1y=41
 player2x=88:player2y=35
 player3x=96:player3y=29
 player4x=105:player4y=20
 player5x=117:player5y=11

 
 
 drawscreen
 rem if joy0fire || switchreset then k=0:g=250:b=0:w=0:score=0:goto main bank1
 rem goto titlescreen

 rem
 rem      TRAFFIC PATTERNS SUBROUTINE
 rem


traffic
 if t>2 then t=0:d=0:e=0:f=0
 rem
 if d=1 then goto ml bank1
 if e=1 then goto mr bank1
 if f=1 then goto ms bank1
 rem 
 rem Traffic patterns change based on game progression
 rem   the default is to use pattern1
 rem
 if k>5 && k<10 then goto pattern2
 if k>22 && k<32 then goto pattern4
 if k>41 && k<53 then goto pattern2
 if k>66 && k<57 then goto pattern3
 if k>66 && k<77 then goto pattern4
 if k>89 && k<94 then goto pattern2
 if k>100 && k<120 then goto pattern2
 if k>150 && k<170 then goto pattern3
 if k>200 && k<220 then goto pattern4
pattern1
 if g>240 && g<251 then goto ms bank1
 if g>230 && g<241 then goto mr bank1
 if g>220 && g<231 then goto ml bank1
 if g>210 && g<221 then goto ms bank1
 if g>200 && g<210 then goto mr bank1
 if g>190 && g<200 then goto ms bank1
 if g>180 && g<190 then goto ml bank1
 if g>170 && g<180 then goto mr bank1
 if g>160 && g<170 then goto mr bank1
 if g>150 && g<160 then goto ml bank1
 if g>140 && g<150 then goto mr bank1
 if g>130 && g<140 then goto ml bank1
 if g>120 && g<130 then goto ms bank1
 if g>110 && g<120 then goto ms  bank1
 if g>100 && g<110 then goto ml bank1
 if g>90 && g<100 then goto ml bank1
 if g>80 && g<90 then goto mr bank1
 if g>70 && g<80 then goto ms bank1
 if g>60 && g<70 then goto mr bank1
 if g>50 && g<60 then goto ml bank1
 if g>40 && g<50 then goto mr bank1
 if g>30 && g<40 then goto ms bank1
 if g>20 && g<30 then goto ml bank1
 if g>10 && g<20 then goto mr bank1
 goto trafficret bank1
pattern2
 if g>240 && g<251 then goto ml bank1
 if g>230 && g<241 then goto ml bank1
 if g>220 && g<231 then goto ms bank1
 if g>210 && g<221 then goto mr bank1
 if g>200 && g<210 then goto ml bank1
 if g>190 && g<200 then goto ms bank1
 if g>180 && g<190 then goto ms bank1
 if g>170 && g<180 then goto ml bank1
 if g>160 && g<170 then goto ml bank1
 if g>150 && g<160 then goto mr bank1
 if g>140 && g<150 then goto mr bank1
 if g>130 && g<140 then goto ms bank1
 if g>120 && g<130 then goto ml bank1
 if g>110 && g<120 then goto ms  bank1
 if g>100 && g<110 then goto ml bank1
 if g>90 && g<100 then goto mr bank1
 if g>80 && g<90 then goto mr bank1
 if g>70 && g<80 then goto ms bank1
 if g>60 && g<70 then goto mr bank1
 if g>50 && g<60 then goto ml bank1
 if g>40 && g<50 then goto ml bank1
 if g>30 && g<40 then goto ms bank1
 if g>20 && g<30 then goto ml bank1
 if g>10 && g<20 then goto mr bank1
 rem 
 goto trafficret bank1
pattern3
 if g>240 && g<251 then goto ms bank1
 if g>230 && g<241 then goto ms bank1
 if g>220 && g<231 then goto mr bank1
 if g>210 && g<221 then goto mr bank1
 if g>200 && g<210 then goto ml bank1
 if g>190 && g<200 then goto mr bank1
 if g>180 && g<190 then goto ml bank1
 if g>170 && g<180 then goto ms bank1
 if g>160 && g<170 then goto ml bank1
 if g>150 && g<160 then goto mr bank1
 if g>140 && g<150 then goto mr bank1
 if g>130 && g<140 then goto ms bank1
 if g>120 && g<130 then goto mr bank1
 if g>110 && g<120 then goto ml  bank1
 if g>100 && g<110 then goto ml bank1
 if g>90 && g<100 then goto ms bank1
 if g>80 && g<90 then goto ms bank1
 if g>70 && g<80 then goto mr bank1
 if g>60 && g<70 then goto mr bank1
 if g>50 && g<60 then goto ms bank1
 if g>40 && g<50 then goto ml bank1
 if g>30 && g<40 then goto ms bank1
 if g>20 && g<30 then goto mr bank1
 if g>10 && g<20 then goto ms bank1
 rem 
 goto trafficret bank1
pattern4
 if g>240 && g<251 then goto mr bank1
 if g>230 && g<241 then goto mr bank1
 if g>220 && g<231 then goto ms bank1
 if g>210 && g<221 then goto ms bank1
 if g>200 && g<210 then goto mr bank1
 if g>190 && g<200 then goto ml bank1
 if g>180 && g<190 then goto ml bank1
 if g>170 && g<180 then goto ms bank1
 if g>160 && g<170 then goto ml bank1
 if g>150 && g<160 then goto mr bank1
 if g>140 && g<150 then goto ml bank1
 if g>130 && g<140 then goto mr bank1
 if g>120 && g<130 then goto ms bank1
 if g>110 && g<120 then goto mr  bank1
 if g>100 && g<110 then goto ms bank1
 if g>90 && g<100 then goto ml bank1
 if g>80 && g<90 then goto ms bank1
 if g>70 && g<80 then goto ml bank1
 if g>60 && g<70 then goto ms bank1
 if g>50 && g<60 then goto mr bank1
 if g>40 && g<50 then goto ms bank1
 if g>30 && g<40 then goto mr bank1
 if g>20 && g<30 then goto ml bank1
 if g>10 && g<20 then goto ml bank1
 rem 
 goto trafficret bank1

 rem +-------------------------------------------------------------------------------------+
 rem |             		        BEGIN BANK 3					   |
 rem +-------------------------------------------------------------------------------------+
 bank 3

rain
 rem
 rem    RAIN SUBROUTINE
 rem 
 rem  the extra p=p-<x> are put in to make the car skid left and right a little
 rem  during the rainstorm.
 rem
 if b=6 then missile1x=n:missile1y=o 
 if b=14 then missile1x=n+20:missile1y=o:p=p-3
 if b=3 then missile1x=n+40:missile1y=o
 if b=10 then missile1x=n+60:missile1y=o
 if b=20 then missile1x=n+80:missile1y=o:p=p-2
 if b=25 then missile1x=n+100:missile1y=o
 if b=12 then missile1x=n+120:missile1y=o
 if b=23 then missile1x=n+30:missile1y=o
 if b=18 then missile1x=n+50:missile1y=o
 if b=29  then missile1x=n+70:missile1y=o
 if b=1 then missile1x=n+90:missile1y=o
 if b=27 then missile1x=n+110:missile1y=o:p=p+3
 if b=15 then missile1x=n+130:missile1y=o
 if b=9 then missile1x=n+20:missile1y=o
 if b=13 then missile1x=n+40:missile1y=o
 if b=5 then missile1x=n+60:missile1y=o
 if b=21 then missile1x=n+80:missile1y=o
 if b=28 then missile1x=n+100:missile1y=o:p=p+3
 if b=7 then missile1x=n+120:missile1y=o
 if b=26 then missile1x=n+30:missile1y=o
 if b=17 then missile1x=n+50:missile1y=o
 if b=2 then missile1x=n+70:missile1y=o
 if b=24 then missile1x=n+80:missile1y=o
 if b=19 then missile1x=n+110:missile1y=o
 if b=22 then missile1x=n+130:missile1y=o:p=p-2
 if b=16 then missile1x=n+20:missile1y=o
 if b=11 then missile1x=n+40:missile1y=o
 if b=8 then missile1x=n+60:missile1y=o
 if b=4 then missile1x=n+80:missile1y=o
 o=o-2
 n=n-2
 if o<40 then o=75
 if n>120 then n=20
 goto rainreturn bank1



 rem
 rem   TAILLIGHT SUBROUTINE
 rem
 rem Create taillights on car with missiles.  Flashes one missile
 rem back and forth quickly to make it appear as both taillights.
 rem 
tlflash
 if b=1 then missile0x=p-4:missile0y=6
 if b=2 then missile0x=p+16:missile0y=6
 if b=3 then missile0x=p-4:missile0y=6
 if b=4 then missile0x=p+16:missile0y=6
 if b=5 then missile0x=p-4:missile0y=6
 if b=6 then missile0x=p+16:missile0y=6
 if b=7 then missile0x=p-4:missile0y=6
 if b=8 then missile0x=p+16:missile0y=6
 if b=9 then missile0x=p-4:missile0y=6
 if b=10 then missile0x=p+16:missile0y=6
 if b=11 then missile0x=p-4:missile0y=6
 if b=12 then missile0x=p+16:missile0y=6
 if b=13 then missile0x=p-4:missile0y=6
 if b=14 then missile0x=p+16:missile0y=6
 if b=15 then missile0x=p-4:missile0y=6
 if b=16 then missile0x=p+16:missile0y=6
 if b=17 then missile0x=p-4:missile0y=6
 if b=18 then missile0x=p+16:missile0y=6
 if b=19 then missile0x=p-4:missile0y=6
 if b=20 then missile0x=p+16:missile0y=6
 if b=21 then missile0x=p-4:missile0y=6
 if b=22 then missile0x=p+16:missile0y=6
 if b=23 then missile0x=p-4:missile0y=6
 if b=24 then missile0x=p+16:missile0y=6
 if b=25 then missile0x=p-4:missile0y=6
 if b=26 then missile0x=p+16:missile0y=6
 if b=27 then missile0x=p-4:missile0y=6
 if b=28 then missile0x=p+16:missile0y=6
 if b=29 then missile0x=p-4:missile0y=6
 if b=30 then missile0x=p+16:missile0y=6
 goto flashreturn bank1



 rem +-----------------------------------+
 rem |        PITSTOP SUBROUTINE         |
 rem +-----------------------------------+
pitstop
 dim sc1=score
 dim sc2=score+1
 dim sc3=score+2
 rem
 missile0x=0:missile0y=0
 missile1x=0:missile1y=0
 ballx=0:bally=0
 rem
 rem workbench
 rem
 if !switchrightb && g>30 then goto closed
 if w<10 then goto closed
 u=60
 player0:
 %11111111
 %11111111
 %11111111
 %11111111
 %11111111
 %11000111
 %11000111
 %11000111
 %11000111
 %11000111
 %11000111
 %11000111
 %11000111
 %11000111
 %11000111
 %10000011
 %11111001
 %11111001
 %10000011
 %11000111
 %11101111
 %11111111
 %11111111
 %11111111
 %11111111
 %11111111
end
 rem
 rem skip this for now
 rem
 goto skipclosed
closed
 u=64
 player0:
 %11111111
 %11000111
 %11011011
 %11011011
 %11011011
 %11000111
 %11111111
 %11000011
 %11011111
 %11000111
 %11011111
 %11000011
 %11111111
 %11000011
 %11111011
 %11000011
 %11011111
 %11000011
 %11111111
 %11000011
 %11011011
 %11011011
 %11000011
 %11111111
 %11000011
 %11011111
 %11011111
 %11011111
 %11111111
 %11000011
 %11011111
 %11011111
 %11000011
 %11111111
end
skipclosed
 rem
 rem Right side of Player car
 rem
 player1:
  %11111100
  %00000010
  %11111010
  %11110010
  %00000011
  %00000011
  %00000011
  %00000011
  %00000011
  %11111111
  %00000110
  %00001010
  %11110010
  %00010010
  %00010010
  %00010010
  %00010010
  %00010010
  %00010010
  %00010010
  %00010010
  %00010010
  %00010010
  %00010010
  %11110010
  %00001010
  %00000110
  %11111110
  %00000010
  %00000010
  %00000011
  %00000011
  %00000011
  %00000011
  %00000011
  %10000011
  %10000010
  %10000010
  %00000100
  %11111000
end
 rem
 rem
 rem Left side of Player car 
 rem
 player2:
  %00111111
  %01000000
  %01011111
  %01001111
  %11000000
  %11000000
  %11000000
  %11000000
  %11000000
  %11111111
  %01100000
  %01010000
  %01001111
  %01001000
  %01001000
  %01001000
  %01001000
  %01001000
  %01001000
  %01001000
  %01001000
  %01001000
  %01001000
  %01001000
  %01001111
  %01010000
  %01100000
  %01111111
  %01000000
  %01000000
  %11000000
  %11000000
  %11000000
  %11000000
  %11000000
  %11000001
  %01000001
  %01000001
  %00100000
  %00011111
end
 rem
 rem gas pump
 rem
 player4:
  %11111111
  %10000111
  %10000100
  %10000100
  %10000100
  %10000110
  %10000110
  %10000101
  %10000101
  %10000101
  %10110101
  %10110110
  %10110110
  %10110100
  %10000100
  %11111100
end
 rem
 rem The word 'gas'
 rem
 player5:
  %11111100
  %00000100
  %11111100
  %10000000
  %11111100
  %00000000
  %10000100
  %10000100
  %11111100
  %10000100
  %11111100
  %00000000
  %11111100
  %10000100
  %10011100
  %10000000
  %11111100
end
 rem
 rem
 rem
 if w>1 then scorecolor=64
 COLUPF=152
 rem COLUP0=28
 rem NewCOLUP1=62
 COLUP2=62
 COLUP3=6
 COLUP4=62
 COLUP5=62
 rem
 rem
 rem
 NewNUSIZ=$05
 NUSIZ2=$05
 NUSIZ3=$00
 NUSIZ4=$05
 NUSIZ5=$00
 rem
 rem DAMAGE COUNTER
 rem
 rem This is a duplicate of the damage counter that is
 rem used in the main loop.  If that one's updated, this
 rem one needs to be updated too.
 rem
 if w<9 then NewCOLUP1=42:COLUP2=42
 if w>9 && w<15 then NewCOLUP1=148:COLUP2=148
 if w>14 && w<20 then NewCOLUP1=196:COLUP2=196
 if w>19 && w<25 then NewCOLUP1=26:COLUP2=26
 if w>24 && w<30 then NewCOLUP1=70:COLUP2=70
 rem
 rem  Left side of car 
 rem
 player2x=q:player2y=r
 rem
 rem  Right side of car
 rem
 player1x=q+16:player1y=r
 rem
 rem  display workbench (fixes car damage)
 rem
 player0x=20:player0y=u
 rem
 rem  display gas pump
 rem
 player4x=130:player4y=19
 rem
 rem
 rem  display gas gauge
 rem
 player3x=13:player3y=h
 rem
 rem the word 'gas'
 rem
 player5x=13:player5y=75
 rem
 rem  Gasoline Gauge
 rem
 if g>210 then COLUP3=206:h=85:goto gasgauge1 
 if g>170 && g<211 then COLUP3=206:h=84:goto gasgauge2 
 if g>140 && g<171 then COLUP3=28:h=83:goto gasgauge3 
 if g>100 && g<141 then COLUP3=28:h=82:goto gasgauge4
 if g>60  && g<101 then COLUP3=72:h=81:goto gasgauge5
 if g<61 then COLUP3=72:h=79:goto gasgauge6 
gasreturn2
 rem
 rem
 rem
 if joy0up then r=r+1
 if joy0down then r=r-1
 if joy0right then q=q+1
 if joy0left then q=q-1
 rem
 rem
 rem
 if r>85 then r=r-1
 if r<40 then r=r+1
 if q<30 then q=q+1  : rem l/r
 if q>107 then q=q-1 : rem l/r
 rem
 rem
 rem
 rem
 rem
 rem
 if joy0up then skipaud2
 AUDF0=18:AUDC0=14:AUDV0=10
skipaud2
 if joy0up then AUDF0=12:AUDC0=14:AUDV0=10
 rem
 rem restore health
 rem
 if !switchrightb && g>30 then goto skiphl
 if joy0left && collision(player0,player1) then AUDF0=12:AUDC0=u:AUDV0=10
 if collision(player0,player1) && w>9 then AUDF0=12:AUDC0=u:AUDV0=10:COLUP1=42:NewCOLUP1=42:COLUP2=42:w=0
skiphl
 rem
 rem restore gas
 rem
 rem no collision detection for player3 (gas pump), so detect when
 rem car is moved to lower right hand corner to fill tank.
 rem
 rem these values may take some experimentation
 rem
 if q>95 && r<45 then AUDF1=14:AUDC1=u:AUDV1=8:g=250
 if joy0up then AUDV1=0
 if joy0left then AUDV1=0
 rem if r<37 then AUDV1=0
 rem
 rem if the car is at the top middle of the screen, exit back to main game
 rem
 if sc1=$00 && sc2=$00 && sc3<$01 then goto skipreduce
 score=score-1
skipreduce
 if r>84 && q>60 && q<90 then goto pitreturn
 pfheight=1
 playfield:
 XXXXXXXXXX......
 X......XXX......
 X.......XX......
 X........X......
 X...............
 X...............
 X...............
 X...............
 X...............
 XX..............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XXX.............
 XX..............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 XXXXXXXXXXX.....
end
 drawscreen
 
 goto pitstop

pitreturn

 rem
 rem I make a quick call to frame3 to prep the screen for the transition back to the road.
 rem  I simply check the pit flag variable in frame3, and if i'm in the pit, I just
 rem  return here (to frame3return).
 rem
 rem COLUPF=0
 goto frame3 bank1
frame3return
 a=44:q=70:r=40:c=70:p=75:COLUPF=m:j=0:goto main bank1




gasgauge1
 player3:
 %11111100
 %11111100
 %11111100
 %11111100
 %11111100
 %11111100
 %11111100
end
 if j=1 then goto gasreturn2
 goto gasreturn bank1

gasgauge2
 player3:
 %11111100
 %11111100
 %11111100
 %11111100
 %11111100
 %11111100
end
 if j=1 then goto gasreturn2
 goto gasreturn bank1

gasgauge3
 player3:
 %11111100
 %11111100
 %11111100
 %11111100
 %11111100
end
 if j=1 then goto gasreturn2
 goto gasreturn bank1

gasgauge4
 player3:
 %11111100
 %11111100
 %11111100
 %11111100
end
  if j=1 then goto gasreturn2
 goto gasreturn bank1

gasgauge5
 player3:
 %11111100
 %11111100
 %11111100
end
 if j=1 then goto gasreturn2
 goto gasreturn bank1

gasgauge6
 player3:
 %11111100
end
 if j=1 then goto gasreturn2
 goto gasreturn bank1




 rem +----------------------------------------------------------+
 rem |         Car Destroyed / Out of Gas Subroutine            |
 rem +----------------------------------------------------------+

cardestroyed
 
 AUDV0=0
 AUDV1=0

 COLUP3=3
 COLUP0=28

 player0:
 %00000000
end

 rem
 rem  if you run out of gas, skip the sprite change to a crashed car.
 rem
 if g<1 then skipdestroy
 rem
 rem
 rem Left side of Player car 
 rem
 player2:
 %00111000
 %00111000
 %01111111
 %10000010
 %10000001
 %10000010
 %01111111
 %00100011
 %00011100
 %00000111
end
 rem
 rem Right side of Player car
 rem
 player1:
 %00011100
 %00011100
 %11111110
 %01000001
 %10000001
 %01000001
 %11111110
 %11110100
 %01101000
 %11100000
end
skipdestroy
 player4:
  %00010000
  %00010000
  %00010000
  %00101000
  %01000100
  %10000010
  %00010000
  %00010000
  %00010000
  %00010000
  %11111110
  %00000000
  %10000000
  %10000000
  %11111110
  %10000010
  %11111110
  %00000000
  %10000010
  %10000010
  %10010010
  %10101010
  %11000110
  %00000000
  %11111110
  %10000000
  %11110000
  %10000000
  %11111110
end

 player3:
 %00000000
end

 player5:
 %00000000
end

 rem
 rem  Left side of car 
 rem
 player2x=p:player2y=10
 rem
 rem  Right side of car
 rem
 player1x=p+16:player1y=10
 rem
 rem
 if g<1 then player4x=13:player4y=37
 rem
 missile0x=0:missile0y=0
 missile1x=0:missile1y=0
 goto frame3 bank1
destroyreturn
 drawscreen

 if joy0down then k=0:a=44:g=250:b=0:w=0:goto titlescreen bank1
 goto cardestroyed 



 rem
 rem    DISPLAY GAS STATION SIGN SUBROUTINE 
 rem

dispsign
 if b=1 then goto roadsign4
 if b=4 then goto roadsign4
 if b=7 then goto roadsign3
 if b=10 then goto roadsign3
 if b=13 then goto roadsign2
 if b=16 then goto roadsign2
 if b=19 then goto roadsign2
 if b=20 then ballx=128:bally=10:goto roadsign1
 if b=21 then ballx=129:bally=9:goto roadsign1
 if b=22 then ballx=130:bally=8:goto roadsign1
 if b=23 then ballx=131:bally=7:goto roadsign1
 if b=24 then ballx=132:bally=6:goto roadsign1
 if b=25 then ballx=133:bally=5:goto roadsign1
 if b=26 then ballx=134:bally=4:goto roadsign1
 if b=27 then ballx=135:bally=3:goto roadsign1
 if b<22 then ballx=0:bally=0
 if b>27 then ballx=0:bally=0
 goto signreturn bank1

roadsign1
 rem biggest
 player5:
  %00111100
  %00011000
  %00011000
  %00011000
  %00011000
  %00011000
  %00011000
  %00011000
  %00011000
  %11111111
  %10000001
  %10011001
  %10011101
  %10011001
  %10000001
  %11111111
end
 if b=22 then player5x=129:player5y=28
 if b=23 then player5x=131:player5y=25
 if b=25 then player5x=134:player5y=24
 if b=27 then player5x=139:player5y=19
 if b>27 then player5x=145:player5y=13
 goto signreturn bank1

roadsign2
 rem middle
 player5:
  %00111100
  %00011000
  %00011000
  %00011000
  %00011000
  %00011000
  %01111110
  %01000010
  %01011010
  %01011010
  %01000010
  %01111110
end
 if b=12 then player5x=110:player5y=40
 if b=13 then player5x=114:player5y=38
 if b=16 then player5x=119:player5y=34
 if b=19 then player5x=124:player5y=30
 goto signreturn bank1

roadsign3
 rem little
 player5:
  %00111100
  %00011000
  %00011000
  %00011000
  %00111100
  %00111100
  %00111100
  %00111100
end
 if b=7 then player5x=99:player5y=46
 if b=8 then player5x=101:player5y=44
 if b=9 then player5x=103:player5y=43
 if b=10 then player5x=105:player5y=42
 goto signreturn bank1

roadsign4
 rem reallylittle
 player5:
  %00011000
  %00011000
  %00011000
  %00111100
  %00111100
end
 if b=1 then player5x=92:player5y=48
 if b=4 then player5x=95:player5y=47
 goto signreturn bank1



 rem
 rem   TUNNEL GRAPHICS
 rem
one
 COLUBK=0
 pfheight=0
 playfield:
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 XXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXX
 X...............
 X...............
 X...............
 X...XXXXXXXXXXXX
 X...X...........
 X...X..XXXXXXXXX
 X...X..X........
 X...X..X..XXXXXX
 X...X..X..X.....
 X...X..X..X.XXXX
 X...X..X..X.X...
 X...X..X..X.X.XX
 X...X..X..X.X.X.
 X...X..X..X.X.X.
 X...X..X..X.X.X.
 X...X..X..X.X.X.
 X...X..X..X.X.X.
 X...X..X..X.X.X.
 X...X..X..X.X...
 X...X..X..X.X...
 X...X..X..X.X...
 X...X..X..X.X...
 X...X..X..X.X...
 X...X..X..X.X...
 X...X..X..X.....
 X...X..X..X.....
 X...X..X..X.....
 X...X..X..X.....
 X...X..X..X.....
 X...X..X..X.....
 X...X..X........
 X...X..X........
 X...X..X........
 X...X..X........
 X...X..X........
 X...X..X........
 X...X...........
 X...X...........
 X...X...........
 X...X...........
 X...X...........
 X...X...........
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 X...............
 ................
 ................
 ................
 ................
 ................
 ................
end
 goto skiptunnel bank1

two
 COLUBK=0
 pfheight=0
 playfield:
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 XXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXX
 ................
 ................
 ................
 ...XXXXXXXXXXXXX
 ...X............
 ...X..XXXXXXXXXX
 ...X..X.........
 ...X..X..XXXXXXX
 ...X..X..X......
 ...X..X..X.XXXXX
 ...X..X..X.X....
 ...X..X..X.X.XXX
 ...X..X..X.X.X..
 ...X..X..X.X.X.X
 ...X..X..X.X.X.X
 ...X..X..X.X.X..
 ...X..X..X.X.X..
 ...X..X..X.X.X..
 ...X..X..X.X....
 ...X..X..X.X....
 ...X..X..X.X....
 ...X..X..X.X....
 ...X..X..X.X....
 ...X..X..X.X....
 ...X..X..X......
 ...X..X..X......
 ...X..X..X......
 ...X..X..X......
 ...X..X..X......
 ...X..X..X......
 ...X..X.........
 ...X..X.........
 ...X..X.........
 ...X..X.........
 ...X..X.........
 ...X..X.........
 ...X............
 ...X............
 ...X............
 ...X............
 ...X............
 ...X............
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
end
 goto skiptunnel bank1

three
 COLUBK=0
 pfheight=0
 playfield:
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 XXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXX
 ................
 ................
 ................
 ..XXXXXXXXXXXXXX
 ..X.............
 ..X..XXXXXXXXXXX
 ..X..X..........
 ..X..X..XXXXXXXX
 ..X..X..X.......
 ..X..X..X.XXXXXX
 ..X..X..X.X.....
 ..X..X..X.X.XXXX
 ..X..X..X.X.X...
 ..X..X..X.X.X.XX
 ..X..X..X.X.X.X.
 ..X..X..X.X.X...
 ..X..X..X.X.X...
 ..X..X..X.X.X...
 ..X..X..X.X.....
 ..X..X..X.X.....
 ..X..X..X.X.....
 ..X..X..X.X.....
 ..X..X..X.X.....
 ..X..X..X.X.....
 ..X..X..X.......
 ..X..X..X.......
 ..X..X..X.......
 ..X..X..X.......
 ..X..X..X.......
 ..X..X..X.......
 ..X..X..........
 ..X..X..........
 ..X..X..........
 ..X..X..........
 ..X..X..........
 ..X..X..........
 ..X.............
 ..X.............
 ..X.............
 ..X.............
 ..X.............
 ..X.............
 ..X.............
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
 ................
end
 goto skiptunnel bank1


 

