diff --git a/applecorn.po b/applecorn.po index 41a1e88..2dd3dc7 100644 Binary files a/applecorn.po and b/applecorn.po differ diff --git a/auxmem.init.s b/auxmem.init.s index 9915aa7..c193116 100644 --- a/auxmem.init.s +++ b/auxmem.init.s @@ -290,7 +290,7 @@ BYTE00 BEQ BYTE00A ; OSBYTE 0,0 - generate error RTS ; %000x1xxx host type, 'A'pple BYTE00A BRK DB $F7 -HELLO ASC 'Applecorn MOS 2022-11-20' +HELLO ASC 'Applecorn MOS 2022-11-21' DB $00 ; Unify MOS messages * TO DO: Move into RAM GSSPEED DB $00 ; $80 if GS is fast, $00 for slow diff --git a/auxmem.misc.s b/auxmem.misc.s index c9ff86a..eef2097 100644 --- a/auxmem.misc.s +++ b/auxmem.misc.s @@ -380,15 +380,15 @@ GSBRKAUX >>> IENTAUX ; IENTAUX does not do CLI IRQBRKHDLR PHA * Mustn't enable IRQs within the IRQ handler * Do not use WRTMAIN/WRTAUX macros - LDA RDRAMRD ; Record softswitch state - STA $90 - LDA RDRAMWR - STA $91 - - STA WRMAINRAM ; Write to main memory - STA $45 ; $45=A for ProDOS IRQ handlers - STA WRCARDRAM ; Write to aux memory - STA RDCARDRAM ; Read from aux memory +* LDA RDRAMRD ; Record softswitch state +* STA $90 +* LDA RDRAMWR +* STA $91 +* +* STA WRMAINRAM ; Write to main memory +* STA $45 ; $45=A for ProDOS IRQ handlers +* STA WRCARDRAM ; Write to aux memory +* STA RDCARDRAM ; Read from aux memory PHX CLD @@ -421,19 +421,20 @@ IRQBRKRET >>> IENTAUX ; IENTAUX does not do CLI PLY - LDA $90 ; Restore state of RAMRD - BMI :S1 - STA RDMAINRAM - BRA :S2 -:S1 STA RDCARDRAM -:S2 LDA $91 ; Restore state of RAMWRT - BMI :S3 - STA WRMAINRAM - BRA :S4 -:S3 STA WRCARDRAM +* LDA $90 ; Restore state of RAMRD +* BMI :S1 +* STA RDMAINRAM +* BRA :S2 +*:S1 STA RDCARDRAM +* +*:S2 LDA $91 ; Restore state of RAMWRT +* BMI :S3 +* STA WRMAINRAM +* BRA :S4 +*:S3 STA WRCARDRAM -:S4 ; TODO: Pass on to IRQ1V +*:S4 ; TODO: Pass on to IRQ1V PLX PLA NULLRTI RTI diff --git a/mainmem.audio.s b/mainmem.audio.s index 7bda744..f2e2cca 100644 --- a/mainmem.audio.s +++ b/mainmem.audio.s @@ -513,28 +513,33 @@ CHECK4BYTES PHX * Configure an oscillator to play a note * On entry: X - oscillator number 0-3 , A - frequency, Y - amplitude * Preserves all registers -AUDIONOTE +AUDIONOTE PHA + LDA AUDIOCARD + BEQ :MOCK + PLA JMP ENSQNOTE -* JMP MOCKNOTE - RTS +:MOCK PLA + JMP MOCKNOTE * Adjust frequency of oscillator * On entry: X - oscillator number 0-3 , Y - frequency to set * Preserves X & Y AUDIOFREQ + LDA AUDIOCARD + BEQ :MOCK JMP ENSQFREQ -* JMP MOCKFREQ - RTS +:MOCK JMP MOCKFREQ * Adjust amplitude of oscillator * On entry: X - oscillator number 0-3 , Y - amplitude to set * Preserves X & Y AUDIOAMP + LDA AUDIOCARD + BEQ :MOCK JMP ENSQAMP -* JMP MOCKAMP - RTS +:MOCK JMP MOCKAMP * Handle envelope tick counter diff --git a/mainmem.init.s b/mainmem.init.s index d43ea49..324c49d 100644 --- a/mainmem.init.s +++ b/mainmem.init.s @@ -6,6 +6,7 @@ * 14-Nov-2021 If started from CSD, gets prefix to CMDBUF. +AUDIOCARD DB $00 ; $00 = Mockingboard, $01 = Ensoniq * Trampoline in main memory used by aux memory IRQ handler * to invoke Apple II / ProDOS IRQs in main memory @@ -34,10 +35,13 @@ RESET TSX * Reset hardware RESETHW SEC + STZ AUDIOCARD JSR IDROUTINE ; See if this is a GS BCS :NOTGS JSR ENSQINIT ; Initialize Ensoniq + INC AUDIOCARD + RTS ; AUDIOCARD=1 :NOTGS -* JSR MOCKINIT ; Initialize Mockingboard (sl4) - RTS + JSR MOCKINIT ; Initialize Mockingboard (sl4) + RTS ; AUDIOCARD=0 diff --git a/mame_applecorn b/mame_applecorn index a21de9b..05ac8af 100755 --- a/mame_applecorn +++ b/mame_applecorn @@ -1,2 +1,2 @@ -#mame -w apple2ee -debug -sl5 mouse -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po -mame -w apple2gs -debug -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po -harddisk2 tests/JGHMusic2.po +mame -w apple2ee -debug -sl5 mouse -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po +#mame -w apple2gs -debug -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po -harddisk2 tests/JGHMusic2.po