4cade/src/prelaunch/bejeweled.a

52 lines
1015 B
Plaintext
Raw Normal View History

;license:MIT
;(c) 2020 by qkumba
!cpu 6502
!to "build/PRELAUNCH/BEJEWELED",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #<callback
2020-03-19 05:03:10 +00:00
sta $4534
lda #>callback
2020-03-19 05:03:10 +00:00
sta $4535
jmp $800 ; decompress
2020-01-29 22:24:09 +00:00
helper
2020-03-19 05:03:10 +00:00
lda $8696
2020-01-29 22:24:09 +00:00
cmp #$CB ; write file
bne nohelp
2020-03-19 05:03:10 +00:00
lda $8AAB ; 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
2020-03-19 05:03:10 +00:00
cmp #$55 ; writing options
2020-02-21 19:08:33 +00:00
beq nohelp
2020-03-19 05:03:10 +00:00
dec $8AAB ; write address
2020-01-29 22:24:09 +00:00
nohelp
jmp $D670 ; ProDOS_enter
nocall
plp
pla
pla
clc
rts
callback
jsr $BE00
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 ", *
}