4cade/src/prelaunch/twerps.a

38 lines
963 B
Plaintext
Raw Normal View History

2019-10-11 01:58:04 +00:00
;license:MIT
;(c) 2019 by 4am
!cpu 6502
!to "build/PRELAUNCH/TWERPS",plain
*=$106
!source "src/prelaunch/common.a"
+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:47:10 +00:00
sta <($100-end_patch+patch),x
2019-10-11 01:58:04 +00:00
dex
bpl -
lda #($100-end_patch+patch)
sta $1DF6
lda #$00
sta $1DF7
jmp $1D97 ; decompress and show title
patch
lda #0 ; SMC
beq +
2019-10-11 13:57:18 +00:00
; lives in $14FE
2019-10-11 01:58:04 +00:00
lda #$AD
sta $0640 ; patch - don't decrease lives
sta $0774 ; patch - don't decrease lives
sta $0F05 ; patch - don't decrease lives
+
jmp $0400
end_patch
2019-12-13 05:51:54 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}