mirror of
https://github.com/a2-4am/passport.git
synced 2025-01-02 17:30:53 +00:00
NEW: support for Origin Systems Dinkey-DOS (Ultima V, Times of Lore)
This commit is contained in:
parent
d07c4e3ebb
commit
b0384941bd
@ -26,3 +26,20 @@ IDProDOS
|
||||
!byte $4C ; JMP
|
||||
rts
|
||||
}
|
||||
|
||||
!zone {
|
||||
PatchUniversalRWTSForOrigin
|
||||
ldy #$0F
|
||||
- lda .a, y
|
||||
sta $b990, y
|
||||
dey
|
||||
bpl -
|
||||
ldy #$14
|
||||
- lda .b, y
|
||||
sta $b92f, y
|
||||
dey
|
||||
bpl -
|
||||
rts
|
||||
.a !byte $C9,$AB,$D0,$0A,$EA,$BD,$8C,$C0,$C9,$AB,$F0,$95,$D0,$00,$18,$60
|
||||
.b !byte $18,$60,$38,$A5,$2D,$E9,$11,$85,$2D,$18,$60,$00,$00,$00,$00,$00,$00,$00,$00,$38,$60
|
||||
}
|
||||
|
@ -319,6 +319,16 @@ ADStyle
|
||||
UseUniversal
|
||||
jsr IncProgress
|
||||
jsr StartWithUniv
|
||||
lda gIsProDOS
|
||||
bne ReadWithRWTS
|
||||
; On disks with a ProDOS bootloader, we patch the universal RWTS in memory
|
||||
; so it can also read protected Origin disks like Ultima V and Times of Lore.
|
||||
; These disks use a hybrid RWTS that alters the sector number in the
|
||||
; address field based on the address epilogue. Once we normalize the
|
||||
; sector numbers, no further patches are required, since the RWTS can also
|
||||
; read unprotected disks. A separate patcher finds the actual code that
|
||||
; alters the sector number to print it to the log.
|
||||
jsr PatchUniversalRWTSForOrigin
|
||||
|
||||
; note: execution falls through here
|
||||
|
||||
@ -683,6 +693,7 @@ _applyToAll
|
||||
!source "patchers/prodosmecc.a" ; gIsProDOS only
|
||||
!source "patchers/bbf9.a" ; gIsProDOS only
|
||||
!source "patchers/memory.config.a" ; gIsProDOS only
|
||||
!source "patchers/origin.a" ; gIsProDOS only
|
||||
!source "patchers/rwtsswapmecc.a" ; gIsMECCFastloader only
|
||||
!source "patchers/protecteddos.a" ; gIsProtDOS only
|
||||
!source "patchers/fbff.a"
|
||||
|
43
src/patchers/origin.a
Normal file
43
src/patchers/origin.a
Normal file
@ -0,0 +1,43 @@
|
||||
;-------------------------------
|
||||
; #ORIGIN
|
||||
; disk allows either $DE or $AB + timing bit
|
||||
; for the address epilogue -- if it finds the latter,
|
||||
; it also munges the sector number from the address field
|
||||
; (no patches required, but we want to
|
||||
; log it and pretend we patched something
|
||||
; so we get a nice CRACK COMPLETE message)
|
||||
;
|
||||
; tested on
|
||||
; - Times of Lore
|
||||
; - Ultima V
|
||||
;-------------------------------
|
||||
!zone {
|
||||
lda gIsProDOS ; only if ProDOS
|
||||
bne .exit
|
||||
lda #$0F
|
||||
sta .sector+1
|
||||
.sector lda #$FF ; modified at runtime
|
||||
sta gDisplayBytes
|
||||
ldx #$81
|
||||
ldy #$18
|
||||
jsr compare
|
||||
!byte $BD,$8C,$C0; LDA $C08C,X
|
||||
!byte $10,$FB ; BPL -
|
||||
!byte $C9,$DE ; CMP #$DE
|
||||
!byte $F0,$0E ; BEQ +
|
||||
!byte $EA ; NOP
|
||||
!byte $BD,$8C,$C0; LDA $C08C,X
|
||||
!byte $C9,$AB ; CMP #$AB
|
||||
!byte $D0,$0C ; BNE +
|
||||
!byte $38 ; SEC
|
||||
!byte $A5,$5D ; LDA $5D
|
||||
!byte $E9,$11 ; SBC #$11
|
||||
!byte $85,$5D ; STA $5D
|
||||
bcs +
|
||||
lda #s_origin
|
||||
jsr PrintByID
|
||||
inc gPatchCount
|
||||
+ dec .sector+1
|
||||
bpl .sector
|
||||
.exit
|
||||
}
|
@ -109,6 +109,7 @@ StringTable
|
||||
!word .rdos
|
||||
!word .sra
|
||||
!word .muse
|
||||
!word .origin
|
||||
;
|
||||
; Text can contain substitution strings, which
|
||||
; are replaced by current values at runtime. Each
|
||||
@ -134,7 +135,7 @@ StringTable
|
||||
; can be set directly before calling PrintByID.
|
||||
;
|
||||
.header
|
||||
!text "Passport by 4am 2017-11-25",$00
|
||||
!text "Passport by 4am 2017-12-03",$00
|
||||
.mainmenu
|
||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||
!text " "
|
||||
@ -418,4 +419,7 @@ StringTable
|
||||
!text "T%t,S%0 Found SRA protection check",$8D,$00
|
||||
.muse
|
||||
!text "T00,S08 RWTS doubles every sector ID",$8D,$00
|
||||
.origin
|
||||
!text "T%t,S%0 RWTS alters the sector ID if the"
|
||||
!text "address epilogue contains a timing bit.",$8D,00
|
||||
}
|
||||
|
@ -97,4 +97,5 @@ s_rwtswrite = $5B
|
||||
s_rdos = $5C
|
||||
s_sra = $5D
|
||||
s_muse = $5E
|
||||
STRINGCOUNT = $5F
|
||||
s_origin = $5F
|
||||
STRINGCOUNT = $60
|
||||
|
Loading…
Reference in New Issue
Block a user