mirror of
https://github.com/a2-4am/4cade.git
synced 2024-09-28 18:55:36 +00:00
52 lines
1003 B
Plaintext
52 lines
1003 B
Plaintext
;license:MIT
|
|
;(c) 2020 by qkumba
|
|
|
|
!cpu 6502
|
|
!to "build/PRELAUNCH/BEJEWELED",plain
|
|
*=$106
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
+ENABLE_ACCEL
|
|
lda #<callback
|
|
sta $4569
|
|
lda #>callback
|
|
sta $456A
|
|
jmp $800 ; decompress
|
|
|
|
helper
|
|
lda $86EA
|
|
cmp #$CB ; write file
|
|
bne nohelp
|
|
lda $8AFF ; write address (low)
|
|
cmp #$F3 ; erasing save
|
|
beq nohelp
|
|
cmp #$F5 ; writing "valid"
|
|
beq nocall ; ignore it
|
|
cmp #$A9 ; writing options
|
|
beq nohelp
|
|
dec $8AFF ; write address
|
|
|
|
nohelp
|
|
jmp iProDOS_enter
|
|
|
|
nocall
|
|
plp
|
|
pla
|
|
pla
|
|
clc
|
|
rts
|
|
|
|
callback
|
|
jsr $BE00
|
|
lda #<helper
|
|
sta $BF0B
|
|
lda #>helper
|
|
sta $BF0C
|
|
+DISABLE_ACCEL
|
|
rts
|
|
|
|
!if * > $1C0 {
|
|
!error "code is too large, ends at ", *
|
|
}
|