passport/src/patchers/runhello.a
2017-01-23 16:57:43 -08:00

55 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
;-------------------------------
!zone {
_runhello
lda gIsProDOS ; this exact protection is only
beq .exit ; on DOS 3.3 disks (other patchers
lda gIsPascal ; will catch other variations)
beq .exit
lda #$0F
sta .sector+1
.sector lda #$FF ; modified at runtime
ldx #$04
ldy #$05
jsr compare
!byte $20,$E3,$03,$85,$FB
bcc +
jmp .nextsector
+
lda .sector+1
ldx #$19
ldy #$06
jsr compare
!byte $CA,$10,$F8,$8A,$48,$20
bcc +
jmp .nextsector
+
lda .sector+1
ldx #$21
ldy #$06
jsr compare
!byte $A0,$01,$B1,$FA,$AA,$20
bcc +
jmp .nextsector
+
lda .sector+1
sta gDisplayBytes
lda #s_runhello
jsr PrintByID
lda .sector+1
ldx #$26
ldy #$01
jsr modify
!byte $2C
.nextsector
dec .sector+1
bmi .exit
jmp .sector
.exit
}