mirror of
https://github.com/a2-4am/passport.git
synced 2025-02-10 15:30:54 +00:00
add support for simpler RPS variant
This commit is contained in:
parent
d314e7be03
commit
6d3cdc7581
@ -8,6 +8,10 @@
|
|||||||
; so named because the disk volume string is
|
; so named because the disk volume string is
|
||||||
; C1984 RPS A#
|
; C1984 RPS A#
|
||||||
;
|
;
|
||||||
|
; variant 0
|
||||||
|
; - Math Skills: Elementary Level (Encyclopaedia Britannica)
|
||||||
|
; - Math Skills: Junior High Level (Encyclopaedia Britannica)
|
||||||
|
|
||||||
; variant 1
|
; variant 1
|
||||||
; - Dig Dug (Thunder Mountain)
|
; - Dig Dug (Thunder Mountain)
|
||||||
; - Pac-Man (Thunder Mountain)
|
; - Pac-Man (Thunder Mountain)
|
||||||
@ -15,14 +19,10 @@
|
|||||||
;
|
;
|
||||||
; variant 2
|
; variant 2
|
||||||
; - Problem Solving in Algebra (Encyclopaedia Britannica)
|
; - Problem Solving in Algebra (Encyclopaedia Britannica)
|
||||||
; - Math Skills: Elementary Level (Encyclopaedia Britannica)
|
|
||||||
; - Math Skills: Junior High Level (Encyclopaedia Britannica)
|
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
!zone {
|
!zone {
|
||||||
bit gMode ; nothing to do here in verify-only mode
|
bit gMode ; nothing to do here in verify-only mode
|
||||||
bpl .exit
|
bpl .exit
|
||||||
lda gIsBoot0 ; if DOS 3.3 boot0 loader
|
|
||||||
bne .exit
|
|
||||||
lda gIsBoot1 ; and DOS 3.3 boot1 loader
|
lda gIsBoot1 ; and DOS 3.3 boot1 loader
|
||||||
bne .exit
|
bne .exit
|
||||||
|
|
||||||
@ -32,9 +32,6 @@
|
|||||||
jsr compare ; if T00,S01,$48 ==
|
jsr compare ; if T00,S01,$48 ==
|
||||||
!byte $C1,$B3
|
!byte $C1,$B3
|
||||||
bcs .exit ; primary pattern not found, bail
|
bcs .exit ; primary pattern not found, bail
|
||||||
ldy #$02
|
|
||||||
jsr modify ; then set T00,S01,$48 =
|
|
||||||
!byte $1F,$B4
|
|
||||||
|
|
||||||
lda #$03
|
lda #$03
|
||||||
ldx #$3E
|
ldx #$3E
|
||||||
@ -42,14 +39,28 @@
|
|||||||
jsr compare ; if T00,S03,$3E ==
|
jsr compare ; if T00,S03,$3E ==
|
||||||
!byte $4C,$B3,$B6
|
!byte $4C,$B3,$B6
|
||||||
!byte $EA
|
!byte $EA
|
||||||
bcs .variant1
|
bcs .variant0 ; passport-test-suite/Math Skills Elementary Level.woz [C=1] here
|
||||||
lda #$03
|
|
||||||
ldx #$3E
|
|
||||||
ldy #$04
|
ldy #$04
|
||||||
jsr modify ; then set T00,S03,$3E =
|
jsr modify ; then set T00,S03,$3E =
|
||||||
!byte $C9,$AA
|
!byte $C9,$AA
|
||||||
!byte $F0,$5C
|
!byte $F0,$5C
|
||||||
|
|
||||||
|
lda #$01 ; presence of JMP $B6B3 also indicates code at
|
||||||
|
ldx #$48 ; $B41F that copies the real DOS code back to $B6B3
|
||||||
|
ldy #$02 ; so we modify $B747 to jump to that (it exits via $9D84)
|
||||||
|
jsr modify ; and set T00,S01,$48 =
|
||||||
|
!byte $1F,$B4
|
||||||
|
bvc .variant1 ; always branches
|
||||||
|
|
||||||
|
.variant0
|
||||||
|
lda #$01 ; lack of JMP $B6B3 indicates an earlier variant
|
||||||
|
ldx #$48 ; which has no useful code at $B3C1, so we
|
||||||
|
ldy #$02 ; modify $B747 to jump directly to $9D84
|
||||||
|
jsr modify
|
||||||
|
!byte $84,$9D
|
||||||
|
; /!\ execution falls through here
|
||||||
|
|
||||||
.variant1
|
.variant1
|
||||||
lda #$01
|
lda #$01
|
||||||
ldx #$87
|
ldx #$87
|
||||||
@ -66,13 +77,15 @@
|
|||||||
jsr modify ; and set T00,S01,$92 =
|
jsr modify ; and set T00,S01,$92 =
|
||||||
!byte $F1 ; change branch to unconditionally jump to success path
|
!byte $F1 ; change branch to unconditionally jump to success path
|
||||||
bvc .exit ; always branches
|
bvc .exit ; always branches
|
||||||
|
|
||||||
.variant2
|
.variant2
|
||||||
inx
|
inx
|
||||||
ldy #$03
|
ldy #$03
|
||||||
jsr compare ; if T00,S01,$88 ==
|
jsr compare ; if T00,S01,$88 ==
|
||||||
!byte $6C,$58,$9D
|
!byte $6C,$58,$9D
|
||||||
bcs .exit ; passport/test-suite/Problem Solving in Algebra.woz [C=0] here
|
bcs .exit ; passport/test-suite/Problem Solving in Algebra.woz [C=0] here
|
||||||
ldx #$8E
|
; if we didn't find indirect jump in either location, bail
|
||||||
|
ldx #$8E ; variant #2 is similar to variant #1 but branch offsets differ by 1 byte
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr modify ; then set T00,S01,$8E =
|
jsr modify ; then set T00,S01,$8E =
|
||||||
!byte $F9 ; change branch to unconditionally jump to success path
|
!byte $F9 ; change branch to unconditionally jump to success path
|
||||||
|
@ -280,7 +280,7 @@ StringTableHigh
|
|||||||
; can be set directly before calling PrintByID.
|
; can be set directly before calling PrintByID.
|
||||||
;
|
;
|
||||||
.header
|
.header
|
||||||
!text "Passport by 4am 2020-07-15",$00
|
!text "Passport by 4am 2020-07-17",$00
|
||||||
.mainmenu
|
.mainmenu
|
||||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||||
!text " "
|
!text " "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user