
	text

L0:
	pea	$400.w
	move	#$20,-(a7)
	trap	#1
	move.l	d0,L120+2

	move.b	#18,$FFFFFC02.w
	movem.l	$FFFF8240.w,d0-d7

	lea	save_cols(pc),a0
	movem.l	d0-d7,(a0)

	move.l	$44E.w,d5
	lea	$68000.l,a0
	lea	196(a0),a6
	move.l	a6,$44E.w

	lea	$FFFF8201.w,a6
	move.l	a0,d0
	lsr.l	#8,d0
	movep.w	d0,0(a6)

	move.l	$44E.w,a0
	lea	1960(a0),a0

	move.l	#logo,a1
	moveq	#19,d1
put_line:
	move.l	a0,a2

	moveq	#29,d0
put_loop:
	move.l	(a1)+,(a2)+
	dbra	d0,put_loop

	lea	230(a0),a0
	dbra	d1,put_line

	moveq	#15,d1
	lea	-4696(a0),a0
L6A:
	move.l	a0,a2
	moveq	#27,d0
L6E:
	move.l	(a1)+,(a2)+
	dbra	d0,L6E
	addq.l	#8,a1
	lea	230(a0),a0
	dbra	d1,L6A

	movem.l	d0-d7/a0-a6,save_regs
	bsr	put_msg_on_screen
	movem.l	save_regs,d0-d7/a0-a6

	lea	$FFFF8242.w,a6
	move.l	#$7770F6D,(a6)+
	move.l	#$3FF0E5C,(a6)+
	move.l	#$3FF0D43,(a6)+
	move.l	#$FFF0C3A,(a6)+
	move.l	#$FFF0312,(a6)+
	move.l	#$F7F0210,(a6)+
	move.l	#$F070F7F,(a6)+
	move	#$F7F,(a6)+

	lea	$FFFFFA15.w,a6
	move.b	(a6),d7
	clr.b	(a6)

	lea	$FFFF8209.w,a0		*Video counter
	lea	87(a0),a1		*Rez
	lea	1(a0),a2		*Hz

	clr.b	d0
	lea	$FFFF8240.w,a4

	moveq	#2,d1
	lea	$70.w,a5
	move.l	(a5),d6
	lea	vbi(pc),a3
	move.l	a3,(a5)

	clr	$800.w
loop:
	stop	#$2300
	cmpi.b	#$B9,$FFFFFC02.w
	bne.b	loop

	move.l	d6,(a5)
	move.b	d7,(a6)

	move.l	d5,$44E.w
	lea	$FFFF8201.w,a0
	lsr.l	#8,d5
	movep.w	d5,0(a0)

	movem.l	save_cols(pc),d0-d7
	movem.l	d0-d7,$FFFF8240.w

	move.b	#8,$FFFFFC02.w

L120:	pea	$55555555.l
	move	#$20,-(a7)
	trap	#1

	clr	-(a7)
	trap	#1

save_cols:
	dc.w	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

vbi:
	move	#$59B,d2
wait_17k_cycles:
	dbra	d2,wait_17k_cycles

	move.b	#16,d2
	move.b	d0,(a2)		*60 hz
	moveq	#1,d3

wait_60_hz:
	dbra	d3,wait_60_hz

	move.b	d1,(a2)		*50 hz

wait_video_run:	move.b	(a0),d3
	beq.b	wait_video_run

	sub.b	d3,d2
	lsl.b	d2,d3

	lea	colors(pc),a0
	move	#$E3,d2
	move	#$E,d3
L17A:
	dbra	d3,L17A

	nop

	bsr.b	L1D0

	move.b	d0,(a2)
	move.b	d1,(a2)
	move	#$2B,d2
	moveq	#2,d3
L18C:
	dbra	d3,L18C
	move.b	d1,(a1)
	nop
	move.b	d0,(a1)
	move.b	d0,(a2)
	move	#$1,d3
L19C:
	dbra	d3,L19C
	nop
	move.b	d1,(a1)
	nop
	move.b	d0,(a1)
	move	(a0)+,(a4)
	move.b	d1,(a2)
	moveq	#23,d3
L1AE:
	dbra	d3,L1AE
	bsr.b	L1D0
	move.b	d0,(a2)
	move.b	d1,(a2)
	move	#$2,d3
L1BC:
	dbra	d3,L1BC
	nop
	move.b	d1,(a1)
	nop
	move.b	d0,(a1)
	clr	(a4)
	lea	-87(a1),a0
	rte

L1D0:
	nop
	nop
	move	#$3,d3
	nop
	move.b	d0,(a2)
	move.b	d1,(a2)
L1DE:
	dbra	d3,L1DE
	move.b	d1,(a1)
	nop
	move.b	d0,(a1)
	move	#$2,d3
L1EC:
	dbra	d3,L1EC
	move.b	d1,(a1)
	nop
	move.b	d0,(a1)
	move	(a0)+,(a4)
	move	#$18,d3
L1FC:
	dbra	d3,L1FC
	dbra	d2,L1D0
	rts

put_msg_on_screen:
	move.l	$44E.w,a0
	lea	7820(a0),a0
	lea	msg(pc),a1
	lea	font,a2
	moveq	#27,d6
L21A:
	lea	(a0),a4
	moveq	#26,d7
L21E:
	moveq	#0,d0
	move.b	(a1)+,d0
	subi	#$20,d0
	lsl.w	#3,d0
	move.l	a2,a3
	adda.l	d0,a3
	move.b	(a3)+,(a4)
	move.b	(a3)+,230(a4)
	move.b	(a3)+,460(a4)
	move.b	(a3)+,690(a4)
	move.b	(a3)+,920(a4)
	move.b	(a3)+,1150(a4)
	move.b	(a3)+,1380(a4)
	move.b	(a3)+,1610(a4)
	moveq	#0,d0
	move.b	(a1)+,d0
	subi	#$20,d0
	lsl.w	#3,d0
	move.l	a2,a3
	adda.l	d0,a3
	move.b	(a3)+,1(a4)
	move.b	(a3)+,231(a4)
	move.b	(a3)+,461(a4)
	move.b	(a3)+,691(a4)
	move.b	(a3)+,921(a4)
	move.b	(a3)+,1151(a4)
	move.b	(a3)+,1381(a4)
	move.b	(a3)+,1611(a4)
	moveq	#0,d5
	move.l	d5,2(a4)
	move	d5,6(a4)
	move.l	d5,232(a4)
	move	d5,236(a4)
	move.l	d5,462(a4)
	move	d5,466(a4)
	move.l	d5,692(a4)
	move	d5,696(a4)
	move.l	d5,922(a4)
	move	d5,926(a4)
	move.l	d5,1152(a4)
	move	d5,1156(a4)
	move.l	d5,1382(a4)
	move	d5,1386(a4)
	move.l	d5,1612(a4)
	move	d5,1616(a4)
	lea	8(a4),a4
	dbra	d7,L21E
	lea	1840(a0),a0
	dbra	d6,L21A
	rts

	data


colors:	incbin	A:\*.img

save_regs:
	ds.l	15

msg:	rept	60
	dc.b	'JONAS DEIBE WAS THE MASTER...',0
	endr

logo:	incbin	A:\*.img

font:	incbin	A:\*.img

	end
