2024-04-24 03:51:13 +00:00
|
|
|
;license:MIT
|
|
|
|
;(c) 2024 by qkumba
|
|
|
|
|
|
|
|
!cpu 6502
|
|
|
|
!to "build/PRELAUNCH.INDEXED/SUDOKU",plain
|
|
|
|
*=$106
|
|
|
|
|
2024-09-09 22:37:13 +00:00
|
|
|
!source "src/macros.a"
|
2024-04-24 03:51:13 +00:00
|
|
|
|
|
|
|
+ENABLE_ACCEL
|
|
|
|
lda #$60
|
|
|
|
sta $813
|
|
|
|
jsr $800 ; decompress
|
|
|
|
lda $BF0B
|
|
|
|
sta nohelp + 1
|
|
|
|
lda $BF0C
|
|
|
|
sta nohelp + 2
|
|
|
|
lda #<helper
|
|
|
|
sta $BF0B
|
|
|
|
lda #>helper
|
|
|
|
sta $BF0C
|
|
|
|
+DISABLE_ACCEL
|
|
|
|
jmp $4000
|
|
|
|
|
|
|
|
helper
|
|
|
|
lda $9F4C
|
|
|
|
cmp #$CB ; write file
|
|
|
|
bne nohelp
|
|
|
|
lda $A50D ; write address (low)
|
|
|
|
cmp #$EE ; erasing save
|
|
|
|
beq nohelp
|
|
|
|
cmp #$F3 ; writing "valid"
|
|
|
|
beq nocall ; ignore it
|
|
|
|
cmp #$F7 ; writing options
|
|
|
|
beq nohelp
|
|
|
|
inc $A053 ; mark save valid
|
|
|
|
dec $A50D ; write address (low)
|
|
|
|
inc $A50F ; increase size
|
|
|
|
|
|
|
|
nohelp
|
|
|
|
jmp $FDFD ; SMC
|
|
|
|
|
|
|
|
nocall
|
|
|
|
plp
|
|
|
|
pla
|
|
|
|
pla
|
|
|
|
clc
|
|
|
|
rts
|
|
|
|
|
|
|
|
!if * > $1C0 {
|
|
|
|
!error "code is too large, ends at ", *
|
|
|
|
}
|