start:  clr.l   -(SP)           ;Go into supervisor mode
        move.w  #$20,-(SP)
        trap    #1
        addq.l  #6,SP
        move.l  D0,spv_sp
	move.b	#0,$484
	move.b	#0,$ff8260
mx:     equ     $26e0
my:	equ	$26e2
buttondat:	equ     $26e6

        jsr     mousof
        jsr     getscrn
        jsr     clearsc
	jsr	colors	
	move.l	#414596,d0
        jsr     randomseed
	jsr	loadscr
	jsr	copyintoboth
	bsr	prestuff
	lea	hblvbl,a0
	jsr	putvbl
	move.l	a1,oldvbl1
	jsr	starthbl
	
part1:
	jsr	copyscr
	bsr	keyboard
	bsr	oxyani
	bsr	dooxy
	bsr	ballani
	bsr	doballs
	jsr	flip_scr
	addq.w	#1,frcount
	bra	part1
*******************************
*********************************
testbound:
	move.w	4(a6),d6	;x also put in correct register
	move.w	6(a6),d7	;y for pblock part
	
tb1:	cmpi.w	#5,d6
	bgt	tb2
	neg	(a6)		;if not negate the xvel
	bra	tb3
tb2:
	cmpi.w	#290,d6
	ble	tb3
	neg	(a6)
tb3:	cmpi.w	#5,d7
	bgt	tb4
	neg	2(a6)		;if not negate the xvel
	bra	tb5
tb4:
	cmpi.w	#180,d7
	blt	tb5
	neg	2(a6)
tb5:
	rts
many:	blk.w	1,10
****************************************
dooxy:
	move.w	many,d0
	lea	oxyparams,a6

oxyloop:
	move.w	(a6),d1		;get xvel
	move.w	2(a6),d2	;get yvel
	add.w	d1,4(a6)	;add xvel to x
	add.w	d2,6(a6)	;add yvel to y
	bsr	testbound
	addq.w	#8,a6	
	bsr	putoxy
	dbf	d0,oxyloop
	rts
putoxy:
	movem.l	d0/a6,-(sp)
	move.w  d6,spblock
        move.w  d7,spblock+2
        move.w  #14,spblock+4
        move.w  #1,spblock+6
        move.l  #gtemp,spblock+12
        move.w  #1,spblock+26
        move.l  #gmask,spblock+38
	bsr	shotsp
	movem.l	(sp)+,d0/a6
	rts


oxyparams:
		blk.w	400,0
ballparams:	blk.w	400,0
spblock:	blk.w	50,0


****************************************
doballs:
	move.w	many,d0
	lea	ballparams,a6

ballloop:
	move.w	(a6),d1		;get xvel
	move.w	2(a6),d2	;get yvel
	add.w	d1,4(a6)	;add xvel to x
	add.w	d2,6(a6)	;add yvel to y
	bsr	testbound
	addq.w	#8,a6	
	bsr	putballs
	dbf	d0,ballloop
	rts
putballs:
	movem.l	d0/a6,-(sp)
	move.w  d6,spblock
        move.w  d7,spblock+2
        move.w  #16,spblock+4
        move.w  #1,spblock+6
        move.l  #gtemp,spblock+12
        move.w  #1,spblock+26
        move.l  #gmask,spblock+38
	bsr	shotsp
	movem.l	(sp)+,d0/a6
	rts


******************************
prestuff:
	move.w	#80,d7
	lea	oxyparams,a0
ps:
	move.w	#5,d0
	bsr	random
	move.w	d0,(a0)+
	move.w	#5,d0
	bsr	random
	move.w	d0,(a0)+
	move.w	#200,d0
	bsr	randomplus
	addq.w	#5,d0
	move.w	d0,(a0)+
	move.w	#160,d0
	bsr	randomplus
	addq.w	#5,d0
	move.w	d0,(a0)+
	dbf	d7,ps


	move.w	#80,d7
	lea	ballparams,a0
ps2:
	move.w	#5,d0
	bsr	random
	move.w	d0,(a0)+
	move.w	#5,d0
	bsr	random
	move.w	d0,(a0)+
	move.w	#200,d0
	bsr	randomplus
	addq.w	#5,d0
	move.w	d0,(a0)+
	move.w	#160,d0
	bsr	randomplus
	addq.w	#5,d0
	move.w	d0,(a0)+
	dbf	d7,ps2
	rts


*******************************
oxyani:
	move.l	#0,d0
	move.w	oani,d0
	mulu	#4,d0
	lea	oxylist,a0
	move.l	(a0,d0.w),spblock+8
	addq.w	#1,oani
	cmpi.w	#8,oani
	blt	oan
	move.w	#0,oani
oan:
	rts

oani:	blk.w	1,0
spy:	blk.w	1,0
oxylist:
	dc.l	oxy1,oxy2,oxy3
	dc.l	oxy4,oxy5,oxy6
	dc.l	oxy7,oxy8
******************************
ballani:
	move.l	#0,d0
	move.w	bani,d0
	mulu	#4,d0
	lea	blist,a0
	move.l	(a0,d0.w),spblock+8
	addq.w	#1,bani
	cmpi.w	#21,bani
	blt	ban
	move.w	#0,bani
ban:
	rts

bani:	blk.w	1,0
blist:
dc.l	balls1,balls2,balls3
dc.l	balls4,balls5,balls6
dc.l	balls7,balls8,balls9
dc.l	balls10,balls11,balls12
dc.l	balls13,balls14,balls15
dc.l	balls16,balls17,balls18
dc.l	balls19,balls20,balls21

*******************************

gtemp:	blk.w	1000,0
gmask:	blk.w	1000,0
	
****************************************
putemin:
	moveq	#0,d0
	moveq	#0,d1
	moveq	#0,d2
	move.w	red1,d0
	lsl.w	#8,d0
	move.w	green1,d1
	lsl.w	#4,d1
	move.w	blue1,d2
	or.w	d1,d0
	or.w	d2,d0
	move.w	d0,$ff8254

	moveq	#0,d0
	moveq	#0,d1
	moveq	#0,d2
	move.w	red1,d0
	subq.w	#2,d0
	tst.w	d0
	bge	dr1
	moveq	#0,d0
dr1:	lsl.w	#8,d0
	move.w	green1,d1
	subq.w	#2,d1
	tst.w	d1
	bge	dg1
	moveq	#0,d1
dg1:	lsl.w	#4,d1
	move.w	blue1,d2
	subq.w	#2,d2
	tst.w	d2
	bge	db1
	moveq	#0,d2
db1:	or.w	d1,d0
	or.w	d2,d0
	move.w	d0,$ff8256

	moveq	#0,d0
	moveq	#0,d1
	moveq	#0,d2
	move.w	red1,d0
	subq.w	#3,d0
	tst.w	d0
	bge	dr2
	moveq	#0,d0
dr2:	lsl.w	#8,d0
	move.w	green1,d1
	subq.w	#3,d1
	tst.w	d1
	bge	dg2
	moveq	#0,d1
dg2:	lsl.w	#4,d1
	move.w	blue1,d2
	subq.w	#3,d2
	tst.w	d2
	bge	db2
	moveq	#0,d1
db2:	or.w	d1,d0
	or.w	d2,d0
	move.w	d0,$ff8258
	rts

red1:	blk.w	1,0
green1:	blk.w	1,0
blue1:	blk.w	1,0
red2:	blk.w	1,0
green2:	blk.w	1,0
blue2:	blk.w	1,0
red3:	blk.w	1,0
green3:	blk.w	1,0
blue3:	blk.w	1,0
*************************
keyboard:
        move.w  #$ff,-(sp)
        move.w  #6,-(sp)
        trap    #1
        addq.l  #4,sp
        tst.l   d0
        beq     keyback
        swap    d0
rplus:
	cmpi.w  #$3b,d0
        bne     rminus
	addq.w	#1,red1
	cmpi.w	#7,red1
	ble	rp1
	move.w	#7,red1
rp1:	bsr	putemin
	rts
rminus:
	cmpi.w  #$3c,d0
        bne     greenplus
	subq.w	#1,red1
	cmpi.w	#0,red1
	bge	rm1
	move.w	#0,red1
rm1:	bsr	putemin
	rts

greenplus:
	cmpi.w  #$3d,d0
        bne     greenminus
	addq.w	#1,green1
	cmpi.w	#7,green1
	ble	gp1
	move.w	#7,green1
gp1:	bsr	putemin
	rts
greenminus:
	cmpi.w  #$3e,d0
        bne     blueplus
	subq.w	#1,green1
	cmpi.w	#0,green1
	bge	gm1
	move.w	#0,green1
gm1:	bsr	putemin
	rts

blueplus:
	cmpi.w  #$3f,d0
        bne     blueminus
	addq.w	#1,blue1
	cmpi.w	#7,blue1
	ble	bp1
	move.w	#7,blue1
bp1:	bsr	putemin
	rts
blueminus:
	cmpi.w  #$40,d0
        bne     quit
	subq.w	#1,blue1
	cmpi.w	#0,blue1
	bge	bm1
	move.w	#0,blue1
bm1:	bsr	putemin
	rts
	
quit:   cmpi.w  #$10,d0
        bne     plus
        bra     gem
plus:	cmpi.w	#$4e,d0
	bne	minus
	addq.w	#5,many
	cmpi.w	#80,many
	ble	ph
	move.w	#80,many
ph:	rts
minus:	cmpi.w	#$4a,d0
	bne	rand
	subq.w	#5,many
	tst.w	many
	bge	mh
	move.w	#0,many
mh:	rts
rand:	cmpi.w	#$62,d0
	bne	keyback
	bsr	prestuff
	rts

keyback:rts


************code to determine  x offset *****************
*               and absolute screen address             *
*               parameters to pass on stack as follows  *
*               1-      x of sprite                     *
*               2-      y of sprite                     *
*               3-      screen address                  *
*       paremeters returned are x offset in d0          *
*       absolute screen address in d2                   *
*********************************************************

shotsp:
        move.l  hiden,spblock+16
	move.l  #0,d0
        move.w  spblock,d0       ;put x value in d0
        divu    #16,d0          ;divide by 16 leaves word boundry in d0
        move.w  spblock+2,d1     ;put y value in d1
        mulu    #160,d1         ;gives offset in words of line
        move.w  d0,d3
        mulu    #8,d3
        add     d3,d1           ;gives word to poke sprite
        move.l  spblock+16,d2    ;put screen address in d2
        add     d1,d2           ;gives actual screen address for sprite
        move.l  d2,spblock+20
        asr.l   #8,d0
        asr.l   #8,d0           ;leaves x offset in d0          
        move.w  d0,spblock+24

*************CODE TO ROTATE A SPRITE IMAGE***********************
*       parameters to be passed on the stack in order are       *       
*       1-      x offset from start of word                     *
*       2-      address of place to put shifted image(tempsp)   *
*       3-      address of sprite data                          *
*       4-      height of object in pixels                      *
*       5-      width of object in words - 1                    *
*****************************************************************
shiftimages:
        move.w  spblock+4,d1        ;height in d1
        move.w  spblock+24,d2       ;offset to d2
        subq.w  #1,d1           ;height - 1 = height if count starts at zero
        subq.w  #1,spblock+6        ;width - 1 = width if count starts at zero
        move.l  spblock+8,a0        ;object pointer to a0
        move.l  spblock+12,a1       ;image pointer to a1
ssi1:	move.w  spblock+6,d0        ;width in d0
        move.l  #0,(a1)            ;for each line, the first word of the
        move.l  #0,4(a1)           ;image must be cleared
ssi0:	move.l  #0,d4              ;make sure that the top halves of these
        move.l  #0,d5              ;registers are zeroed out
        move.l  #0,d6
        move.l  #0,d7
        move.w  (a0)+,d4        ;load in one word (four planes)
        move.w  (a0)+,d5        ;to be rotated
        move.w  (a0)+,d6
        move.w  (a0)+,d7
        ror.l   d2,d4           ;rotate all planes by the offset(d2)
        ror.l   d2,d5
        ror.l   d2,d6
        ror.l   d2,d7
        or.w    d4,(a1)+        ;add low order bits to the high order bits
        or.w    d5,(a1)+        ;stored by move instructions farther
        or.w    d6,(a1)+        ;down in this routine
        or.w    d7,(a1)+
        swap    d4              ;move high order bits into lower halves
        swap    d5              ;of the registers
        swap    d6
        swap    d7
        move.w  d4,(a1)         ;save the high orders bits to be ORed
        move.w  d5,2(a1)        ;in the loop (do not increment a1 because
        move.w  d6,4(a1)        ;the ORs in the loop must function on
        move.w  d7,6(a1)        ;the same addresses as these moves.
        dbf     d0,ssi0          ;repeat width times
        addq.l  #8,a1           ;new line, move to next word( * 4 planes = 8)
        dbf     d1,ssi1          ;repeat height times
        addi.w  #1,spblock+6
smake_mask:
        move.w  spblock+4,d1        ;height in d1
        subq.w  #1,d1           ;height - 1 = height if count starts at zero
        move.l  spblock+12,a0        ;image pointer to a0
        move.l  spblock+38,a1       ;mask pointer to a1
smm1:	move.w  spblock+6,d0        ;width in d0
smm0:	move.w  (a0)+,d2        ;load first plane of bit image in d2
        or.w    (a0)+,d2        ;OR it with the 3 other planes
        or.w    (a0)+,d2
        or.w    (a0)+,d2
        move.w  d2,d3           ;store inverse mask in d3 (temporary)
        swap    d2              ;move inverse mask to top half of register
        move.w  d3,d2           ;and also in bottom half
        eor.l   #-1,d2          ;mask no longer inverse
        move.l  d2,(a1)+        ;store mask in buffer
        dbf     d0,smm0          ;repeat 'width' times
        dbf     d1,smm1          ;repeat 'height' times

*********code to put sprite on screen********************
*********parameters to be passed on the stack are********
*********1-     shifted sprite address (tempsp) *********
*********2-     absolute screen address to put image*****
*********3-     height in pixels                *********
*********4-     width in words -1               *********
sdraw:
        move.w  spblock+4,d1     ;height to d1
        subq.w  #1,d1           ;height - 1 = height if count starts at zero
        move.l  spblock+12,a1    ;image pointer to a1
        move.l  spblock+38,a2    ;mask pointer to a2
        move.l  spblock+20,a3    ;screen buffer pointer to a3
sdi1:	move.w  spblock+6,d0     ;width to d0
        move.l  spblock+20,a0    ;absolute screen address to a0
sdi0:	move.l  (a2)+,d3        ;load mask data into d3
        move.l  (a1)+,d6        ;load screen image into d6 and d7
        move.l  (a1)+,d7        ;2 words each covers all 4 planes
        move.l  (a3)+,d4        ;do the same for the background
        move.l  (a3)+,d5        ;in d4 and d5 (from buffer, not screen)
        and.l   d3,d4           ;mask background
        and.l   d3,d5
        or.l    d6,d4           ;copy image onto background
        or.l    d7,d5           ;giving final image on top of background
        move.l  d4,(a0)+        ;copy final image into screen memory
        move.l  d5,(a0)+
        dbf     d0,sdi0          ;repeat for 'width' times
        add.l   #160,spblock+20  ;move to next screen line
        addi.l  #144,a3
        dbf     d1,sdi1          ;repeat 'height' times
	rts
**********************************
putnums:
	cmpi.w	#49,released
	blt	pthome
	move.w	through,d0
	asl.w	#1,d0
	move.w	d0,number
	move.w	#0,through
	move.w	#0,released
pthome:
	move.l  #levpos,pos
        bsr     prtnum
        rts
        

emancnt:	blk.w	1,0
dopr:	blk.w	1,0
released:	blk.w	1,0
through:	blk.w	1,0
cnt1:	blk.w	1,0
cnt2:	blk.w	1,0
cnt3:	blk.w	1,0

******************************
starthbl:
	move.w	#$0000,cnt3
	move.w	#$0000,cnt2
	move.w	sr,srsave
	move.l	#hbl2,-(sp)
	move.w	#1,-(sp)
	move.w	#8,-(sp)
	move.w	#1,-(sp)
	move.w	#31,-(sp)
	trap	#14
	add.l	#12,sp
	rts


turnoff:
	move.w	#8,-(sp)
	move.w	#26,-(sp)
	trap	#14
	addq.l	#4,sp
	rts

hbl2:	movem.l	d0/a0-a1,-(sp)
	addq.w	#1,cnt2
	cmpi.w	#0,cnt2
	ble	iii2
aaa:	move.l	#$ff8248,a0
	move.l	#palette2,a1
	move.w	cnt3,d0
	move.w	(a1,d0.w),(a0)
	addq.w	#2,cnt3	
	cmpi.w	#170,cnt3
	ble	iii2
	move.w	#0,cnt3
iii2:
	bclr	#0,$fffa0f
	movem.l	(sp)+,d0/a0-a1
	rte

hblvbl:
	cmpi.w	#50,frc
	blt	hbhere
	move.w	frcount,number
	bsr	prtnum
	move.w	#0,frc
	move.w	#0,frcount
hbhere:	move.w	#0,cnt2
	move.w	#0,cnt3
	addq.w	#1,frc
	rts

frcount:	blk.w	1,0
frc:	blk.w	1,0


palette2:dc.w	$0011,$0022,$0033,$0044,$0055,$0066,$0077,$0066
	dc.w	$0055,$0044,$0033,$0022,$0011,$0000
	dc.w	$0110,$0220,$0330,$0440,$0550,$0660,$0770,$0660
	dc.w	$0550,$0440,$0330,$0220,$0110,$0000
	dc.w	$0101,$0202,$0303,$0404,$0505,$0606,$0707,$0606
	dc.w	$0505,$0404,$0303,$0202,$0101,$0000
	dc.w	$0010,$0020,$0030,$0040,$0050,$0060,$0070,$0060
	dc.w	$0050,$0040,$0030,$0020,$0010,$0000
	dc.w	$0001,$0002,$0003,$0004,$0005,$0006,$0007,$0006
	dc.w	$0005,$0004,$0003,$0002,$0001,$0000
	dc.w	$0111,$0222,$0333,$0444,$0555,$0666,$0777,$0666
	dc.w	$0555,$0444,$0333,$0222,$0111,$0000
oldvbl1:	blk.l	1,0
srsave:	blk.w	1,0
***************************************************************************
*               RETURN TO GEM

gem:
*	move.w	#$2700,sr
*        move.w  #34,-(sp)
*        trap    #14
*        addq.l  #2,sp
*        move.l  d0,a0
*        move.l  oldmouse,16(a0)

        move.b  #7,$484
*       MOVE.W  #1,-(SP)        ;WAIT FOR A KEY
*        TRAP    #1
*        ADDQ.L  #2,SP
	bsr	turnoff

	move.l	oldvbl1,a0
	move.l	#0,(a0)	

        move.w  #-1,-(sp)
        move.l  screen1,-(sp)
        move.l  screen1,-(sp)
        move.w  #5,-(sp)
        trap    #14
        addi.l  #12,sp
        

        move.l  spv_sp,-(SP)    ;Back to user mode
        move.w  #$20,-(SP)
        trap    #1
        addq.l  #6,(SP)

illegal
        CLR.W   -(SP)           ;RETURN TO GEM
   
        TRAP    #1

spv_sp: blk.l   1               ;supervisor SP store


***************************************************************************

*               FLIP SCREEN

*       Flip displayed screen.

copyscr:
        move.l  screen3,a0      ;first copy from third to hiden
        move.l  #199,d0
        move.l  hiden,a1
copyit:
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+

        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+

        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+

        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+

        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+

        dbf     d0,copyit
	rts


flip_scr:
        move.l  seen,A6
        move.l  hiden,seen
        move.l  A6,hiden
*       rts
df:     move.w  #-1,-(sp)
        move.l  seen,-(sp)
        move.l  hiden,-(sp)
        move.w  #5,-(sp)
        trap    #14
        addi.l  #12,sp  
        move.w  #37,-(SP)               ;Wait for vertical sync
        trap    #14
        addq    #2,SP
        rts

*************************************************
linea:  dc.w    $a000
        move.l  a0,linepar
        move.l  8(a0),intin
        move.l  12(a0),ptsin
        rts

*************************************************

***********************fancy clear screen****************
clearsc:move.l  #99,d0
        move.l  screen,a0
cl1:    move.w  #159,d1
cl2:    move.w  #0,(a0)+
        dbf     d1,cl2
        addi.l  #160,a0
        dbf     d0,cl1
        move.w  #99,d0
        move.l  screen,a0
        addi.l  #160,a0
cl3:    move.w  #159,d1
cl4:    move.w  #0,(a0)+
        dbf     d1,cl4
        addi.l  #160,a0
        dbf     d0,cl3
        rts


cldel:  move.w  #3000,d2
cdel1:  nop
        dbf     d2,cdel1
        rts
********************************
copyintoboth:
        move.l  screen4,a0
        move.l  screen3,a1
        move.w  #4000,d0
cib3:
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        dbf     d0,cib3
*now clear the title stuff out
*	bsr	clita

        move.l  screen3,a0
        move.l  screen1,a1
        move.w  #4000,d0
cib:
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        dbf     d0,cib
        move.l  screen3,a0
        move.l  screen2,a1
        move.w  #4000,d0
cib2:
        move.l  (a0)+,(a1)+
        move.l  (a0)+,(a1)+
        dbf     d0,cib2


        rts


clita:
        move.l  screen3,a1      ;first copy from third to hiden
        move.l  #149,d0
        add.l   #4000,a1
clit:
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+

        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+

        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+

        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+

        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+

        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+

        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
        move.w  #0,(a1)+
*        adda    #48,a0
        adda    #48,a1
        dbf     d0,clit
	rts
********************fancy copy screen*************
copysc: move.w  #99,d0
        move.l  screen,a0
        move.l  screen2,a1
cop1:   move.w  #159,d1
cop2:   move.w  (a1)+,(a0)+
        dbf     d1,cop2
        addi.l  #160,a0
        addi.l  #160,a1
        dbf     d0,cop1
        move.w  #99,d0
        move.l  screen,a0
        addi.l  #160,a0
        move.l  screen2,a1
        addi.l  #160,a1
cop3:   move.w  #159,d1
cop4:   move.w  (a1)+,(a0)+
        dbf     d1,cop4
        addi.l  #160,a0
        addi.l  #160,a1
        dbf     d0,cop3
        rts
**********************routine to print a dec nuber*************
prtnum: 
        move.l  #0,d7
        move.w  number,d7
        andi.l  #$ffff,d7
        move.l  #line,a5

dodec:  move.l  d7,d6
        divu    #10,d6
        move.w  d6,d7
        swap    d6
        addi.w  #16,d6
        move.b  d6,(a5)+
        cmpi.w  #0,d7
        bne     dodec

        move.l  #levpos,-(sp)
        move.w  #9,-(sp)
        trap    #1
        addq.l  #6,sp

out:    cmpa.l  #line,a5
        beq     decback

        move.b  -(a5),d7
        andi.w  #$ff,d7
        
        move.w  d7,-(sp)
        move.w  #5,-(sp)
        move.w  #3,-(sp)
        trap    #13
        addq.l  #6,sp

        bra     out


decback:
        rts

*************puts my mouse interupt in***************** 


putrout:move.w  #34,-(sp)
        trap    #14
        addq.l  #2,sp
        move.l  d0,a0
        move.l  16(a0),oldmouse
        move.l  #myrout,16(a0)
        rts
**************my ubeut mouse interupt*******************

myrout: tst.b   $0027e7
        bne    .L home
        movem.l d0-d7/a0-a6,-(sp)
        move.b  (a0),d0
        move.b  d0,d1
        and.b   #$00f8,d1
        cmp.b   #$00f8,d1
        bne    .L nearhome
        and.w   #$0003,d0
        lsr.b   #1,d0
        bcc    .L test1
        bset    #$0001,d0
test1:  move.b  $0027de,d1
        and.w   #$0003,d1
        cmp.b   d1,d0
        beq    .S test2
        move.w  d1,-(sp)
        move.l  $002900,a1
        jsr     (a1)
        move.w  (sp)+,d1
        move.w  d0,$0026e6
        eor.b   d0,d1
        ror.b   #2,d1
        or.b    d1,d0
        move.b  d0,$0027de
test2:  move.b  $0001(a0),d0
        or.b    $0002(a0),d0
        bne    .S test3
        bclr    #$0005,$0027de
        bra    .S nearhome
test3:  bset    #$0005,$0027de
        move.w  $0026e0,d0
        move.b  $0001(a0),d1
        ext.w   d1
        add.w   d1,d0
        move.w  $0026e2,d1
        move.b  $0002(a0),d3
        ext.w   d3
        add.w   d3,d1
        bsr    .S extra
        move.l  $002908,a1
        jsr     (a1)
        bsr    .S extra
        move.w  d0,$0026e0
        move.w  d1,$0026e2
        move.l  $002904,a1
        jsr     (a1)
nearhome:movem.l (sp)+,d0-d7/a0-a6
home:   rts
extra:  cmp.w   mmin,d0
        bge    .S extra1
        move.w  mmin,d0
        bra    .S extra2
extra1: cmp.w   mmax,d0
        ble    .S extra2
        move.w  mmax,d0
extra2: tst.w   d1
        bge    .S extra3
        move.w  #199,d1
        rts
extra3: cmp.w   $002688,d1
        ble    .S extra4
        move.w  #0,d1
extra4: rts


mmin:	blk.w	1,0
mmax:	blk.w	1,0
************get screen address***************
getscrn:move.w  #2,-(sp)
        trap    #14
        addq.l  #2,sp
        move.l  d0,screen
        move.l  d0,screen1
        move.l  d0,screen2
        subi.l  #$8000,screen2
        move.l  screen2,screen3
        subi.l  #$8000,screen3
	move.l	screen3,screen4
	subi.l	#$8000,screen4
        move.l  screen1,seen
        move.l  screen2,hiden
        rts


screen4:	blk.l	1,0
************change colors****************
colors: move.l #palette,-(sp)
        move.w #6,-(sp)
        trap #14
        addq.l #6,sp
        rts
************change colors****************
colors2:
	move.l #titlecols,-(sp)
        move.w #6,-(sp)
        trap #14
        addq.l #6,sp
        rts
************change colors****************

darkcolors:
        move.l #palette2,-(sp)
        move.w #6,-(sp)
        trap #14
        addq.l #6,sp
        rts

*****************wait for a key*********************
wait:   move.w  $26e6,d0
        cmpi.w  #2,d0
        beq     wback
        bra     wait
wback:  rts
***************turn mouse off***********************
mousof: dc.w    $a00a   
        rts

*******************************************************************
; SYSNOPSIS
;    RandomSeed( SeedValue )
;                   D0

randomseed:     ADD.L   D0,D1           ;user seed in d0 (d1 too)
                MOVEM.L D0/D1,RND

; drops through to the main random function (not user callable)

LongRnd:        MOVEM.L D2-D3,-(SP)     
                MOVEM.L RND,D0/D1       ;D0=LSB's, D1=MSB's of random number
                ANDI.B  #$0E,D0         ;ensure upper 59 bits are an...
                ORI.B   #$20,D0         ;...odd binary number
                MOVE.L  D0,D2
                MOVE.L  D1,D3
                ADD.L   D2,D2           ;accounts for 1 of 17 left shifts
                ADDX.L  D3,D3           ;[D2/D3] = RND*2
                ADD.L   D2,D0
                ADDX.L  D3,D1           ;[D0/D1] = RND*3
                SWAP    D3              ;shift [D2/D3] additional 16 times
                SWAP    D2
                MOVE.W  D2,D3
                CLR.W   D2
                ADD.L   D2,D0           ;add to [D0/D1]
                ADDX.L  D3,D1
                MOVEM.L D0/D1,RND       ;save for next time through
                MOVE.L  D1,D0           ;most random part to D0
                MOVEM.L (SP)+,D2-D3
                RTS

; SYSNOPSIS
;    RndNum = Random( UpperLimit )
;      D0                 D0

random:         MOVE.W  D2,-(SP)
                MOVE.W  D0,D2           ;save upper limit
                BEQ.S   r1              ;range of 0 returns 0 always
                BSR.S   LongRnd         ;get a longword random number
                CLR.W   D0              ;use upper word (it's most random)
                SWAP    D0
                ext.l   d0
                DIVs    D2,D0           ;divide by range...
                CLR.W   D0              ;...and use remainder for the value
                SWAP    D0              ;result in D0.W
r1:             MOVE.W  (SP)+,D2
                RTS

randomplus:     MOVE.W  D2,-(SP)
                MOVE.W  D0,D2           ;save upper limit
                BEQ.S   r2              ;range of 0 returns 0 always
                BSR.S   LongRnd         ;get a longword random number
                CLR.W   D0              ;use upper word (it's most random)
                SWAP    D0
                DIVu    D2,D0           ;divide by range...
                CLR.W   D0              ;...and use remainder for the value
                SWAP    D0              ;result in D0.W
r2:             MOVE.W  (SP)+,D2
                RTS





*********************************************************
*       a brilliant routine courtesy of janko to        *
*       insert the vbi addresses in the jump table      *
*       lea address of routine in a0 do a jsr           *
*       putvbl and thats it!!!                          *
*********************************************************


putvbl: lea     $452,a1
        move.w  #1,(a1)
        moveq   #7,d1
        lea     $456,a1
        move.l  (a1),a1
vbl3:   subq.b  #1,d1
        cmpi.b  #0,d1
        beq.s   vbl4
        move.l  (a1)+,d0
        cmpi.l  #0,d0
        bne.S   vbl3
        suba.l  #4,a1
        move.l  a0,(a1)
vbl4:   rts



*********************************************************
*       my routines for loading in the screens          *
*       note i use degas format even though I           *
*       hate the package,due to it's simple format      *
*       ie: 32l for pallette and straight 32k screen    *
*       dump                                            *
*********************************************************

loadscr:move    #0,-(SP)        ;Open file
        move.l  #filename,-(SP) ;Address of filename
        move    #$3D,-(SP)
        trap    #1              ;Get handle number in D0
        addq.l  #8,SP
                
        move    D0,-(SP)        ;Save handle

        move.l  #dummy,-(SP)    ;load pallette into safe area
        move.l  #128,-(SP)       ;length to read in
        move    D0,-(SP)        ;Handle
        move    #$3F,-(SP)      ;bios number
        trap    #1              ;Read file in
        addi.l   #12,SP
        move    (sp),d0        
               
        move.l  screen4,-(SP)    ;load it straight onto screen
        move.l  #32000,-(SP)    ;length to read in
        move    D0,-(SP)        ;Handle
        move    #$3F,-(SP)      ;bios number
        trap    #1              ;Read file in
        addi.l   #12,SP
                
        move    #$3E,-(SP)      ;Handle already on stack
        trap    #1              ;Close file
        addq.l  #4,SP
        rts

*********************************************************
loadscr2:
	move    #0,-(SP)        ;Open file
        move.l  #filescreen2,-(SP) ;Address of filename
        move    #$3D,-(SP)
        trap    #1              ;Get handle number in D0
        addq.l  #8,SP
                
        move    D0,-(SP)        ;Save handle

        move.l  #dummy,-(SP)    ;load pallette into safe area
        move.l  #128,-(SP)       ;length to read in
        move    D0,-(SP)        ;Handle
        move    #$3F,-(SP)      ;bios number
        trap    #1              ;Read file in
        addi.l   #12,SP
        move    (sp),d0        
               
        move.l  screen4,-(SP)    ;load it straight onto screen
        move.l  #32000,-(SP)    ;length to read in
        move    D0,-(SP)        ;Handle
        move    #$3F,-(SP)      ;bios number
        trap    #1              ;Read file in
        addi.l   #12,SP
                
        move    #$3E,-(SP)      ;Handle already on stack
        trap    #1              ;Close file
        addq.l  #4,SP
        rts

filescreen2:
	dc.b	'darksky.neo',0
	even
******************************
*********************************************************
loadtitle:
	move    #0,-(SP)        ;Open file
        move.l  #filescreen3,-(SP) ;Address of filename
        move    #$3D,-(SP)
        trap    #1              ;Get handle number in D0
        addq.l  #8,SP
                
        move    D0,-(SP)        ;Save handle

        move.l  #dummy,-(SP)    ;load pallette into safe area
        move.l  #128,-(SP)       ;length to read in
        move    D0,-(SP)        ;Handle
        move    #$3F,-(SP)      ;bios number
        trap    #1              ;Read file in
        addi.l   #12,SP
        move    (sp),d0        
               
        move.l  screen4,-(SP)    ;load it straight onto screen
        move.l  #32000,-(SP)    ;length to read in
        move    D0,-(SP)        ;Handle
        move    #$3F,-(SP)      ;bios number
        trap    #1              ;Read file in
        addi.l   #12,SP
                
        move    #$3E,-(SP)      ;Handle already on stack
        trap    #1              ;Close file
        addq.l  #4,SP
        rts

filescreen3:
	dc.b	'title.neo',0
	even
******************************
*******************blocks for rotated sprites*************
screen3:blk.l   1,0
pblock: blk.l   50
screen: blk.l   1
off:    blk.w   1
ynflg:  blk.w   1
screen2:blk.l   1
screen1:blk.l   1
dummy:  blk.l   32
xvel:   blk.w   1
yvel:   blk.w   1
brhits:	blk.w	1,0
filename:       dc.b    'sprite.neo',0  
even
line:   blk.b   10
pos:    blk.l   1
col:    blk.l   1
number: blk.w   1
whichblock:     blk.l   1,0
shipx:  blk.w   1,0
shipy:  blk.w   1,0
shootx: blk.w   1,0
shooty: blk.w   1,0
bigshootx:      blk.w   1,0
bigshooty:      blk.w   1,0
shotxvel:       blk.w   1,0
shotyvel:       blk.w   1,0
levpos:		dc.b    27,89,32,32,0
scorepos:       dc.b    27,89,38,64,0
shippos:        dc.b    27,89,45,65,0
backcol:        dc.b    27,99,6,0
greencol:       dc.b    27,98,7,0

even
ships:	blk.w	1,0
intin:  blk.l   1
ptsin:  blk.l   1
putpix: equ     $a001
getpix: equ     $a002
seen:   blk.l   1
hiden:  blk.l   1
bigflg: blk.w   1,-1
*palette2:
        dc.w    $0000,$0000,$0000
        dc.w    $0000,$0000,$0000
        dc.w    $0000,$0000,$0000
        dc.w    $0000,$0000,$0000
        dc.w    $0000,$0000,$0000
        dc.w    $0000

*************************************STORAGE*******************************
shooting:       blk.w   1,-1
rnd:            blk.l   2,0
beatflg:        blk.w   1,0
speed:		blk.w	1,0
brtimer:        blk.w   1,0
lastbr:         blk.w   1,0
grtimer:        blk.w   1,0
levsp:          blk.l   1,0
levtim:         blk.w   1,0
pdflg:          blk.w   1,0
whsp:           blk.l   1,0
tempsp:         blk.w   500,0
oldsp:          blk.w   1,-1
oldht:          blk.w   1,0
oldwt:          blk.w   1,0
oldscr:         blk.l   1,0
tempsh:         blk.l   1,0
score:          blk.w   1,0
level:          blk.w   1,0
oldmouse:       blk.l   1,0
linepar:        blk.l   1,0
mmin2:           blk.w   1,0
mmax2:           blk.w   1,0
byebye:         blk.w   1,-1
blockad:        blk.l   1,0

*palette:dc.w	$0000,$0577,$0467,$0357,$0247,$0137,$0027,$0777
*	dc.w	$0607,$0405,$0076,$0054,$0043,$0666,$0444,$0222


titlecols:
dc.w	$0000,$0777,$0667,$0447,$0337,$0127,$0007,$0006
dc.w	$0005,$0004,$0003,$0002,$0710,$0610,$0510,$0310

oxy1:
 dc.w 0,0,0,896
 dc.w 512,896,0,1984
 dc.w 3200,1856,0,3936
 dc.w 3072,1984,0,4064
 dc.w 3648,1984,0,4064
 dc.w 1984,896,0,1984
 dc.w 896,0,0,896
 dc.w 0,0,0,14392
 dc.w 8224,14392,0,31868
 dc.w 51400,29812,0,63222
 dc.w 49344,31868,0,65278
 dc.w 58596,31868,0,65278
 dc.w 31868,14392,0,31868
 dc.w 14392,0,0,14392

oxy2:
 dc.w 512,512,0,896
 dc.w 512,768,1024,1984
 dc.w 1152,1792,2048,3936
 dc.w 1024,1920,2048,4064
 dc.w 1568,1920,2048,4064
 dc.w 960,768,1024,1984
 dc.w 384,0,512,896
 dc.w 3136,64,4096,7280
 dc.w 5696,6240,8320,16120
 dc.w 5776,6368,25856,32748
 dc.w 4736,7408,24832,32764
 dc.w 2756,2288,29952,32764
 dc.w 1656,96,14464,16120
 dc.w 3120,0,4160,7280

oxy3:
 dc.w 512,512,0,896
 dc.w 576,576,1024,1984
 dc.w 1184,1824,2176,4064
 dc.w 1056,1824,2048,4064
 dc.w 1536,1792,2080,4064
 dc.w 896,512,1088,1984
 dc.w 384,0,512,896
 dc.w 1664,128,2048,3808
 dc.w 3728,3216,4352,8176
 dc.w 6440,6600,9760,16376
 dc.w 6408,6600,9728,16376
 dc.w 2440,2504,13824,16376
 dc.w 752,144,7424,8176
 dc.w 1632,0,2176,3808

oxy4:
 dc.w 512,512,0,896
 dc.w 576,576,1024,1984
 dc.w 1056,1760,2176,4064
 dc.w 1056,1632,2048,4064
 dc.w 1600,1600,2080,4064
 dc.w 896,512,1088,1984
 dc.w 384,0,512,896
 dc.w 512,0,1280,1984
 dc.w 288,288,3584,4064
 dc.w 528,880,7232,8176
 dc.w 528,816,7168,8176
 dc.w 784,816,7168,8176
 dc.w 480,288,3584,4064
 dc.w 704,0,1280,1984

oxy5:
 dc.w 128,128,0,896
 dc.w 64,192,1024,1984
 dc.w 1184,1120,2048,3936
 dc.w 1056,1248,2048,4064
 dc.w 1088,1216,2080,4064
 dc.w 896,128,1088,1984
 dc.w 768,0,128,896
 dc.w 128,128,0,896
 dc.w 64,192,1024,1984
 dc.w 1184,1120,2048,3936
 dc.w 1056,1248,2048,4064
 dc.w 1056,1248,2048,4064
 dc.w 960,192,1024,1984
 dc.w 768,0,128,896

oxy6:
 dc.w 128,128,0,896
 dc.w 64,192,1024,1984
 dc.w 1184,1120,2048,3936
 dc.w 1056,1248,2048,4064
 dc.w 1600,1216,2080,4064
 dc.w 896,128,1088,1984
 dc.w 768,0,128,896
 dc.w 384,384,64,1984
 dc.w 160,416,2112,4064
 dc.w 2384,2256,4128,7920
 dc.w 2128,2512,4128,8176
 dc.w 3216,2448,4192,8176
 dc.w 1824,288,2240,4064
 dc.w 1600,64,384,1984

oxy7:
 dc.w 128,128,0,896
 dc.w 64,192,1024,1984
 dc.w 160,352,2048,3936
 dc.w 32,480,2048,4064
 dc.w 1600,448,2080,4064
 dc.w 896,128,1088,1984
 dc.w 768,0,128,896
 dc.w 736,544,0,3808
 dc.w 368,816,4224,8176
 dc.w 664,1464,8288,15864
 dc.w 184,1976,8256,16376
 dc.w 6456,1848,8384,16376
 dc.w 3824,560,4352,8176
 dc.w 3264,0,544,3808

oxy8:
 dc.w 128,128,0,896
 dc.w 64,448,0,1984
 dc.w 2208,864,0,3936
 dc.w 2080,992,0,4064
 dc.w 3648,960,32,4064
 dc.w 1920,384,64,1984
 dc.w 768,0,128,896
 dc.w 1120,1024,16,7280
 dc.w 736,3632,8,16120
 dc.w 17872,7016,20,31740
 dc.w 16832,8056,4,32764
 dc.w 29416,7800,260,32764
 dc.w 15600,3120,520,16120
 dc.w 6240,0,1040,7280




raysound:
	dc.b	0,0,1,0,2,0,3,0
	dc.b	4,0,5,0,6,0,7,$38
	dc.b	8,$10,9,$10,$a,$10
	dc.b	$b,0,$c,4,$d,$f
	dc.b	$80,$ff
	dc.b	$81,0,0,$18
	dc.b	$82,0

cloudsound:
	dc.b	0,0,1,0,2,0,3,0
	dc.b	4,0,5,0,6,0,7,$3e
	dc.b	8,$10,9,0,$a,0
	dc.b	$b,0,$c,1,$d,$f
	dc.b	$80,$73
	dc.b	$81,0,$f,$3
	dc.b	$82,0





palette:dc.w    $0000,$0777,$0555,$0333,$0007,$0005,$0003,$0750
        dc.w    $0630,$0420,$0070,$0050,$0030,$0707,$0606,$0404


balls1:
 dc.w 0,0,0,0
 dc.w 12292,12296,12,12300
 dc.w 14390,12280,16410,26650
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 8204,12300,0,0
 dc.w 8200,12300,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 0,0,0,0
balls2:
 dc.w 0,0,0,0
 dc.w 4104,6160,24,6168
 dc.w 4332,8176,8244,15412
 dc.w 8160,8188,8252,15420
 dc.w 24,24,6168,6168
 dc.w 4120,6168,0,0
 dc.w 4112,6168,0,0
 dc.w 4120,6160,0,0
 dc.w 4120,6160,0,0
 dc.w 4120,6160,0,0
 dc.w 4120,6160,0,0
 dc.w 2064,4120,6144,6168
 dc.w 11480,13268,15392,15412
 dc.w 9180,16348,15392,15420
 dc.w 6144,6144,6168,6168
 dc.w 0,0,0,0

balls3:
 dc.w 0,0,0,0
 dc.w 2064,3104,48,3120
 dc.w 2520,4064,4200,7784
 dc.w 4032,4088,4216,7800
 dc.w 48,48,3120,3120
 dc.w 3120,3120,0,0
 dc.w 3104,3120,0,0
 dc.w 3120,3104,0,0
 dc.w 3120,3104,0,0
 dc.w 3120,3104,0,0
 dc.w 3120,3104,0,0
 dc.w 1056,2096,3072,3120
 dc.w 6064,6568,7744,7784
 dc.w 4536,8120,7744,7800
 dc.w 3072,3072,3120,3120
 dc.w 0,0,0,0

balls4:
 dc.w 0,0,0,0
 dc.w 1056,1600,96,1632
 dc.w 1200,1728,2512,4048
 dc.w 1664,1776,2544,4080
 dc.w 96,96,1632,1632
 dc.w 1632,1632,0,0
 dc.w 1600,1632,0,0
 dc.w 1632,1600,0,0
 dc.w 1632,1600,0,0
 dc.w 1632,1600,0,0
 dc.w 1632,1600,0,0
 dc.w 576,1120,1536,1632
 dc.w 2912,3408,3968,4048
 dc.w 2416,3952,3968,4080
 dc.w 1536,1536,1632,1632
 dc.w 0,0,0,0

balls5:
 dc.w 0,0,0,0
 dc.w 832,896,192,960
 dc.w 864,896,1440,1952
 dc.w 768,992,1504,2016
 dc.w 192,192,960,960
 dc.w 960,960,0,0
 dc.w 896,960,0,0
 dc.w 960,896,0,0
 dc.w 960,896,0,0
 dc.w 960,896,0,0
 dc.w 960,896,0,0
 dc.w 128,960,768,960
 dc.w 1216,1696,1792,1952
 dc.w 1248,1760,1792,2016
 dc.w 768,768,960,960
 dc.w 0,0,0,0

balls6:
 dc.w 0,0,0,0
 dc.w 128,256,384,384
 dc.w 704,768,832,832
 dc.w 512,960,960,960
 dc.w 384,384,384,384
 dc.w 384,384,0,0
 dc.w 256,384,0,0
 dc.w 384,256,0,0
 dc.w 384,256,0,0
 dc.w 384,256,0,0
 dc.w 384,256,0,0
 dc.w 256,384,0,384
 dc.w 384,320,512,832
 dc.w 448,448,512,960
 dc.w 0,0,384,384
 dc.w 0,0,0,0

balls7:
 dc.w 0,0,0,0
 dc.w 384,704,768,960
 dc.w 1472,1632,1664,1760
 dc.w 1120,2016,1920,2016
 dc.w 768,768,960,960
 dc.w 960,960,0,0
 dc.w 640,960,0,0
 dc.w 896,704,0,0
 dc.w 896,704,0,0
 dc.w 896,704,0,0
 dc.w 896,704,0,0
 dc.w 576,896,192,960
 dc.w 864,640,1120,1760
 dc.w 896,992,1120,2016
 dc.w 192,192,960,960
 dc.w 0,0,0,0

balls8:
 dc.w 0,0,0,0
 dc.w 576,1120,1536,1632
 dc.w 2912,3184,3456,3568
 dc.w 2160,3952,3968,4080
 dc.w 1536,1536,1632,1632
 dc.w 1632,1632,0,0
 dc.w 1088,1632,0,0
 dc.w 1600,1120,0,0
 dc.w 1600,1120,0,0
 dc.w 1600,1120,0,0
 dc.w 1600,1120,0,0
 dc.w 1056,1600,96,1632
 dc.w 1712,1472,2288,3568
 dc.w 1920,2032,2288,4080
 dc.w 96,96,1632,1632
 dc.w 0,0,0,0

balls9:
 dc.w 0,0,0,0
 dc.w 1056,2096,3072,3120
 dc.w 6048,6584,6720,6776
 dc.w 4536,8120,7744,7800
 dc.w 3072,3072,3120,3120
 dc.w 3120,3120,0,0
 dc.w 2080,3120,0,0
 dc.w 3104,2096,0,0
 dc.w 3104,2096,0,0
 dc.w 3104,2096,0,0
 dc.w 3104,2096,0,0
 dc.w 2064,3104,48,3120
 dc.w 3544,3040,4216,6776
 dc.w 4032,4088,4216,7800
 dc.w 48,48,3120,3120
 dc.w 0,0,0,0

balls10:
 dc.w 0,0,0,0
 dc.w 2064,4120,6144,6168
 dc.w 11472,13276,13344,13372
 dc.w 9180,16348,15392,15420
 dc.w 6144,6144,6168,6168
 dc.w 6160,6168,0,0
 dc.w 4112,6168,0,0
 dc.w 6160,4120,0,0
 dc.w 6160,4120,0,0
 dc.w 6160,4120,0,0
 dc.w 6160,4120,0,0
 dc.w 4104,6160,24,6168
 dc.w 6380,6128,8252,13372
 dc.w 8160,8188,8252,15420
 dc.w 24,24,6168,6168
 dc.w 0,0,0,0

balls11:
 dc.w 0,0,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 8200,12300,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8196,12296,12,12300
 dc.w 12342,12280,16410,26650
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 0,0,0,0

balls12:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 12300,12300,0,0
 dc.w 8200,12300,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8196,12296,12,12300
 dc.w 8246,16376,16414,30750
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 0,0,0,0,0,0,0,0
 dc.w 0,0,0,0,0,0,0,0

balls13:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 12300,12300,0,0
 dc.w 8200,12300,0,0
 dc.w 8196,12296,12,12300
 dc.w 8246,16376,16414,30750
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 0,0,0,0,0,0,0,0
 dc.w 0,0,0,0,0,0,0,0
 dc.w 0,0,0,0,0,0,0,0

balls14:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 12,12,12300,12300
 dc.w 12276,16378,16414,30750
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0

balls15:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 16368,16370,28702,30750
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0

balls16:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0

balls17:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 8196,12296,12,12300
 dc.w 14322,16380,16414,30750
 dc.w 8184,12286,28690,30750
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0

balls18:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 8196,12296,12,12300
 dc.w 8246,16376,16414,30750
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0

balls19:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 8196,12296,12,12300
 dc.w 8246,16376,16414,30750
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 12300,12300,0,0
 dc.w 8200,12300,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 0,0,0,0

balls20:
 dc.w 0,0,0,0
 dc.w 0,0,0,0
 dc.w 8196,12296,12,12300
 dc.w 8246,16376,16414,30750
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 12300,12300,0,0
 dc.w 8200,12300,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 0,0,0,0
 dc.w 0,0,0,0


balls21:
 dc.w 0,0,0,0
 dc.w 8196,12296,12,12300
 dc.w 12342,12280,16410,26650
 dc.w 16368,16382,16414,30750
 dc.w 12,12,12300,12300
 dc.w 12300,12300,0,0
 dc.w 8200,12300,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 8204,12296,0,0
 dc.w 4104,8204,12288,12300
 dc.w 22572,26602,26640,26650
 dc.w 18414,32750,30736,30750
 dc.w 12288,12288,12300,12300
 dc.w 0,0,0,0



