4cade/src/prelaunch/lady.tut.a

37 lines
803 B
Plaintext
Raw Normal View History

2019-10-06 15:16:12 +00:00
;license:MIT
;(c) 2019 by 4am
!cpu 6502
!to "build/PRELAUNCH/LADY.TUT",plain
*=$106
!source "src/prelaunch/common.a"
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
sta cheat
ldx #(end_patch-patch-1) ; copy patch code to zero page (stack will be destroyed by the time we need to patch)
- lda patch,x
sta $F0,x
dex
bpl -
lda #$F0
sta $084F
lda #$00
sta $0850
jmp $0800 ; decompress
patch
cheat=*+1
lda #$00 ; SMC
beq +
; lives in $07
lda #$A5
sta $76AC ; patch - don't decrease lives
+
jmp $8460
end_patch
2019-12-13 05:51:54 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}