diff --git a/applecorn.po b/applecorn.po index 1fdd029..1570116 100644 Binary files a/applecorn.po and b/applecorn.po differ diff --git a/mainmem.ensq.s b/mainmem.ensq.s index 4089388..cb1407f 100644 --- a/mainmem.ensq.s +++ b/mainmem.ensq.s @@ -121,7 +121,7 @@ ENSQNOTE PHA * Adjust frequency of note already playing -* On entry: Y - frequency to set +* On entry: X - oscillator number 0-3, Y - frequency to set * Preserves X & Y ENSQFREQ PHX PHY ; Gonna need it again @@ -143,7 +143,7 @@ ENSQFREQ PHX * Adjust amplitude of note already playing -* On entry: Y - amplitude to set +* On entry: X - oscillator number 0-3, Y - amplitude to set * Preserves X & Y ENSQAMP PHX PHY ; Gonna need it again @@ -155,7 +155,8 @@ ENSQAMP PHX RTS * Ensoniq interrupt service routine - just calls generic audio ISR -ENSQISR JMP AUDIOISR +ENSQISR CLD + JMP AUDIOISR ** diff --git a/mainmem.fsequ.s b/mainmem.fsequ.s index d3c73b0..c1c4f13 100644 --- a/mainmem.fsequ.s +++ b/mainmem.fsequ.s @@ -37,6 +37,7 @@ FBATTR EQU FILEBLK+14 ; Attributes FBEND EQU FILEBLK+14 ; End address for SAVE * ProDOS MLI command numbers +ALLOCCMD EQU $40 QUITCMD EQU $65 GTIMECMD EQU $82 CREATCMD EQU $C0 diff --git a/mainmem.lists.s b/mainmem.lists.s index 6df46d4..c7a0b76 100644 --- a/mainmem.lists.s +++ b/mainmem.lists.s @@ -110,33 +110,7 @@ QUITPL HEX 04 ; Number of parameters DB $00 DW $0000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +ALLOCPL HEX 02 ; Number of parameters + DB $00 ; Interrupt number returned here + DW $0000 ; Pointer to ISR diff --git a/mainmem.mock.s b/mainmem.mock.s index 0cf5729..dbc10ac 100644 --- a/mainmem.mock.s +++ b/mainmem.mock.s @@ -57,10 +57,13 @@ MOCKINIT LDA #$FF ; All VIA pins output LDA #MOCK_AY_INACTIVE STA MOCK_6522_ORB2 - LDA #MOCKISR - STA A2IRQV+1 + STA ALLOCPL+3 + JSR MLI + DB ALLOCCMD + DW ALLOCPL PHP SEI @@ -87,32 +90,47 @@ MOCKSILENT LDX #13 ; Clear all 14 AY-3 regs * Configure a Mockingboard oscillator to play a note -* On entry: X - oscillator number 0-3 , A - frequency, Y - amplitude +* On entry: X - oscillator number 0-3, A - frequency, Y - amplitude * Preserves all registers MOCKNOTE ; TODO RTS * Adjust frequency of note already playing -* On entry: Y - frequency to set +* On entry: X - oscillator number 0-3, Y - frequency to set * Preserves X & Y -MOCKFREQ ; TODO - RTS - - -* Adjust amplitude of note already playing -* On entry: Y - amplitude to set -* Preserves X & Y -MOCKAMP PHX - PHY ; Gonna need it again +MOCKFREQ PHX + PHY ; TODO PLY PLX RTS +* Adjust amplitude of note already playing +* On entry: X - oscillator number 0-3, Y - amplitude to set +* Preserves X & Y +MOCKAMP PHX + PHY + CPX #$00 ; Noise channel + BEQ :DONE ; Has no amplitude + TXA ; Add 7 to get register + CLC + ADC #7 + TAX + TYA ; Amplitude 0..127 + LSR ; Divide by 8 + LSR + LSR ; Now 0..15 + JSR MOCKWRT ; Write value to AY-3 register + PLY + PLX +:DONE RTS + + * Mockingboard interrupt service routine - just calls generic audio ISR -MOCKISR JMP AUDIOISR +MOCKISR CLD + JMP AUDIOISR **