2017-01-08 03:35:35 +00:00
|
|
|
!cpu 6502
|
2019-06-14 02:54:03 +00:00
|
|
|
!ifdef RELBASE {
|
|
|
|
*=RELBASE
|
|
|
|
} else {
|
2017-01-08 03:35:35 +00:00
|
|
|
*=$2000
|
2019-06-14 02:54:03 +00:00
|
|
|
}
|
2017-01-08 03:35:35 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; Passport
|
|
|
|
; a 4am hack
|
2021-04-20 01:17:23 +00:00
|
|
|
; (c) 2016-2021 by 4am
|
2017-01-08 03:35:35 +00:00
|
|
|
;
|
|
|
|
; Permission is hereby granted, free of charge, to any
|
|
|
|
; person obtaining a copy of this software and associated
|
|
|
|
; documentation files (the "Software"), to deal in the
|
|
|
|
; Software without restriction, including without limitation
|
|
|
|
; the rights to use, copy, modify, merge, publish,
|
|
|
|
; distribute, sublicense, and/or sell copies of the
|
|
|
|
; furnished to do so, subject to the following conditions:
|
|
|
|
;
|
|
|
|
; The above copyright notice and this permission notice
|
|
|
|
; shall be included in all copies or substantial portions of
|
|
|
|
; the Software.
|
|
|
|
;
|
|
|
|
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
|
|
; KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
|
|
; WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
|
|
; PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
|
|
|
; OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
|
|
; OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
|
|
; OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
;
|
|
|
|
;-------------------------------
|
|
|
|
|
2017-11-09 05:47:12 +00:00
|
|
|
!ifndef VERBOSE {
|
|
|
|
VERBOSE = $00 ; set to $01 to display API label addresses
|
|
|
|
}
|
|
|
|
|
2021-04-18 15:19:14 +00:00
|
|
|
!to "../build/PASSPORT.TMP",plain
|
2021-06-11 19:19:41 +00:00
|
|
|
!ct "lcase.ct"
|
2017-01-08 03:35:35 +00:00
|
|
|
|
2021-06-11 19:19:41 +00:00
|
|
|
!source "apidefs.a" ; no code in here
|
2017-01-08 03:35:35 +00:00
|
|
|
|
2021-06-11 19:19:41 +00:00
|
|
|
FirstMover
|
2021-04-19 14:58:00 +00:00
|
|
|
ldx #$FF
|
|
|
|
txs
|
2017-01-08 03:35:35 +00:00
|
|
|
lda $C0E8
|
2021-04-20 00:53:33 +00:00
|
|
|
jsr CleanupFiles ; RAM/HD files might be left open after Ctrl-Reset
|
|
|
|
; /!\ execution falls through here
|
|
|
|
MainMenu
|
2017-01-08 03:35:35 +00:00
|
|
|
jsr ClearScreen
|
|
|
|
lda #s_header
|
|
|
|
jsr PrintByID
|
|
|
|
lda #s_mainmenu
|
|
|
|
jsr PrintByID
|
2021-04-18 04:12:05 +00:00
|
|
|
bit gTargetType
|
|
|
|
bmi @usingHardDisk
|
|
|
|
bvs @usingCFFA
|
2021-04-15 03:35:14 +00:00
|
|
|
lda #s_targetdisk
|
|
|
|
!byte $2C
|
2021-04-18 04:12:05 +00:00
|
|
|
@usingCFFA
|
2021-04-15 03:35:14 +00:00
|
|
|
lda #s_targetcffa
|
|
|
|
!byte $2C
|
2021-04-18 04:12:05 +00:00
|
|
|
@usingHardDisk
|
2021-04-14 16:40:53 +00:00
|
|
|
lda #s_targetfile
|
|
|
|
jsr PrintByID
|
2021-04-18 04:49:26 +00:00
|
|
|
@getkey
|
2017-01-08 03:35:35 +00:00
|
|
|
jsr WaitForKey
|
2017-02-20 03:41:48 +00:00
|
|
|
cmp #$80
|
|
|
|
bne +
|
|
|
|
jsr EnterCFFAIfAvailable
|
2021-04-19 14:58:00 +00:00
|
|
|
bcc MainMenu
|
2021-04-18 04:49:26 +00:00
|
|
|
bcs @getkey
|
|
|
|
|
|
|
|
+ cmp #$9B ; Esc quits
|
|
|
|
beq @jumpToExit
|
|
|
|
cmp #$91 ; Ctrl-Q quits
|
|
|
|
beq @jumpToExit
|
2017-01-08 03:35:35 +00:00
|
|
|
cmp #k_quit
|
|
|
|
bne +
|
2021-04-18 04:49:26 +00:00
|
|
|
@jumpToExit
|
2017-01-08 03:35:35 +00:00
|
|
|
jmp CleanExit
|
2021-04-18 04:49:26 +00:00
|
|
|
|
2021-04-18 04:12:05 +00:00
|
|
|
+ cmp #k_slot
|
2017-01-08 03:35:35 +00:00
|
|
|
bne +
|
|
|
|
jsr NextSlot
|
|
|
|
lda #TRUE
|
|
|
|
sta gChangedPrefs
|
2021-04-18 04:49:26 +00:00
|
|
|
beq MainMenu ; always branches
|
|
|
|
|
2021-04-18 04:12:05 +00:00
|
|
|
+ cmp #k_verify
|
2017-01-08 03:35:35 +00:00
|
|
|
bne +
|
|
|
|
lda #%00000000
|
2021-04-18 04:49:26 +00:00
|
|
|
beq Action ; always branches
|
|
|
|
|
2021-04-18 04:12:05 +00:00
|
|
|
+ cmp #k_crack
|
2021-04-18 04:49:26 +00:00
|
|
|
bne @getkey
|
2017-01-08 03:35:35 +00:00
|
|
|
lda #%11000000
|
2021-04-18 04:12:05 +00:00
|
|
|
; /!\ execution falls through here
|
2021-04-18 04:49:26 +00:00
|
|
|
|
2017-01-08 03:35:35 +00:00
|
|
|
Action
|
|
|
|
sta gMode
|
|
|
|
jsr InitSectorMap
|
2018-10-12 23:43:40 +00:00
|
|
|
Reaction
|
2017-01-08 03:35:35 +00:00
|
|
|
lda #FALSE
|
|
|
|
sta gTriedUniv
|
|
|
|
sta gSaidWriting
|
2017-10-26 02:30:21 +00:00
|
|
|
sta gIsProtDOS
|
2018-12-29 06:20:48 +00:00
|
|
|
sta gIsInfocom18
|
|
|
|
sta gIs13Sector
|
2021-04-20 23:29:46 +00:00
|
|
|
sta gIsRW18
|
2017-01-08 03:35:35 +00:00
|
|
|
lda #$00
|
|
|
|
sta gTrack
|
|
|
|
sta gSector
|
|
|
|
sta gPatchCount
|
2017-11-09 05:47:12 +00:00
|
|
|
sta jCallRWTS+1
|
2021-04-20 20:02:07 +00:00
|
|
|
sta CacheDst+1
|
2017-01-08 03:35:35 +00:00
|
|
|
lda #$08
|
|
|
|
sta gAddress+1
|
2021-04-20 20:02:07 +00:00
|
|
|
lda #$D4
|
|
|
|
sta CacheDst+2
|
2021-04-18 04:49:26 +00:00
|
|
|
jsr ShowInitialProgressScreen
|
2021-04-18 04:12:05 +00:00
|
|
|
|
|
|
|
lda gMode
|
|
|
|
bpl @printReading ; don't create RAM disk or hard disk file in verify mode
|
|
|
|
jsr LookupUnitNumberOfSelectedHardDisk
|
|
|
|
beq @notHardDrive
|
2021-06-11 19:19:41 +00:00
|
|
|
jsr SwapProDOS ; ProDOS out -> in (preserves flags)
|
2021-04-18 04:12:05 +00:00
|
|
|
jsr CreateFileOnHardDisk
|
|
|
|
jsr SwapProDOS ; ProDOS in -> out (preserves flags)
|
|
|
|
bcc @printReading
|
|
|
|
jmp FatalWriteError ; failed to create target file on hard disk
|
|
|
|
; this is fatal
|
2021-06-12 00:45:10 +00:00
|
|
|
|
|
|
|
@idBootloader
|
|
|
|
jmp IDBootloader ; /src/id/inspect0
|
|
|
|
|
2021-04-18 04:12:05 +00:00
|
|
|
@notHardDrive
|
|
|
|
lda RAMDiskImagePath
|
|
|
|
beq @printReading ; no RAM disk available
|
2021-06-11 19:19:41 +00:00
|
|
|
jsr SwapProDOS ; ProDOS out -> in (preserves flags)
|
2021-04-18 04:12:05 +00:00
|
|
|
jsr CreateFileOnRAMDisk
|
|
|
|
jsr SwapProDOS ; ProDOS in -> out (preserves flags)
|
|
|
|
bcc @printReading
|
|
|
|
lda #0 ; failed to create temporary file on RAM disk
|
|
|
|
sta RAMDiskImagePath ; this is not fatal, but we'll mark the RAM
|
|
|
|
; disk as unavailable so we don't bother with it
|
|
|
|
@printReading
|
2017-01-08 03:35:35 +00:00
|
|
|
lda #s_reading
|
|
|
|
jsr PrintByID
|
2020-07-20 16:49:09 +00:00
|
|
|
lda #$B2
|
|
|
|
ldx #$00
|
|
|
|
ldy #$0D
|
|
|
|
jsr ClearMemory
|
2017-11-10 18:38:31 +00:00
|
|
|
jsr CopyUniversal
|
2017-10-30 01:00:15 +00:00
|
|
|
jsr IgnoreAddressChecksum
|
2017-10-26 02:30:21 +00:00
|
|
|
jsr ReadSector
|
2021-06-12 00:45:10 +00:00
|
|
|
bcc @idBootloader
|
2021-06-11 19:19:41 +00:00
|
|
|
jsr IDBootFailure ; /src/id/bootfailure
|
2021-06-12 00:45:10 +00:00
|
|
|
bcc @idBootloader
|
2017-01-08 03:35:35 +00:00
|
|
|
lda #s_fatal0000
|
|
|
|
jsr PrintByID
|
2021-06-12 00:45:10 +00:00
|
|
|
; /!\ execution falls through here
|
2017-01-08 03:35:35 +00:00
|
|
|
|
|
|
|
TheEnd
|
|
|
|
lda $C0E8
|
2021-04-19 14:44:51 +00:00
|
|
|
jsr CleanupFiles
|
2021-04-18 04:12:05 +00:00
|
|
|
lda #s_done
|
2017-01-08 03:35:35 +00:00
|
|
|
jsr PrintByID
|
|
|
|
jsr WaitForKey
|
|
|
|
cmp #$9B
|
|
|
|
beq CleanExit
|
2018-05-29 01:15:45 +00:00
|
|
|
cmp #k_redo
|
|
|
|
beq HandleRedo
|
2018-10-11 21:58:12 +00:00
|
|
|
cmp #k_redo_with_ignore
|
|
|
|
beq HandleRedoWithIgnore
|
2021-04-20 20:02:07 +00:00
|
|
|
jsr CheckLogKeys
|
2017-01-08 03:35:35 +00:00
|
|
|
jmp MainMenu
|
|
|
|
|
2018-10-11 21:58:12 +00:00
|
|
|
HandleRedoWithIgnore
|
|
|
|
jsr InitSectorMapWithIgnore
|
2018-10-12 23:43:40 +00:00
|
|
|
jmp Reaction
|
|
|
|
|
2018-05-29 01:15:45 +00:00
|
|
|
HandleRedo
|
2021-04-18 04:49:26 +00:00
|
|
|
jsr ShowInitialProgressScreen
|
2018-05-29 01:15:45 +00:00
|
|
|
lda #s_reading
|
|
|
|
jsr PrintByID
|
2021-04-18 04:49:26 +00:00
|
|
|
; /!\ execution falls through here
|
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; RestartScan
|
|
|
|
; Print 'Restarting scan...' then do exactly that.
|
|
|
|
; Used by several patchers that find evidence of a protection
|
|
|
|
; then activate an expensive search the second time around.
|
|
|
|
; Can be called from anywhere.
|
|
|
|
; Resets stack, never returns.
|
|
|
|
; Exits via ReadWithRWTS
|
|
|
|
;-------------------------------
|
|
|
|
RestartScan
|
|
|
|
lda #s_restart
|
|
|
|
jsr PrintByID
|
|
|
|
jsr RestartProgress
|
|
|
|
jsr IncProgress
|
|
|
|
ldx #$FF
|
|
|
|
txs
|
|
|
|
jmp ReadWithRWTS
|
2018-05-29 01:15:45 +00:00
|
|
|
|
2021-04-20 03:48:41 +00:00
|
|
|
;-------------------------------
|
|
|
|
; CleanupFiles
|
|
|
|
;
|
|
|
|
; Cleans up open files (if any)
|
|
|
|
;
|
|
|
|
; in: ProDOS is NOT in memory
|
|
|
|
; out: ProDOS is NOT in memory
|
|
|
|
; all registers and flags clobbered
|
|
|
|
;-------------------------------
|
|
|
|
CleanupFiles
|
|
|
|
lda gHardDiskRef
|
|
|
|
ora gRAMDiskRef
|
|
|
|
beq +
|
|
|
|
jsr SwapProDOS ; ProDOS out -> in
|
|
|
|
jsr DeleteFileOnRAMDisk
|
|
|
|
jsr CloseFileOnHardDisk
|
|
|
|
jsr SwapProDOS ; ProDOS in -> out
|
|
|
|
+ rts
|
|
|
|
|
2021-04-20 00:53:33 +00:00
|
|
|
;-------------------------------
|
|
|
|
; CleanExit
|
|
|
|
;
|
|
|
|
; Cleans up open files, saves preferences (if modified),
|
|
|
|
; and quits via ProDOS MLI
|
|
|
|
;
|
|
|
|
; in: ProDOS is NOT in memory
|
|
|
|
; out: does not return
|
|
|
|
;-------------------------------
|
2017-01-08 03:35:35 +00:00
|
|
|
CleanExit
|
2021-04-20 00:53:33 +00:00
|
|
|
jsr CleanupFiles
|
2021-04-18 04:49:26 +00:00
|
|
|
jsr SwapProDOS ; ProDOS out -> in
|
2017-01-08 03:35:35 +00:00
|
|
|
lda gChangedPrefs
|
2021-04-15 16:33:41 +00:00
|
|
|
bne +
|
2017-01-08 03:35:35 +00:00
|
|
|
jsr SavePrefs
|
2021-04-20 01:17:23 +00:00
|
|
|
+ jsr PRODOSMLI ; does not return
|
2017-01-08 03:35:35 +00:00
|
|
|
!byte $65
|
2021-04-18 04:49:26 +00:00
|
|
|
!word +
|
|
|
|
+ !byte $04
|
2017-01-08 03:35:35 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; AnalyzeTrack routine
|
|
|
|
; Looks at buffer in memory to detect known
|
|
|
|
; copy protections and disable/revert/modify them
|
|
|
|
; to work on standard disks.
|
2017-12-13 00:21:15 +00:00
|
|
|
; Prints through COUT
|
|
|
|
; Makes modifications in memory only.
|
2021-04-20 03:48:41 +00:00
|
|
|
; in: @BASEPAGE contains one track worth of data ($1000 bytes)
|
|
|
|
; gTrack contains track number
|
|
|
|
; out: if C set, no known protections were found and
|
|
|
|
; no modifications were made
|
|
|
|
; if C clear, at least one modification was made
|
2017-01-08 03:35:35 +00:00
|
|
|
;-------------------------------
|
|
|
|
AnalyzeTrack
|
|
|
|
lda gTrack
|
2021-04-20 03:48:41 +00:00
|
|
|
bne @applyToAll
|
|
|
|
; Track 0 patchers are stored compressed in memory
|
|
|
|
; then decompressed into $2000 when needed
|
2017-11-09 05:47:12 +00:00
|
|
|
lda #>AnalyzeT00
|
|
|
|
sta _byte_hi
|
|
|
|
lda #<AnalyzeT00
|
|
|
|
sta _byte_lo
|
|
|
|
jsr decrunch
|
|
|
|
jsr $2000
|
2021-04-20 03:48:41 +00:00
|
|
|
; /!\ execution falls through here
|
|
|
|
@applyToAll
|
2021-04-08 16:22:02 +00:00
|
|
|
; run these modules in verify and crack mode
|
2017-12-26 16:44:19 +00:00
|
|
|
!source "patchers/t11diskvol.a" ; T11 && gIsRWTS only
|
|
|
|
!source "patchers/t02volumename.a" ; T02 && gIsBoot0 only
|
2021-04-08 16:22:02 +00:00
|
|
|
bit gMode
|
|
|
|
bmi +
|
2021-04-20 03:48:41 +00:00
|
|
|
jmp _checkPatchCount
|
2021-04-08 16:22:02 +00:00
|
|
|
+
|
|
|
|
; only run these modules in crack mode
|
2017-01-08 03:35:35 +00:00
|
|
|
!source "patchers/universale7.a"
|
2018-09-24 02:30:17 +00:00
|
|
|
!source "patchers/c9ff.a"
|
2017-05-05 18:04:32 +00:00
|
|
|
!source "patchers/a6bc95.a" ; gIsPascal only
|
|
|
|
!source "patchers/a5count.a" ; gIsPascal only
|
2017-05-05 22:11:31 +00:00
|
|
|
!source "patchers/d5d5f7.a" ; gIsPascal || (gIsBoot0 && gPossibleD5D5F7) only
|
2017-05-05 18:04:32 +00:00
|
|
|
!source "patchers/prodosrwts.a" ; gIsProDOS only
|
|
|
|
!source "patchers/prodos6a.a" ; gIsProDOS only
|
|
|
|
!source "patchers/prodosmecc.a" ; gIsProDOS only
|
2017-05-21 17:59:36 +00:00
|
|
|
!source "patchers/bbf9.a" ; gIsProDOS only
|
2017-08-01 23:42:11 +00:00
|
|
|
!source "patchers/memory.config.a" ; gIsProDOS only
|
2017-12-04 05:37:41 +00:00
|
|
|
!source "patchers/origin.a" ; gIsProDOS only
|
2021-03-01 17:22:46 +00:00
|
|
|
!source "patchers/rwtsswapmecc.a" ; gMECCFastloadType || gPossibleMECCSwapper only
|
2021-03-01 05:27:38 +00:00
|
|
|
!source "patchers/meccdqc.a" ; gMECCFastloadType==1 && gT07 only
|
2018-09-23 18:43:06 +00:00
|
|
|
!source "patchers/rwtsswappenguin.a" ; T01 only
|
2017-05-05 18:04:32 +00:00
|
|
|
!source "patchers/protecteddos.a" ; gIsProtDOS only
|
2017-01-24 04:37:16 +00:00
|
|
|
!source "patchers/fbff.a"
|
2018-01-27 15:32:49 +00:00
|
|
|
!source "patchers/fbffencrypted.a" ; gIsProDOS only
|
2018-07-19 16:27:02 +00:00
|
|
|
!source "patchers/fbffpascal.a" ; gIsPascal only
|
2018-01-27 15:32:49 +00:00
|
|
|
!source "patchers/polarware.a" ; gIsProDOS only
|
2017-05-05 20:01:35 +00:00
|
|
|
!source "patchers/sierra.a" ; gIsBoot0 only
|
2017-05-05 18:21:03 +00:00
|
|
|
!source "patchers/corrupter.a" ; T13 only
|
2020-07-22 23:01:07 +00:00
|
|
|
!source "patchers/ea.a" ; gIsEA || gIsBoot0 only
|
2017-07-03 14:50:55 +00:00
|
|
|
!source "patchers/gamco.a" ; gPossibleGamco only
|
2017-05-05 18:04:32 +00:00
|
|
|
!source "patchers/optimum.a" ; gIsOptimum only
|
|
|
|
!source "patchers/bootcounter.a" ; T01 only
|
|
|
|
!source "patchers/jmpb412.a" ; T02 only
|
2019-07-25 16:51:24 +00:00
|
|
|
!source "patchers/jmp2012.a" ; T02 only
|
2017-07-15 15:24:56 +00:00
|
|
|
!source "patchers/jmpb400.a" ; T02 && gIsBoot0 only
|
2017-08-03 14:08:36 +00:00
|
|
|
!source "patchers/advint.a" ; gAdventureInternational only
|
2017-09-19 00:39:45 +00:00
|
|
|
!source "patchers/jsr8635.a" ; gIsRWTS only
|
2017-11-25 16:22:25 +00:00
|
|
|
!source "patchers/jmpb4bb.a" ; T02 only
|
2017-11-24 22:03:48 +00:00
|
|
|
!source "patchers/dos32muse.a" ; T01 && gIsDOS32 only
|
2020-07-22 23:01:07 +00:00
|
|
|
!source "patchers/sra.a" ; gIsDOS32 || gIsRWTS only
|
2017-12-02 21:07:38 +00:00
|
|
|
!source "patchers/sierra13.a" ; gIsDOS32 only
|
2017-12-26 16:44:19 +00:00
|
|
|
!source "patchers/ssprot.a" ; gIsF7F6 only
|
2017-12-26 18:13:11 +00:00
|
|
|
!source "patchers/f7f6.a" ; gIsF7F6 only
|
2018-01-04 20:02:27 +00:00
|
|
|
!source "patchers/trillium.a" ; gIsTrillium only
|
2018-09-23 03:00:24 +00:00
|
|
|
!source "patchers/trillium2.a" ; T17 only
|
2018-05-26 17:54:48 +00:00
|
|
|
!source "patchers/advent.a" ; gIsAdvent only
|
2018-06-16 15:38:26 +00:00
|
|
|
!source "patchers/davidsonforth.a" ; gIsDavidson only
|
|
|
|
!source "patchers/davidsonasm.a" ; gIsDavidson only
|
2018-09-26 17:20:03 +00:00
|
|
|
!source "patchers/ssi.a" ; gIsRDOS13 only
|
2018-09-27 21:26:08 +00:00
|
|
|
!source "patchers/rdosfmt.a" ; gIsRDOS13 only
|
2018-09-28 19:54:24 +00:00
|
|
|
!source "patchers/aacount.a"
|
2019-02-09 19:33:14 +00:00
|
|
|
!source "patchers/hallabs.a" ; T01 only
|
2019-02-10 04:51:41 +00:00
|
|
|
!source "patchers/holle.a" ; gIsHolle only
|
2019-04-08 00:02:19 +00:00
|
|
|
!source "patchers/zoomgrafix.a" ; gIsPhoenix only
|
2019-04-13 13:55:41 +00:00
|
|
|
!source "patchers/e7everywhere.a" ; gIsBoot0 || gIsProDOS only
|
2019-04-13 17:33:15 +00:00
|
|
|
!source "patchers/choplifter.a" ; gIsChoplifter only
|
2019-11-16 04:22:13 +00:00
|
|
|
!source "patchers/pdi.a" ; gIsDiversi only
|
2020-07-14 20:36:31 +00:00
|
|
|
!source "patchers/harvey.a" ; T01 only
|
2020-07-22 23:01:07 +00:00
|
|
|
!source "patchers/tsr.a" ; T04 && gIsTSR only
|
2021-03-02 23:23:13 +00:00
|
|
|
!source "patchers/woodbury.a" ; gPossibleWoodbury only
|
2021-03-24 23:06:00 +00:00
|
|
|
!source "patchers/leisure.a" ; gIsProDOS && T22 only
|
2021-04-19 14:19:57 +00:00
|
|
|
!source "patchers/b4bbbasic.a" ; gPossibleB4BBBasic only
|
2021-04-30 01:55:45 +00:00
|
|
|
!source "patchers/errord51.a" ; gIsLowDOS only
|
2021-05-22 15:35:57 +00:00
|
|
|
!source "patchers/sigcheck.a" ; gIsDiversi only
|
2021-05-27 02:22:36 +00:00
|
|
|
!source "patchers/555.a" ; gIs555 only
|
2017-01-08 03:35:35 +00:00
|
|
|
|
2021-04-20 03:48:41 +00:00
|
|
|
_checkPatchCount
|
2017-01-08 03:35:35 +00:00
|
|
|
lda gPatchCount
|
2021-04-20 03:48:41 +00:00
|
|
|
beq @noPatches
|
2017-01-08 03:35:35 +00:00
|
|
|
clc
|
|
|
|
!byte $24 ; hide next SEC
|
2021-04-20 03:48:41 +00:00
|
|
|
@noPatches
|
2017-01-08 03:35:35 +00:00
|
|
|
sec ; set carry if nothing happened
|
|
|
|
rts
|
|
|
|
|
2021-04-20 03:48:41 +00:00
|
|
|
; utility functions used by several patchers
|
2021-05-22 15:35:57 +00:00
|
|
|
inx0F inx
|
|
|
|
inx0E inx
|
|
|
|
inx0D inx
|
|
|
|
inx0C inx
|
|
|
|
inx0B inx
|
|
|
|
inx0A inx
|
|
|
|
inx9 inx
|
|
|
|
inx8 inx
|
|
|
|
inx7 inx
|
2021-03-01 02:01:35 +00:00
|
|
|
inx6 inx
|
|
|
|
inx5 inx
|
|
|
|
inx4 inx
|
|
|
|
inx
|
|
|
|
inx
|
|
|
|
inx
|
|
|
|
rts
|
|
|
|
|
2017-11-09 05:47:12 +00:00
|
|
|
universalrwts
|
|
|
|
!bin "../build/universalrwts.pak"
|
2019-06-14 02:54:03 +00:00
|
|
|
!source "exodecrunch.s"
|
|
|
|
|
|
|
|
get_crunched_byte:
|
|
|
|
_byte_lo = * + 1
|
|
|
|
_byte_hi = * + 2
|
2021-03-01 02:01:35 +00:00
|
|
|
lda $1234 ; needs to be set correctly before
|
|
|
|
; decrunch_file is called.
|
|
|
|
inc _byte_lo
|
|
|
|
bne _byte_skip_hi
|
|
|
|
inc _byte_hi
|
2019-06-14 02:54:03 +00:00
|
|
|
_byte_skip_hi:
|
2021-03-01 02:01:35 +00:00
|
|
|
rts
|
2019-06-14 02:54:03 +00:00
|
|
|
|
2021-06-11 19:19:41 +00:00
|
|
|
!source "strings/en.a"
|
|
|
|
!source "id/inspect0.a"
|
|
|
|
!source "id/precheck.a"
|
|
|
|
!source "id/trace.a"
|
|
|
|
!source "id/trace33.a"
|
|
|
|
!source "id/trace32.a"
|
|
|
|
!source "id/trace8b3.a"
|
|
|
|
!source "id/trace33p.a"
|
|
|
|
!source "id/dos33.a"
|
|
|
|
!source "id/prodos.a"
|
|
|
|
!source "id/pascal.a"
|
|
|
|
!source "id/rdos.a"
|
|
|
|
!source "id/jsr8b3.a"
|
|
|
|
!source "id/mecc.a"
|
|
|
|
!source "id/datasoft.a"
|
|
|
|
!source "id/tsr.a"
|
|
|
|
!source "id/protecteddos.a"
|
|
|
|
!source "id/encode44.a"
|
|
|
|
!source "id/encode53.a"
|
|
|
|
!source "id/ea.a"
|
|
|
|
!source "id/milliken.a"
|
|
|
|
!source "id/daviddos.a"
|
|
|
|
!source "id/quickdos.a"
|
|
|
|
!source "id/diversidos.a"
|
|
|
|
!source "id/prontodos.a"
|
|
|
|
!source "id/d5d5f7.a"
|
|
|
|
!source "id/laureate.a"
|
|
|
|
!source "id/micrograms.a"
|
|
|
|
!source "id/volumename.a"
|
|
|
|
!source "id/dinkeydos.a"
|
|
|
|
!source "id/advent.a"
|
|
|
|
!source "id/panglosdos.a"
|
|
|
|
!source "id/davidson.a"
|
|
|
|
!source "id/holle.a"
|
|
|
|
!source "id/phoenix.a"
|
|
|
|
!source "id/555.a"
|
|
|
|
!source "print.a"
|
|
|
|
!source "compare.a"
|
|
|
|
!source "modify.a"
|
|
|
|
!source "memory.a"
|
|
|
|
!source "sectormap.a"
|
|
|
|
!source "mli.a"
|
|
|
|
!source "ramdisk.a"
|
|
|
|
!source "harddisk.a"
|
|
|
|
!source "slots.a"
|
|
|
|
!source "prefs.a"
|
|
|
|
!source "keys.a"
|
|
|
|
!source "cffa.a"
|
|
|
|
!source "progress.a"
|
|
|
|
!source "rwts.a"
|
|
|
|
!source "standarddelivery.a"
|
|
|
|
!source "wholetrack.a"
|
|
|
|
!source "adstyle.a"
|
|
|
|
!source "universalstyle.a"
|
|
|
|
!source "crackme.a"
|
2021-06-11 19:06:50 +00:00
|
|
|
!source "id/bootfailure.a"
|
|
|
|
|
2017-11-09 05:47:12 +00:00
|
|
|
AnalyzeT00 ; placeholder to identify stack of packed data
|
|
|
|
!bin "../build/t00only.pak"
|
|
|
|
!source "apicode.a"
|
2017-01-30 22:10:41 +00:00
|
|
|
LastMover
|
|
|
|
|
2017-11-09 05:47:12 +00:00
|
|
|
!if RELBASE = $2000 {
|
|
|
|
!ifdef PASS2 {
|
|
|
|
} else { ;PASS2
|
|
|
|
!set PASS2=1
|
2018-09-26 17:20:03 +00:00
|
|
|
!warn "RELBASE = ", HIGHPOINT - (LastMover - FirstMover)
|
2017-11-09 05:47:12 +00:00
|
|
|
}
|
|
|
|
} else {
|
2018-09-26 17:20:03 +00:00
|
|
|
!if (HIGHPOINT - (LastMover - FirstMover)) < LOWPOINT {
|
2021-04-08 16:22:02 +00:00
|
|
|
!serious "My spoon is too big (", HIGHPOINT - (LastMover - FirstMover), ") is below minimum (", LOWPOINT, ")!"
|
|
|
|
} else {
|
|
|
|
!warn "LowPoint=", HIGHPOINT - (LastMover - FirstMover)
|
2017-11-09 05:47:12 +00:00
|
|
|
}
|
2019-06-14 02:54:03 +00:00
|
|
|
|
2021-04-21 14:33:57 +00:00
|
|
|
!warn "CleanExit=",CleanExit
|
|
|
|
!warn "WaitForKey=",WaitForKey
|
|
|
|
!warn "OpenFile=",OpenFile
|
|
|
|
!warn "ReadFile=",ReadFile
|
|
|
|
!warn "CloseFile=",CloseFile
|
|
|
|
!warn "GetVolumeName=",GetVolumeName
|
|
|
|
!warn "OnlineReturn=",OnlineReturn
|
|
|
|
!warn "VolumeName=",VolumeName
|
|
|
|
!warn "RAMDiskImagePath=",RAMDiskImagePath
|
|
|
|
!warn "GetVolumeInfo=",GetVolumeInfo
|
|
|
|
!warn "mliparam=",mliparam
|
|
|
|
!warn "access=",access
|
|
|
|
!warn "filetype=",filetype
|
|
|
|
!warn "auxtype=",auxtype
|
|
|
|
!warn "blocks=",blocks
|
|
|
|
!warn "PREFSFILE=",PREFSFILE
|
|
|
|
!warn "PREFSBUFFER=",PREFSBUFFER
|
|
|
|
!warn "PREFSREADLEN=",PREFSREADLEN
|
|
|
|
!warn "PREFSVER=",PREFSVER
|
|
|
|
!warn "SavePrefs=",SavePrefs
|
|
|
|
!warn "ValidatePrefs=",ValidatePrefs
|
|
|
|
!warn "kForceLower=",kForceLower
|
|
|
|
!warn "PrintByID=",PrintByID
|
|
|
|
!warn "DiskIIArray=",DiskIIArray
|
|
|
|
!warn "HardDiskArray=",HardDiskArray
|
|
|
|
!warn "ThisSlot=",ThisSlot
|
|
|
|
!warn "CheckCache=",CheckCache
|
2021-06-11 19:06:50 +00:00
|
|
|
!warn "IDBootFailure=",IDBootFailure
|
2017-02-13 21:20:24 +00:00
|
|
|
}
|