home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d930
/
quadracomp.lha
/
QuadraComp
/
QCReplay.s
< prev
next >
Wrap
Text File
|
1993-10-07
|
22KB
|
1,136 lines
* This replayroutine was written by Bo Lincoln (Eternal).
* Copyright © 1993 Technological Artwork. All rights reserved.
* You may use this routine in your programs.
* This is the normal routine.
* Worst case is about 20(?) rasterlines.
* How to use: Call QC_init to init the mod.
* Call QC_music every vertical blank.
* Call QC_end to stop.
* The EMOD should be at QC_data.
* You can not use Tempo in this routine.
QC_dmawait = 6 ;How many rasterrows it waits for dma
;(2 times).
section QC,code_c
s: move.w $dff01c,-(sp)
move.w #$7fff,$dff09a
bsr QC_init
.loop: bsr QC_music
.loop2: cmp.b #70,$dff006
bne .loop2
.loop3: cmp.b #70,$dff006
beq .loop3
btst #6,$bfe001
bne .loop
bsr QC_end
move.w (sp)+,d0
or.w #$8000,d0
move.w d0,$dff09a
rts
QC_init:lea QC_data(pc),a0 ;Check if the module is ok
cmp.l #"FORM",(a0)
bne QC_initerr
cmp.l #"EMOD",8(a0)
bne QC_initerr
cmp.l #"EMIC",12(a0)
bne QC_initerr
cmp.w #1,20(a0)
bne QC_initerr
or.b #$2,$bfe001
moveq #0,d7 ;Get the adresses to the sampleinfos
move.b 63(a0),d7 ;and init the real adresses in the infos
subq #1,d7
lea 64(a0),a0
lea QC_samplepointers(pc),a1
QC_sploop:moveq #0,d0
move.b (a0),d0
add.w d0,d0
add.w d0,d0
move.l a0,(a1,d0.w)
add.l #QC_data,30(a0)
move.l 30(a0),a2
clr.w (a2)
lea 34(a0),a0
dbf d7,QC_sploop
lea QC_patternpointers(pc),a1 ;Get the patternadresses
moveq #0,d7
addq #1,a0
move.b (a0)+,d7
subq #1,d7
QC_pploop:moveq #0,d0
move.b (a0),d0
add.w d0,d0
add.w d0,d0
move.l a0,(a1,d0.w)
add.l #QC_data,22(a0)
lea 26(a0),a0
dbf d7,QC_pploop
clr.w QC_nrofpos
move.b (a0)+,QC_nrofpos+1
move.l a0,QC_posstart
moveq #0,d0
move.b (a0),d0
add.w d0,d0
add.w d0,d0
move.l (a1,d0.w),a1
move.l 22(a1),QC_currpattpointer
move.b 1(a1),QC_breakrow+1
move.w #6,QC_speed
move.w QC_speed(pc),QC_speedcount
clr.b QC_newposflag
clr.w QC_rowcount
clr.w QC_pos
move.w #1,t_length+QC_chan1
move.w #1,t_length+QC_chan2
move.w #1,t_length+QC_chan3
move.w #1,t_length+QC_chan4
move.w #1,t_replen+QC_chan1
move.w #1,t_replen+QC_chan2
move.w #1,t_replen+QC_chan3
move.w #1,t_replen+QC_chan4
moveq #0,d0
QC_end: move.w #$f,$dff096
clr.w $dff0a8
clr.w $dff0b8
clr.w $dff0c8
clr.w $dff0d8
rts
QC_initerr:moveq #-1,d0
rts
QC_music:
addq.w #1,QC_speedcount
move.w QC_speed,d0
cmp.w QC_speedcount,d0
bgt QC_nonew
tst.b QC_pattwait
beq QC_getnotes
subq.b #1,QC_pattwait
clr.w QC_speedcount
QC_nonew:lea QC_samplepointers(pc),a4
lea QC_periods(pc),a3
lea QC_chan1(pc),a6
lea $dff0a0,a5
bsr QC_chkplayfx
lea QC_chan2-QC_chan1(a6),a6
lea $10(a5),a5
bsr QC_chkplayfx
lea QC_chan2-QC_chan1(a6),a6
lea $10(a5),a5
bsr QC_chkplayfx
lea QC_chan2-QC_chan1(a6),a6
lea $10(a5),a5
bsr QC_chkplayfx
tst.w QC_dmacon
beq QC_mend
move.w QC_dmacon(pc),$dff096
moveq #QC_dmawait,d7
QC_wait6:move.b $dff006,d0
QC_wait5:cmp.b $dff006,d0
beq QC_wait5
dbf d7,QC_wait6
or.w #$8000,QC_dmacon
move.w QC_dmacon(pc),$dff096
moveq #QC_dmawait,d7
QC_wait8:move.b $dff006,d0
QC_wait7:cmp.b $dff006,d0
beq QC_wait7
dbf d7,QC_wait8
clr.w QC_dmacon
lea QC_chan1+t_repeat(pc),a0
lea $dff000,a5
move.l (a0),$a0(a5)
move.w 4(a0),$a4(a5)
move.l QC_chan2-QC_chan1(a0),$b0(a5)
move.w 4+QC_chan2-QC_chan1(a0),$b4(a5)
move.l QC_chan3-QC_chan1(a0),$c0(a5)
move.w 4+QC_chan3-QC_chan1(a0),$c4(a5)
move.l QC_chan4-QC_chan1(a0),$d0(a5)
move.w 4+QC_chan4-QC_chan1(a0),$d4(a5)
rts
QC_chkplayfx:
lea QC_playfx(pc),a2
move.b t_cmd(a6),d0
and.w #$f,d0
add.w d0,d0
add.w d0,d0
move.l (a2,d0.w),a0
jmp (a0)
QC_getnotes:
clr.w QC_speedcount
move.l QC_currpattpointer(pc),a0
move.w QC_rowcount(pc),d0
asl.w #4,d0
add.w d0,a0
lea QC_samplepointers(pc),a4
lea QC_periods(pc),a3
lea $dff0a0,a5
lea QC_chan1(pc),a6
bsr QC_playnote
lea $10(a5),a5
lea QC_chan2-QC_chan1(a6),a6
bsr QC_playnote
lea $10(a5),a5
lea QC_chan2-QC_chan1(a6),a6
bsr QC_playnote
lea $10(a5),a5
lea QC_chan2-QC_chan1(a6),a6
bsr QC_playnote
tst.w QC_dmacon
beq QC_update
move.w QC_dmacon(pc),$dff096
moveq #QC_dmawait,d7
QC_wait2:move.b $dff006,d0
QC_wait1:cmp.b $dff006,d0
beq QC_wait1
dbf d7,QC_wait2
or.w #$8000,QC_dmacon
move.w QC_dmacon(pc),$dff096
moveq #QC_dmawait,d7
QC_wait4:move.b $dff006,d0
QC_wait3:cmp.b $dff006,d0
beq QC_wait3
dbf d7,QC_wait4
clr.w QC_dmacon
lea QC_chan1+t_repeat(pc),a0
lea $dff000,a5
move.l (a0),$a0(a5)
move.w 4(a0),$a4(a5)
move.l QC_chan2-QC_chan1(a0),$b0(a5)
move.w 4+QC_chan2-QC_chan1(a0),$b4(a5)
move.l QC_chan3-QC_chan1(a0),$c0(a5)
move.w 4+QC_chan3-QC_chan1(a0),$c4(a5)
move.l QC_chan4-QC_chan1(a0),$d0(a5)
move.w 4+QC_chan4-QC_chan1(a0),$d4(a5)
QC_update:tst.b QC_newposflag
beq QC_tstend
clr.b QC_newposflag
move.w QC_newposnr,QC_pos
bra QC_newpos
QC_tstend:tst.b QC_jumpbreakflag
beq QC_tstend2
clr.b QC_jumpbreakflag
move.w QC_looprow(pc),d0
cmp.w QC_breakrow(pc),d0
bgt QC_mend
move.w d0,QC_rowcount
rts
QC_tstend2:
addq.w #1,QC_rowcount
move.w QC_rowcount(pc),d0
cmp.w QC_breakrow(pc),d0
ble QC_mend
addq.w #1,QC_pos
QC_newpos:move.w QC_pos(pc),d0
cmp.w QC_nrofpos(pc),d0
blt QC_getpos
clr.w QC_pos
moveq #0,d0
QC_getpos:move.l QC_posstart(pc),a0
move.b (a0,d0.w),d0
add.w d0,d0
add.w d0,d0
lea QC_patternpointers(pc),a0
move.l (a0,d0.w),a0
move.l 22(a0),QC_currpattpointer
move.b 1(a0),QC_breakrow+1
move.w QC_newrow(pc),QC_rowcount
clr.w QC_newrow
QC_mend:rts
QC_playnote:move.l (a0)+,(a6)
moveq #0,d0
move.b (a6),d0
beq QC_isnote
add.w d0,d0
add.w d0,d0
move.l (a4,d0.w),a1
move.b 1(a1),t_volume+1(a6)
move.b 25(a1),d0
and.w #$f,d0
add.w d0,d0
add.w d0,d0
move.l (a3,d0.w),t_finetune(a6)
move.l 30(a1),d1
move.l d1,t_start(a6)
move.w t_volume(a6),8(a5)
btst #0,24(a1)
beq QC_noloop
moveq #0,d0
move.w 26(a1),d0
add.l d0,d1
add.l d0,d1
move.l d1,t_repeat(a6)
moveq #0,d0
move.w 26(a1),d0
moveq #0,d1
move.w 28(a1),d1
add.l d0,d1
move.w d1,t_length(a6)
move.w 28(a1),t_replen(a6)
bra QC_isnote
QC_noloop:clr.l t_repeat(a6)
move.w #$1,t_replen(a6)
move.w 2(a1),t_length(a6)
QC_isnote:
tst.b t_notenr(a6)
blt QC_chkfirstfx
move.b t_notenr(a6),t_notenr2+1(a6)
move.w t_cmd(a6),d0
and.w #$ff0,d0
cmp.w #$e50,d0
beq QC_setfinetunefirst
and.w #$f00,d0
cmp.w #$300,d0
beq QC_settoneport
cmp.w #$500,d0
beq QC_settoneport
QC_getper:move.w t_notenr2(a6),d0
add.w d0,d0
move.l t_finetune(a6),a2
move.w (a2,d0.w),t_period(a6)
move.w t_cmd(a6),d0
and.w #$ff0,d0
cmp.w #$ed0,d0
beq QC_notedelay
move.w t_dmabit(a6),d0
or.w d0,QC_dmacon
move.l t_start(a6),(a5)
move.w t_length(a6),4(a5)
move.w t_period(a6),6(a5)
QC_chkfirstfx:
lea QC_fxaftersetperiod(pc),a2
moveq #0,d0
move.b t_cmd(a6),d0
add.w d0,d0
add.w d0,d0
move.l (a2,d0.w),a2
jmp (a2)
QC_setfinetunefirst:
move.b t_cmdarg(a6),d0
add.w d0,d0
add.w d0,d0
move.l (a3,d0.w),t_finetune(a6)
bra QC_getper
QC_ecommands:
lea QC_efx(pc),a2
move.b t_cmdarg(a6),d0
and.w #$f0,d0
lsr.w #2,d0
move.l (a2,d0.w),a2
jmp (a2)
QC_playecommands:
lea QC_playefx(pc),a2
move.b t_cmdarg(a6),d0
and.w #$f0,d0
lsr.w #2,d0
move.l (a2,d0.w),a2
jmp (a2)
********** Effect commands **********
QC_arpeggio:
tst.b t_cmdarg(a6)
beq QC_mend
move.w QC_speedcount,d0
lea QC_arptbl,a2
tst.b (a2,d0.w)
beq QC_arp2
blt QC_arp1
move.b t_cmdarg(a6),d0
and.w #$f,d0
add.w t_notenr2(a6),d0
add.w d0,d0
move.l t_finetune(a6),a2
move.w (a2,d0.w),6(a5)
rts
QC_arp1:move.w t_period(a6),6(a5)
rts
QC_arp2:moveq #0,d0
move.b t_cmdarg(a6),d0
lsr.w #4,d0
add.w t_notenr2(a6),d0
add.w d0,d0
move.l t_finetune(a6),a2
move.w (a2,d0.w),6(a5)
rts
QC_slideup:
moveq #0,d0
move.b t_cmdarg(a6),d0
sub.w d0,t_period(a6)
cmp.w #113,t_period(a6)
bgt QC_sunotlow
move.w #113,t_period(a6)
QC_sunotlow:
move.w t_period(a6),6(a5)
rts
QC_slidedown:
moveq #0,d0
move.b t_cmdarg(a6),d0
add.w d0,t_period(a6)
cmp.w #856,t_period(a6)
blt QC_sdnothigh
move.w #856,t_period(a6)
QC_sdnothigh:
move.w t_period(a6),6(a5)
rts
QC_settoneport:
move.w t_notenr2(a6),d0
add.w d0,d0
move.l t_finetune(a6),a2
move.w (a2,d0.w),d0
move.w d0,t_wantedperiod(a6)
cmp.w t_period(a6),d0
bgt QC_setportdown
clr.b t_portdir(a6)
rts
QC_setportdown:
move.b #1,t_portdir(a6)
rts
QC_toneport:
tst.w t_wantedperiod(a6)
beq QC_mend
moveq #0,d0
move.b t_cmdarg(a6),d0
beq QC_tpold
move.b d0,t_portspeed(a6)
tst.b t_portdir(a6)
bne QC_portdown
sub.w d0,t_period(a6)
move.w t_wantedperiod(a6),d0
cmp.w t_period(a6),d0
blt QC_notyetwanted
move.w d0,6(a5)
move.w d0,t_period(a6)
clr.w t_wantedperiod(a6)
rts
QC_tpold:move.b t_portspeed(a6),d0
tst.b t_portdir(a6)
bne QC_portdown
sub.w d0,t_period(a6)
move.w t_wantedperiod(a6),d0
cmp.w t_period(a6),d0
blt QC_notyetwanted
move.w d0,6(a5)
move.w d0,t_period(a6)
clr.w t_wantedperiod(a6)
rts
QC_portdown:
add.w d0,t_period(a6)
move.w t_wantedperiod(a6),d0
cmp.w t_period(a6),d0
bgt QC_notyetwanted
move.w d0,6(a5)
move.w d0,t_period(a6)
clr.w t_wantedperiod(a6)
rts
QC_notyetwanted:
tst.b t_glisscont(a6)
beq QC_nogliss
move.l t_finetune(a6),a2
move.w t_period(a6),d0
QC_glissloop:
cmp.w (a2)+,d0
blt QC_glissloop
move.w -2(a2),6(a5)
rts
QC_nogliss:
move.w t_period(a6),6(a5)
rts
QC_vibrato:
moveq #0,d0
move.b t_vibwave(a6),d0
asl.w #7,d0
lea QC_vibtables(pc),a2
add.w d0,a2
moveq #0,d0
move.b t_cmdarg(a6),d0
beq QC_vib
move.w d0,d1
and.b #$f,d0
beq QC_vibusespeed
and.b #$f0,t_vibcmd(a6)
or.b d0,t_vibcmd(a6)
QC_vibusespeed:
and.b #$f0,d1
beq QC_vib
and.b #$f,t_vibcmd(a6)
or.b d1,t_vibcmd(a6)
QC_vib: move.b t_vibcmd(a6),d0
lsr.w #3,d0
add.w d0,t_vibpos(a6)
and.w #$7e,t_vibpos(a6)
move.w t_vibpos(a6),d0
move.w t_period(a6),d1
move.w (a2,d0.w),d0
move.b t_vibcmd(a6),d2
and.w #$f,d2
muls d2,d0
add.l d0,d0
add.l d0,d0
swap d0
add.w d0,d1
cmp.w #856,d1
blt QC_vibnothigh
move.w #856,d1
QC_vibnothigh:
cmp.w #113,d1
bgt QC_vibnotlow
moveq #113,d1
QC_vibnotlow:
move.w d1,6(a5)
rts
QC_toneportandvolslide:
tst.w t_wantedperiod(a6)
beq QC_volslide
bsr QC_tpold
bra QC_volslide
QC_vibratoandvolslide:
bsr QC_vib
bra QC_volslide
QC_tremolo:
moveq #0,d0
move.b t_tremwave(a6),d0
asl.w #7,d0
lea QC_vibtables(pc),a2
add.w d0,a2
moveq #0,d0
move.b t_cmdarg(a6),d0
beq QC_trem
move.w d0,d1
and.b #$f,d0
beq QC_tremusespeed
and.b #$f0,t_tremcmd(a6)
or.b d0,t_tremcmd(a6)
QC_tremusespeed:
and.b #$f0,d1
beq QC_trem
and.b #$f,t_tremcmd(a6)
or.b d1,t_tremcmd(a6)
QC_trem:move.b t_tremcmd(a6),d0
lsr.w #3,d0
add.w d0,t_trempos(a6)
and.w #$7e,t_trempos(a6)
move.w t_trempos(a6),d0
move.w t_volume(a6),d1
move.w (a2,d0.w),d0
move.b t_tremcmd(a6),d2
and.w #$f,d2
muls d2,d0
asl.l #3,d0
swap d0
add.w d0,d1
cmp.w #40,d1
blt QC_tremnothigh
move.w #40,d1
QC_tremnothigh:
tst.w d1
bgt QC_tremnotlow
moveq #0,d1
QC_tremnotlow:
move.w d1,8(a5)
rts
QC_sampleoffset:
moveq #0,d0
move.b t_cmdarg(a6),d0
beq QC_sook
move.b d0,t_sampleoffset(a6)
QC_sook:move.b t_sampleoffset(a6),d0
asl.w #8,d0
moveq #0,d1
move.w t_length(a6),d1
sub.l d0,d1
ble QC_sotoolong
move.w d1,t_length(a6)
add.l d0,d0
add.l d0,t_start(a6)
move.l t_start(a6),(a5)
move.w t_length(a6),4(a5)
rts
QC_sotoolong:
move.w #1,t_length(a6)
move.w t_length(a6),4(a5)
rts
QC_volslide:
moveq #0,d0
move.b t_cmdarg(a6),d0
lsr.w #4,d0
beq QC_volslidedown
add.w d0,t_volume(a6)
cmp.w #$40,t_volume(a6)
blt QC_setvol
move.w #$40,t_volume(a6)
QC_setvol:move.w t_volume(a6),8(a5)
rts
QC_volslidedown:
move.b t_cmdarg(a6),d0
sub.w d0,t_volume(a6)
tst.w t_volume(a6)
bgt QC_setvol
clr.w t_volume(a6)
clr.w 8(a5)
rts
QC_posjump:
move.b t_cmdarg(a6),QC_newposnr+1
move.b #1,QC_newposflag
clr.w QC_newrow
rts
QC_volumechange:
move.b t_cmdarg(a6),d0
cmp.b #$40,d0
blo QC_volchhigh
move.w #$40,t_volume(a6)
move.w #$40,8(a5)
rts
QC_volchhigh:
move.b d0,t_volume+1(a6)
move.w t_volume(a6),8(a5)
rts
QC_patternbreak:
move.w QC_pos,d0
addq.w #1,d0
move.w d0,QC_newposnr
move.b t_cmdarg(a6),QC_newrow+1
move.b #1,QC_newposflag
rts
QC_setspeed:
move.b t_cmdarg(a6),d0
beq QC_setspeed1
cmp.b #$1f,d0
bhi QC_end
move.b d0,QC_speed+1
clr.w QC_speedcount
rts
QC_setspeed1:
move.w #1,QC_speed
clr.w QC_speedcount
rts
QC_setfilter:
move.b t_cmdarg(a6),d0
and.b #1,d0
add.b d0,d0
and.b #$fd,$bfe001
or.b d0,$bfe001
rts
QC_fineslideup:
move.b t_cmdarg(a6),d0
and.w #$f,d0
sub.w d0,t_period(a6)
cmp.w #113,t_period(a6)
bgt QC_fsunotlow
move.w #113,t_period(a6)
QC_fsunotlow:
move.w t_period(a6),6(a5)
rts
QC_fineslidedown:
move.b t_cmdarg(a6),d0
and.w #$f,d0
add.w d0,t_period(a6)
cmp.w #856,t_period(a6)
blt QC_fsdnothigh
move.w #856,t_period(a6)
QC_fsdnothigh:
move.w t_period(a6),6(a5)
rts
QC_glisscontrol:
move.b t_cmdarg(a6),t_glisscont(a6)
and.b #$f,t_glisscont(a6)
rts
QC_vibratowave:
move.b t_cmdarg(a6),t_vibwave(a6)
and.b #$f,t_vibwave(a6)
rts
QC_finetune:
move.b t_cmdarg(a6),d0
and.w #$f,d0
add.w d0,d0
add.w d0,d0
move.l (a3,d0.w),t_finetune(a6)
rts
QC_jumploop:
move.b t_cmdarg(a6),d0
and.w #$f,d0
beq QC_saveloop
tst.b QC_loopcount
beq QC_saveloop
subq.b #1,QC_loopcount
beq QC_mend
move.b #1,QC_jumpbreakflag
rts
QC_newloop:
move.b d0,QC_loopcount
move.b #1,QC_jumpbreakflag
rts
QC_saveloop:
move.w QC_rowcount(pc),QC_looprow
rts
QC_tremolowave:
move.b t_cmdarg(a6),t_tremwave(a6)
and.b #$f,t_tremwave(a6)
rts
QC_initretrig:
clr.b t_retrig(a6)
QC_retrignote:
addq.b #1,t_retrig(a6)
move.b t_cmdarg(a6),d0
and.b #$f,d0
cmp.b t_retrig(a6),d0
bgt QC_mend
clr.b t_retrig(a6)
move.w t_dmabit(a6),d0
or.w d0,QC_dmacon
move.l t_start(a6),(a5)
move.w t_length(a6),4(a5)
move.w t_period(a6),6(a5)
rts
QC_volumefineup:
move.b t_cmdarg(a6),d0
and.w #$f,d0
add.w d0,t_volume(a6)
cmp.w #$40,t_volume(a6)
blt QC_vfuset
move.w #$40,t_volume(a6)
move.w #$40,8(a5)
rts
QC_vfuset:move.w t_volume(a6),8(a5)
rts
QC_volumefinedown:
move.b t_cmdarg(a6),d0
and.w #$f,d0
sub.w d0,t_volume(a6)
bge QC_vfdset
clr.w t_volume(a6)
clr.w 8(a5)
rts
QC_vfdset:move.w t_volume(a6),8(a5)
rts
QC_notecut:
moveq #0,d1
move.b t_cmdarg(a6),d1
and.b #$f,d1
cmp.w QC_speedcount(pc),d1
bgt QC_mend
clr.w t_volume(a6)
clr.w 8(a5)
rts
QC_notedelay:
moveq #0,d1
move.b t_cmdarg(a6),d1
and.b #$f,d1
cmp.w QC_speedcount(pc),d1
bne QC_mend
move.w t_dmabit(a6),d0
or.w d0,QC_dmacon
move.l t_start(a6),(a5)
move.w t_length(a6),4(a5)
move.w t_period(a6),6(a5)
rts
QC_patterndelay:
move.b t_cmdarg(a6),QC_pattwait
and.b #$f,QC_pattwait
rts
QC_arptbl:rept 86 ;if your assembler doensn't want to handle
dc.b -1,0,1 ;the "rept" command, you'll have to write
endr ;a list incl. 256 numbers like this:
;-1,0,1,-1,0,1,-1.. and so on.
QC_playfx:dc.l QC_arpeggio
dc.l QC_slideup
dc.l QC_slidedown
dc.l QC_toneport
dc.l QC_vibrato
dc.l QC_toneportandvolslide
dc.l QC_vibratoandvolslide
dc.l QC_tremolo
dc.l QC_mend
dc.l QC_mend
dc.l QC_volslide
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_playecommands
dc.l QC_mend
QC_playefx:dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_retrignote
dc.l QC_mend
dc.l QC_mend
dc.l QC_notecut
dc.l QC_notedelay
dc.l QC_mend
dc.l QC_mend
QC_efx: dc.l QC_setfilter
dc.l QC_fineslideup
dc.l QC_fineslidedown
dc.l QC_glisscontrol
dc.l QC_vibratowave
dc.l QC_finetune
dc.l QC_jumploop
dc.l QC_tremolowave
dc.l QC_mend
dc.l QC_initretrig
dc.l QC_volumefineup
dc.l QC_volumefinedown
dc.l QC_notecut
dc.l QC_notedelay
dc.l QC_patterndelay
dc.l QC_mend
QC_fxaftersetperiod:
dc.l QC_arpeggio
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_mend
dc.l QC_sampleoffset
dc.l QC_mend
dc.l QC_posjump
dc.l QC_volumechange
dc.l QC_patternbreak
dc.l QC_ecommands
dc.l QC_setspeed
QC_vibtables:
dc.w 0,3211,6392,9511,12539,15446,18204,20787,23169,25329
dc.w 27244,28897,30272,31356,32137,32609,32767,32609,32137
dc.w 31356,30272,28897,27244,25329,23169,20787,18204,15446
dc.w 12539,9511,6392,3211
dc.w 0,-3211,-6392,-9511,-12539,-15446,-18204,-20787,-23169,-25329
dc.w -27244,-28897,-30272,-31356,-32137,-32609,-32767,-32609,-32137
dc.w -31356,-30272,-28897,-27244,-25329,-23169,-20787,-18204,-15446
dc.w -12539,-9511,-6392,-3211
dc.w 32767,31744,30720,29696,28672,27648,26624,25600,24576,23552
dc.w 22528,21504,20480,19456,18432,17408,16384,15360,14336,13312
dc.w 12288,11264,10240,9216,8192,7168,6144,5120,4096,3072,2048,1024
dc.w 0,-1024,-2048,-3072,-4096,-5120,-6144,-8168,-8192,-9216,-10240
dc.w -11264,-12288,-13312,-14336,-15360,-16384,-17408,-18432,-19456
dc.w -20480,-21504,-22528,-23552,-24576,-25600,-26624,-27648,-28672
dc.w -29696,-30720,-31744,-32768
dc.w 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767
dc.w 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767
dc.w 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767
dc.w 32767,32767
dc.w -32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767
dc.w -32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767
dc.w -32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767
dc.w -32767,-32767
QC_periods:dc.l QC_periodtable
dc.l QC_periodtable+72
dc.l QC_periodtable+144
dc.l QC_periodtable+216
dc.l QC_periodtable+288
dc.l QC_periodtable+360
dc.l QC_periodtable+432
dc.l QC_periodtable+504
dc.l QC_periodtable+576
dc.l QC_periodtable+648
dc.l QC_periodtable+720
dc.l QC_periodtable+792
dc.l QC_periodtable+864
dc.l QC_periodtable+936
dc.l QC_periodtable+1008
dc.l QC_periodtable+1080
QC_periodtable:
dc.w 856,808,762,720,678,640,604,570,538,508,480,453
dc.w 428,404,381,360,339,320,302,285,269,254,240,226
dc.w 214,202,190,180,170,160,151,143,135,127,120,113
dc.w 850,802,757,715,674,637,601,567,535,505,477,450
dc.w 425,401,379,357,337,318,300,284,268,253,239,225
dc.w 213,201,189,179,169,159,150,142,134,126,119,113
dc.w 844,796,752,709,670,632,597,563,532,502,474,447
dc.w 422,398,376,355,335,316,298,282,266,251,237,224
dc.w 211,199,188,177,167,158,149,141,133,125,118,112
dc.w 838,791,746,704,665,628,592,559,528,498,470,444
dc.w 419,395,373,352,332,314,296,280,264,249,235,222
dc.w 209,198,187,176,166,157,148,140,132,125,118,111
dc.w 832,785,741,699,660,623,588,555,524,495,467,441
dc.w 416,392,370,350,330,312,294,278,262,247,233,220
dc.w 208,196,185,175,165,156,147,139,131,124,117,110
dc.w 826,779,736,694,655,619,584,551,520,491,463,437
dc.w 413,390,368,347,328,309,292,276,260,245,232,219
dc.w 206,195,184,174,164,155,146,138,130,123,116,109
dc.w 820,774,730,689,651,614,580,547,516,487,460,434
dc.w 410,387,365,345,325,307,290,274,258,244,230,217
dc.w 205,193,183,172,163,154,145,137,129,122,115,109
dc.w 814,768,725,684,646,610,575,543,513,484,457,431
dc.w 407,384,363,342,323,305,288,272,256,242,228,216
dc.w 204,192,181,171,161,152,144,136,128,121,114,108
dc.w 907,856,808,762,720,678,640,604,570,538,508,480
dc.w 453,428,404,381,360,339,320,302,285,269,254,240
dc.w 226,214,202,190,180,170,160,151,143,135,127,120
dc.w 900,850,802,757,715,675,636,601,567,535,505,477
dc.w 450,425,401,379,357,337,318,300,284,268,253,238
dc.w 225,212,200,189,179,169,159,150,142,134,126,119
dc.w 894,844,796,752,709,670,632,597,563,532,502,474
dc.w 447,422,398,376,355,335,316,298,282,266,251,237
dc.w 223,211,199,188,177,167,158,149,141,133,125,118
dc.w 887,838,791,746,704,665,628,592,559,528,498,470
dc.w 444,419,395,373,352,332,314,296,280,264,249,235
dc.w 222,209,198,187,176,166,157,148,140,132,125,118
dc.w 881,832,785,741,699,660,623,588,555,524,494,467
dc.w 441,416,392,370,350,330,312,294,278,262,247,233
dc.w 220,208,196,185,175,165,156,147,139,131,123,117
dc.w 875,826,779,736,694,655,619,584,551,520,491,463
dc.w 437,413,390,368,347,328,309,292,276,260,245,232
dc.w 219,206,195,184,174,164,155,146,138,130,123,116
dc.w 868,820,774,730,689,651,614,580,547,516,487,460
dc.w 434,410,387,365,345,325,307,290,274,258,244,230
dc.w 217,205,193,183,172,163,154,145,137,129,122,115
dc.w 862,814,768,725,684,646,610,575,543,513,484,457
dc.w 431,407,384,363,342,323,305,288,272,256,242,228
dc.w 216,203,192,181,171,161,152,144,136,128,121,114
QC_samplepointers:
blk.l 256,QC_quietsamp
QC_patternpointers:
blk.l 256,0
QC_currpattpointer:dc.l 0
QC_posstart:dc.l 0
QC_nrofpos:dc.w 0
QC_pos: dc.w 0
QC_speed:dc.w 6
QC_speedcount:dc.w 0
QC_breakrow:dc.w 0
QC_newrow:dc.w 0
QC_newposnr:dc.w 0
QC_rowcount:dc.w 0
QC_quiet:dc.w 0
QC_dmacon:dc.w 0
QC_looprow:dc.w 0
QC_tempo:dc.w 125
QC_oldirq:dc.l 0
QC_newposflag:dc.b 0
QC_jumpbreakflag:dc.b 0
QC_loopcount:dc.b 0
QC_pattwait:dc.b 0
QC_quietsamp:
dc.w 0,1
blk.b 20
dc.w 0
dc.w 1
dc.l QC_quiet
t_notenr = 1
t_cmd = 2
t_cmdarg = 3
t_repeat = 4
t_replen = 8
t_period = 10
t_volume = 12
t_length = 14
t_finetune = 42
t_start = 18
t_dmabit = 22
t_notenr2 = 24
t_wantedperiod = 26
t_portdir = 28
t_vibwave = 29
t_glisscont = 30
t_vibcmd = 31
t_vibpos = 32
t_tremwave = 34
t_tremcmd = 35
t_trempos = 36
t_sampleoffset = 38
t_retrig = 39
t_portspeed = 40
even
QC_chan1:dc.l 0 ;The note and command
dc.l 0 ;Repeat
dc.w 0 ;Replen
dc.w 0 ;Period
dc.w 0 ;Volume
dc.w 0 ;Length
dc.w 0 ;Finetune
dc.l 0 ;Start
dc.w 1 ;DMAbit
dc.w 0 ;NoteNr2
dc.w 0 ;WantedPeriod
dc.b 0 ;Portdir
dc.b 0 ;VibWave
dc.b 0 ;Glisscont
dc.b 0 ;Vibcmd
dc.w 0 ;VibPos
dc.b 0 ;Tremwave
dc.b 0 ;Tremcmd
dc.w 0 ;Trempos
dc.b 0 ;Sampleoffset
dc.b 0 ;Retrig
dc.b 0 ;Portspeed
dc.b 0 ;
dc.l 0 ;FineTune
even
QC_chan2:dc.l 0
dc.l 0
dc.w 0
dc.w 0
dc.w 0
dc.w 0
dc.w 0
dc.l 0
dc.w 2
dc.w 0
dc.w 0
dc.b 0
dc.b 0
dc.b 0
dc.b 0
dc.w 0
dc.b 0
dc.b 0
dc.w 0
dc.b 0
dc.b 0
dc.b 0
dc.b 0
dc.l 0
even
QC_chan3:dc.l 0
dc.l 0
dc.w 0
dc.w 0
dc.w 0
dc.w 0
dc.w 0
dc.l 0
dc.w 4
dc.w 0
dc.w 0
dc.b 0
dc.b 0
dc.b 0
dc.b 0
dc.w 0
dc.b 0
dc.b 0
dc.w 0
dc.b 0
dc.b 0
dc.b 0
dc.b 0
dc.l 0
even
QC_chan4:dc.l 0
dc.l 0
dc.w 0
dc.w 0
dc.w 0
dc.w 0
dc.w 0
dc.l 0
dc.w 8
dc.w 0
dc.w 0
dc.b 0
dc.b 0
dc.b 0
dc.b 0
dc.w 0
dc.b 0
dc.b 0
dc.w 0
dc.b 0
dc.b 0
dc.b 0
dc.b 0
dc.l 0
even
QC_data: ;Your module here!