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

56 lines
1.2 KiB
Plaintext
Raw Normal View History

2019-10-06 15:16:12 +00:00
;license:MIT
2020-03-25 16:49:30 +00:00
;(c) 2019-2020 by 4am and qkumba
2019-10-06 15:16:12 +00:00
!cpu 6502
!to "build/PRELAUNCH/LADY.TUT",plain
*=$106
!source "src/prelaunch/common.a"
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
2020-03-25 16:49:30 +00:00
sta $200,x
2019-10-06 15:16:12 +00:00
dex
bpl -
lda #$00
2020-03-25 16:49:30 +00:00
sta $084F
lda #$02
2019-10-06 15:16:12 +00:00
sta $0850
jmp $0800 ; decompress
patch
2020-03-25 16:49:30 +00:00
+READ_RAM2_NO_WRITE
lda MachineStatus
and #CHEATS_ENABLED
2019-10-06 15:16:12 +00:00
beq +
; lives in $07
lda #$A5
sta $76AC ; patch - don't decrease lives
+
2020-03-25 16:49:30 +00:00
lda #$2C
sta $8470 ; reset vector to reboot
sta $84B7
lda #$00
sta $84BE
sta $84C5
dec $84C9
lda MockingboardStuff
beq +
asl
ror $AD
lsr
ora #$C0
sta $AC
lda #$4B
sta $84CB
lda #$85
sta $84CC
+
+READ_ROM_NO_WRITE
2019-10-06 15:16:12 +00:00
jmp $8460
end_patch
2019-12-13 05:51:54 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}