4cade/src/prelaunch/bejeweled.a

52 lines
1003 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-06-01 19:25:18 +00:00
sta $4569
lda #>callback
2020-06-01 19:25:18 +00:00
sta $456A
jmp $800 ; decompress
2020-01-29 22:24:09 +00:00
helper
2020-06-01 19:25:18 +00:00
lda $86EA
2020-01-29 22:24:09 +00:00
cmp #$CB ; write file
bne nohelp
2020-06-01 19:25:18 +00:00
lda $8AFF ; 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-06-01 19:25:18 +00:00
cmp #$A9 ; writing options
2020-02-21 19:08:33 +00:00
beq nohelp
2020-06-01 19:25:18 +00:00
dec $8AFF ; write address
2020-01-29 22:24:09 +00:00
nohelp
2020-06-01 19:25:18 +00:00
jmp iProDOS_enter
2020-01-29 22:24:09 +00:00
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 ", *
}