mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-27 08:50:01 +00:00
use kGlobalPrefsBuffer for writing data stored at kGlobalPrefsBuffer, because otherwise things go poorly
This commit is contained in:
parent
7afebf6b04
commit
4f6688cba1
@ -69,7 +69,7 @@ SaveSmallFileInternal
|
||||
;jsr hddopendir ; call ProRWTS2
|
||||
;lda ldrlo2
|
||||
sta ldrlo
|
||||
lda #$80 ;lda ldrhi2
|
||||
lda #>kGlobalPrefsBuffer ;lda ldrhi2
|
||||
sta ldrhi
|
||||
lda #cmdwrite ; write (instead of read)
|
||||
sta reqcmd
|
||||
|
@ -15,7 +15,7 @@
|
||||
; - kCheat
|
||||
;
|
||||
|
||||
kGlobalPrefsBuffer = $BD00
|
||||
kGlobalPrefsBuffer = $BD00 ; [512 bytes] must be page-aligned
|
||||
|
||||
; valid pref keys
|
||||
kNextAttract
|
||||
@ -217,13 +217,13 @@ pref_set
|
||||
|
||||
+LDADDR kGlobalPrefsFilename ; write prefs buffer to file on disk
|
||||
jsr SetPath
|
||||
;; +LDADDR kGlobalPrefsBuffer
|
||||
; /!\ execution falls through here to glue.prorwts/SaveSmallFile
|
||||
;------------------------------------------------------------------------------
|
||||
; SaveSmallFile
|
||||
; Save a file into memory all at once, using ProRWTS2.
|
||||
; /!\ Only first block (512 bytes) is written. Keep those files small. /!\
|
||||
; /!\ All 512 bytes are written to disk. Clear buffer before calling. /!\
|
||||
; /!\ Address is hardcoded to kGlobalPrefsBuffer /!\
|
||||
;
|
||||
; supports paths, see note
|
||||
;
|
||||
@ -233,7 +233,6 @@ pref_set
|
||||
; all registers clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
SaveSmallFile
|
||||
;; +ST16 ldrlo ; set data buffer address for ProRWTS2
|
||||
jsr SwitchToBank2
|
||||
jsr SaveSmallFileInternal
|
||||
jmp SwitchToBank1
|
||||
|
Loading…
Reference in New Issue
Block a user