From 43e429d4dfb71efe355820a02475faaa852c2249 Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Mon, 31 Oct 2022 17:48:52 -0400 Subject: [PATCH] Implemented ADSR release 'hold' feature --- applecorn.po | Bin 819200 -> 819200 bytes auxmem.init.s | 2 +- mainmem.audio.s | 57 +++++++++++++++++++++++++++++++++--------------- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/applecorn.po b/applecorn.po index db382ef8648502fd639a8222e81d974d1d07f4f3..7faff25bb5eaa235979035bc1e60078e03eb6eba 100644 GIT binary patch delta 10110 zcma)i3qTXc*6?PRM;KIs4~$srSg8$ak*d{PKUzgZgGND71YBT!-0#L$U*C6IuebdZ zZyT@IvNWxaMFpE~#j@0;p{-SVq3RVLPSZ%R2|CvO5wf+Au$?nda zIdjgLGc)Hg8;fPE#WL3MmjF#yB9-%WY&d0UrZ6eI`C7m~UkgydMZ?9wMe2cY1;G^z zmm02+eXj+elkfC>pDlf!c4ImAAYZ^@>fqNqg!Ikmt;J1C@bN_H1wMt9hVgS*X|qUa z@h>x^zukjKcOjFkancjk=cGy2=cRep$r5FqDq(Aa9)};1#`2wvl*D&2Nk#k(MvCMW zQte=H<^o~07L8U#>|3z~J*n!g10o4PWD^ic5Dq?rVuY%#=&?ziorM%#rMV?fa7J7B zxz%`bC+_s%qo?o_)lx8S^Wqlo?w_@4+_y6?mj>RyN*3!KdkAh3uz-dQ?Atjy$f60t zjHN^g+usM z99;Xt6uQq8TACW@wz^HxOo-Yzt41rT4wTRp#dKi_?Fh&(EC&6xak&2}pf%bcQ%=p3 zNfx}XJ<1z9$korSZ?_>s(DrI;P5BNX zay!ByRn@DDX{a6(W&Zqfe8n670lO_82Hd+a2lW5L3?-Z%-pxp!HV)}SK z?bhJ258$2v9O)o1sN9aG{Aoos@1`r3RP!h4idU-nYPw==HGh=GRc+B>3N1BSPf03# zwnoa~_tShiE!laZhtv2AA$|wag{=H;^if*F;H|>z6VPM*ji+(ccl<&ppW@`_JN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cyv|U~O?1yg&8UP2glh7i=2< zPIH$W6oVkT!qO89iMYEL0FD7_3ku<7kGHlw6W(!nOF+x?sAPRqvO_5jx)I;3%Y2g1 za;QB)i2R+RgBJWVLAzwnf+CKRW9(7)IUSbwUObBi&>OqZgLePqr(M;CcDHrP{U0PJ Bs#E{~ diff --git a/auxmem.init.s b/auxmem.init.s index 38e315e..1583b13 100644 --- a/auxmem.init.s +++ b/auxmem.init.s @@ -209,7 +209,7 @@ BYTE00 BEQ BYTE00A ; OSBYTE 0,0 - generate error RTS ; %000x1xxx host type, 'A'pple BYTE00A BRK DB $F7 -HELLO ASC 'Applecorn MOS 2022-10-25' +HELLO ASC 'Applecorn MOS 2022-10-31-BOO!' DB $00 ; Unify MOS messages * TO DO: Move into RAM GSSPEED DB $00 ; $80 if GS is fast, $00 for slow diff --git a/mainmem.audio.s b/mainmem.audio.s index c5cfb65..3a1c610 100644 --- a/mainmem.audio.s +++ b/mainmem.audio.s @@ -389,26 +389,18 @@ ENSQISR INC COUNTER+0 ; Increment centisecond timer :PEEK JSR PEEKAUDIO ; Inspect byte at head of queue BCS :NEXT ; Nothing in queue ; NOTE: A contains HS byte of &HSFC + TAY ; Stash for later AND #$0F ; Mask out hold nybble BNE :SYNCSET ; Do not play if sync != 0 + TYA ; HS byte + AND #$F0 ; Mask out sync nybble + BNE :HOLDSET ; Handle hold function -* The following is paranoid maybe. Perhaps can be removed once I am debugged. *** - PHX - INX ; Convert audio channel to buf num - INX - INX - INX - CLV ; Ask to count buffer - CLC ; Ask for space used - JSR CNP ; Go count it - TXA - PLX - CMP #3 ; At least 4 bytes used? - BMI :NEXT -* End paranoid section. *** + JSR CHECK4BYTES ; Check queue has a note + BCS :NEXT ; Less than 4 bytes, skip - JSR REMAUDIO ; Remove byte from queue - JSR REMAUDIO ; Remove byte from queue + JSR REMAUDIO ; Remove HS byte from queue + JSR REMAUDIO ; Remove amplitude byte from queue TYA ; Amplitude or envelope -> A DEC A @@ -433,9 +425,9 @@ ENSQISR INC COUNTER+0 ; Increment centisecond timer LDA #$00 ; Initial amplitude is zero PHA ; Zero amplitude to stack -:S2 JSR REMAUDIO ; Remove byte from queue +:S2 JSR REMAUDIO ; Remove freq byte from queue PHY ; Frequency - JSR REMAUDIO ; Remove byte from queue + JSR REMAUDIO ; Remove dur byte from queue TYA ; Duration STA CHANTIMES,X PLA ; Recover frequency @@ -457,6 +449,13 @@ ENSQISR INC COUNTER+0 ; Increment centisecond timer BPL :L2 ; Next audio queue CLC RTL +:HOLDSET LDA CURRAMP,X ; Get current amplitude + BNE :NEXT ; If non zero, hold + JSR REMAUDIO ; Dequeue four bytes + JSR REMAUDIO + JSR REMAUDIO + JSR REMAUDIO + BRA :NEXT :SYNCSET JSR CHORD ; See if chord can be released BRA :NEXT :CNT DB $05 ; Used to determine 20Hz cycles @@ -477,6 +476,28 @@ NONOTE LDA CHANENV,X ; See if envelope is in effect RTS +* Helper function for ENSQISR +* On entry: X is audio channel # +* On return: CS if there are <= 4 bytes in queue, CC otherwise +* X is preserved +CHECK4BYTES PHX + INX ; Convert audio channel to buf num + INX + INX + INX + CLV ; Ask to count buffer + CLC ; Ask for space used + JSR CNP ; Go count it + TXA + PLX + CMP #3 ; At least 4 bytes used? + BMI :NO + CLC + RTS +:NO SEC + RTS + + * Handle envelope tick counter * On entry: X is audio channel # * On return: CS if this cycle is an envelope tick, CC otherwise.