add support for JSR8635 self-decrypting nibble check

This commit is contained in:
4am 2017-09-18 20:39:45 -04:00
parent 10b42d2475
commit 4c32ad028c
3 changed files with 41 additions and 1 deletions

View File

@ -754,6 +754,7 @@ _applyToAll
!source "patchers/jmpb412.a" ; T02 only
!source "patchers/jmpb400.a" ; T02 && gIsBoot0 only
!source "patchers/advint.a" ; gAdventureInternational only
!source "patchers/jsr8635.a" ; gIsRWTS only
lda gPatchCount
beq .nopatches

39
src/patchers/jsr8635.a Normal file
View File

@ -0,0 +1,39 @@
;-------------------------------
; #JSR8635
; self-decrypting nibble check at $8635 finds D5D5F7 sequence on track 3
;
; tested on
; Moon Bingo (1985, Grolier)
; Rhyme-A-Line (1985, Grolier)
; Rhymo's Falling star (1985, Grolier)
; The Story of Miss Mouse (1985, Grolier)
; Rhyme Land (1985, Grolier)
; First Steps to Reading: Phonics I (1985, Grolier)
; First Steps to Reading: Phonics II (1985, Grolier)
;-------------------------------
!zone {
lda gIsBoot0
bne .exit
lda #$0F
sta .sector+1
.sector lda #$FF ; modified at runtime
sta gDisplayBytes
ldx #$00
ldy #$0A
jsr compare
!byte $35,$86 ; BLOAD address
!byte WILDCARD,WILDCARD; BLOAD length
!byte $4E,$38,$86; LSR $8638
!byte $DD,$3B,$86
bcs +
lda #s_d5d5f7
jsr PrintByID
lda gDisplayBytes
ldx #$04
ldy #$01
jsr modify
!byte $60
+ dec .sector+1
bpl .sector
.exit
}

View File

@ -230,7 +230,7 @@ StringTable
; can be set directly before calling PrintByID.
;
.header
!text "Passport by 4am 2017-09-12",$00
!text "Passport by 4am 2017-09-18",$00
.mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "