********************************************************* * * * PseudoHQC Player (PHQC) * * ------------------------ * * * * made in 1993 by The Vampire / PseudoDOS Group * * ...based on a HQC-Routine from 1987 * * * * Now you can: -convert old songs or * * -compose songs * * -include one or more songs * * -jsr start * * -jsr stop * * * * because: -the new format works at * * every address * * -the songs are now without * * a replay routine * * * ********************************************************* irqvec = $00000068 dmacon = $dff096 timerlo = $00 timerhi = $28 talo = $bfe401 tahi = $bfe501 icr = $bfed01 cra = $bfee01 aud0lch = $a0 aud0lcl = $a2 aud0len = $a4 aud0per = $a6 aud0vol = $a8 s_wavedco = 0 s_envelope = 32 s_sus = 48 s_end = 49 s_wavelfo = 50 s_spdlfo = 66+16 s_slctlfo = 67+16 s_typelfo = 68+16 s_phase = 69+16 s_arp = 70+16 s_spdport = 78+16 s_spdbend = 80+16 s_egfreq = 82+16 v_sactive = 0 v_envpoint = 4 v_lfowpoint = 8 v_phmark = 12 v_notetim = 14 v_lfotim = 16 v_arpoint = 18 v_actnote = 22 v_wntnote = 24 v_hardw = 26 v_trkstp = 30 v_crnot = 34 v_trkbck = 38 v_actfrq = 42 v_trnspse = 46 v_savnote = 50 v_add = 52 v_pauspnt = 54 v_actloud = 56 v_voicelen = 58 ; >> use 'Universal Ripper' to convert songs !! ; >> use 'PHQC Editor' to compose !! start: lea newirq(pc),a0 lea irqvec.w,a1 cmpi.l (a1),a0 beq.s noton move.b #$81,icr move.b #$2f,cra move.b #$81,cra move.b #timerlo,talo move.b #timerhi,tahi move.l (a1),saveirqvec move.l (a1),modif+2 bsr.s setback bsr.s setup move.l a0,(a1) move.w #$800f,dmacon noton rts stop: lea irqvec.w,a0 cmpi.l #newirq,(a0) bne.s notoff move.b #$01,icr move.l saveirqvec(pc),(a0) move.w #$000f,dmacon bsr.s setback notoff rts setback: lea $dff000,a2 moveq #3,d0 sb_lp clr.l aud0lch(a2) clr.w aud0len(a2) clr.w aud0per(a2) clr.w aud0vol(a2) lea $10,a2 dbf d0,sb_lp rts setup: lea v_temp(pc),a3 lea Module,a2 move.l 4(a2),d1 add.l a2,d1 lea inf-hdr(a2),a4 lea $dff0a0,a5 moveq #3,d7 fix_lp move.l d1,(a3) ; startsound move.l (a4)+,a6 add.l a2,a6 move.l a6,v_trkbck(a3) ; resettrack move.l a6,v_trkstp(a3) move.l (a6)+,v_crnot(a3) move.l (a6),v_trnspse(a3) move.l a5,v_hardw(a3) move.l d1,(a5)+ move.w #$10,(a5) clr.l v_notetim(a3) lea v_voicelen(a3),a3 lea $C(a5),a5 dbf d7,fix_lp rts newirq: movem.l d0-d7/a0-a6,-(a7) cmp.b #timerhi-1,$bfe501 bne.s nottim lea v_temp(pc),a0 moveq #3,d7 irq_lp bsr.s playvoice lea v_voicelen(a0),a0 dbf d7,irq_lp nottim movem.l (a7)+,d0-d7/a0-a6 modif jmp $0.l playvoice: subq.w #1,v_notetim(a0) bpl.L notyet1 clr.w v_add(a0) clr.w v_pauspnt(a0) musl1: move.l v_crnot(a0),a1 move.l v_trnspse(a0),d3 clr.l d4 move.w (a1),d4 cmp.w #128,d4 ;change snd? bne.s testarp move.l 2(a1),v_sactive(a0) addi.l #6,v_crnot(a0) move.l 2(a1),d5 move.l v_hardw(a0),a3 move.l d5,(a3) bra.s musl1 testarp: cmp.w #129,d4 ;change arp? bne.s chpause move.l v_sactive(a0),a3 move.l 2(a1),s_arp(a3) move.l 6(a1),s_arp+4(a3) addi.l #10,v_crnot(a0) bra.s musl1 chpause: cmp.w #130,d4 ;pause? bne.s chweiter move.w #1,v_pauspnt(a0) bra.s gut1 chweiter: add.w d4,d3 move.w d3,v_savnote(a0) cmp.l v_trnspse(a0),d3 bne.s gut1 addi.l #8,v_trkstp(a0) move.l v_trkstp(a0),a2 move.l 4(a2),v_trnspse(a0) move.l (a2),v_crnot(a0) bne.s musl1 move.l v_trkbck(a0),v_trkstp(a0) move.l v_trkstp(a0),a2 move.l 4(a2),v_trnspse(a0) move.l (a2),v_crnot(a0) bra.L musl1 gut1: tst.w v_pauspnt(a0) bne.s notset clr.l v_envpoint(a0) clr.w v_actloud(a0) notset: move.w 2(a1),d0 subq.w #1,d0 move.w d0,v_notetim(a0) adda.l #4,a1 move.l a1,v_crnot(a0) notyet1: move.l v_hardw(a0),a2 move.l v_sactive(a0),a3 move.w v_wntnote(a0),d0 subq.w #1,d0 mulu #2,d0 lea freqtab,a4 move.w (a4,d0.w),d1 move.w s_spdport(a3),d0 beq.s noport cmp.w v_actfrq(a0),d1 blo.s portdown addi.w d0,v_actfrq(a0) cmp.w v_actfrq(a0),d1 bhi.s nochklei move.w d1,v_actfrq(a0) nochklei: bra.s portaend portdown: subi.w d0,v_actfrq(a0) cmp.w v_actfrq(a0),d1 blo.s nochgroe move.w d1,v_actfrq(a0) nochgroe: bra.s portaend noport: add.w v_add(a0),d1 move.w d1,v_actfrq(a0) portaend: move.l v_sactive(a0),a3 adda.l #s_arp,a3 move.l v_arpoint(a0),d1 clr.l d2 move.b (a3,d1.l),d2 bpl.s positiv neg.b d2 clr.l d3 move.w v_savnote(a0),d3 sub.w d2,d3 move.w d3,d2 bra.s negativ positiv: add.w v_savnote(a0),d2 negativ: move.w d2,v_wntnote(a0) addq.l #1,v_arpoint(a0) cmp.l #8,v_arpoint(a0) bne.s notnull clr.l v_arpoint(a0) notnull: move.l v_sactive(a0),a3 tst.w v_phmark(a0) beq.s ffff clr.w v_phmark(a0) clr.l d2 move.b s_phase(a3),d2 move.w v_actfrq(a0),d1 add.w d2,d1 move.w d1,v_actfrq(a0) bra.s wasffff ffff: move.w #$ffff,v_phmark(a0) clr.l d2 move.b s_phase(a3),d2 move.w v_actfrq(a0),d1 sub.w d2,d1 move.w d1,v_actfrq(a0) wasffff: clr.l d2 move.w s_spdbend(a3),d2 sub.w d2,v_add(a0) clr.l d0 move.w v_actfrq(a0),d0 move.w s_egfreq(a3),d1 beq.s noteg bmi.s dazu sub.w v_actloud(a0),d0 bra.s noteg dazu: add.w v_actloud(a0),d0 noteg: move.w d0,$06(a2) clr.l d2 move.l v_sactive(a0),a2 clr.l d0 clr.l d1 move.b s_sus(a2),d0 move.b s_end(a2),d1 cmp.l v_envpoint(a0),d1 beq.s envelopend cmp.l #$00,d0 beq.s notsustep cmp.l v_envpoint(a0),d0 bne.s notsustep cmpi.w #$00,v_pauspnt(a0) beq.s envelopend notsustep: move.l v_envpoint(a0),d2 mulu #2,d2 lea s_envelope(a2),a3 clr.l d3 clr.l d4 move.b (a3,d2.w),d3 move.b 1(a3,d2.w),d4 cmp.w v_actloud(a0),d4 bhi.s loudup sub.w d3,v_actloud(a0) cmp.w v_actloud(a0),d4 ble.s nichtunt move.w d4,v_actloud(a0) addq.l #$1,v_envpoint(a0) nichtunt: bra.s envelopend loudup: add.w d3,v_actloud(a0) cmp.w v_actloud(a0),d4 bhi.s envelopend move.w d4,v_actloud(a0) addq.l #$1,v_envpoint(a0) envelopend: clr.l d1 move.w v_actloud(a0),d1 divu #4,d1 move.l v_hardw(a0),a1 move.w d1,$08(a1) rts freqtab: dc.w 6848,6464,6096,5760,5424,5120,4832,4560,4304,4064,3840,3616 dc.w 3424,3232,3048,2880,2712,2560,2416,2280,2152,2032,1920,1808 dc.w 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,0960,0904 dc.w 0856,0808,0762,0720,0678,0640,0604,0570,0538,0508,0480,0452 dc.w 0428,0404,0381,0360,0339,0320,0302,0285,0269,0254,0240,0226 dc.w 0214,0202,0190,0180,0170,0160,0151,0143,0135,0127 saveirqvec: dc.l 0 v_temp: blk.b v_voicelen*4,0 ********************************************************************** org $40000 load $40000 Module: ; (include here !!) ********************************** ** Moduledatas (like in a file) ** ; ---------------------------------------- ; - - ; - "LA BOUM II - THEME" - ; - eingegeben von: Dr.Nobody - ; - 1987 JMC - ; - - ; ---------------------------------------- ; ; (converted by The Vampire / PseudoDOS Group) Hdr: dc.b "PHQC" ; Kennung dc.l Dat-Hdr ; Datas offset dc.w 0 ; reserved dc.w 5 ; #Sounds dc.w 4 ; #Scores inf dc.l Track1-Hdr ; startsound,resettrack dc.l Track2-Hdr dc.l Track3-Hdr dc.l Track4-Hdr dc.w $0028 ; CIA Tempo dc.b " This was a HQC Routine, " dc.b "but it was converted to a not-relocated module " dc.b "with 'Universal Ripper' from PseudoDOS Group." dc.b "The new fileformat was concepted by The Vampire. " even Dat ***************** ** Instruments ** sound1: dc.b 127,127,127,127,127,127,127,127,-128,-128 ; WaveForm DCO dc.b -128,127,127,-128,-128,-128,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 50,175,6,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Envelope (Rate/Level) dc.b 0,2 ; No SUS, END is step #2 dc.b -128,-128,-128,-128,-128,-128,-128,-128,-128,-128 ; WaveForm LFO dc.b -128,-128,-128,-128,-128,-128,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 0 ; Speed LFO dc.b 1+2 ; LFO for Amplitude & Frequency dc.b 1 ; LFO: on dc.b 0 ; Depth of Phasing, 0=none dc.b 0,0,0,0,0,0,0,0 ; Arpeggio dc.w 0 ; Speed Portamento (0=none) dc.w 0 ; BendRate dc.w 0 ; EG frequency off sound2: dc.b 127,127,127,127,127,127,127,127,-128,-128 ; WaveForm DCO dc.b -128,127,127,-128,-128,-128,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 255,255,7,100,3,0,0,0,0,0,0,0,0,0,0,0 ; Envelope (Rate/Level) dc.b 0,3 ; No SUS, END is step #2 dc.b -128,-120,-112,-104,-96,-88,-80,-72,-64,-56 ; WaveForm LFO dc.b -48,-40,-32,-24,-16,-8,0,8,16,24,32 dc.b 40,48,56,64,72,80,88,96,104,112,127 dc.b 0 ; Speed LFO dc.b 1+2 ; LFO for Amplitude & Frequency dc.b 1 ; LFO: on dc.b 0 ; Depth of Phasing, 0=none dc.b 0,0,0,0,0,0,0,0 ; Arpeggio dc.w 0 ; Speed Portamento (0=none) dc.w 0 ; BendRate dc.w 0 ; EG frequency off sound3: dc.b -128,-128,-128,-128,-128,-128,-128,-128,-128,-128 ; WaveForm DCO dc.b -128,-128,-128,-128,-128,-128,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 255,255,25,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Envelope (Rate/Level) dc.b 0,2 ; No SUS, END is step #2 dc.b -128,-128,-128,-128,-128,-128,-128,-128,-128,-128 ; WaveForm LFO dc.b -128,-128,-128,-128,-128,-128,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 0 ; Speed LFO dc.b 1+2 ; LFO for Amplitude & Frequency dc.b 1 ; LFO: on dc.b 0 ; Depth of Phasing, 0=none dc.b 0,0,0,0,0,0,0,0 ; Arpeggio dc.w 0 ; Speed Portamento (0=none) dc.w -50 ; BendRate dc.w 0 ; EG frequency off sound4: dc.b -128,-128,-128,-128,-128,-128,-128,-128,-128,-128 ; WaveForm DCO dc.b -128,-128,-128,-128,-128,-128,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Envelope (Rate/Level) dc.b 0,2 ; No SUS, END is step #2 dc.b -128,-128,-128,-128,-128,-128,-128,-128,-128,-128 ; WaveForm LFO dc.b -128,-128,-128,-128,-128,-128,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 0 ; Speed LFO dc.b 1+2 ; LFO for Amplitude & Frequency dc.b 1 ; LFO: on dc.b 0 ; Depth of Phasing, 0=none dc.b 0,0,0,0,0,0,0,0 ; Arpeggio dc.w 0 ; Speed Portamento (0=none) dc.w -50 ; BendRate dc.w 0 ; EG frequency off sound5: dc.b -128,-128,-128,-128,-128,-128,-128,-128,127,127 ; WaveForm DCO dc.b 127,127,127,127,127,127,-128,-98,-68,-38,-8,28 dc.b 58,78,98,118,120,122,124,125,126,127 dc.b 50,255,4,80,0,0,0,0,0,0,0,0,0,0,0,0 ; Envelope (Rate/Level) dc.b 0,2 ; No SUS, END is step #2 dc.b -128,-128,-128,-128,-128,-128,127,127,127,127 ; WaveForm LFO dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 127,127,127,127,127,127,127,127,127,127,127 dc.b 0 ; Speed LFO dc.b 0 dc.b 1 ; LFO on dc.b 4 ; Depth of Phasing, 0=none dc.b 0,0,0,0,0,0,0,0 ; Arpeggio dc.w 0 ; Speed Portamento (0=none) dc.w 0 ; BendRate dc.w 0 ; EG frequency off ************ ** Tracks ** track1: dc.l score3,-23,score3,-18,score4,-25,score4,-20,score4,-27,score3,-24 dc.l score4,-23,score4,-23 dc.l 0,0 track2: dc.l score1,13,score1,18,score2,11,score2,16,score2,9,score2,8 dc.l score2,13,score2,13 dc.l 0,0 track3: dc.l score5,5 dc.l 0,0 track4: dc.l score6,-2 dc.l 0,0 ************ ** Scores ** score1: dc.w 128 dc.l sound1 dc.w 129 dc.l $0003070c,$0003070c dc.w 40,28,40,28,40,28,40,28 dc.w 40,28,40,28,40,28,40,28 dc.w 0,0 score2: dc.w 128 dc.l sound1 dc.w 129 dc.l $0004070c,$0004070c dc.w 40,28,40,28,40,28,40,28 dc.w 40,28,40,28,40,28,40,28 dc.w 0,0 score3: dc.w 128 dc.l sound2 dc.w 129 dc.l $00000000,$00000000 dc.w 40,84,40,28,40,70,40,14,42,14,43,14 dc.w 0,0 score4: dc.w 128 dc.l sound2 dc.w 129 dc.l $00000000,$0000000 dc.w 40,84,40,28,40,70,40,14,42,14,44,14 dc.w 0,0 score5: dc.w 128 dc.l sound3 dc.w 129 dc.l $00000000,$00000000 dc.w 43,56 dc.w 128 dc.l sound4 dc.w 129 dc.l $00000000,$00000000 dc.w 43,28 dc.w 128 dc.l sound3 dc.w 43,28 dc.w 128 dc.l sound4 dc.w 43,56 dc.w 43,56 dc.w 0,0 score6: dc.w 128 dc.l sound5 dc.w 129 dc.l $00000000,$00000000 dc.w 43,56,46,56,50,56,53,56,53,28,51,28,50,28,51,140 dc.w 41,84,45,28,48,56,51,56,51,28,50,28,49,28,50,140 dc.w 39,56,43,56,46,56,50,56,50,28,48,28,47,28,48,84 dc.w 50,28,45,28 dc.w 48,28,47,28,45,28,47,140 dc.w 48,28,47,28,46,28,47,140 dc.w 129 dc.l $00000c0c,$00000c0c dc.w 43,56,46,56,50,56,53,56,53,28,51,28,50,28,51,140 dc.w 41,84,45,28,48,56,51,56,51,28,50,28,49,28,50,140 dc.w 39,56,43,56,46,56,50,56,50,28,48,28,47,28,48,84 dc.w 50,28,45,28 dc.w 48,28,47,28,45,28,47,140 dc.w 48,28,47,28,46,28,47,140 dc.w 0,0 .