4cade/src/prelaunch/serpentine.a

38 lines
920 B
Plaintext
Raw Normal View History

2019-10-05 22:58:45 +00:00
;license:MIT
;(c) 2019 by 4am
!cpu 6502
!to "build/PRELAUNCH/SERPENTINE",plain
*=$106
!source "src/prelaunch/common.a"
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
sta cheat
2019-12-24 04:19:39 +00:00
+NEW_RESET_VECTOR $3C0
2019-10-05 22:58:45 +00:00
ldx #$0E ; copy patch code to zero page (stack will be destroyed by the time we need to patch)
- lda patch,x
sta $F1,x
dex
bpl -
2019-12-10 01:05:13 +00:00
lda #$F1 ; call patch instead of $233
sta $8C96
2019-10-05 22:58:45 +00:00
lda #$00
2019-12-10 01:05:13 +00:00
sta $8C97
2019-10-05 22:58:45 +00:00
jmp $43F5 ; decompress and show title
patch
jsr $0100 ; decompress
cheat=*+1
lda #0 ; SMC
beq +
2019-10-06 14:39:59 +00:00
; lives in $D8 (capped at 3)
2019-10-05 22:58:45 +00:00
lda #$A5
sta $868F ; patch - don't decrease lives
+
jmp $0800
2019-12-13 05:51:54 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}