4cade/src/prelaunch/bejeweled.a

56 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

;license:MIT
2021-10-15 20:00:40 +00:00
;(c) 2020-2021 by qkumba
!cpu 6502
!to "build/PRELAUNCH.INDEXED/BEJEWELED",plain
*=$106
!source "src/macros.a"
+ENABLE_ACCEL
lda #<callback
2021-03-18 22:19:21 +00:00
sta $467F
lda #>callback
2021-03-18 22:19:21 +00:00
sta $4680
jmp $800 ; decompress
2020-01-29 22:24:09 +00:00
helper
2021-03-18 22:19:21 +00:00
lda $89A0
2020-01-29 22:24:09 +00:00
cmp #$CB ; write file
bne nohelp
2021-03-18 22:19:21 +00:00
lda $8DB5 ; write address (low)
2020-02-21 19:08:33 +00:00
cmp #$F3 ; erasing save
beq nohelp
2020-01-29 22:24:09 +00:00
cmp #$F5 ; writing "valid"
beq nocall ; ignore it
2021-03-18 22:19:21 +00:00
cmp #$5E ; writing options
2020-02-21 19:08:33 +00:00
beq nohelp
2021-03-18 22:19:21 +00:00
dec $8DB5 ; write address (low)
2020-01-29 22:24:09 +00:00
nohelp
2021-10-15 20:00:40 +00:00
jmp $FDFD ; SMC
2020-01-29 22:24:09 +00:00
nocall
plp
pla
pla
clc
rts
callback
jsr $BE00
2021-10-15 20:00:40 +00:00
lda $BF0B
sta nohelp + 1
lda $BF0C
sta nohelp + 2
2020-01-29 22:24:09 +00:00
lda #<helper
sta $BF0B
lda #>helper
sta $BF0C
+DISABLE_ACCEL
rts
!if * > $1C0 {
!error "code is too large, ends at ", *
}