***********************************************************
* This program was "altered" by The Dancing Fool of Epsilon
* on 15.01.93.  The original source (By Booger of Nightfall)
* should also be in this archive.  The only changes to the demo
* itself are I took out the music and therefore had to change the
* way the VU-Meter stars work. :^) Now come Booger's 
* comments.....
*
* ALL OF THE TEXTS ARE AT THE BOTTOM!
* for NIGHTFALL if you wanna use this...
* 1> If you wann change the MOD go to the END Of the FILE and 
*    Put a new MOD name and path
* 2> The text is section off into 25x40 blocks.. to
*    add another screen just copy a block of memory and edite it out
*    I have section it off for ya to make it easier...
* UPDATED SCROLLY 
* 3> YOU CAN FIND THE BOTTOM SCROLLY Down below... under TEXTT
*    I HOPE YOU LIKE THIS ONE!!!
* 4> If you want a NEW FONT then use PF8 to make an 8x8 font
*    and use PF16 to make a 16x16 font
*    Now just change the incbins to point at them

* Now... 
*  A  ;Assemble
*  WO ;Write Object file
*  Name.exe ; Name of Object file
*  G  ; GO <test file to see if it works..

* Now Exit and crunch it with power packer...

* I released this file 09-09-92...
* However I went back and REdid the MUSIC for Pro-Tracker..
* Electronic Ice updated his mod and Specfied I have to stop
* using Digital Sound Studio..  Also from now on I'm writing for PAL!
* I also updated the routine for the scrolling.. its SMOOTHER NOW!
* A Coders life is never done... I'm about finished with this....
* I know I shouldn't do this but I'm adding a SCROLL text for the bottom...
***********************************************************
* Includes
***********************************************************

		incdir	"DevpacAm:include/"
		include	"exec/exec_lib.i"
		include	"exec/execbase.i"
		include	"graphics/gfxbase.i"
		include	"graphics/graphics_lib.i"
		include	"hardware/custom.i"

***********************************************************
* Other Macros
***********************************************************

CALL		MACRO
		jsr	_LVO\1(a6)
		ENDM

WaitBlit	MACRO
		btst.b	#6,$dff002
.\@:		btst.b	#6,$dff002
		bne.b	.\@
		ENDM

***********************************************************
* Other Equates
***********************************************************

 IFND	gb_ActiView
gb_ActiView	EQU	32
 ENDIF

 IFND	gb_CopInit
gb_CopInit	EQU	36
 ENDIF

***********************************************************

		section	code,code

		bsr.w	TakeSystem
		move.w	#$20,$1dc-2(a5)
		move.w	#$83e0,DMACon-2(a5)
start:		bsr.w	starst
		bsr.w	scroll

		move.l	VectorBase,a0
		move.l	$6c(a0),oldirq	 ;store the old interrupt
		move.l	#newirq,$6c(a0)	 ;insert your interrupt
		move.w	#$c020,$dff000+INTEna
		bsr.w	introst

		bsr.w	RestoreSystem
		rts			 ;end program!

***********************************************************

newirq:		movem.l	a0-a6/d0-d7,-(a7)
		bsr.w	scrollback
		bsr.w	scrolld1
		bsr.w	scrollt
		bsr.w	movestar
		bsr.w	scrolloff2	
		move.w #$0070,$dff09c
intend:		movem.l	(a7)+,a0-a6/d0-d7
		rte

***********************************************************

introst:	lea	2+bmap,a0
		lea	2+cmap,a1
		lea	2+dmap,a2
		move.l	#bpic,d0
		move.l	#bpic+40,d1
		move.w	d0,4(a0)
		move.w	d1,12(a0)
		move.w	d0,4(a1)
		move.w	d1,12(a1)
		move.w	d0,4(a2)
		move.w	d1,12(a2)
		swap	d0
		swap	d1
		move.w	d0,(a0)
		move.w	d1,8(a0)
		move.w	d0,(a1)
		move.w	d1,8(a1)
		move.w	d0,(a2)
		move.w	d1,8(a2)

		lea	2+smap,a0
		move.l	#s_pic,d0
		move.l	#s_pic+40,d1
		move.w	d0,4(a0)
		move.w	d1,12(a0)
		swap	d0
		swap	d1
		move.w	d0,(a0)
		move.w	d1,8(a0)

		move.l	#copa,$dff080

mleft:		btst	#6,$bfe001	
		bne.b	mright
		tst.w	soff
		bne.b	mright
		move.w	#48,soff

mright:		btst	#10,$dff016	;right mouse button
		bne.b	mleft
		btst	#6,$bfe001	
		bne.b	mleft
		bsr.w	scrolloff1
		rts

***********************************************************

scrollback:	tst.w	up_down
		bne.w	scrollbacku
		bra.w	scrollbackd

scrollbackd:	moveq	#0,d0
		addq.w	#1,backpt
		cmpi.w	#back,backpt
		bne.b	dsc_go
		clr.w	backpt
		move.w	#1,up_down
dsc_go:		move.w	backpt,d0
		lea	backsine,a0
		add.w	d0,d0
		move.w	(a0,d0.w),d0
		tst.w	d0
		beq.w	rts
	
		move.w	d0,d1
		lsl.w	#6,d1	;setting up opertion for 1line
		add.w	d1,d1
		add.w	#20,d1
		move.w	#100,d2	
		sub.w	d0,d2
		addq.w	#1,d2
		lsl.w	#6,d2
		add.w	d2,d2
		add.w	#20,d2
		mulu	#80,d0
		move.l	#8000,d3
		sub.w	d0,d3
		add.l	#bpic,d3
		
dsback:		WaitBlit
		move.l 	#-1,$dff044
		move.l	d3,$dff050	; a obj
		move.l	#buffer,$dff054	; d
		move.l	#0,$dff064	; a
		move.l	#$09f00000,$dff040
		move.w	d1,$dff058

		WaitBlit
		move.l	d3,$dff050	; a obj	d0
		move.l	#bpic+8000,$dff054	; d
		move.w	#$2,$dff042
		move.w	d2,$dff058	;d2

		WaitBlit
		move.l	#buffer,$dff050	; a obj
		move.l	#bpic,$dff054	; d
		move.w	#$0,$dff042
		move.w	d1,$dff058
		rts

***********************************************************

scrollbacku:	moveq	#0,d0
		addq.w	#1,backpt
		cmpi.w	#back,backpt
		bne.b	sc_go
		clr.w	backpt
		clr.w	up_down
sc_go:		move.w	backpt,d0
		lea	backsine,a0
		add.w	d0,d0
		move.w	(a0,d0.w),d0
		tst.w	d0
		beq.w	rts
		move.w	d0,d1
		lsl.w	#6,d1	;setting up opertion for 1line
		add.w	d1,d1
		add.w	#20,d1
		move.w	#100,d2
		sub.w	d0,d2
		addq.w	#1,d2
		lsl.w	#6,d2	;setting up opertion for 1line
		add.w	d2,d2
		add.w	#20,d2
		mulu	#80,d0
		move.l	#8000,d3
		sub.w	d0,d3
		add.l	#bpic,d0
		add.l	#bpic,d3

sback:		WaitBlit
		move.l 	#$ffffffff,$dff044
		move.l	#bpic,$dff050	; a obj
		move.l	#buffer,$dff054	; d
		move.l	#000000000,$dff064	; a
		move.l	#$09f00000,$dff040
		move.w	d1,$dff058

		WaitBlit
		move.l	d0,$dff050	; a obj
		move.l	#bpic,$dff054	; d
		move.w	d2,$dff058

		WaitBlit
		move.l	#buffer,$dff050	; a obj
		move.l	d3,$dff054	; d
		move.w	d1,$dff058
		rts

***********************************************************

scrolloff2:	cmpi.w	#200,sup
		bne.b	rts
		tst.w	soff
		beq.b	rts
		lea	sine,a0
		move.w	soff,d0
		add.w	d0,d0
		moveq	#0,d2
		move.w	(a0,d0.w),d2
		muls	#40,d2

		lea	2+amap,a0
		move.l	#apic+8000,d0
		sub.l	d2,d0
		move.l	d0,d1
		addi.l	#41,d1
		move.w	d0,4(a0)
		move.w	d1,12(a0)
		swap	d0
		swap	d1
		move.w	d0,(a0)
		move.w	d1,8(a0)
		subq.w	#1,soff
		beq.w	scroll
rts:		rts

***********************************************************

scrolld1:	cmpi.w	#200,sup
		beq.b	rts
		lea	sine,a0
		move.w	sup,d0
		add.w	d0,d0
		moveq	#0,d2
		move.w	(a0,d0.w),d2
		muls	#40,d2

		lea	2+amap,a0
		move.l	#apic+8000,d0
		sub.l	d2,d0
		move.l	d0,d1
		add.l	#41,d1
		move.w	d0,4(a0)
		move.w	d1,12(a0)
		swap	d0
		swap	d1
		move.w	d0,(a0)
		move.w	d1,8(a0)
		addq.w	#1,sup
		rts

***********************************************************

scrolloff1:	cmpi.w	#200,sup
		bne.b	scrolloff1
		move.w	#40,soff1

bl_tst:		WaitBlit
		move.l 	#$000fffff,$dff044
		move.l	#apic,$dff050	; a obj
		move.l	#apic-2,$dff054	; d
		move.l	#0,$dff064	; a
		move.l	#$59f00000,$dff040
		move.w	#$3214,$dff058
		subq.w	#1,soff1
		bne.b	bl_tst
		rts

scroll:		movem.l	a0-a6/d0-d7,-(a7)
		clr.w	sup
		lea	2+amap,a0
		move.l	#apic+8000,d0
		move.l	#apic+8041,d1
		move.w	d0,4(a0)
		move.w	d1,12(a0)	
		swap	d0
		swap	d1
		move.w	d0,(a0)
		move.w	d1,8(a0)
		moveq	#9,d4
golp:		moveq	#99,d6	;num in line -1
gotxt:		moveq	#0,d0
		lea	text,a0
		move.l	txt_pnt,d1
		move.b	(a0,d1),d0
		bne.b	n_nwtxt
		clr.l	txt_pnt
		move.b	text,d0
n_nwtxt:	addq.l	#1,txt_pnt
n_chnge:	sub.w	#32,d0		;subtract hex start
		lsl.w	#3,d0		;and get offset in the font
		add.l	#font8,d0		;now to locate in ram!
		moveq	#0,d7
		addq.w	#1,xoff
		cmpi.w	#40,xoff
		bne.b	y_go
		clr.w	xoff
		move.w	#0,d7
		addi.w	#320,yoff
		cmpi.w	#8000,yoff
		bne.b	y_go
		clr.w	yoff
y_go:		move.w	xoff,d7
		add.w	yoff,d7
		add.l	offset,d7
		add.l	#apic,d7
		move.l	d7,a1
		move.l	d0,a0
 		moveq	#7,d3	;number of data
looper:		move.b	(a0)+,(a1)
		lea	40(a1),a1
		dbf	d3,looper
		dbf	d6,gotxt
		movem.l	a0-a6/d0-d7,-(a7)
		bsr.w	scrollback
		bsr.w	movestar
		bsr.w	scrollt
		movem.l	(a7)+,a0-a6/d0-d7
		dbf	d4,golp

		movem.l	(a7)+,a0-a6/d0-d7
		rts

***********************************************************

tst_chn:	; lea	mt_chan1temp,a1
		lea	spoint,a0
		moveq	#3,d1	;num of channels -1
gloop:		move.b	1(a1),d0
		tst.b	d0
		beq.b	nostovr
		move.w	#-1,(a0)
nostovr:	addq.w	#1,(a0)
		cmpi.w	#8,(a0)
		bne.b	not0
		move.w	#7,(a0)
not0:		move.w	(a0)+,(a0)+
		lea	44(a1),a1
		dbf	d1,gloop
		rts

***********************************************************
* stars use sprites

starst:		bsr.b	tst_chn
		lea	csprite,a4
		lea	spoint,a6
		lea	buffpt,a5
		moveq	#7,d7	;this is the number of sprites used -1
sprloop:	moveq	#0,d0
		move.w	(a6)+,d0
		lsl.l	#6,d0
		add.l	#str0,d0
		move.l	(a5),a1	;location of the start of data
		moveq	#$2c,d5	;start of sprites
		moveq	#7,d6	;num of v sprites in loop -1
	; randing stars
not1:		move.l	d0,a0

		move.b	$dff007,d1	;rand start height!
		andi.b	#$f,d1
		beq.b	not1
		add.b	d1,d5

		move.b	d5,(a1)+	;4 more

not2:		move.b	$dff007,d1
		and.b	$dff007,d1
		or.b	$dff007,d1
		and.b	$dff007,d1
		beq.b	not2
		move.b	d1,(a1)+

		addi.b	#$f,d5
		move.b	d5,(a1)+
		lea	1(a1),a1

	; coping that data into the sprite
		moveq	#14,d1	;num -1 of lines
scopylp:	move.l	(a0)+,(a1)+
		dbf	d1,scopylp
		dbf	d6,not1
	
	; put sprites in copper
		move.l	(a5)+,d0
copys:		move.w 	d0,6(a4)
		swap 	d0
		move.w 	d0,2(a4)
		lea	8(a4),a4
		dbf	d7,sprloop	
		rts

***********************************************************

str_rnd:	moveq	#0,d0
		move.w	(a6),d0
		lsl.w	#6,d0
		add.l	#str0,d0
		move.l	(a5),a1	;location of the start of data
		moveq	#$2c,d5	;start of sprites
		moveq	#7,d6	;num of v sprites in loop -1
xnot1:		move.l	d0,a0
		move.b	$dff007,d1	;rand start height!
		and.b	#$f,d1
		beq.b	xnot1
		add.b	d1,d5
		move.b	d5,(a1)+	;4 more
xnot2:		move.b	$dff007,d1
		and.b	$dff007,d1
		or.b	$dff007,d1
		beq.b	xnot2
		move.b	d1,(a1)+
		addi.b	#$f,d5
		move.b	d5,(a1)+
		lea	61(a1),a1
		dbf	d6,xnot1
		rts

***********************************************************
* stars use sprites

movestar:	bsr.w	tst_chn
		lea	csprite,a4
		lea	spoint,a6
		lea	buffpt,a5
		lea	speed,a3
***
		moveq	#7,d7	;this is the number of sprites used -1
	; get the actual data pointer
xsprloop:	moveq	#0,d0
		move.w	(a6)+,d0
		lsl.l	#6,d0
		add.l	#str0,d0
		moveq	#7,d6	;vloop!
		move.b	(a3)+,d2
		move.l	(a5),a1	;location of the start of data
xloop:		move.l	d0,a0
		move.w	(a1),d3
		add.b	d2,d3
		move.w	d3,(a1)
		lea	4(a1),a1
	; coping that data into the sprite
		moveq	#14,d1	;num -1 of lines
zscopylp:	move.l	(a0)+,(a1)+
		dbf	d1,zscopylp
		dbf	d6,xloop
	; put sprites in copper
		move.l	(a5)+,d0
zcopys:		move.w 	d0,6(a4)
		swap 	d0
		move.w 	d0,2(a4)
		lea	8(a4),a4
		dbf	d7,xsprloop
	;testing rnd factor
		lea	spoint,a6
		lea	buffpt,a5
		move.w	#8,numlp	;numtimes to loop - 1
rndlp:		cmpi.w	#7,(a6)	;
		bne.b	nornd
		bsr.w	str_rnd
nornd:		lea	2(a6),a6
		lea	4(a5),a5
		subq.w	#1,numlp
		bne.b	rndlp
		rts

scrollt:	movem.l	a0-a6/d0-d7,-(a7)
go_text:	moveq	#0,d0
		move.w	speed_,d7
		sub.w	d7,delay
		bgt.w	bl_shft
		move.w	#16,delay
		lea	textt,a0
		move.l	text_pnt,d1
		move.b	(a0,d1),d0
		bne.b	n_nwtxt.
		clr.l	text_pnt
		move.b	textt,d0
		moveq	#8,d1
n_nwtxt.:	addq.l	#1,text_pnt
		moveq	#$f,d1
no_loop:	cmp.w	d1,d0
		beq.b	cspeed
		dbf	d1,no_loop
		bra.b	n_chnge.
cspeed:		move.w	d1,speed_
		bra.b	go_text
n_chnge.:	sub.w	#32,d0		;subtract hex start
		lsl.w	#5,d0		;and get offset in the font
		add.l	#font16,d0		;now to locate in ram!

put_fnt:	WaitBlit
		move.l	#$ffffffff,$dff044;
		move.l	d0,$dff050	; a mask of logo
		move.l	#42+spic,$dff054	; d destination!
		move.l	#$0000002a,$dff064	; d <pl wdth bytes40>-(blt words1*2)
		move.l	#$09f00000,$dff040	; cookiecut
		move.w	#$0401,$dff058	; (height*64*bitplanes)+(words wide of blit!)

bl_shft:	WaitBlit
		move.l	#$ffff0000,$dff044
		move.l	#spic+2,$dff050
		move.l	#spic,$dff054
		move.l	#0,$dff064
		move.w	#0,$dff042
		eori.w	#$f,d7
		addq.w	#1,d7
		swap	d7
		ror.l	#4,d7
		ori.w	#$9f0,d7
		move.w	d7,$dff040
		move.w	#$0416,$dff058

	; copy data to real plane;!!!!
		WaitBlit
		move.w 	#$ffff,$dff046
		move.l	#spic+2,$dff050	; a obj
		move.l	#s_pic,$dff054	; d
		move.w	#4,$dff064	; a
		move.w	#$9f0,$dff040
		move.w	#$0414,$dff058
		movem.l	(a7)+,a0-a6/d0-d7
		rts

***********************************************************

TakeSystem:	movea.l	4.w,a6		; exec base
		lea	$dff002,a5	; custom chip base + 2

		lea	GraphicsName,a1	; "graphics.library"
		moveq	#0,d0		; any version
		CALL	OpenLibrary	; open it.
		move.l	d0,gfx_base	; save pointer to gfx base
		beq.b	.exit		; if we got a NULL, then exit
		move.l	d0,a6		; for later callls...

		move.l  gb_ActiView(a6),OldView	; save old view

		move.w	#0,a1		; clears full long-word
		CALL	LoadView	; Open a NULL view (resets display
					;   on any Amiga)

		CALL	WaitTOF		; Wait twice so that an interlace
		CALL	WaitTOF		;   display can reset.

		CALL	OwnBlitter	; take over the blitter and...
		CALL	WaitBlit	;   wait for it to finish so we
					;   safely use it as we please.

		movea.l	4.w,a6		; exec base
		CALL	Forbid		; kill multitasking

		cmpi.b	#50,VblankFrequency(a6)	; is vblank rate pal?
		beq.b	.pal		; yup.
		st	ntsc		; set NTSC flag.

.pal:		move.w	$7c-2(a5),d0	; AGA register...
		cmpi.b	#$f8,d0		; are we AGA?
		bne.b	.not_aga	; nope.
		move.w	#0,$dff1fc	; reset AGA sprites to normal mode

.not_aga:	bsr.w	GetVBR		; get the vector base pointer
		move.l	d0,VectorBase	; save it for later.

		move.w	dmaconr-2(a5),d0	; old DMACON bits
		ori.w	#$8000,d0	; or it set bit for restore
		move.w	d0,OldDMACon	; save it

		move.w	intenar-2(a5),d0	; old INTEna bits
		ori.w	#$c000,d0	; or it set bit for restore
		move.w	d0,OldINTEna	; save it

		move.l	#$7fff7fff,intena-2(a5)	; kill all ints
		move.w	#$7fff,dmacon-2(a5)	; kill all dma
.exit:		rts

***********************************************************

RestoreSystem:	lea	$dff002,a5	; custom chip base + 2

		tst.b	ntsc			; was it in NTSC?
		beq.b	.pal			; nope
		move.w	#0,$1dc-2(a5)		; put it back in NTSC!!!
.pal:
	; You must do these in this order or you're asking for trouble!
		move.l	#$7fff7fff,intena-2(a5)	; kill all ints
		move.w	#$7fff,dmacon-2(a5)	; kill all dma

		move.l	VectorBase,a0
		move.l	oldirq,$6c(a0)		; restore old level3 int.
		move.w	OldDMACon,dmacon-2(a5)	; restore old dma bits
		move.w	OldINTEna,intena-2(a5)	; restore old int bits

		move.l	OldView,a1	; old Work Bench view
		move.l	gfx_base,a6	; gfx base
		CALL	LoadView	; Restore the view
		CALL	DisOwnBlitter	; give blitter back to the system.

		move.l	gb_CopInit(a6),$80-2(a5) ; restore system clist
		move.l	a6,a1
		movea.l	4.w,a6		; exec base
		CALL	CloseLibrary

	; there is no call to Permit() because it is implied by the return
	; to AmigaDOS! :^)
		rts

***********************************************************
* This function provides a method of obtaining a pointer to the base of the
* interrupt vector table on all Amigas.  After getting this pointer, use
* the vector address as an offset.  For example, to install a level three
* interrupt you would do the following:
*
*		bsr	_GetVBR
*		move.l	d0,a0
*		move.l	$6c(a0),OldIntSave
*		move.l	#MyIntCode,$6c(a0)
*
***********************************************************
* Inputs: none
* Output: d0 contains vbr.

GetVBR:		move.l	a5,-(sp)		; save it.
		moveq	#0,d0			; clear
		movea.l	4.w,a6			; exec base
		btst.b	#AFB_68010,AttnFlags+1(a6); are we at least a 68010?
		beq.b	.1			; nope.
		lea.l	vbr_exception(pc),a5	; addr of function to get VBR
		CALL	Supervisor		; supervisor state
.1:		move.l	(sp)+,a5		; restore it.
		rts				; return

vbr_exception:
	; movec vbr,Xn is a priv. instr.  You must be supervisor to execute!
;		movec   vbr,d0
	; many assemblers don't know the VBR, if yours doesn't, then use this
	; line instead.
		dc.w	$4e7a,$0801
		rte				; back to user state code

***********************************************************

		section	sin,data

sine:	dc.w	$0001,$0001
	dc.w	$0001,$0002,$0003,$0004,$0005,$0006,$0008,$000a
	dc.w	$000c,$000e,$0010,$0013,$0016,$0019,$001c,$001f
	dc.w	$0023,$0026,$002a,$002e,$0032,$0036,$003b,$003f
	dc.w	$0044,$0048,$004d,$0052,$0058,$005d,$0062,$0068
	dc.w	$006d,$0073,$0079,$007f,$0084,$008a,$0090,$0097
	dc.w	$009d,$00a3,$00a9,$00af,$00b6,$00bc,$00c2,$00c8

	dc.w	$00c8,$00c2,$00bc,$00b5,$00af,$00a9,$00a3,$009d
	dc.w	$0097,$0092,$008d,$0088,$0083,$007e,$007a,$0076
	dc.w	$0073,$0070,$006d,$006b,$0069,$0067,$0066,$0065
	dc.w	$0065,$0065,$0065,$0066,$0067,$0069,$006b,$006d
	dc.w	$0070,$0073,$0076,$007a,$007e,$0083,$0088,$008d
	dc.w	$0092,$0097,$009d,$00a3,$00a9,$00af,$00b5,$00bc
	dc.w	$00c2,$00c8

	dc.w	$00c8,$00c5,$00c2,$00bf,$00bc,$00b9,$00b6,$00b3
	dc.w	$00b0,$00ad,$00ab,$00a8,$00a6,$00a3,$00a1,$009f
	dc.w	$009e,$009c,$009b,$009a,$0099,$0098,$0097,$0097
	dc.w	$0097,$0097,$0097,$0097,$0098,$0099,$009a,$009b
	dc.w	$009c,$009e,$009f,$00a1,$00a3,$00a6,$00a8,$00ab
	dc.w	$00ad,$00b0,$00b3,$00b6,$00b9,$00bc,$00bf,$00c2
	dc.w	$00c5,$00c8

	dc.w	$00c8,$00c7,$00c5,$00c4,$00c2,$00c1,$00bf,$00be
	dc.w	$00bc,$00bb,$00ba,$00b8,$00b7,$00b6,$00b5,$00b4
	dc.w	$00b3,$00b2,$00b2,$00b1,$00b1,$00b0,$00b0,$00b0
	dc.w	$00b0,$00b0,$00b0,$00b0,$00b0,$00b1,$00b1,$00b2
	dc.w	$00b2,$00b3,$00b4,$00b5,$00b6,$00b7,$00b8,$00ba
	dc.w	$00bb,$00bc,$00be,$00bf,$00c1,$00c2,$00c4,$00c5
	dc.w	$00c7,$00c8


backpt:	dc.w	0
back=	520

backsine:
	dc.w	$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dc.w	$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dc.w	$0000,$0000,$0000,$0001,$0001,$0001,$0001,$0001
	dc.w	$0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dc.w	$0001,$0001,$0001,$0001,$0001,$0002,$0002,$0002
	dc.w	$0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dc.w	$0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dc.w	$0002,$0003,$0003,$0003,$0003,$0003,$0003,$0003
	dc.w	$0003,$0003,$0003,$0003,$0003,$0003,$0003,$0003
	dc.w	$0003,$0003,$0003,$0003,$0003,$0003,$0003,$0004
	dc.w	$0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dc.w	$0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dc.w	$0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dc.w	$0004,$0004,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006

	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0007,$0007,$0007,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006,$0006,$0006,$0006,$0006
	dc.w	$0006,$0006,$0006,$0006

	dc.w	$0006,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0005,$0005,$0005,$0005,$0005,$0005,$0005,$0005
	dc.w	$0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dc.w	$0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dc.w	$0004,$0004,$0004,$0004,$0004,$0004,$0004,$0004
	dc.w	$0004,$0004,$0004,$0003,$0003,$0003,$0003,$0003
	dc.w	$0003,$0003,$0003,$0003,$0003,$0003,$0003,$0003
	dc.w	$0003,$0003,$0003,$0003,$0003,$0003,$0003,$0003
	dc.w	$0003,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dc.w	$0002,$0002,$0002,$0002,$0002,$0002,$0002,$0002
	dc.w	$0002,$0002,$0002,$0002,$0002,$0001,$0001,$0001
	dc.w	$0001,$0001,$0001,$0001,$0001,$0001,$0001,$0001
	dc.w	$0001,$0001,$0001,$0001,$0001,$0001,$0001,$0000
	dc.w	$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dc.w	$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
	dc.w	$0000,$0000

text_pnt:dc.l	0
speed_:	dc.w	2
delay:	dc.w	0

GraphicsName:	GRAFNAME		; name of gfx library
		EVEN

xoff:		dc.w	-1
speed:		;dc.b	1,0,2,0,1,0,2,0
		dc.b	0,0,0,0,0,0,0,0
spoint:		dc.w	0,0,0,0,0,0,0,0
buffpt:		dc.l	sbuff0,sbuff1,sbuff2,sbuff3,sbuff4,sbuff5,sbuff6,sbuff7

text:	;top line leave alone.. it will only half show...
	dc.b	'                                        ' 
	dc.b	'                                        ' 
	dc.b	'      this file was leech from the      '
	dc.b	'                                        '
	dc.b	' _ __  _  ____     _      ___  _ _  ___ '
	dc.b	'///_/\//\/___/\   /_\    /\__\/\\\\/\__\'
	dc.b	'\\\ \ \\ \ __\/   | |   / /_ / //// /__/'
	dc.b	' \\\ \ \\ \\ \    | |  / //// //// // \ '
	dc.b	'  \\\ \ \\ \\ \__ | | / //// ////\/_~~/ '
	dc.b	'   \~  \ \\ \\/ /\| |/ //// ////\~~\//  '
	dc.b	'    \   \/\\/\~~\/| |\/ ~/\/ ~/\/~~~/   '
	dc.b	'     ~~~~  ~  ~~~  ~  ~~~  ~~~  ~~~~    '
	dc.b	'             ( circle bbs )             '
	dc.b	'                                        '
	dc.b	'        -*- registered 2.20 -*-         '
	dc.b	' -*- a nightfall distrabution site  -*- '
	dc.b	'                                        '
	dc.b	'   sysop  - raistlin       hst"s only   '
	dc.b	'co-sysop  - dark angel     amiga only   '
	dc.b	'          - the ripper       0-day      '
	dc.b	'          - x /\ d        warez/counsel '
	dc.b	'                                        '
	dc.b	'            (1-813-799-4094)            '
	dc.b	'                                        '
	dc.b	'                         < left button >'
	;top line leave alone.. it will only half show...
	dc.b	'                                        ' 
	dc.b	'        _        _                      '
        dc.b	'  ___ /|_) _____/|\________________|\|\ ' 
        dc.b	' /   | |_ /  _________   __/___/ _ | | |'  
        dc.b	'/  \   | |  (_/  _  \/  ||  _// _  | | |'
        dc.b	'\_ |\__|_|\_  \__|__/\_ || | / _/|_|_|_|'
        dc.b	'==\|========|__|=======\||/==\/present=='
	dc.b	'                                      mb'
	dc.b	'                                        '
	dc.b	'           proudly  presents            '
	dc.b	'                                        '
	dc.b	'               xxxxxxx                  '
	dc.b	'                                        '
	dc.b	'          released  10-xx-92            '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                         < left button >'

	;top line leave alone.. it will only half show...
	dc.b	'                                        ' 
	dc.b	'        _        _                      ' 
        dc.b	'  ___ /|_) _____/|\________________|\|\ ' 
        dc.b	' /   | |_ /  _________   __/___/ _ | | |'  
        dc.b	'/  \   | |  (_/  _  \/  ||  _// _  | | |'
        dc.b	'\_ |\__|_|\_  \__|__/\_ || | / _/|_|_|_|'
        dc.b	'==\|== =====|__|=======\||/==\/present=='
	dc.b	'                                      mb'
	dc.b	'          -*-  member list -*-          '
	dc.b    '                                        '
	dc.b	'  booger ---------> coder               '
	dc.b	'  x/\d -----------> modem trader        '
	dc.b	'  the riper ------> another trader      '
	dc.b	'                                        '
	dc.b	'            -*- bbs list -*-            '
	dc.b	'                                        '
	dc.b	' vicious circle -- uhq - +1-813-7994094 '
	dc.b	' buried treasure - uhq - +1-813-5354253 '
	dc.b	' mental hospital - ihq - +39-11-6601590 '
	dc.b	' madness confusion     - +39-2-48401439 '
	dc.b	' hidden power ---- whq - ++39-40-350660 '
	dc.b	' gambler --------- ihq - ++39-40-630998 '
	dc.b	' empire of power - ihq - ++39-40-569973 '
	dc.b	' futura ---------- ihq - ++39-40-350580 '
	dc.b	'                         < left button >'

	;top line leave alone.. it will only half show...
	dc.b	'                                        ' 
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'      both buttons to exit...           '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                                        '
	dc.b	'                         < left button >'

	dc.b	0	; this signals the end...
	even


textt:	DC.B	3,'ONCE AGAIN THIS IS IT....  '
	DC.B	5,'BY NOW YOU ARE SEEING THE PLIGHT OF A PROGRAMER    '
	DC.B	4,' JUST WHEN YOU THINK YOU ARE FINISHED.....  '
	DC.B	5,' BAM!  YOU END UP TOUCHING UP THE PROGRAM EVEN MORE!! '
	DC.B	7,' THE TEXT IS IN SECTIONS OF 25 BY 40..   '
	DC.B	2,' YOU CAN ADD MORE SCREENS JUST REMBER TO MAKE IT 25 BY 40'
	DC.B	1,' SPEED 1......   '
	DC.B	2,' SPEED 2......   '
	DC.B	3,' SPEED 3......   '
	DC.B	4,' SPEED 4......   '
	DC.B	5,' SPEED 5......   '
	DC.B	6,' SPEED 6......   '
	DC.B	7,' SPEED 7......   '
	DC.B	8,' SPEED 8......   '
	DC.B	9,' SPEED 9......   '
	DC.B	10,' SPEED A......   '
	DC.B	11,' SPEED B......   '
	DC.B	12,' SPEED C......   '
	DC.B	13,' SPEED D......   '
	DC.B	14,' SPEED E......   '
	DC.B	15,' SPEED F......   '
	even

***********************************************************

		section	copper,data_c
copa:
csprite:dc.l $01200000,$01220000,$01240000,$01260000,$01280000,$012a0000
	dc.l $012c0000,$012e0000,$01300000,$01320000,$01340000,$01360000 
	dc.l $01380000,$013a0000,$013c0000,$013e0000
c17:	dc.l $01a20444,$01a40888,$01a60fff,$01aa0400,$01ac0800,$01ae0f00
c25:	dc.l $01b20040,$01b40080,$01b600f0,$01ba0044,$01bc0088,$01be00ff
	dc.l $008e2c81,$00902cc1,$00920038,$009400d0,$00968020
	dc.l $01020000,$01040024,$01080000,$010a0028,$01004400
	dc.l $0180000e
amap:	dc.l $00e00000,$00e20000,$00e80000,$00ea0000,$01040024
bmap:	dc.l $00e40000,$00e60000,$00ec0000,$00ee0000
	dc.l $0192000e,$0194000e,$0196000e
	dc.l $0182000e,$0184000e,$0186000e
	dc.l $3501fffe,$01920aaa,$01940444,$01960fff
	dc.l 	       $01820000,$01840ff8,$01860ff0

	dc.l $3c01fffe,$0180000d,$01920aaa,$01940444,$01960eee
	dc.l $4c01fffe,$0180000c,$01920999,$01940444,$01960ddd
	dc.l $5c01fffe,$0180000b,$01920888,$01940333,$01960ccc
	dc.l $6c01fffe,$01800009,$01920777,$01940333,$01960bbb
	dc.l $7c01fffe,$01800008,$01920666,$01940222,$01960aaa
	dc.l $8c01fffe,$01800007,$01920555,$01940222,$01960999
	dc.l $9001fffe
dmap:	dc.l $00e40000,$00e60000,$00ec0000,$00ee0000
	dc.l $9c01fffe,$01800006,$01920444,$01940111,$01960888
	dc.l $ac01fffe,$01800005,$01920333,$01940111,$01960777
	dc.l $bc01fffe,$01800004,$01920222,$01940000,$01960666
	dc.l $cc01fffe,$01800003,$01920111,$01940000,$01960666
	dc.l $dc01fffe,$01800002,$01920000,$01940000,$01960555
	dc.l $ec01fffe,$01800001,$01920000,$01940000,$01960555
	dc.l $f301fffe,$01040064,$01920000,$01940000,$01960444
	dc.l $01840000,$01860000
	dc.l $f401fffe
cmap:	dc.l $00e40000,$00e60000,$00ec0000,$00ee0000
	dc.l $ff01fffe,$00960020,$01440000,$01400000	;turn off sprite shit...
	dc.l $01820fff,$01840000,$01860fff
smap:	dc.l $00e00000,$00e20000,$00e80000,$00ea0000,$01040024
	dc.l $01820000,$01840ff8,$01860ff0
	dc.l $fffffffe

	incdir	''
buffer:	ds.b	8000
bpic:	incbin	"bt_disk1:demo_03/bt-3-background.raw"
	ds.b	8000

str0:	incbin	"bt_disk1:demo_03/bt-3-stars.raw"
font8:	incbin	"bt_disk1:demo_03/bt-3-font8"
font16:	incbin	"bt_disk1:demo_03/bt-3-font16"

***********************************************************

		section	ack,bss

scormv:		ds.w	1
up_down:	ds.w	1
soff:		ds.w	1
sup:		ds.w	1
soff1:		ds.w	1
yoff:		ds.w	1
offset:		ds.l	1

txt_pnt:	ds.l	1
numlp:		ds.w	1
oldirq:		ds.l	1	;reserve place for oldinterrupt pointer

gfx_base	ds.l	1		; pointer to graphics base
OldView		ds.l    1		; old Work Bench view addr.
VectorBase:	ds.l	1		; pointer to the Vector Base

OldDMACon:	ds.w	1		; old dmacon bits
OldINTEna:	ds.w	1		; old intena bits

ntsc:		ds.b	1		; 0 = pal, 1 = ntsc

***********************************************************

		section	bss,bss_c

spic:		ds.b	800
s_pic:		ds.b	9000

		ds.b	1000
apic:		ds.b	16000

sbuff0:		ds.l	130
sbuff1:		ds.l	130
sbuff2:		ds.l	130
sbuff3:		ds.l	130
sbuff4:		ds.l	130
sbuff5:		ds.l	130
sbuff6:		ds.l	130
sbuff7:		ds.l	130
