; YOU CAN SAVE FROM START TO $72000

>extern "df0:shortbob",bobimage
>extern "df1:run",start

scroll=$7d000
start=$20820	; inizio zona da trasferire
endloc=$70000	; fine zona da trasferire
dest=$820	; zona destinazione

jmp	$70000
org	$70000
load	$70000

movem.l	d0/d1/d2/d3/d4/d5/d6/d7/a0/a1/a2/a3/a4/a5/a6,-(a7)
move.l	a7,InitialSP			; Just to be on the safe side
moveq	#0,d0
bsr	SwitchOSout			; Switch out Operating System
bsr	copymem
bsr	initscroll
bsr	clear
bsr	printmenu
bsr	Initchips			; Setup Custom chip pointers
bsr	Initint				; Setup Interrupts.
bsr	Wait
bsr	Resetint			; Reset interrupts
bsr	Resetchips			; Reset custom chips
bsr	SwitchOSin			; Switch in Operating System.
move.l	InitialSP,a7			; Restore Stack Frame Pointer
movem.l	(a7)+,a0/a1/a2/a3/a4/a5/a6/d0/d1/d2/d3/d4/d5/d6/d7
bsr	buttanach
jmp	$820

Clear:
lea	$78000,a0
lea	$7f000,a1

cloop:
clr.b	(a0)+
cmp.l	a0,a1
bne	cloop
rts

InitialSP:dc.l 0			; Hold initial SP

SwitchOSout:				; Switch out disturbing stuff.
move.l	$4,a6				; System Base
lea	gfxlib,a1
clr.l	d0
jsr	-552(a6)			; _LVOOpenLibrary
move.l	d0,gfxbase			; Save Graphics_lib base
jsr	-$84(a6)			; _LVOForbid
jsr	-$96(a6)			; _LVOSuperState
move.l	d0,systack			; System stack
rts

systack:dc.l 0
gfxlib:	dc "graphics.library",0,0
gfxbase:dc.l 0

Initchips:				; Initialize custom chips
move.w	$dff01c,intesave
move.w	$dff01e,intrsave
move.w	$dff002,dmasave
move.w	$dff010,adksave
move.w	#%0111111111111111,$dff096	; DMACONW
move.w	#%1000001111100000,$dff096	; Disable disk access.
move.w	#%0111111111110111,$dff09a	; INTENA
move.w	#%1100000000111100,$dff09a	; Enable desired IRQ's
move.l	#copl,$dff080
rts

intesave:dc.w	0
intrsave:dc.w	0
dmasave:dc.w	0
adksave:dc.w	0

Copymem:
	move.w	#$7fff,$dff096
	lea	start,a0
	lea	endloc,a1
	lea	dest,a2

Copyloop:
	move.b	(a0)+,(a2)+
	move.b	(a0),d0
	move.b	d0,$dff180
	cmpa.l	a0,a1
	bne	copyloop
	move.w	#$ffff,$dff096
	rts

oldvector:dc.l 0

InitInt:				; Initialize interrupts
move.l	$6c,level3save			; Save level 3 vector
move.l	$6c,af3+2
move.l	$68,level2save			; Save level 2 vector
move.l	$68,af2+2
move.l	#level2irq,$68			; Set new interrupt vector 2
move.l	#level3irq,$6c			; Set new interrupt vector 3
rts

level2save:dc.l 0
level3save:dc.l 0

ResetInt:				; Reset Interrupts
move.l	level3save,$6c			; Restore level 3 vector
move.l	level2save,$68			; Restore level 2 vector
rts

Resetchips:				; Reset custom chips
move.w	intesave,d7
bset	#$f,d7
move.w	d7,$dff09a			; Reset Interrupts
move.w	intrsave,d7
bset	#$f,d7
move.w	d7,$dff09c			; Reset interrupt request
move.w	dmasave,d7
bset	#$f,d7
move.w	d7,$dff096			; Reset DMAConw
move.w	adksave,d7
bset	#$f,d7
move.w	d7,$dff09e			; Reset ADK
move.l	gfxbase,a0
move.l	$26(a0),$dff080
rts

SwitchOSIn:				; Allow OS to operate again.
move.l	4,a6				; System Base
jsr	-$8a(a6)			; _LVOPermit
move.l	systack,d0			; Systemstack
jsr	-$9c(a6)			; _LVOUserState
rts

level2irq:
af2:jmp 0

level3irq:
movem.l	d0/d1/d2/d3/d4/d5/d6/d7/a0/a1/a2/a3/a4/a5/a6,-(a7)
bsr	bobo1
bsr	copy
bsr	scrolling
bsr	sin_scroll
movem.l	(a7)+,d0/d1/d2/d3/d4/d5/d6/d7/a0/a1/a2/a3/a4/a5/a6
af3:jmp 0

Wait:					; Wait.
wtl:
cmp.b	#255,$dff006
bne.s	wtl
bsr	checkkeyz
btst	#6,$bfe001
bne.s	wait
rts

dmastuff:dc.w	0

buttanach:
	btst	#0,opta
	beq	normal
	move.l	#$33fc0ffe,$22aa	; YEAH!

Normal:
	rts

Checkkeyz:
	cmp.b	#$5f,$bfec01		; erste opt
	beq	setopta
	rts				; natuerlich rts musst immer sein

Setopta:
	clr.b	$bfec01
	bchg	#0,opta
	btst	#0,opta
	beq	offa
	move.l	#" ON ",optat+30
	bra	zuruecka

offa:
	move.l	#" OFF",optat+30

zuruecka:
	bsr	printmenu
	bra	wait

opta:dc.w 0

Initscroll:
move.l	 gfxbase,a6
lea	 bitmap,a0
move.l	 #$01,d0		; 1 bitplane
move.l   #352,d1		; breite x
move.l   #50,d2		; hoehe y
jsr 	 -390(a6)		; bitmap init
move.l	 #$7d000,plane1 	; startadresse graphic
move.l  gfxbase,a6
lea	rastport,a1	
jsr	-198(a6)		; rastport init
move.l  #bitmap,r_bitmap
move.l	gfxbase,a6
lea	rastport,a1
jsr 	-48(a6)			; clear bitmap
bsr	init2
rts

bobimage:blk.b 1600,0

copl:
dc.w $0120,$0000,$0122,$0000	; spr 1 address
dc.w $0124,$0000,$0126,$0000	; spr 2 address
dc.w $0128,$0000,$012a,$0000
dc.w $012c,$0000,$012e,$0000
dc.w $0130,$0000,$0132,$0000
dc.w $0134,$0000,$0136,$0000
dc.w $0138,$0000,$013a,$0000
dc.w $013c,$0000,$013e,$0000
dc.w $0180,$0000,$0182,$0fff	; hintergrundfarben
dc.w $008e,$2481,$0090,$30c1
dc.w $0092,$0038,$0094,$00d0
dc.w $0108,0,$010a,0
dc.w $0102,$0000,$0104,$0000
dc.w $0100,$4200
dc.w $00e0,$0007,$00e2,$a000
dc.w $00e4,$0007,$00e6,$a000+40
dc.w $00e8,$0007,$00ea,$8000
dc.w $00ec,$0007,$00ee,$8000+40
dc.w $0180,$0000,$0182,$0a0a,$0184,$0c0c,$0186,$0f0f
dc.w $0188,$00aa,$018a,$00ff,$018c,$00ff,$018e,$00ff
dc.w $0190,$00dd,$0192,$00ff,$0194,$00dd,$0196,$00dd
dc.w $0198,$00dd,$019a,$00dd,$019c,$00dd,$019e,$00dd
dc.w $f001,$fffe
dc.w $0100,$2200
dc.w $00e0,$0007,$00e2,$d370	; zeiger auf start bitplane
dc.w $00e4,$0007,$00e6,$d370+44	; zeiger auf start bitplane
dc.w $0102,$0001
dc.w $0108,$0004,$010a,$0004	; graphic modulus
dc.w $0182,$0999,$0184,$0eee,$0186,$0aaa
dc.w $f101,$fffe,$0186,$0aab
dc.w $f201,$fffe,$0186,$0aac
dc.w $f301,$fffe,$0186,$0aad
dc.w $f401,$fffe,$0186,$0aae
dc.w $f501,$fffe,$0186,$0aaf
dc.w $f601,$fffe,$0186,$0a9f
dc.w $f701,$fffe,$0186,$0a8f
dc.w $f801,$fffe,$0186,$0a7f
dc.w $f901,$fffe,$0186,$0a6f
dc.w $fa01,$fffe,$0186,$0a5f
dc.w $fb01,$fffe,$0186,$0a4f
dc.w $fc01,$fffe,$0186,$0a3f
dc.w $fd01,$fffe,$0186,$0a2f
dc.w $fe01,$fffe,$0186,$0a1f
dc.w $ff01,$fffe,$0186,$0a0f
dc.w $ffdf,$fffe
dc.w $0001,$fffe,$0186,$090f
dc.w $0101,$fffe,$0186,$080f
dc.w $0201,$fffe,$0186,$070f
dc.w $0301,$fffe,$0186,$060f
dc.w $0401,$fffe,$0186,$050f
dc.w $0501,$fffe,$0186,$040f
dc.w $0601,$fffe,$0186,$030f
dc.w $0701,$fffe,$0186,$020f
dc.w $0801,$fffe,$0186,$010f
dc.w $0901,$fffe,$0186,$000f
dc.w $0a01,$fffe,$0186,$001e
dc.w $0b01,$fffe,$0186,$002d
dc.w $0c01,$fffe,$0186,$003c
dc.w $0d01,$fffe,$0186,$004b
dc.w $0e01,$fffe,$0186,$005a
dc.w $0f01,$fffe,$0186,$0069
dc.w $1001,$fffe,$0186,$0078
dc.w $1209,$fffe,$0180,$0004,$0108,-84,$010a,-84,$0186,$0aaa
dc.w $ffff,$fffe

bitmap:
blk.w	 4,0
plane1:
blk.l	10,0
rastport:
blk.l	1,0
r_bitmap:
blk.l 26,0
gfxname:
dc.b "graphics.library",0

even
init2:
move.l	#sin_beg,sin		; fuer sin-scroller
move.w	#0,stand		; wert fuer stehende schrift
move.w	#0,speed		; anfangs geschwindigkeit
move.l	#text,pointer		; textzeiger auf textbeginn
move.w	#0,nibble		; buchstabenbruchteil auf 0
rts

scrolling:
cmp.w	#0,stand		; steht der text ??
beq	do_scroll2		; jaaaa !
sub.w	#1,stand		; weiter warten
bra	ready2			; fertig

do_scroll2:
add.w	#1,nibble		; bruchteil erhoehen
cmp.w	#1,speed		; schnelle schrift ?
bne	not_slow		; nooeee !
add.w	#1,nibble		; mehr erhoehen
not_slow:
cmp.w	#10,nibble		; neuer buchstabe ?
bne	move_it
clr.w	nibble
bsr	setchar			; verdeckt setzen
next:
add.l	#1,pointer		; naechster buchstabe
move.l	pointer,a0
move.b	(a0),d0
cmp.b	#0,d0			; mit allem moeglichen vergleichen!
bne	move2
move.l	#text,pointer
bra	move_it
move2:
cmp.b	#"¹",d0
bne	move3
move.w	#0,speed
bra	next
move3:
cmp.b	#"²",d0
bne	move4
move.w	#1,speed
bra	next
move4:
cmp.b	#"·",d0
bne	move_it
move.w	#100,stand
bra	next
move_it:
bsr	set_em			; buchstabe vergroessern
bsr	movechar		; und scrollen
ready2:
rts

set_em:
move.l	#scroll+$1d60,a0		; daher
move.l	#scroll+[40],a1		; dahin !
moveq	#6,d3

copy_em:
move.b	(a0),d0
and.b	#%10000000,d0
move.b	d0,d1
asr.b	#1,d1
or.b	d1,d0
move.b	d0,(a1)
add.l	#44,a1
move.b	d0,(a1)
add.l	#44,a1
add.l	#44,a0
dbra	d3,copy_em
move.l	#scroll+$1d60,a0		; und nochmal mit 2.bit
move.l	#scroll+[40],a1
moveq	#6,d3

copy_em2:
move.b	(a0),d0
and.b	#%01000000,d0
move.b	d0,d1
asr.b	#1,d1
asr.b	#2,d0
or.b	d1,d0
or.b	d0,(a1)
add.l	#44,a1
or.b	d0,(a1)
add.l	#44,a1
add.l	#44,a0
dbra	d3,copy_em2
move.w	speed,d1		; rotieren

rrr:
move.l	#scroll+$1d60,a0
move.w	#6,d0

rol_em:
asl.b	(a0)
add.l	#44,a0
dbra	d0,rol_em
dbra	d1,rrr
rts

setchar:
bsr	searchbegin
move.w	#6,d0			; sooft 7 -1
move.l	#scroll+$1d60,a1	; dahin !

copy_char:
move.b	(a0)+,(a1)
add.l	#44,a1
dbra	d0,copy_char
rts

searchbegin:			; buchstabe aus tabelle suchen
move.l	#char,a0
move.l	pointer,a1
move.b	(a1),d0
clr.l	d1
move.b	(a0),d2
search_char:
cmp.b	d2,d0
beq	found
add.l	#8,d1
move.b	(a0,d1),d2
cmp.b	#0,d2
bne	search_char
found:
add.l	d1,a0
add.l	#1,a0
rts

movechar:
lea.l	rastport,a1		; normaler scroller
move.l	gfxbase,a6
move.l	#2,d0
cmp.w	#1,speed
bne	move_slow
move.l	#4,d0

move_slow:
move.l	#0,d1
move.l	#0,d2
move.l	#0,d3
move.l	#323,d4
move.l	#13,d5
jsr	-396(a6)
rts

pointer:
dc.l	0

nibble:
dc.w	0

dreck:
dc.w	0

Bobo1:
	moveq	#10,d0
	move.w	#60,d1
	move.w	#40,d2

Putbobz:
	move.l	xpointer,a4
	move.w	(a4)+,d5
	cmp.w	#$ffff,d5
	bne	nonrx
	move.l	#xtab,a4
	move.w	(a4)+,d5

nonrx:
	move.w	d5,d3
	move.l	a4,xpointer
	move.l	ypointer,a4
	move.w	(a4)+,d5
	cmp.w	#$ffff,d5
	bne	nonry
	move.l	#ytab,a4
	move.w	(a4)+,d5

nonry:
	move.w	d5,d4
	move.l	a4,ypointer
	move.l	#bobimage,a0
	move.l	#$7a000,a1
	bsr	erasebobnosave
	bsr	putbobnosave
	rts


******************************
* Wait for blitter to finish *
******************************

WaitBlit:
btst	#14,$dff002
bne.s	WaitBlit
rts

*********************************************************
*  Put A Bob plane into a bitmap, no background saving	*
*		  or masking with masks			*
*-------------------------------------------------------*
* 	D0=BOBWidth in words, D1=Height in pixels	*
* 	D2=BitMapWidth in bytes.			*
*	D3=Horiz.Position, D4=Vertical Position		*
*	A0=BobData Pointer				*
*	A1=BitMap  Pointer				*
*********************************************************

PutBobNoSave:
movem.l	d0-d7/a0-a6,-(a7)
bsr	WaitBlit
addq.w	#1,d0
swap	d4
move.w	#0,d4			; Used as long later
swap	d4
move.w	d3,d5
asr.w	#4,d5			; Divide by 16 to get word offset.
asl.w	#1,d5			; Multiply with 2 to get byte offset
mulu	d2,d4			; To get byte offset =vertwidth*ypos
add.w	d5,d4			; Total offset
and.w	#15,d3			; Shift value = low 4 bits
add.l	d4,a1			; Calc BitMap pointer

move.l	a0,$dff050		; BLTAPT
move.l	a1,$dff054		; BLTDPT
move.l	a1,$dff04c		; BLTBPT
move.l	#$ffff0000,$dff044	; First and LastWord masks
ror.w	#4,d3			; No.Of shifts
ori.w	#$0dfc,d3		; D=A+B
move.w	d3,$dff040		; BLTCON0
clr.w	$dff042			; BLTCON1
move.w	d2,d3			; BitMapWidth in bytes
asr.w	#1,d3			; Divide by two.
sub.w	d0,d3			; Calculate modulo
asl.w	#1,d3			; Must be even
move.w	d3,$dff062		; BLTBMOD
move.w	d3,$dff066		; BLTDMOD
move.w	#-2,$dff064		; BLTAMOD
lsl.w	#6,d1			; Height is mapped to bits 6-15
ori.w	d0,d1			; Width is mapped to bits 0-5
move.w	d1,$dff058		; BLTSIZE and trigger
movem.l	(a7)+,d0-d7/a0-a6
rts

*********************************************************
*      Erase a bob without restoring the background	*
*-------------------------------------------------------*
* 	D0=BOBWidth in words, D1=Height in pixels	*
* 	D2=BitMapWidth in bytes.			*
*	D3=Horiz.Position, D4=Vertical Position		*
*	A1=BitMap  Pointer				*
*********************************************************

EraseBobNoSave:
movem.l	d0-d7/a0-a6,-(a7)
bsr	WaitBlit
ext.l	d4
addq.w	#1,d0
asr.w	#4,d3			; Divide by 16 to get word offset.
asl.w	#1,d3			; Multiply with 2 to get byte offset
mulu	d2,d4			; To get byte offset =vertwidth*ypos
add.w	d3,d4			; Total offset
add.l	d4,a1			; Calc BitMap pointer

move.l	a1,$dff054		; BLTDPT
move.w	#$0100,$dff040		; D=0
clr.w	$dff042			; BLTCON1
move.w	d2,d3			; BitMapWidth in bytes
asr.w	#1,d3			; Divide by two.
sub.w	d0,d3			; Calculate modulo
asl.w	#1,d3			; Must be even
move.w	d3,$dff066		; BLTDMOD
lsl.w	#6,d1			; Height is mapped to bits 6-15
ori.w	d0,d1			; Width is mapped to bits 0-5
move.w	d1,$dff058		; BLTSIZE and trigger
movem.l	(a7)+,d0-d7/a0-a6
rts

SfFl:dc.w 0

Xpointer:dc.l	xtab
Xtab:
	dc.w	0,0,0,0,1,1,2,2
	dc.w	3,4,4,5,6,7,9,10
	dc.w	11,13,14,16,17,19,21,22
	dc.w	24,26,28,30,33,35,37,39
	dc.w	42,44,47,49,52,54,57,60
	dc.w	62,65,68,70,73,76,79,82
	dc.w	84,87,90,93,96,98,101,104
	dc.w	107,110,112,115,118,120,123,126
	dc.w	128,131,133,136,138,141,143,145
	dc.w	147,150,152,154,156,158,159,161
	dc.w	163,164,166,167,169,170,171,173
	dc.w	174,175,176,176,177,178,178,179
	dc.w	179,180,180,180,180,180,180,180
	dc.w	179,179,178,178,177,176,176,175
	dc.w	174,173,171,170,169,167,166,164
	dc.w	163,161,159,158,156,154,152,150
	dc.w	147,145,143,141,138,136,133,131
	dc.w	128,126,123,120,118,115,112,110
	dc.w	107,104,101,98,96,93,90,87
	dc.w	84,82,79,76,73,70,68,65
	dc.w	62,60,57,54,52,49,47,44
	dc.w	42,39,37,35,33,30,28,26
	dc.w	24,22,21,19,17,16,14,13
	dc.w	11,10,9,7,6,5,4,4
	dc.w	3,2,2,1,1,0,0,0

	dc.w	$ffff

Ypointer:dc.l	ytab
Ytab:

	dc.w	0,0,0,1,1,2,3,4
	dc.w	5,7,9,10,12,14,16,19
	dc.w	21,24,26,29,32,35,38,42
	dc.w	45,48,52,55,59,62,66,70
	dc.w	73,77,81,85,88,92,96,99
	dc.w	103,106,110,113,117,120,123,126
	dc.w	129,132,135,138,140,142,145,147
	dc.w	149,151,152,154,155,156,157,158
	dc.w	159,159,160,160,160,160,159,159
	dc.w	158,157,156,155,154,152,151,149
	dc.w	147,145,142,140,138,135,132,129
	dc.w	126,123,120,117,113,110,106,103
	dc.w	99,96,92,88,85,81,77,73
	dc.w	70,66,62,59,55,52,48,45
	dc.w	42,38,35,32,29,26,24,21
	dc.w	19,16,14,12,10,9,7,5
	dc.w	4,3,2,1,1,0,0

	dc.w	$ffff


char:			; buchstaben- tabelle
dc.b " "
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000

dc.b "a"
dc.b %01111111
dc.b %11111111
dc.b %11000011
dc.b %11111111
dc.b %11111111
dc.b %11000011
dc.b %11000011

dc.b "b"
dc.b %11111110
dc.b %11111111
dc.b %11000011
dc.b %11111110
dc.b %11000011
dc.b %11111111
dc.b %11111110

dc.b "c"
dc.b %01111110
dc.b %11111111
dc.b %11000011
dc.b %11000000
dc.b %11000011
dc.b %11111111
dc.b %01111110

dc.b "d"
dc.b %11111110
dc.b %11111111
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11111111
dc.b %11111110

dc.b "e"
dc.b %01111111
dc.b %11111111
dc.b %11000000
dc.b %11111111
dc.b %11000000
dc.b %11111111
dc.b %01111111

dc.b "f"
dc.b %01111111
dc.b %11111111
dc.b %11000000
dc.b %11111110
dc.b %11111110
dc.b %11000000
dc.b %11000000

dc.b "g"
dc.b %01111111
dc.b %11111111
dc.b %11000000
dc.b %11000111
dc.b %11000011
dc.b %11111111
dc.b %01111110

dc.b "h"
dc.b %11000011
dc.b %11000011
dc.b %11111111
dc.b %11111111
dc.b %11000011
dc.b %11000011
dc.b %11000011

dc.b "i"
dc.b %00011100
dc.b %00011100
dc.b %00011100
dc.b %00011100
dc.b %00011100
dc.b %00011100
dc.b %00011100

dc.b "j"
dc.b %11111111
dc.b %11111111
dc.b %00000011
dc.b %00000011
dc.b %11000011
dc.b %11111111
dc.b %01111110

dc.b "k"
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11111110
dc.b %11111111
dc.b %11000011
dc.b %11000011

dc.b "l"
dc.b %11000000
dc.b %11000000
dc.b %11000000
dc.b %11000000
dc.b %11000000
dc.b %11111111
dc.b %01111111

dc.b "m"
dc.b %11000011
dc.b %11100111
dc.b %11011011
dc.b %11011011
dc.b %11011011
dc.b %11011011
dc.b %11011011

dc.b "n"
dc.b %11111110
dc.b %11111111
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11000011

dc.b "o"
dc.b %01111110
dc.b %11111111
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11111111
dc.b %01111110

dc.b "p"
dc.b %11111110
dc.b %11111111
dc.b %11000001
dc.b %11111111
dc.b %11111110
dc.b %11000000
dc.b %11000000

dc.b "q"
dc.b %01111110
dc.b %11111111
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11111110
dc.b %01111101

dc.b "r"
dc.b %11111110
dc.b %11111111
dc.b %11000011
dc.b %11111110
dc.b %11111110
dc.b %11000011
dc.b %11000011

dc.b "s"
dc.b %01111111
dc.b %11111111
dc.b %11000000
dc.b %01111110
dc.b %00000011
dc.b %11111111
dc.b %11111110

dc.b "t"
dc.b %11111111
dc.b %11111111
dc.b %00011000
dc.b %00011000
dc.b %00011000
dc.b %00011000
dc.b %00011000

dc.b "u"
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11111111
dc.b %01111110

dc.b "v"
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %01100110
dc.b %00111100
dc.b %00011000

dc.b "w"
dc.b %11011011
dc.b %11011011
dc.b %11011011
dc.b %11011011
dc.b %11011011
dc.b %11100111
dc.b %11000011

dc.b "x"
dc.b %11000011
dc.b %11000011
dc.b %11000011
dc.b %01111110
dc.b %11000011
dc.b %11000011
dc.b %11000011

dc.b "y"
dc.b %11000011
dc.b %11000011
dc.b %11111111
dc.b %01111110
dc.b %00011000
dc.b %00011000
dc.b %00011000

dc.b "z"
dc.b %11111111
dc.b %11111111
dc.b %00000011
dc.b %01111110
dc.b %11000000
dc.b %11111111
dc.b %11111111

dc.b "0"
dc.b %01111110
dc.b %11111111
dc.b %11000111
dc.b %11001011
dc.b %11010011
dc.b %11111111
dc.b %01111110

dc.b "1"
dc.b %00011000
dc.b %00111000
dc.b %00011000
dc.b %00011000
dc.b %00011000
dc.b %00111100
dc.b %00111100

dc.b "2"
dc.b %11111110
dc.b %11111111
dc.b %00000001
dc.b %01111110
dc.b %11000000
dc.b %11111111
dc.b %11111111

dc.b "3"
dc.b %11111110
dc.b %11111111
dc.b %00000011
dc.b %11111110
dc.b %00000011
dc.b %11111111
dc.b %11111110

dc.b "4"
dc.b %11000011
dc.b %11000011
dc.b %11111111
dc.b %01111111
dc.b %00000011
dc.b %00000011
dc.b %00000011

dc.b "5"
dc.b %11111111
dc.b %11111111
dc.b %11000000
dc.b %11111110
dc.b %00000011
dc.b %11111111
dc.b %11111110

dc.b "6"
dc.b %01111111
dc.b %11111111
dc.b %11000000
dc.b %11111110
dc.b %11000011
dc.b %11111111
dc.b %01111110

dc.b "7"
dc.b %11111110
dc.b %11111111
dc.b %00000011
dc.b %00011111
dc.b %00011111
dc.b %00000011
dc.b %00000011

dc.b "8"
dc.b %01111110
dc.b %11111110
dc.b %11000011
dc.b %01111110
dc.b %11000011
dc.b %11111111
dc.b %01111110

dc.b "9"
dc.b %01111110
dc.b %11111111
dc.b %11000011
dc.b %01111111
dc.b %00000011
dc.b %11111111
dc.b %01111110

dc.b "!"
dc.b %00011000
dc.b %00111100
dc.b %00111100
dc.b %00111100
dc.b %00011000
dc.b %00000000
dc.b %00011000

dc.b "."
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %01100000
dc.b %01100000

dc.b ","
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %01100000
dc.b %00100000
dc.b %01000000

dc.b "'"
dc.b %01100000
dc.b %00100000
dc.b %01000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000

dc.b "*"
dc.b %00010000
dc.b %01010100
dc.b %00111000
dc.b %11111110
dc.b %00111000
dc.b %01010100
dc.b %00010000

dc.b "-"
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %11111111
dc.b %00000000
dc.b %00000000
dc.b %00000000

dc.b "ç"
dc.b %00111000
dc.b %01111000
dc.b %11000111
dc.b %11000110
dc.b %11000111
dc.b %01111000
dc.b %00111000

dc.b "æ"
dc.b %00000110
dc.b %00001110
dc.b %00010110
dc.b %00100110
dc.b %00111110
dc.b %01000110
dc.b %11101111

dc.b	0
even
speed:
dc.w	1
stand:
dc.w	0
uu:
dc.l	0

copy:
move.l	#sin_end,sin
move.l	#scroll+$370,a1
move.w	#388,d0

wclear:
clr.l	(a1)+
dbra	d0,wclear
move.l	#scroll,a0	; org. scroller
move.l	#scroll+$370,a1	; sin-scroller

do_copy:
move.l	a1,a2
move.l	a0,a3
move.l	sin,a4
move.l	(a4),d4
mulu	#44,d4
add.l	d4,a2
subq	#4,a4
cmpi.l	#sin_beg,a4
bne	not_ready
move.l	#sin_end,a4

not_ready:
move.l	a4,sin
moveq	#13,d5

line_copy:
move.b	(a3),(a2)
add.l	#44,a3
add.l	#44,a2
dbra	d5,line_copy
addq	#1,a1
addq	#1,a0
cmpi.l	#scroll+41,a0
bmi	do_copy
rts

sin:
dc.l	0

sin_beg:
	dc.l	20,20,20,19,18,17,16,15
	dc.l	13,12,10,8,7,5,4,3
	dc.l	2,1,0,0,0,0,0,1
	dc.l	2,3,4,5,7,8,10,12
	dc.l	13,15,16,17,18,19,20,20
	dc.l	20,20,18,16,13,10,7,4
	dc.l	2,0,0,0,2,4,7,10
	dc.l	13,16,18
sin_end:
dc.l	20
dc.l	$ffff

sin_scroll:
move.l	#sin_beg,a0
move.l	#sin_beg+4,a1
move.l	(a0),d0

sin_copy:
move.l	(a1)+,(a0)+
cmp.l	#$ffff,(a1)
bne	sin_copy
move.l	d0,(a0)
rts


mp:
dc.l	0

fin:
dc.l	0
end:
e:

printmenu:
	move.l	#page,a0
	move.l	#$78000,a1
	move.w	#20*40,d0
	move.w	#0,d1
	move.w	#0,d2
	bsr	rasta_text
	rts

*-> Pass these parameters:	a0 = pointer to text
*->				a1 = pointer to bitmap
*->				d0 = text lenght
*->				d1 = ROW
*->				d2 = COLUMN

rasta_text:
	move.w	d1,ROW		; save user ROW
	move.w	d2,COL		; save user COLUMN

WRITE_TEXT:
	lea	ST_FONT,a2
	clr.l	d3
	move.b	(a0),d3
	add.l	#$01,a0
	sub.b	#$20,d3		; This two lines get the right
	mulu	#$10,d3		; offset in the chars-table.
	add.l	d3,a2		; add the offset at the font base
	move.w	ROW,d1		; calculate right scan ROW
	mulu	#$28,d1		;   "        "
	move.w	COL,d2
	add.w	#$01,COL
	cmp.w	#$28,COL	; +40 maximum chars per ROW
	bne	NO_ENDLINE
	clr.w	COL
	add.w	#$08,ROW

NO_ENDLINE:
	move.l	a1,a3		; save store reg in a3
	add.w	d1,a3		; the the roght bitmap position
	add.w	d2,a3		;         "	"	"
	moveq	#$07,d7		; +8 = height of char

WRITE_CHAR:
	move.b	(a2)+,(a3)
	add.l	#$01,a2		; this few lines move the char.
	add.l	#$28,a3
	dbf	d7,WRITE_CHAR
	sub.w	#$01,d0		; decrease lenght counter
	bne	WRITE_TEXT	; if not zero take another char.
	rts

ROW:	dc.w	$0000
COL:	dc.w	$0000
o1flag: dc.w	0

ST_FONT:
	DC.L	$00000000
	DC.L	$00000000,$00000000
	DC.L	$00000000,$00000000
	DC.L	$18001800,$18000000
	DC.L	$18000000,$00000000
	DC.L	$66006600,$00000000
	DC.L	$00000000,$00000000
	DC.L	$6C00FE00,$6C00FE00
	DC.L	$6C000000,$00000000
	DC.L	$7E00D000,$7C001600
	DC.L	$FC000000,$00000000
	DC.L	$66000C00,$18003000
	DC.L	$66000000,$00000000
	DC.L	$10001000,$7C001000
	DC.L	$10000000,$00000000
	DC.L	$0C000C00,$18000000
	DC.L	$00000000,$00000000
	DC.L	$0C001800,$18001800
	DC.L	$0C000000,$00000000
	DC.L	$18000C00,$0C000C00
	DC.L	$18000000,$00000000
	DC.L	$54003800,$7C003800
	DC.L	$54000000,$00000000
	DC.L	$10001000,$7C001000
	DC.L	$10000000,$00000000
	DC.L	$00000000,$00000C00
	DC.L	$0C001800,$00000000
	DC.L	$00000000,$7C000000
	DC.L	$00000000,$00000000
	DC.L	$00000000,$00001800
	DC.L	$18000000,$00000000
	DC.L	$06000C00,$18003000
	DC.L	$60000000,$00000000
	DC.L	$3C006E00,$76006600
	DC.L	$3C000000,$00000000
	DC.L	$1C003C00,$0C000C00
	DC.L	$0C000000,$00000000
	DC.L	$7C000600,$3C006000
	DC.L	$7E000000,$00000000
	DC.L	$7C000600,$1C000600
	DC.L	$7C000000,$00000000
	DC.L	$1C003C00,$6C007E00
	DC.L	$0C000000,$00000000
	DC.L	$7E006000,$7C000600
	DC.L	$7C000000,$00000000
	DC.L	$3E006000,$7C006600
	DC.L	$3C000000,$00000000
	DC.L	$7E000600,$0C001800
	DC.L	$18000000,$00000000
	DC.L	$3C006600,$3C006600
	DC.L	$3C000000,$00000000
	DC.L	$3C006600,$3E000600
	DC.L	$7C000000,$00000000
	DC.L	$00001800,$00001800
	DC.L	$00000000,$00000000
	DC.L	$00001800,$00001800
	DC.L	$30000000,$00000000
	DC.L	$0C001800,$30001800
	DC.L	$0C000000,$00000000
	DC.L	$00003C00,$00003C00
	DC.L	$00000000,$00000000
	DC.L	$30001800,$0C001800
	DC.L	$30000000,$00000000
	DC.L	$7C000600,$1C000000
	DC.L	$18000000,$00000000
	DC.L	$00000000,$00000000
	DC.L	$00000000,$00000000
	DC.L	$3C006600,$7E006600
	DC.L	$66000000,$00000000
	DC.L	$7C006600,$7C006600
	DC.L	$7C000000,$00000000
	DC.L	$3C006600,$60006600
	DC.L	$3C000000,$00000000
	DC.L	$7C006600,$66006600
	DC.L	$7C000000,$00000000
	DC.L	$7E006000,$78006000
	DC.L	$7E000000,$00000000
	DC.L	$7E006000,$78006000
	DC.L	$60000000,$00000000
	DC.L	$3E006000,$6E006600
	DC.L	$3E000000,$00000000
	DC.L	$66006600,$7E006600
	DC.L	$66000000,$00000000
	DC.L	$7E001800,$18001800
	DC.L	$7E000000,$00000000
	DC.L	$7E000600,$06006600
	DC.L	$3C000000,$00000000
	DC.L	$66006600,$7C006600
	DC.L	$66000000,$00000000
	DC.L	$60006000,$60006000
	DC.L	$7E000000,$00000000
	DC.L	$42006600,$7E006600
	DC.L	$66000000,$00000000
	DC.L	$66007600,$7E006E00
	DC.L	$66000000,$00000000
	DC.L	$3C006600,$66006600
	DC.L	$3C000000,$00000000
	DC.L	$7C006600,$7C006000
	DC.L	$60000000,$00000000
	DC.L	$3C006600,$66006E00
	DC.L	$3E000000,$00000000
	DC.L	$7C006600,$7C006600
	DC.L	$66000000,$00000000
	DC.L	$3E006000,$3C000600
	DC.L	$7C000000,$00000000
	DC.L	$7E001800,$18001800
	DC.L	$18000000,$00000000
	DC.L	$66006600,$66006600
	DC.L	$3E000000,$00000000
	DC.L	$66006600,$66003C00
	DC.L	$18000000,$00000000
	DC.L	$66006600,$7E006600
	DC.L	$42000000,$00000000
	DC.L	$66006600,$3C006600
	DC.L	$66000000,$00000000
	DC.L	$66006600,$3C001800
	DC.L	$18000000,$00000000
	DC.L	$7E000600,$18006000
	DC.L	$7E000000,$00000000
	DC.L	$38003000,$30003000
	DC.L	$38000000,$00000000
	DC.L	$60003000,$18000C00
	DC.L	$06000000,$00000000
	DC.L	$38001800,$18001800
	DC.L	$38000000,$00000000
	DC.L	$10003800,$6C004400
	DC.L	$00000000,$00000000

OLDCOPCODE:	DC.L	0
GFX:		DC.L	0

page:
	DC.B	"                                        "
	DC.B	"                                        "
	DC.B	"                                        "
	DC.B	"                                        "
	DC.B	"                                        "
	DC.B	"             SAVAGE PRESENTS:           "
	DC.B	"             MR. DO RUN RUN +           "
	DC.B	"                                        "
	DC.B	"          TRAINED BY FILIPPETTO!        "
	DC.B	"                                        "
	DC.B	"                                        "
	DC.B	"                                        "

optat:
	DC.B	"        F1 - UNLIMITED LIVES   OFF      "
	dc.b	"                                        "
	dc.b	"                                        "
	dc.b	"                                        "
	dc.b	"                                        "
	dc.b	"                                        "
	dc.b	"                                        "
	dc.b	"         LEFT MOUSE TO START GAME       "

; page musst immer 20 lines lang sein! so wenn man ein paar optionen
; wie 2,3,4,5,6 nicht benutzt, nur spaces einfuegen und nicht die linien
; loeschen! sonst musst ihr die page length in der printmenu routine
; aendern (linien*40)

text:
dc.b	"   savage bringz ya another release called: ¹mr. do run run "
dc.b 	"trainer...   trained by filippetto!   note: sometimes the "
dc.b	"scores gets mad, i don't know why this happens 'coz i changed "
dc.b	"just 1 instruction in the program...   anyway enjoy all your "
dc.b	"lives and play this great, old game!       "
dc.b	"²no time for greetings, "
dc.b	"just some short messages to: paul of extreme - thanx for the"
dc.b	" phonecall! hope to see the sources!   paranoid of zero defe"
dc.b	"cts - see ya at the smau fellow, for the demo competition!  "
dc.b	"and last but not least   sterling, the ex savage's founder: "
dc.b	"you're cool also without your group!!!    scroll restarts..."
dc.b	"                                                            "
dc.b 0

; diese cool scroller war von MMS/Level 4! die kontroll-zeichen sind:
; ¹ speed 1, ² speed 2, ³ speed 3, · (alt+8) pause und auch
; ç (alt+c) commodore logo, æ (alt+a) amiga logo
