>EXTERN 'RhtProject.bpl',logodata

bitmapsodd=$42000				;-$4b000
bitmapseven=$4b000				;-$54000
logodata=$54000
mt_data=$5c000

org $40000
load $40000

start:
cmp.b	#$f0,$dff006
bne	start

bsr	settings
bsr	loadmusic
bsr	colorchange
bsr	mt_init
bsr	makeinterrupt
bsr	starcolors

* * * * * * * * * * * * * * * * * *
mainloop:
cmp.b	#$40,$dff006
bne	mainloop


btst	#6,$bfe001
bne	mainloop

bsr	reminterrupt
bsr	Endit
bsr	mt_end
rts

* * * * * * * * * * * * * * * * * *
*          Aliohjelmat            *
* * * * * * * * * * * * * * * * * *
colorchange:
lea	dispcolors(pc),a0
moveq	#8,d6
ccloop1:
move.l	#$dff192,a1
moveq	#50,d7
waittof1:
cmp.b	#$f0,$dff006
bne	waittof1
dbf	d7,waittof1
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
dbf	d6,ccloop1
bsr	cleanbpl
moveq	#7,d6
ccloop2:
moveq	#50,d7
waittof2:
cmp.b	#$f0,$dff006
bne	waittof2
dbf	d7,waittof2
move.w	(a0)+,$dff180
dbf	d6,ccloop2
rts

dispcolors:
dc.w	$000,$800,$0b0,$00e,$dc0,$d80,$80b
dc.w	$001,$701,$0a1,$00d,$cc1,$c71,$70a
dc.w	$002,$602,$082,$00c,$aa2,$a62,$60a
dc.w	$003,$503,$073,$00c,$883,$853,$509
dc.w	$004,$404,$064,$00b,$664,$644,$409
dc.w	$005,$305,$045,$00a,$445,$435,$309
dc.w	$006,$206,$026,$009,$226,$226,$209
dc.w	$007,$107,$017,$008,$117,$117,$108
dc.w	$008,$008,$008,$008,$008,$008,$008
dc.w	$007,$006,$005,$004,$003,$002,$001,$000

starcolors:
lea	starcoltable(pc),a0
moveq	#9,d6
ccloop3:
move.l	#$dff192,a1
moveq	#70,d7
waittof3:
cmp.b	#$f0,$dff006
bne	waittof3
dbf	d7,waittof3
move.w	(a0)+,$dff182
move.w	(a0)+,$dff184
move.w	(a0)+,$dff188
dbf	d6,ccloop3
rts

starcoltable:
dc.w	$001,$001,$001,$011,$111,$112
dc.w	$112,$112,$223,$222,$223,$334
dc.w	$223,$224,$445,$333,$335,$556
dc.w	$334,$446,$667,$444,$556,$778
dc.w	$455,$667,$89a,$556,$778,$aab

loadmusic:
move.l	4,a6			;Execbase
lea	dosname(pc),a1		;library name
moveq	#0,d0			;any version
jsr	-$228(a6)		;open Dos library
move.l	d0,dosbase		;save Dos lib address

move.l	d0,a6			;Dos address to a6
lea	musicname(pc),a0	;name of the song
move.l	a0,d1			;song name pointer to d1
move.l	#1005,d2		;allready existing file
jsr	-$1e(a6)		;Open file
move.l	d0,d1			;file structure pointer to d1
move.l	d0,d6			;also to d6
move.l	#mt_data,d2		;buffer start
move.l	#112718,d3		;file lenght
jsr	-$2a(a6)		;Read file

move.l	d6,d1			;file structure pointer to d1
jsr	-$24(a6)		;Close file

move.l	4,a6			;Exec address to a6
move.l	dosbase,a1		;Dos lib address to a1
jsr	-$19e(a6)		;Close Dos library
rts				;exit

dosbase:
dc.l	0
dosname:
dc.b	'dos.library',0
musicname:
dc.b	'df0:modules/mod.seanight',0
even

makeinterrupt:
move.l	4,a6			;Exec address to a6
lea	Istructure(pc),a1	;pointer to Int structure
moveq	#5,d0			;Vertical blanking Interrupt
jsr	-$a8(a6)		;Add Int Server
rts	

reminterrupt:
move.l	4,a6			;Exec address to a6
lea	Istructure(pc),a1	;pointer to Int structure
moveq	#5,d0			;VertB Interrupt
jsr	-$ae(a6)		;Rem Int Server
rts

Istructure:	
dc.l	0,0
dc.b	2,0
dc.l	Iname
dc.l	0
dc.l	introutine

Iname:
dc.b	'oma keskeytys',0


introutine:
movem.l	d0-d7/a0-a6,-(a7)	;save multiple registers
bsr	stars			;great
bsr	mt_music		;play music
movem.l	(a7)+,d0-d7/a0-a6	;replace multiple registers
moveq	#1,d0			;interrupt handled
rts

stars:
lea	staraddr(pc),a2		
lea 	starxcoord(pc),a3
moveq	#2,d2			;speed
starmainloop:
moveq	#23,d7			;number of stars/bitplane -1
starloop:	
moveq	#0,d0			
move.w	(a3),d0			;take stars x coord
move.b	d0,d1			;also to d1
andi.w	#$fff8,d0		;make it divable with 8
divu	#8,d0			;divide it
add.l	(a2)+,d0		;add stars line address
move.l	d0,a0			;move the result to a0			
clr.b	-1(a0)			;clear star
clr.b	(a0)
eori.b	#$7,d1			;wow ?! Turn the bits over
bset	d1,(a0)			;light the star
add.w	d2,(a3)			;increase x-coord 
cmp.w	#384,(a3)		;screen widht
blo	star_ok			;if lower then no coord reset
clr.w	(a3)			;reset stars x-coord
star_ok:
add.w	#2,a3			;next star
dbf	d7,starloop		
add.b	#1,d2			;increase speed for next bitplane
cmp.b	#5,d2			;is it the last bitplane ???
bne	starmainloop		;if not then another loop
rts				;exit


staraddr:
dc.l	$42000,$42150,$423c0,$42510,$427b0,$42990,$42ae0,$42d80
dc.l	$42e40,$431d0,$43500,$43620,$436e0,$439b0,$43d10,$43f80	
dc.l	$44100,$44250,$444f0,$445e0,$446d0,$44970,$44be0,$44c70
dc.l	$45090,$45240,$45450,$45510,$45630,$45930,$45c90,$45f60
dc.l	$46050,$46320,$463e0,$464a0,$46680,$467a0,$469b0,$46d10
dc.l	$46fe0,$471f0,$473d0,$476a0,$479d0,$47e20,$47ee0,$47fa0
dc.l	$48030,$481b0,$48270,$484b0,$48690,$48870,$48ae0,$48d20
dc.l	$48f60,$49020,$49050,$49350,$49560,$49830,$499e0,$49bc0
dc.l	$49cb0,$4a010,$4a190,$4a340,$4a430,$4a550,$4a5b0,$4a820

starxcoord:
dc.w	080,012,290,177,089,333,001,225
dc.w	033,327,124,375,104,346,227,229
dc.w	072,048,198,133,065,149,248,095	
dc.w	227,230,300,345,353,123,167,046
dc.w	026,139,207,204,017,118,071,288
dc.w	198,179,113,232,358,240,194,229
dc.w	107,295,297,007,031,137,366,287
dc.w	166,065,298,351,076,044,322,200
dc.w	367,196,378,073,235,334,137,292

settings:
bsr	takecopperadd
bsr	cleanbpl
lea	coplist(pc),a0			;Clist address
move.l	a0,$dff080			;install own clist
move.w	$dff088,d0			;force to use it
move.w	#$0020,$dff096			;DMA ctrl reg -sprite DMA off
move.w	#$85d0,$dff096			
clr.w	$dff142				;clear 1. sprite reg
bsr	setbitmap
bsr	copylogo
bsr	setcolors
rts

Endit:
bsr	cleanbpl
move.l	coppersailo,$dff080		;install original clist
move.w	#$8020,$dff096			;DMA ctrl reg -Sprite DMA on
bclr	#1,$bfe001			;power light ON
clr.l	d0				
clr.l	d1
rts

copylogo:
move.l	#logodata,$dff050
move.l	#bitmapseven+2410,a0
move.l	#$ffffffff,$dff044
move.l	#$a9f00000,$dff040
move.w	#10,$dff064
move.w	#18,$dff066
move.l	a0,$dff054
move.w	#$17cf,$dff058
add.l	#$3000,a0
move.l	a0,$dff054
move.w	#$17cf,$dff058
add.l	#$3000,a0
move.l	a0,$dff054
move.w	#$17cf,$dff058
rts


setcolors:
lea	logocolors(pc),a0
move.l	#$dff192,a1
move.w	#$008,$dff180
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0)+,(a1)+
move.w	(a0),(a1)
rts
logocolors:
dc.w	$000,$900,$0e0,$00f,$ec0,$e80,$90b

cleanbpl:
move.l	#bitmapsodd,a1
move.l	#18432,d7
cleanloop:
clr.l	(a1)+
dbf	d7,cleanloop
rts

takecopperadd:
lea	gfxname(pc),a1			
move.l	4,a6				;Exec lib address
jsr	-552(a6)			;open gfx lib
move.l	d0,a1				;gfx lib address to a0
move.l	$26(a1),coppersailo		;take orig clist addr.     
jsr	-414(a6)			;close gfx lib
rts
coppersailo:
dc.l	0
gfxname:
dc.b	'graphics.library',0
even

setbitmap:
move.w	#$2c70,$dff08e				;DIWSTRT
move.w	#$2cc6,$dff090				;DIWSTOP
move.w	#$0020,$dff092				;Data fetch start
move.w	#$00d8,$dff094				;Data fetch stop
move.w	#$0000,$dff108				;Modulo odd
move.w	#$0000,$dff10a				;Modulo even
clr.w	$dff182					;BPlane colors
clr.w	$dff184
clr.w	$dff188
rts


coplist:
dc.w	$0100,$6400			;bpl ctrl reg
dc.w	$00e0,$0004,$00e2,$2000		;bpl pointers odd
dc.w	$00e8,$0004,$00ea,$5000
dc.w	$00f0,$0004,$00f2,$8000
dc.w	$00e4,$0004,$00e6,$b000		 ;bpl pointers even
dc.w	$00ec,$0004,$00ee,$e000
dc.w	$00f4,$0005,$00f6,$1000
dc.w	$ffff,$fffe



;ญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญ
;ญ   NoisetrackerV1.0 replayroutine   ญ
;ญ Mahoney & Kaktus - HALLONSOFT 1989 ญ
;ญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญญ


mt_init:lea	mt_data,a0
	move.l	a0,a1
	add.l	#$3b8,a1
	moveq	#$7f,d0
	moveq	#0,d1
mt_loop:move.l	d1,d2
	subq.w	#1,d0
mt_lop2:move.b	(a1)+,d1
	cmp.b	d2,d1
	bgt.s	mt_loop
	dbf	d0,mt_lop2
	addq.b	#1,d2

	lea	mt_samplestarts(pc),a1
	asl.l	#8,d2
	asl.l	#2,d2
	add.l	#$43c,d2
	add.l	a0,d2
	move.l	d2,a2
	moveq	#$1e,d0
mt_lop3:clr.l	(a2)
	move.l	a2,(a1)+
	moveq	#0,d1
	move.w	42(a0),d1
	asl.l	#1,d1
	add.l	d1,a2
	add.l	#$1e,a0
	dbf	d0,mt_lop3

	or.b	#$2,$bfe001
	move.b	#$6,mt_speed
	clr.w	$dff0a8
	clr.w	$dff0b8
	clr.w	$dff0c8
	clr.w	$dff0d8
	clr.b	mt_songpos
	clr.b	mt_counter
	clr.w	mt_pattpos
	rts

mt_end:	clr.w	$dff0a8
	clr.w	$dff0b8
	clr.w	$dff0c8
	clr.w	$dff0d8
	move.w	#$f,$dff096
	rts

mt_music:
	movem.l	d0-d4/a0-a6,-(a7)
	lea	mt_data,a0
	addq.b	#$1,mt_counter
	move.b	mt_counter,D0
	cmp.b	mt_speed,D0
	blt.s	mt_nonew
	clr.b	mt_counter
	bra	mt_getnew

mt_nonew:
	lea	mt_voice1(pc),a6
	lea	$dff0a0,a5
	bsr	mt_checkcom
	lea	mt_voice2(pc),a6
	lea	$dff0b0,a5
	bsr	mt_checkcom
	lea	mt_voice3(pc),a6
	lea	$dff0c0,a5
	bsr	mt_checkcom
	lea	mt_voice4(pc),a6
	lea	$dff0d0,a5
	bsr	mt_checkcom
	bra	mt_endr

mt_arpeggio:
	moveq	#0,d0
	move.b	mt_counter,d0
	divs	#$3,d0
	swap	d0
	cmp.w	#$0,d0
	beq.s	mt_arp2
	cmp.w	#$2,d0
	beq.s	mt_arp1

	moveq	#0,d0
	move.b	$3(a6),d0
	lsr.b	#4,d0
	bra.s	mt_arp3
mt_arp1:moveq	#0,d0
	move.b	$3(a6),d0
	and.b	#$f,d0
	bra.s	mt_arp3
mt_arp2:move.w	$10(a6),d2
	bra.s	mt_arp4
mt_arp3:asl.w	#1,d0
	moveq	#0,d1
	move.w	$10(a6),d1
	lea	mt_periods(pc),a0
	moveq	#$24,d7
mt_arploop:
	move.w	(a0,d0.w),d2
	cmp.w	(a0),d1
	bge.s	mt_arp4
	addq.l	#2,a0
	dbf	d7,mt_arploop
	rts
mt_arp4:move.w	d2,$6(a5)
	rts

mt_getnew:
	lea	mt_data,a0
	move.l	a0,a3
	move.l	a0,a2
	add.l	#$c,a3
	add.l	#$3b8,a2
	add.l	#$43c,a0

	moveq	#0,d0
	move.l	d0,d1
	move.b	mt_songpos,d0
	move.b	(a2,d0.w),d1
	asl.l	#8,d1
	asl.l	#2,d1
	add.w	mt_pattpos,d1
	clr.w	mt_dmacon

	lea	$dff0a0,a5
	lea	mt_voice1(pc),a6
	bsr.s	mt_playvoice
	lea	$dff0b0,a5
	lea	mt_voice2(pc),a6
	bsr.s	mt_playvoice
	lea	$dff0c0,a5
	lea	mt_voice3(pc),a6
	bsr.s	mt_playvoice
	lea	$dff0d0,a5
	lea	mt_voice4(pc),a6
	bsr.s	mt_playvoice
	bra	mt_setdma

mt_playvoice:
	move.l	(a0,d1.l),(a6)
	addq.l	#4,d1
	moveq	#0,d2
	move.b	$2(a6),d2
	and.b	#$f0,d2
	lsr.b	#4,d2
	move.b	(a6),d0
	and.b	#$f0,d0
	or.b	d0,d2
	tst.b	d2
	beq.s	mt_setregs
	moveq	#0,d3
	lea	mt_samplestarts(pc),a1
	move.l	d2,d4
	subq.l	#$1,d2
	asl.l	#2,d2
	mulu	#$1e,d4
	move.l	(a1,d2.l),$4(a6)
	move.w	(a3,d4.l),$8(a6)
	move.w	$2(a3,d4.l),$12(a6)
	move.w	$4(a3,d4.l),d3
	tst.w	d3
	beq.s	mt_noloop
	move.l	$4(a6),d2
	asl.w	#1,d3
	add.l	d3,d2
	move.l	d2,$a(a6)
	move.w	$4(a3,d4.l),d0
	add.w	$6(a3,d4.l),d0
	move.w	d0,8(a6)
	move.w	$6(a3,d4.l),$e(a6)
	move.w	$12(a6),$8(a5)
	bra.s	mt_setregs
mt_noloop:
	move.l	$4(a6),d2
	add.l	d3,d2
	move.l	d2,$a(a6)
	move.w	$6(a3,d4.l),$e(a6)
	move.w	$12(a6),$8(a5)
mt_setregs:
	move.w	(a6),d0
	and.w	#$fff,d0
	beq	mt_checkcom2
	move.b	$2(a6),d0
	and.b	#$F,d0
	cmp.b	#$3,d0
	bne.s	mt_setperiod
	bsr	mt_setmyport
	bra	mt_checkcom2
mt_setperiod:
	move.w	(a6),$10(a6)
	and.w	#$fff,$10(a6)
	move.w	$14(a6),d0
	move.w	d0,$dff096
	clr.b	$1b(a6)

	move.l	$4(a6),(a5)
	move.w	$8(a6),$4(a5)
	move.w	$10(a6),d0
	and.w	#$fff,d0
	move.w	d0,$6(a5)
	move.w	$14(a6),d0
	or.w	d0,mt_dmacon
	bra	mt_checkcom2

mt_setdma:
	move.w	#$12c,d0
mt_wait:dbf	d0,mt_wait
	move.w	mt_dmacon,d0
	or.w	#$8000,d0
	move.w	d0,$dff096
	move.w	#$12c,d0
mt_wai2:dbf	d0,mt_wai2
	lea	$dff000,a5
	lea	mt_voice4(pc),a6
	move.l	$a(a6),$d0(a5)
	move.w	$e(a6),$d4(a5)
	lea	mt_voice3(pc),a6
	move.l	$a(a6),$c0(a5)
	move.w	$e(a6),$c4(a5)
	lea	mt_voice2(pc),a6
	move.l	$a(a6),$b0(a5)
	move.w	$e(a6),$b4(a5)
	lea	mt_voice1(pc),a6
	move.l	$a(a6),$a0(a5)
	move.w	$e(a6),$a4(a5)

	add.w	#$10,mt_pattpos
	cmp.w	#$400,mt_pattpos
	bne.s	mt_endr
mt_nex:	clr.w	mt_pattpos
	clr.b	mt_break
	addq.b	#1,mt_songpos
	and.b	#$7f,mt_songpos
	move.b	mt_songpos,d1
	cmp.b	mt_data+$3b6,d1
	bne.s	mt_endr
	clr.b	mt_songpos
mt_endr:tst.b	mt_break
	bne.s	mt_nex
	movem.l	(a7)+,d0-d4/a0-a6
	rts

mt_setmyport:
	move.w	(a6),d2
	and.w	#$fff,d2
	move.w	d2,$18(a6)
	move.w	$10(a6),d0
	clr.b	$16(a6)
	cmp.w	d0,d2
	beq.s	mt_clrport
	bge.s	mt_rt
	move.b	#$1,$16(a6)
	rts
mt_clrport:
	clr.w	$18(a6)
mt_rt:	rts

mt_myport:
	move.b	$3(a6),d0
	beq.s	mt_myslide
	move.b	d0,$17(a6)
	clr.b	$3(a6)
mt_myslide:
	tst.w	$18(a6)
	beq.s	mt_rt
	moveq	#0,d0
	move.b	$17(a6),d0
	tst.b	$16(a6)
	bne.s	mt_mysub
	add.w	d0,$10(a6)
	move.w	$18(a6),d0
	cmp.w	$10(a6),d0
	bgt.s	mt_myok
	move.w	$18(a6),$10(a6)
	clr.w	$18(a6)
mt_myok:move.w	$10(a6),$6(a5)
	rts
mt_mysub:
	sub.w	d0,$10(a6)
	move.w	$18(a6),d0
	cmp.w	$10(a6),d0
	blt.s	mt_myok
	move.w	$18(a6),$10(a6)
	clr.w	$18(a6)
	move.w	$10(a6),$6(a5)
	rts

mt_vib:	move.b	$3(a6),d0
	beq.s	mt_vi
	move.b	d0,$1a(a6)

mt_vi:	move.b	$1b(a6),d0
	lea	mt_sin(pc),a4
	lsr.w	#$2,d0
	and.w	#$1f,d0
	moveq	#0,d2
	move.b	(a4,d0.w),d2
	move.b	$1a(a6),d0
	and.w	#$f,d0
	mulu	d0,d2
	lsr.w	#$6,d2
	move.w	$10(a6),d0
	tst.b	$1b(a6)
	bmi.s	mt_vibmin
	add.w	d2,d0
	bra.s	mt_vib2
mt_vibmin:
	sub.w	d2,d0
mt_vib2:move.w	d0,$6(a5)
	move.b	$1a(a6),d0
	lsr.w	#$2,d0
	and.w	#$3c,d0
	add.b	d0,$1b(a6)
	rts

mt_nop:	move.w	$10(a6),$6(a5)
	rts

mt_checkcom:
	move.w	$2(a6),d0
	and.w	#$fff,d0
	beq.s	mt_nop
	move.b	$2(a6),d0
	and.b	#$f,d0
	tst.b	d0
	beq	mt_arpeggio
	cmp.b	#$1,d0
	beq.s	mt_portup
	cmp.b	#$2,d0
	beq	mt_portdown
	cmp.b	#$3,d0
	beq	mt_myport
	cmp.b	#$4,d0
	beq	mt_vib
	move.w	$10(a6),$6(a5)
	cmp.b	#$a,d0
	beq.s	mt_volslide
	rts

mt_volslide:
	moveq	#0,d0
	move.b	$3(a6),d0
	lsr.b	#4,d0
	tst.b	d0
	beq.s	mt_voldown
	add.w	d0,$12(a6)
	cmp.w	#$40,$12(a6)
	bmi.s	mt_vol2
	move.w	#$40,$12(a6)
mt_vol2:move.w	$12(a6),$8(a5)
	rts

mt_voldown:
	moveq	#0,d0
	move.b	$3(a6),d0
	and.b	#$f,d0
	sub.w	d0,$12(a6)
	bpl.s	mt_vol3
	clr.w	$12(a6)
mt_vol3:move.w	$12(a6),$8(a5)
	rts

mt_portup:
	moveq	#0,d0
	move.b	$3(a6),d0
	sub.w	d0,$10(a6)
	move.w	$10(a6),d0
	and.w	#$fff,d0
	cmp.w	#$71,d0
	bpl.s	mt_por2
	and.w	#$f000,$10(a6)
	or.w	#$71,$10(a6)
mt_por2:move.w	$10(a6),d0
	and.w	#$fff,d0
	move.w	d0,$6(a5)
	rts

mt_portdown:
	clr.w	d0
	move.b	$3(a6),d0
	add.w	d0,$10(a6)
	move.w	$10(a6),d0
	and.w	#$fff,d0
	cmp.w	#$358,d0
	bmi.s	mt_por3
	and.w	#$f000,$10(a6)
	or.w	#$358,$10(a6)
mt_por3:move.w	$10(a6),d0
	and.w	#$fff,d0
	move.w	d0,$6(a5)
	rts

mt_checkcom2:
	move.b	$2(a6),d0
	and.b	#$f,d0
	cmp.b	#$e,d0
	beq.s	mt_setfilt
	cmp.b	#$d,d0
	beq.s	mt_pattbreak
	cmp.b	#$b,d0
	beq.s	mt_posjmp
	cmp.b	#$c,d0
	beq.s	mt_setvol
	cmp.b	#$f,d0
	beq.s	mt_setspeed
	rts

mt_setfilt:
	move.b	$3(a6),d0
	and.b	#$1,d0
	asl.b	#$1,d0
	and.b	#$fd,$bfe001
	or.b	d0,$bfe001
	rts
mt_pattbreak:
	not.b	mt_break
	rts
mt_posjmp:
	move.b	$3(a6),d0
	subq.b	#$1,d0
	move.b	d0,mt_songpos
	not.b	mt_break
	rts
mt_setvol:
	cmp.b	#$40,$3(a6)
	ble.s	mt_vol4
	move.b	#$40,$3(a6)
mt_vol4:move.b	$3(a6),$8(a5)
	rts
mt_setspeed:
	move.b	$3(a6),d0
	and.w	#$1f,d0
	beq.s	mt_rts2
	clr.b	mt_counter
	move.b	d0,mt_speed
mt_rts2:rts

mt_sin:
dc.b $00,$18,$31,$4a,$61,$78,$8d,$a1,$b4,$c5,$d4,$e0,$eb,$f4,$fa,$fd
dc.b $ff,$fd,$fa,$f4,$eb,$e0,$d4,$c5,$b4,$a1,$8d,$78,$61,$4a,$31,$18

mt_periods:
dc.w $0358,$0328,$02fa,$02d0,$02a6,$0280,$025c,$023a,$021a,$01fc,$01e0
dc.w $01c5,$01ac,$0194,$017d,$0168,$0153,$0140,$012e,$011d,$010d,$00fe
dc.w $00f0,$00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097,$008f,$0087
dc.w $007f,$0078,$0071,$0000,$0000

mt_speed:	dc.b	$6
mt_songpos:	dc.b	$0
mt_pattpos:	dc.w	$0
mt_counter:	dc.b	$0

mt_break:	dc.b	$0
mt_dmacon:	dc.w	$0
mt_samplestarts:blk.l	$1f,0
mt_voice1:	blk.w	10,0
		dc.w	$1
		blk.w	3,0
mt_voice2:	blk.w	10,0
		dc.w	$2
		blk.w	3,0
mt_voice3:	blk.w	10,0
		dc.w	$4
		blk.w	3,0
mt_voice4:	blk.w	10,0
		dc.w	$8
		blk.w	3,0
