Added routine to disconnect /RAM

This commit is contained in:
Bobbi Webber-Manners 2021-07-22 21:29:05 -04:00
parent aabc8c21e6
commit 2e24580981
2 changed files with 39 additions and 0 deletions

Binary file not shown.

View File

@ -70,6 +70,7 @@ START STZ BLOCKS
BRA :L1
:S1 JSR CROUT
JSR SETPRFX
JSR DISCONN
STA $C009 ; Alt ZP on
STZ $9F ; WARMSTRT - set cold!
@ -196,6 +197,44 @@ SETPRFX LDA #GPFXCMD
BNE :L1
:S1 RTS
* Disconnect /RAM
* Stolen from Beagle Bros Extra K
DISCONN LDA $BF98
AND #$30
CMP #$30
BNE :S1
LDA $BF26
CMP $BF10
BNE :S2
LDA $BF27
CMP $BF11
BEQ :S1
:S2 LDY $BF31
:L1 LDA $BF32,Y
AND #$F3
CMP #$B3
BEQ :S3
DEY
BPL :L1
BMI :S1
:S3 LDA $BF32,Y
STA $0302
:L2 LDA $BF33,Y
STA $BF32,Y
BEQ :S4
INY
BNE :L2
:S4 LDA $BF26
STA $0300
LDA $BF27
STA $0301
LDA $BF10
STA $BF26
LDA $BF11
STA $BF27
DEC $BF31
:S1 RTS
* Reset handler
* XFER to AUXMOS ($C000) in aux, AuxZP on, LC on
RESET TSX