4cade/src/prelaunch/up.n.down.a

35 lines
844 B
Plaintext
Raw Normal View History

2019-10-01 02:24:45 +00:00
;license:MIT
;(c) 2019 by 4am
!cpu 6502
!to "build/PRELAUNCH/UP.N.DOWN",plain
*=$106
!source "src/prelaunch/common.a"
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
sta patch+1
2019-10-05 22:58:45 +00:00
ldx #$0B ; copy patch code to zero page (stack will be destroyed by the time we need to patch)
2019-10-01 02:24:45 +00:00
- lda patch,x
2019-10-05 22:58:45 +00:00
sta $F4,x
2019-10-01 02:24:45 +00:00
dex
bpl -
2019-10-05 22:58:45 +00:00
lda #$F4 ; call patch instead of $200
2019-10-01 02:24:45 +00:00
sta $4061
lda #$00
sta $4062
2019-12-11 03:39:46 +00:00
jmp $2D2C
2019-10-01 02:24:45 +00:00
patch
lda #0 ; SMC
beq +
2019-10-06 14:39:59 +00:00
; lives in $1B,X (X=0/1 for player 1/2)
2019-10-01 02:24:45 +00:00
lda #$B5
sta $0912 ; patch - don't decrease lives
+
2019-10-01 02:24:45 +00:00
jmp $0200 ; continue with load
2019-12-13 05:51:54 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}