4cade/src/prelaunch/threshold.a

41 lines
992 B
Plaintext
Raw Normal View History

2019-10-11 16:21:35 +00:00
;license:MIT
2019-12-25 22:15:36 +00:00
;(c) 2019 by 4am/Frank M.
2019-10-11 16:21:35 +00:00
!cpu 6502
!to "build/PRELAUNCH.INDEXED/THRESHOLD",plain
2019-10-11 16:21:35 +00:00
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
2019-12-24 17:37:13 +00:00
+NEW_RESET_VECTOR $BFF0
2019-10-11 16:21:35 +00:00
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
sta patch+1
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
2019-10-11 23:55:54 +00:00
sta <($100-end_patch+patch),x
2019-10-11 16:21:35 +00:00
dex
bpl -
lda #($100-end_patch+patch)
sta $39F4
lda #$00
sta $39F5
jmp $0800 ; decompress
patch
lda #0 ; SMC
beq +
; lives in $778F
lda #$AD
sta $45B0 ; patch - don't decrease lives
sta $7ECD ; patch - don't increase lives
+
+DISABLE_ACCEL
jmp $6B00
end_patch
2019-12-13 05:51:54 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}