	movem.l	a0-a6/d0-d7,-(a7)
	bra.s	Rutin
*---------------------------------------------------
doss:	dc.b	"dos.library",0
*---------------------------------------------------
graf:	dc.b	"graphics.library",0
*-------------------------------------------
	even
Rutin:	move.l	$4.W,a6
	lea	graf(pc),a1
	clr.l	d0
	jsr	-552(a6)	;OpenLibrary (Graphics.library)
	move.l	d0,a6		;a6 = GfxBase
	move.l	d0,$68004	;$68004 = GfxBase

	lea	data(pc),a1	;Copperlist samenstellen
	lea	$52000,a2
myra:	move.l	(a1),(a2)+
	cmp.l	#$fffffffe,(a1)+
	bne.s	myra
*-------------------------------------------
	bsr.s	init

	move.w  #$00a0,$dff096
	move.l  $32(a6),$51000	;Bewaar oude Copper list in $51000
	move.l  #$52000,$32(a6)	;Copperlist in GfxBase zetten
	move.w  #$8380,$dff096

	bsr.L	getkey

	move.l	$4.W,a6
	bra.L	loader
*-------------------------------------------
init:	lea	$70000,a1
clear:	clr.l	(a1)+
	cmp.l	#$7e000,a1
	bne.s	clear

	lea     $41000,a0	;BitMap
	move.l  #1,d0		;depth
	move.l  #768,d1		;width
	move.l  #192,d2		;heigth
	jsr     -$0186(a6)	;InitBitMap()
 
	move.l  #$70000,$41008
	lea     $41100,a1	;a1->RastPort
	jsr     -$00c6(a6)	;InitRastPort()
	move.l  #$41000,$41104

	lea	$41100,a1	;RastPort
	move.w	#1,d0		;Pen nr
	jsr	-342(a6)	;SetAPen()
	lea	blaj(pc),a5

print:	lea	$41100,a1
	clr.l	d4
	move.l	#50,d3
	move.b	(a5)+,d4
	beq.s	pr2

	bsr.s	skriv
	add.l	#384,d3
	bsr.s	skriv
	add.l	#31,a5
	bra.s	print
pr2:	rts
*-------------------------------------------
getkey:	clr.b	$bfec01
	clr.l	d0
read:	move.b	$bfec01,d0
	not.b	d0
	lsr.b	#1,d0
	cmp.b	#$4f,d0
	bls.s	read
	cmp.b	#$55,d0
	bhi.s	read
	sub.w	#$50,d0
	move.l	d0,$80.W	;Bewaar key in $80
	rts
*-------------------------------------------
skriv:	lea	$41100,a1	;RastPort
	move.l	d3,d0		;X-coordinaat
	move.l	d4,d1		;Y-coordinaat
	jsr	-240(a6)	;Move()
	lea	$41100,a1	;RastPort
	move.l	a5,a0		;String
	move.l	#31,d0		;Lengte
	jsr	-60(a6)		;Text()
	rts
*-------------------------------------------
data:	dc.w	$0100,$2200	;BPLCON   2 BitPlanes, color
	dc.w	$0102,$0001	;BPLCON1  
	dc.w	$0108,$0000,$010a,$0000
	dc.w	$0092,$0020,$0094,$00d8
	dc.w	$008e,$3000	;DIWSTRT  
	dc.w	$0090,$30ff	;DWISTOP
	dc.w	$00e0,$0007,$00e2,$0870	;Bitplane 0 op $70870
	dc.w	$00e4,$0007,$00e6,$08a0	;Bitplane 1 op $708a0

	dc.w	$0180,$0000,$0182,$0000
	dc.w	$0184,$0fff,$0186,$0fff

	dc.w	$3401,$fffe,$0180,$0ccc
	dc.w	$3501,$fffe,$0180,$0888
	dc.w	$4601,$fffe,$0180,$0444
	dc.w	$4701,$fffe,$0180,$0000

	dc.w	$4c01,$fffe,$0180,$0ccc
	dc.w	$4d01,$fffe,$0180,$0888
	dc.w	$5e01,$fffe,$0180,$0444
	dc.w	$5f01,$fffe,$0180,$0000

	dc.w	$7601,$fffe,$0180,$0ccf
	dc.w	$7701,$fffe,$0180,$088f
	dc.w	$8801,$fffe,$0180,$044f
	dc.w	$8901,$fffe,$0180,$0000

	dc.w	$8e01,$fffe,$0180,$0ccf
	dc.w	$8f01,$fffe,$0180,$088f
	dc.w	$a001,$fffe,$0180,$044f
	dc.w	$a101,$fffe,$0180,$0000

	dc.w	$a601,$fffe,$0180,$0ccf
	dc.w	$a701,$fffe,$0180,$088f
	dc.w	$b801,$fffe,$0180,$044f
	dc.w	$b901,$fffe,$0180,$0000

	dc.w	$be01,$fffe,$0180,$0ccf
	dc.w	$bf01,$fffe,$0180,$088f
	dc.w	$d001,$fffe,$0180,$044f
	dc.w	$d101,$fffe,$0180,$0000

	dc.w	$d601,$fffe,$0180,$0ccf
	dc.w	$d701,$fffe,$0180,$088f
	dc.w	$e801,$fffe,$0180,$044f
	dc.w	$e901,$fffe,$0180,$0000

	dc.w	$ee01,$fffe,$0180,$0ccf
	dc.w	$ef01,$fffe,$0180,$088f
	dc.w	$ffe1,$fffe
	dc.w	$0001,$fffe,$0180,$044f
	dc.w	$0101,$fffe,$0180,$0000

	dc.w	$ffff,$fffe
*-------------------------------------------
blaj:	dc.b	$34/2+6,"DEFJAM and CCS Proudly Present:"
	dc.b	$4c/2+6,"       Compact Disk No 5       "
	dc.b	$76/2+6,"[F1]   Frostbyte        (085 K)"
	dc.b	$8e/2+6,"[F2]   Gunshoot         (165 K)"
	dc.b	$a6/2+6,"[F3]   Mach 3           (152 K)"
	dc.b	$be/2+6,"[F4]   Rolling Thunder  (124 K)"
	dc.b	$d6/2+6,"[F5]   Slaygon          (148 K)"
	dc.b	$ee/2+6,"[F6]   Wizball          (134 K)"
	dc.b	0
	even
*-------------------------------------------
loader:	move.l	$80.W,d0
	mulu	#4,d0
	lea	table(pc),a0

	move.l	#$18000,a1	;Vanaf $18000
	move.l	0(a0,d0.w),d0	;d0 is grootte van geheugen ruimte
	jsr	-204(a6)	;AllocAbs()

	move.l	$68004,a6
	move.l	$51000,$32(a6)	;Copper list weer goed zetten
	movem.l	(a7)+,a0-a6/d0-d7
	lea	doss(pc),a1	;A1-> 'dos.library',0
	jsr	-96(a6)		;FindResident()
	move.l	d0,a0		;Verder normale manier van BB stoppen
	move.l	$16(a0),a0
	moveq	#$00,d0
	rts
*-------------------------------------------
table:	dc.l	$14800	;Te reserveren geheugen ruimte voor de spelen
	dc.l	$27c00
	dc.l	$27c00
	dc.l	$1e800
	dc.l	$1ba00
	dc.l	$20c00
*-------------------------------------------

