mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-06-09 11:29:40 +00:00
Supports both Ensoniq (GS) and Mockingboard (//e).
This commit is contained in:
parent
354f4b8e78
commit
db6cf6c73c
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
|
@ -290,7 +290,7 @@ BYTE00 BEQ BYTE00A ; OSBYTE 0,0 - generate error
|
||||||
RTS ; %000x1xxx host type, 'A'pple
|
RTS ; %000x1xxx host type, 'A'pple
|
||||||
BYTE00A BRK
|
BYTE00A BRK
|
||||||
DB $F7
|
DB $F7
|
||||||
HELLO ASC 'Applecorn MOS 2022-11-20'
|
HELLO ASC 'Applecorn MOS 2022-11-21'
|
||||||
DB $00 ; Unify MOS messages
|
DB $00 ; Unify MOS messages
|
||||||
* TO DO: Move into RAM
|
* TO DO: Move into RAM
|
||||||
GSSPEED DB $00 ; $80 if GS is fast, $00 for slow
|
GSSPEED DB $00 ; $80 if GS is fast, $00 for slow
|
||||||
|
|
|
@ -380,15 +380,15 @@ GSBRKAUX >>> IENTAUX ; IENTAUX does not do CLI
|
||||||
IRQBRKHDLR PHA
|
IRQBRKHDLR PHA
|
||||||
* Mustn't enable IRQs within the IRQ handler
|
* Mustn't enable IRQs within the IRQ handler
|
||||||
* Do not use WRTMAIN/WRTAUX macros
|
* Do not use WRTMAIN/WRTAUX macros
|
||||||
LDA RDRAMRD ; Record softswitch state
|
* LDA RDRAMRD ; Record softswitch state
|
||||||
STA $90
|
* STA $90
|
||||||
LDA RDRAMWR
|
* LDA RDRAMWR
|
||||||
STA $91
|
* STA $91
|
||||||
|
*
|
||||||
STA WRMAINRAM ; Write to main memory
|
* STA WRMAINRAM ; Write to main memory
|
||||||
STA $45 ; $45=A for ProDOS IRQ handlers
|
* STA $45 ; $45=A for ProDOS IRQ handlers
|
||||||
STA WRCARDRAM ; Write to aux memory
|
* STA WRCARDRAM ; Write to aux memory
|
||||||
STA RDCARDRAM ; Read from aux memory
|
* STA RDCARDRAM ; Read from aux memory
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
CLD
|
CLD
|
||||||
|
@ -421,19 +421,20 @@ IRQBRKRET
|
||||||
>>> IENTAUX ; IENTAUX does not do CLI
|
>>> IENTAUX ; IENTAUX does not do CLI
|
||||||
|
|
||||||
PLY
|
PLY
|
||||||
LDA $90 ; Restore state of RAMRD
|
|
||||||
BMI :S1
|
|
||||||
STA RDMAINRAM
|
|
||||||
BRA :S2
|
|
||||||
:S1 STA RDCARDRAM
|
|
||||||
|
|
||||||
:S2 LDA $91 ; Restore state of RAMWRT
|
* LDA $90 ; Restore state of RAMRD
|
||||||
BMI :S3
|
* BMI :S1
|
||||||
STA WRMAINRAM
|
* STA RDMAINRAM
|
||||||
BRA :S4
|
* BRA :S2
|
||||||
:S3 STA WRCARDRAM
|
*: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
|
PLX
|
||||||
PLA
|
PLA
|
||||||
NULLRTI RTI
|
NULLRTI RTI
|
||||||
|
|
|
@ -513,28 +513,33 @@ CHECK4BYTES PHX
|
||||||
* Configure an oscillator to play a note
|
* Configure an 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
|
* Preserves all registers
|
||||||
AUDIONOTE
|
AUDIONOTE PHA
|
||||||
|
LDA AUDIOCARD
|
||||||
|
BEQ :MOCK
|
||||||
|
PLA
|
||||||
JMP ENSQNOTE
|
JMP ENSQNOTE
|
||||||
* JMP MOCKNOTE
|
:MOCK PLA
|
||||||
RTS
|
JMP MOCKNOTE
|
||||||
|
|
||||||
|
|
||||||
* Adjust frequency of oscillator
|
* Adjust frequency of oscillator
|
||||||
* On entry: X - oscillator number 0-3 , Y - frequency to set
|
* On entry: X - oscillator number 0-3 , Y - frequency to set
|
||||||
* Preserves X & Y
|
* Preserves X & Y
|
||||||
AUDIOFREQ
|
AUDIOFREQ
|
||||||
|
LDA AUDIOCARD
|
||||||
|
BEQ :MOCK
|
||||||
JMP ENSQFREQ
|
JMP ENSQFREQ
|
||||||
* JMP MOCKFREQ
|
:MOCK JMP MOCKFREQ
|
||||||
RTS
|
|
||||||
|
|
||||||
|
|
||||||
* Adjust amplitude of oscillator
|
* Adjust amplitude of oscillator
|
||||||
* On entry: X - oscillator number 0-3 , Y - amplitude to set
|
* On entry: X - oscillator number 0-3 , Y - amplitude to set
|
||||||
* Preserves X & Y
|
* Preserves X & Y
|
||||||
AUDIOAMP
|
AUDIOAMP
|
||||||
|
LDA AUDIOCARD
|
||||||
|
BEQ :MOCK
|
||||||
JMP ENSQAMP
|
JMP ENSQAMP
|
||||||
* JMP MOCKAMP
|
:MOCK JMP MOCKAMP
|
||||||
RTS
|
|
||||||
|
|
||||||
|
|
||||||
* Handle envelope tick counter
|
* Handle envelope tick counter
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
* 14-Nov-2021 If started from CSD, gets prefix to CMDBUF.
|
* 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
|
* Trampoline in main memory used by aux memory IRQ handler
|
||||||
* to invoke Apple II / ProDOS IRQs in main memory
|
* to invoke Apple II / ProDOS IRQs in main memory
|
||||||
|
@ -34,10 +35,13 @@ RESET TSX
|
||||||
|
|
||||||
* Reset hardware
|
* Reset hardware
|
||||||
RESETHW SEC
|
RESETHW SEC
|
||||||
|
STZ AUDIOCARD
|
||||||
JSR IDROUTINE ; See if this is a GS
|
JSR IDROUTINE ; See if this is a GS
|
||||||
BCS :NOTGS
|
BCS :NOTGS
|
||||||
JSR ENSQINIT ; Initialize Ensoniq
|
JSR ENSQINIT ; Initialize Ensoniq
|
||||||
|
INC AUDIOCARD
|
||||||
|
RTS ; AUDIOCARD=1
|
||||||
:NOTGS
|
:NOTGS
|
||||||
* JSR MOCKINIT ; Initialize Mockingboard (sl4)
|
JSR MOCKINIT ; Initialize Mockingboard (sl4)
|
||||||
RTS
|
RTS ; AUDIOCARD=0
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#mame -w apple2ee -debug -sl5 mouse -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.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
|
#mame -w apple2gs -debug -sl7 cffa2 -harddisk1 ~/Personal/Development/Applecorn/applecorn.po -harddisk2 tests/JGHMusic2.po
|
||||||
|
|
Loading…
Reference in New Issue
Block a user