mirror of
https://github.com/a2-4am/passport.git
synced 2024-11-19 03:06:34 +00:00
commit
0b19b9a14a
@ -8,7 +8,7 @@
|
|||||||
;-------------------------------
|
;-------------------------------
|
||||||
!zone {
|
!zone {
|
||||||
lda gIsOptimum
|
lda gIsOptimum
|
||||||
bne .jmpexit
|
bne .jmpexit1
|
||||||
ldx gTrack
|
ldx gTrack
|
||||||
dex
|
dex
|
||||||
beq .dotrack1
|
beq .dotrack1
|
||||||
@ -28,7 +28,8 @@
|
|||||||
bcs .checktrack
|
bcs .checktrack
|
||||||
tay
|
tay
|
||||||
adc #BASEPAGE-1
|
adc #BASEPAGE-1
|
||||||
sta .iob+2
|
sta .iob1+2
|
||||||
|
sta .iob2+2
|
||||||
pha
|
pha
|
||||||
tya
|
tya
|
||||||
|
|
||||||
@ -45,22 +46,27 @@
|
|||||||
ldy #6
|
ldy #6
|
||||||
jsr SearchSector
|
jsr SearchSector
|
||||||
!byte $01,$60,$01,$00,$01,$0F
|
!byte $01,$60,$01,$00,$01,$0F
|
||||||
bcc .iob
|
bcc .iob1
|
||||||
|
|
||||||
;if it doesn't exist, fetch address from alternative location
|
;if it doesn't exist, fetch address from alternative location
|
||||||
|
|
||||||
inc .iob+2
|
inc .iob1+2
|
||||||
|
inc .iob2+2
|
||||||
ldx #7
|
ldx #7
|
||||||
|
|
||||||
;save for later...
|
;save for later...
|
||||||
|
|
||||||
.iob
|
.iob1
|
||||||
lda $D109,X
|
lda $D109,X
|
||||||
sta .address+1
|
sta .address+1
|
||||||
|
|
||||||
|
.iob2
|
||||||
|
lda $D108,X
|
||||||
|
sta .mergelo+1
|
||||||
|
|
||||||
.checktrack
|
.checktrack
|
||||||
lda gTrack
|
lda gTrack
|
||||||
bne .jmpexit
|
bne .jmpexit1
|
||||||
jmp .dotrack0
|
jmp .dotrack0
|
||||||
|
|
||||||
.retrycount
|
.retrycount
|
||||||
@ -70,7 +76,7 @@
|
|||||||
lda #s_optbad ; say read failure
|
lda #s_optbad ; say read failure
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
|
|
||||||
.jmpexit
|
.jmpexit1
|
||||||
jmp .exit
|
jmp .exit
|
||||||
|
|
||||||
.dotrack1
|
.dotrack1
|
||||||
@ -225,6 +231,9 @@
|
|||||||
;are supplied by reading the data from the protected sector
|
;are supplied by reading the data from the protected sector
|
||||||
;failing to read the data causes the title to crash
|
;failing to read the data causes the title to crash
|
||||||
|
|
||||||
|
.jmpexit2
|
||||||
|
jmp .exit
|
||||||
|
|
||||||
.dotrack0
|
.dotrack0
|
||||||
lda #s_construct
|
lda #s_construct
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
@ -237,7 +246,7 @@
|
|||||||
!byte $20,$5D,$B6 ;JSR $B65D
|
!byte $20,$5D,$B6 ;JSR $B65D
|
||||||
!byte $01,$0E ;track 1, sector #$0E
|
!byte $01,$0E ;track 1, sector #$0E
|
||||||
!byte $00,$08,$18 ;address, count
|
!byte $00,$08,$18 ;address, count
|
||||||
bcs .exit ;give up
|
bcs .jmpexit2 ;give up
|
||||||
adc #BASEPAGE
|
adc #BASEPAGE
|
||||||
sta .patch1+2
|
sta .patch1+2
|
||||||
sta .patch2+2
|
sta .patch2+2
|
||||||
@ -250,6 +259,9 @@
|
|||||||
pha
|
pha
|
||||||
and #$0F
|
and #$0F
|
||||||
sta tmp
|
sta tmp
|
||||||
|
lda #$D1
|
||||||
|
sta .address+1 ; restore default value
|
||||||
|
|
||||||
.patch1
|
.patch1
|
||||||
lda $D104,x
|
lda $D104,x
|
||||||
sbc tmp
|
sbc tmp
|
||||||
@ -273,17 +285,37 @@
|
|||||||
;read replaced page
|
;read replaced page
|
||||||
|
|
||||||
.domerge
|
.domerge
|
||||||
lda #21 ; $2100-21FF
|
lda #$21 ; $2100-21FF
|
||||||
sta gAddress+1
|
sta gAddress+1
|
||||||
ldy #<gRWTSParams
|
ldy #<gRWTSParams
|
||||||
lda #>gRWTSParams
|
lda #>gRWTSParams
|
||||||
jsr $BD00
|
jsr $BD00
|
||||||
|
lda .mergelo+1
|
||||||
|
beq ++
|
||||||
|
dec gSector
|
||||||
|
bpl +
|
||||||
|
lda #$0F
|
||||||
|
sta gSector
|
||||||
|
dec gTrack
|
||||||
|
+ inc gAddress+1
|
||||||
|
ldy #<gRWTSParams
|
||||||
|
lda #>gRWTSParams
|
||||||
|
jsr $BD00
|
||||||
|
dec gAddress+1
|
||||||
|
ldy #0
|
||||||
|
|
||||||
|
.mergelo
|
||||||
|
lda $2100,y ; self-modified
|
||||||
|
sta $2100,y
|
||||||
|
iny
|
||||||
|
bne .mergelo
|
||||||
|
|
||||||
|
++
|
||||||
;merge content
|
;merge content
|
||||||
|
|
||||||
ldy #$86
|
ldy #$86
|
||||||
- lda $300,y
|
- lda $300,y
|
||||||
sta $2000,y
|
sta $2100,y
|
||||||
dey
|
dey
|
||||||
cpy #$FF
|
cpy #$FF
|
||||||
bne -
|
bne -
|
||||||
|
Loading…
Reference in New Issue
Block a user