add support for ssprot variant 3 [fixes Metric System Tutor]

This commit is contained in:
4am 2020-07-19 16:24:14 -04:00
parent 6d3cdc7581
commit 1f01f41988

View File

@ -17,9 +17,9 @@
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
bpl .exit0
lda gIsF7F6
bne .exit
bne .exit0
lda #$0F
sta .sector+1
.sector lda #$FF ; modified above
@ -46,14 +46,22 @@
ldy #$03
jsr compare
!byte $23,$2A,$28
bcc .variant1 ; passport-test-suite/Creative Contraptions.woz [C=0] matches
bcc .variant1 ; passport-test-suite/Creative Contraptions.woz [C=0] matches
ldy #$03
jsr compare
!byte $70,$79,$77
bcc .variant2 ; passport-test-suite/Wortgefecht.woz [C=0] matches
bcc .variant2 ; passport-test-suite/Wortgefecht.woz [C=0] matches
ldy #$03
jsr compare
!byte $23,$2A,$24 ; passport-test-suite/Metric System Tutor.woz [C=0] matches
bcc .variant3
bcs .nextsector
.exit0 jmp .exit
.sector0 bpl .sector
.variant1
ldx #$20
ldy #$03
@ -77,10 +85,19 @@
jsr modify ; new JMP entry point ($0903 when decrypted)
!byte $FA,$F2
; note: execution falls through here
.variant3
ldx #$20
ldy #$03
jsr modify
!byte $EA ; NOP
!byte $A9,$27 ; LDA #$27
ldx #$76
ldy #$02
jsr modify ; new JMP entry point ($0903 when decrypted)
!byte $A9,$A1
.nextsector
dec .sector+1
bpl .sector
bpl .sector0
.exit
}