From 56883335b5539578feb984d3676afc452824de8e Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Fri, 25 Nov 2022 23:09:40 -0500 Subject: [PATCH] Ensoniq noise channel is now feature-complete. --- applecorn.po | Bin 819200 -> 819200 bytes mainmem.audio.s | 3 +-- mainmem.ensq.s | 10 +++++++++- mame_applecorn | 0 4 files changed, 10 insertions(+), 3 deletions(-) mode change 100644 => 100755 mame_applecorn diff --git a/applecorn.po b/applecorn.po index 4f1b0e50051c2c158eb0e57872538d636c3a3bfc..13f6c6c39b45dc85024a7db82a47cd33e3076a83 100644 GIT binary patch delta 538 zcmZo@FluNp+K|p7kn6=zscS99(D0Z+0mNu7XK62IVFY3(AZ7+)5T6x@*?^cGh&h0m zb9*@p*R-9Cb=&#&am7ohK1}ymJIV6{ONLK#N`}w3bP$KxM?KYtDFecEOZAbOKIt0Q zV#c`XX4kngfz*QQTniY3r#s%@60J{7UBIwXX%UM;bIPJ63pfoa!@uvj7 zCn#iqWEg-l2_Cni`r=X_FnkDnz<7cEB*O>hUbR$@6+7$FR;*-Dh)4yh$pG?FSFBWk z@T#I#IzU)JTN>c318`RT0tmCg(L?asSGwfb;TkDphy+S zo<$&sEOMxd0#OGRuz;uqVAoas%1D@+YRYgc3fVnXKpv8NekI(3JE`hd!VM9H#>8xi z+_=J76OKV6D;p delta 530 zcmZo@FluNp+K|p7km$uwsjDZ-(D0Z+0mNu7XK62IVFY3(AZ7+)5T6x@*?^cGh&h0m zb9*@p*R-9CMceuIam7ohUQPE{JIV6{ONLK#N`}v?bP$KxM>^H#8ccmE(lxHd zj6u`Qu5)DqsRh@$7BIR`cf7$RS|6FZfMKQ5A{K?_ltoJxa43NJ4U3q8{CO|qPYHZa zP{;tuFaTu|JZ?qx1*JY<_~7QTVrNm>ij@osKB+*73?MIc#YzPTuPSP#1B3-Mx&h8Q z0B0?Luo@gaH0xPDuq{$e|eUU>|6o@*o zfCWS?06VGbS4P6rRMT5g$j+$(@{pYKE8!O0MOD8NZYVS+W=rG-rLIa~Sj%B^z~Fa+ zheGi7jGJ7ROpHp?7v1JEvM|axCGcyd#UgeEql^TF!|5yQd-;y6ZHeveh*e A CLC ADC CURRAMP,X ; Add change to current amp -* BCS :CLAMP ; If overflow, clamp to target CMP :TARGET ; Compare with target BCS :CLAMP ; If target < sum, clamp to target BRA :UPDATE @@ -743,7 +742,7 @@ ADSRPHASE STX OSCNUM :S2 TYA ; Change/step -> A CLC ADC CURRAMP,X ; Add change to current amp - BCS :CLAMP ; If overflow, clamp to target + BCS :CLAMP ; If overflow (-ve), clamp to target CMP :TARGET ; Compare with target BCC :CLAMP ; If target >= sum, clamp to target BRA :UPDATE diff --git a/mainmem.ensq.s b/mainmem.ensq.s index 8c2968c..806d757 100644 --- a/mainmem.ensq.s +++ b/mainmem.ensq.s @@ -2,6 +2,7 @@ * (c) Bobbi 2022 GPLv3 * * Ensoniq DOC Driver for Apple IIGS. +* Simulates Hitachi SN76489 sound generator chip found in BBC Micro. * * Ensoniq control registers @@ -145,7 +146,13 @@ ENSQNOTE PHA CPX #$00 BEQ :NOISE ; Oscillator 0 is noise channel - PHA ; Stash orig freq + CPX #$01 ; Oscillator 1 controls noise freq + BNE :S0 ; Not 1? Skip + CMP #$00 ; If frequency is zero .. + BEQ :S0 ; .. skip + STA :CH1NOTE ; Store frequency for noise gen + +:S0 PHA ; Stash orig freq TAY LDA EFREQLOW,Y TAY ; Frequency value LS byte @@ -232,6 +239,7 @@ ENSQNOTE PHA :NOISENOTE DB 149 ; BBC Micro note P=0 or 4 DB 101 ; BBC Micro note P=1 or 5 DB 53 ; BBC Micro note P=2 or 6 +:CH1NOTE DB 00 ; Note on channel 1 * Adjust frequency of note already playing diff --git a/mame_applecorn b/mame_applecorn old mode 100644 new mode 100755