passport/src/patchers/runhello.a

53 lines
1.4 KiB
Plaintext
Executable File

;-------------------------------
; #RUNHELLO
; search and destroy a protection check
; in a startup file that runs the real
; startup program after succeeding
; e.g. Microzine 15, Alpine Tram Ride
;-------------------------------
_runhello
lda gIsProDOS ; this exact protection is only
beq runhello_exit ; on DOS 3.3 disks (other patchers
lda gIsPascal ; will catch other variations)
beq runhello_exit
lda #$0F
sta rhsector+1
rhsector lda #$FF ; modified at runtime
ldx #$04
ldy #$05
jsr compare
!byte $20,$E3,03,$85,$FB
bcc +
jmp rhnextsector
+
lda rhsector+1
ldx #$19
ldy #$06
jsr compare
!byte $CA,$10,$F8,$8A,$48,$20
bcc +
jmp rhnextsector
+
lda rhsector+1
ldx #$21
ldy #$06
jsr compare
!byte $A0,01,$B1,$FA,$AA,$20
bcc +
jmp rhnextsector
+
lda rhsector+1
sta gDisplayBytes
lda #s_runhello
jsr PrintByID
lda rhsector+1
ldx #$26
ldy #$01
jsr modify
!byte $2C
rhnextsector
dec rhsector+1
bmi runhello_exit
jmp rhsector
runhello_exit