mirror of
https://github.com/a2-4am/passport.git
synced 2025-08-09 07:25:06 +00:00
more 5-5-5 work
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
; utility functions for common cases
|
; utility functions for common cases
|
||||||
; (from the caller's perspective, these have the side effect of setting Y,
|
; (from the caller's perspective, these have the side effect of setting Y,
|
||||||
; since the modify routine will 'save' and 'restore' the value we're setting here)
|
; since the modify routine will 'save' and 'restore' the value we're setting here)
|
||||||
|
modify4
|
||||||
|
ldy #$04
|
||||||
|
!byte $2C
|
||||||
|
; /!\ execution falls through here
|
||||||
modify3
|
modify3
|
||||||
ldy #$03
|
ldy #$03
|
||||||
!byte $2C
|
!byte $2C
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
; - Guardian
|
; - Guardian
|
||||||
; - Jumble Jet
|
; - Jumble Jet
|
||||||
; - Jumpman
|
; - Jumpman
|
||||||
|
; - Keyboard Golf
|
||||||
; - L.A. Land Monopoly
|
; - L.A. Land Monopoly
|
||||||
; - Lazersilk
|
; - Lazersilk
|
||||||
; - Microzine 3
|
; - Microzine 3
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
; - Supermap
|
; - Supermap
|
||||||
; - Tales of Discovery
|
; - Tales of Discovery
|
||||||
; - Temple of Apshai
|
; - Temple of Apshai
|
||||||
|
; - The Final Frontier
|
||||||
; - The Game Show
|
; - The Game Show
|
||||||
; - Trap-a-Zoid
|
; - Trap-a-Zoid
|
||||||
; - Zenith
|
; - Zenith
|
||||||
@@ -212,7 +214,7 @@ Do555
|
|||||||
sta .curtrk+1
|
sta .curtrk+1
|
||||||
lda #$34
|
lda #$34
|
||||||
sta .hookseek+1
|
sta .hookseek+1
|
||||||
ldx #$93
|
ldx #$94
|
||||||
jmp .foundpart
|
jmp .foundpart
|
||||||
|
|
||||||
.foundseek2
|
.foundseek2
|
||||||
@@ -242,6 +244,8 @@ Do555
|
|||||||
stx $3A
|
stx $3A
|
||||||
ldy #0
|
ldy #0
|
||||||
lda ($3A),y
|
lda ($3A),y
|
||||||
|
cmp #$4C ; JMP $xxxx
|
||||||
|
beq .nohalf
|
||||||
cmp #$AA ; TAX
|
cmp #$AA ; TAX
|
||||||
beq .isldx
|
beq .isldx
|
||||||
cmp #$A2 ; LDX #$xx
|
cmp #$A2 ; LDX #$xx
|
||||||
@@ -345,13 +349,43 @@ Do555
|
|||||||
lda gTrack
|
lda gTrack
|
||||||
cmp #1
|
cmp #1
|
||||||
bne .curtrk
|
bne .curtrk
|
||||||
|
ldx #$AC
|
||||||
|
stx $BDEF
|
||||||
ldx #$90
|
ldx #$90
|
||||||
stx $BDF2
|
stx $BDF2
|
||||||
.curtrk
|
.curtrk
|
||||||
cmp #00 ; SMC
|
cmp #00 ; SMC
|
||||||
bne .notpartial
|
beq .ispartial
|
||||||
|
jmp .notpartial
|
||||||
|
|
||||||
|
.ispartial
|
||||||
ldy #$CD
|
ldy #$CD
|
||||||
sty $BE2B
|
sty $BE2B
|
||||||
|
lda #8
|
||||||
|
ldx #$AD
|
||||||
|
ldy #4
|
||||||
|
jsr CompareMemory
|
||||||
|
!byte $A9,$0F ; LDA #$0F
|
||||||
|
!byte $85,$3D ; STA $3D
|
||||||
|
ldx #0
|
||||||
|
bcs .forwards
|
||||||
|
ldx #<.forwards3-<.forwards1
|
||||||
|
|
||||||
|
.forwards
|
||||||
|
lda #1
|
||||||
|
sta .forwards1+1,x
|
||||||
|
lda #6
|
||||||
|
sta .forwards1+3,x
|
||||||
|
txa
|
||||||
|
eor #<.forwards3-<.forwards1
|
||||||
|
tax
|
||||||
|
lda #11
|
||||||
|
sta .forwards1+1,x
|
||||||
|
lda #16
|
||||||
|
sta .forwards1+3,x
|
||||||
|
|
||||||
|
|
||||||
|
.forwards1
|
||||||
ldx #1
|
ldx #1
|
||||||
ldy #6
|
ldy #6
|
||||||
jsr .readsectors
|
jsr .readsectors
|
||||||
@@ -365,14 +399,14 @@ Do555
|
|||||||
inc gTrack
|
inc gTrack
|
||||||
lsr gTrack
|
lsr gTrack
|
||||||
inc dct+1 ; back to normal
|
inc dct+1 ; back to normal
|
||||||
|
.forwards3
|
||||||
ldx #11
|
ldx #11
|
||||||
ldy #16
|
ldy #16
|
||||||
jsr .readsectors
|
jsr .readsectors
|
||||||
dec gTrack
|
dec gTrack
|
||||||
lda #1
|
lda #1
|
||||||
ldx #$44
|
ldx #$44
|
||||||
ldy #3
|
jsr compare3
|
||||||
jsr compare
|
|
||||||
!byte $20,$76,$08 ;JSR $0876
|
!byte $20,$76,$08 ;JSR $0876
|
||||||
bcs .notfixed
|
bcs .notfixed
|
||||||
jsr modify1
|
jsr modify1
|
||||||
@@ -382,6 +416,24 @@ Do555
|
|||||||
!byte $20,$76,$08 ;JSR $0876
|
!byte $20,$76,$08 ;JSR $0876
|
||||||
|
|
||||||
.notfixed
|
.notfixed
|
||||||
|
lda #$0F
|
||||||
|
ldx #$38
|
||||||
|
jsr compare3
|
||||||
|
!byte $20,$5F,$08 ;JSR $085F
|
||||||
|
bcs .notfixed2
|
||||||
|
jsr modify1
|
||||||
|
!byte $2C ;BIT
|
||||||
|
ldx #$4B
|
||||||
|
jsr modify1
|
||||||
|
!byte $C1
|
||||||
|
ldx #$C1
|
||||||
|
ldy #9
|
||||||
|
jsr modify
|
||||||
|
!byte $20,$5F,$08 ;JSR $085F
|
||||||
|
!byte $20,$5F,$08 ;JSR $085F
|
||||||
|
!byte $4C,$5F,$08 ;JMP $085F
|
||||||
|
|
||||||
|
.notfixed2
|
||||||
jsr ReorderLogicalToPhysical
|
jsr ReorderLogicalToPhysical
|
||||||
jsr .writesectors
|
jsr .writesectors
|
||||||
inc gTrack
|
inc gTrack
|
||||||
@@ -407,39 +459,40 @@ Do555
|
|||||||
jsr .readsectors
|
jsr .readsectors
|
||||||
lda gTrack
|
lda gTrack
|
||||||
bne .writesectors
|
bne .writesectors
|
||||||
ldx (BASEPAGE*256)+2
|
ldx #2
|
||||||
cpx #$76
|
jsr compare1
|
||||||
bne .checkfixed2
|
!byte $76
|
||||||
lda #0
|
bcs .checkfixed2
|
||||||
ldx #$B2
|
ldx #$B2
|
||||||
|
jsr compare
|
||||||
|
!byte $00
|
||||||
|
bcc .patchfixed
|
||||||
|
ldx #$B6
|
||||||
|
|
||||||
|
.patchfixed
|
||||||
jsr modify1
|
jsr modify1
|
||||||
!byte 1
|
!byte 1
|
||||||
|
ldx #2
|
||||||
|
|
||||||
.checkfixed2
|
.checkfixed2
|
||||||
ldx (BASEPAGE*256)+2
|
jsr compare
|
||||||
cpx #$7A
|
!byte $7A
|
||||||
bne .writesectors
|
bcs .writesectors
|
||||||
lda #0
|
|
||||||
ldx #$16
|
ldx #$16
|
||||||
ldy #4
|
jsr modify4
|
||||||
jsr modify
|
|
||||||
!byte $1A,$08
|
!byte $1A,$08
|
||||||
!byte $E6,$41 ; INC $41
|
!byte $E6,$41 ; INC $41
|
||||||
lda #$0B
|
lda #$0B
|
||||||
ldx #$0D
|
ldx #$0D
|
||||||
jsr modify1
|
jsr modify1
|
||||||
!byte $EA
|
!byte $EA
|
||||||
lda #$0B
|
|
||||||
ldx #$64
|
ldx #$64
|
||||||
jsr modify1
|
jsr modify1
|
||||||
!byte $2C ; BIT
|
!byte $2C ; BIT
|
||||||
lda #$0B
|
|
||||||
ldx #$86
|
ldx #$86
|
||||||
ldy #4
|
jsr modify4
|
||||||
jsr modify
|
|
||||||
!byte $8A,$04
|
!byte $8A,$04
|
||||||
!byte $E6,$41 ; INC $41
|
!byte $E6,$41 ; INC $41
|
||||||
lda #$0B
|
|
||||||
ldx #$EA
|
ldx #$EA
|
||||||
ldy #6
|
ldy #6
|
||||||
jsr modify
|
jsr modify
|
||||||
@@ -466,6 +519,9 @@ Do555
|
|||||||
lda gError
|
lda gError
|
||||||
cmp #$40 ; sector not found
|
cmp #$40 ; sector not found
|
||||||
bne .reallyfatal
|
bne .reallyfatal
|
||||||
|
lda gTrack
|
||||||
|
cmp .curtrk+1
|
||||||
|
bcc .notpatch2 ; cross fingers
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.reallyfatal
|
.reallyfatal
|
||||||
@@ -506,7 +562,10 @@ Do555
|
|||||||
!byte $4C ; JMP $xxxx
|
!byte $4C ; JMP $xxxx
|
||||||
lda .curtrk+1
|
lda .curtrk+1
|
||||||
bpl .skipnohalf
|
bpl .skipnohalf
|
||||||
ldy #$A5
|
lda $3A
|
||||||
|
clc
|
||||||
|
adc #$12
|
||||||
|
tay
|
||||||
lda #$36
|
lda #$36
|
||||||
sta ($3E),y
|
sta ($3E),y
|
||||||
iny
|
iny
|
||||||
@@ -583,7 +642,6 @@ Do555
|
|||||||
!byte $DE
|
!byte $DE
|
||||||
|
|
||||||
.notadrepi
|
.notadrepi
|
||||||
|
|
||||||
ldy #8
|
ldy #8
|
||||||
jsr SearchTrack
|
jsr SearchTrack
|
||||||
!byte $A9,$20 ; LDA #$20
|
!byte $A9,$20 ; LDA #$20
|
||||||
@@ -596,120 +654,97 @@ Do555
|
|||||||
inx
|
inx
|
||||||
jsr modify1
|
jsr modify1
|
||||||
!byte $00
|
!byte $00
|
||||||
.novol
|
|
||||||
|
|
||||||
ldy #9
|
.novol
|
||||||
jsr SearchTrack
|
|
||||||
!byte $AC,$9F,$05 ; LDY $059F
|
|
||||||
!byte $C8 ; INY
|
|
||||||
!byte $C8 ; INY
|
|
||||||
!byte $98 ; TYA
|
|
||||||
!byte $20,$19,$05 ; JSR $0519
|
|
||||||
bcc .patchrocky
|
|
||||||
ldy #5
|
ldy #5
|
||||||
jsr SearchTrack
|
jsr SearchTrack
|
||||||
!byte $20,$87,$07 ; JSR $0787
|
!byte $20,$87,$07 ; JSR $0787
|
||||||
!byte $A6,$2B ; LDX $2B
|
!byte $A6,$2B ; LDX $2B
|
||||||
bcs .notfixed2
|
bcs .notfixed3
|
||||||
ldy #5
|
ldy #5
|
||||||
jsr modify
|
jsr modify
|
||||||
!byte $20,$89,$07 ; JSR $0789
|
!byte $20,$89,$07 ; JSR $0789
|
||||||
!byte $E6,$41 ; INC $41
|
!byte $E6,$41 ; INC $41
|
||||||
|
|
||||||
.notfixed2
|
.notfixed3
|
||||||
rts
|
|
||||||
|
|
||||||
.patchrocky
|
|
||||||
ldy #8
|
ldy #8
|
||||||
|
jsr SearchTrack
|
||||||
|
!byte $01,$30,$28
|
||||||
|
!byte $24,$20,$1E
|
||||||
|
!byte $1D,$1C
|
||||||
|
bcs .notseek
|
||||||
pha
|
pha
|
||||||
jsr modify
|
sec
|
||||||
!byte $E6,$41 ; INC $41
|
|
||||||
!byte $A5,$41 ; LDA $41
|
|
||||||
!byte $20,$18,$05 ; JSR $0518
|
|
||||||
!byte $A9 ; LDA #$xx
|
|
||||||
clc
|
|
||||||
txa
|
txa
|
||||||
adc #$38
|
sbc #$6D
|
||||||
tax
|
tax
|
||||||
pla
|
pla
|
||||||
|
sbc #0
|
||||||
|
ldy #10
|
||||||
|
jsr compare
|
||||||
|
!byte $0A ; ASL
|
||||||
|
!byte $85,WILDCARD ; STA $xx
|
||||||
|
!byte $CD,WILDCARD,WILDCARD ; CMP $xxxx
|
||||||
|
!byte $F0,$53 ; BEQ *+$55
|
||||||
|
!byte $A9,$00 ; LDA #$00
|
||||||
|
bcs .notseek
|
||||||
pha
|
pha
|
||||||
|
txa
|
||||||
|
adc #8
|
||||||
|
tax
|
||||||
|
pla
|
||||||
|
jsr modify2
|
||||||
|
!byte $D0,$73 ; BNE *+$75
|
||||||
|
pha
|
||||||
|
clc
|
||||||
|
txa
|
||||||
|
adc #$23
|
||||||
|
tax
|
||||||
|
pla
|
||||||
jsr modify1
|
jsr modify1
|
||||||
!byte $08
|
!byte $08
|
||||||
|
pha
|
||||||
|
ldy #$15
|
||||||
|
sec
|
||||||
|
lda (moddest),y
|
||||||
|
sbc #4
|
||||||
|
sta (moddest),y
|
||||||
|
iny
|
||||||
|
lda (moddest),y
|
||||||
|
sbc #0
|
||||||
|
sta (moddest),y
|
||||||
clc
|
clc
|
||||||
txa
|
txa
|
||||||
adc #$4A
|
adc #$4A
|
||||||
tax
|
tax
|
||||||
pla
|
pla
|
||||||
|
adc #0 ; DOS seek spans a page
|
||||||
|
jsr modify4
|
||||||
|
!byte $70,$2C,$26
|
||||||
|
!byte $22
|
||||||
pha
|
pha
|
||||||
ldy #4
|
lda (moddest),y
|
||||||
|
tay
|
||||||
|
pla
|
||||||
|
cpy #$70
|
||||||
|
beq .nocross ; Pollywog seek spans a page
|
||||||
|
sec
|
||||||
|
sbc #1
|
||||||
|
.nocross
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
ldy #11
|
||||||
jsr modify
|
jsr modify
|
||||||
!byte $85,$41 ; STA $41
|
!byte $1F,$1E,$1D
|
||||||
!byte $D0,$08 ; BNE *+$0A
|
!byte $1C
|
||||||
clc
|
!byte $4A ; LSR
|
||||||
txa
|
!byte $85,$41 ; STA $41
|
||||||
adc #$0C
|
!byte $A9,$00 ; LDA #$00
|
||||||
tax
|
!byte $F0,$86 ; BEQ *-$78
|
||||||
pla
|
|
||||||
pha
|
.notseek
|
||||||
jsr modify3
|
|
||||||
!byte $4C,$18,$05 ; JMP $0518
|
|
||||||
clc
|
|
||||||
txa
|
|
||||||
adc #$7B
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
adc #$FE
|
|
||||||
pha
|
|
||||||
jsr modify1
|
|
||||||
!byte $8D
|
|
||||||
clc
|
|
||||||
txa
|
|
||||||
adc #$3B
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
pha
|
|
||||||
jsr modify1
|
|
||||||
!byte $8D
|
|
||||||
clc
|
|
||||||
txa
|
|
||||||
adc #$21
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
pha
|
|
||||||
jsr modify1
|
|
||||||
!byte $8D
|
|
||||||
clc
|
|
||||||
txa
|
|
||||||
adc #$22
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
pha
|
|
||||||
jsr modify1
|
|
||||||
!byte $8D
|
|
||||||
clc
|
|
||||||
txa
|
|
||||||
adc #$1C
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
pha
|
|
||||||
jsr modify1
|
|
||||||
!byte $8D
|
|
||||||
clc
|
|
||||||
txa
|
|
||||||
adc #$38
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
pha
|
|
||||||
jsr modify1
|
|
||||||
!byte $8D
|
|
||||||
clc
|
|
||||||
txa
|
|
||||||
adc #$2E
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
adc #$FE
|
|
||||||
jsr modify1
|
|
||||||
!byte $8D
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.decode
|
.decode
|
||||||
@@ -725,6 +760,8 @@ Do555
|
|||||||
.cleanup
|
.cleanup
|
||||||
lda #1
|
lda #1
|
||||||
sta dct+1
|
sta dct+1
|
||||||
|
lda #$CC
|
||||||
|
sta $BDEF
|
||||||
lda #$F0
|
lda #$F0
|
||||||
sta $BDF2
|
sta $BDF2
|
||||||
lda #$B9
|
lda #$B9
|
||||||
|
@@ -341,7 +341,7 @@ StringTableHigh
|
|||||||
.passport
|
.passport
|
||||||
!text "Passport ",$00
|
!text "Passport ",$00
|
||||||
.header
|
.header
|
||||||
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-25",$00
|
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-29",$00
|
||||||
.bar9
|
.bar9
|
||||||
!text "_________",$00
|
!text "_________",$00
|
||||||
.bar18
|
.bar18
|
||||||
|
Reference in New Issue
Block a user