Detect ZipChip before attempting to change settings.

This commit is contained in:
Bobbi Webber-Manners 2022-09-24 00:19:04 -04:00
parent 7c932e8e83
commit 54bce84745
2 changed files with 24 additions and 4 deletions

Binary file not shown.

View File

@ -759,10 +759,12 @@ EXEC JSR LPTRtoXY
FAST LDA #$80 ; Apple IIgs FAST LDA #$80 ; Apple IIgs
TSB $C036 TSB $C036
STA GSSPEED STA GSSPEED
STA $C05C ; Ultrawarp fast
JSR UNLOCKZIP ; ZipChip JSR UNLOCKZIP ; ZipChip
JSR DETECTZIP
BCC :NOZIP
STA $C05B ; Enable STA $C05B ; Enable
JSR LOCKZIP JMP LOCKZIP
:NOZIP STA $C05C ; Ultrawarp fast
RTS RTS
* *
@ -771,12 +773,30 @@ FAST LDA #$80 ; Apple IIgs
SLOW LDA #$80 ; Apple IIgs SLOW LDA #$80 ; Apple IIgs
TRB $C036 TRB $C036
STZ GSSPEED STZ GSSPEED
STA $C05D ; Ultrawarp slow
JSR UNLOCKZIP ; ZipChip JSR UNLOCKZIP ; ZipChip
JSR DETECTZIP
BCC :NOZIP
STZ $C05A ; Disable STZ $C05A ; Disable
JSR LOCKZIP JMP LOCKZIP
:NOZIP STA $C05D ; Ultrawarp slow
RTS RTS
* Detect a ZipChip
* Set carry is ZipChip found
DETECTZIP LDA $C05C ; ZipChip manual p25
EOR #$FF
STA $C05C
CMP $C05C
BNE :NOZIP
EOR #$FF
STA $C05C
CMP $C05C
BNE :NOZIP
SEC
RTS
:NOZIP CLC
RTS
* Unlock ZipChip registers * Unlock ZipChip registers
UNLOCKZIP PHP UNLOCKZIP PHP
SEI ; Timing sensitive SEI ; Timing sensitive