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
|
;jsr hddopendir ; call ProRWTS2
|
||||||
;lda ldrlo2
|
;lda ldrlo2
|
||||||
sta ldrlo
|
sta ldrlo
|
||||||
lda #$80 ;lda ldrhi2
|
lda #>kGlobalPrefsBuffer ;lda ldrhi2
|
||||||
sta ldrhi
|
sta ldrhi
|
||||||
lda #cmdwrite ; write (instead of read)
|
lda #cmdwrite ; write (instead of read)
|
||||||
sta reqcmd
|
sta reqcmd
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
; - kCheat
|
; - kCheat
|
||||||
;
|
;
|
||||||
|
|
||||||
kGlobalPrefsBuffer = $BD00
|
kGlobalPrefsBuffer = $BD00 ; [512 bytes] must be page-aligned
|
||||||
|
|
||||||
; valid pref keys
|
; valid pref keys
|
||||||
kNextAttract
|
kNextAttract
|
||||||
@ -217,13 +217,13 @@ pref_set
|
|||||||
|
|
||||||
+LDADDR kGlobalPrefsFilename ; write prefs buffer to file on disk
|
+LDADDR kGlobalPrefsFilename ; write prefs buffer to file on disk
|
||||||
jsr SetPath
|
jsr SetPath
|
||||||
;; +LDADDR kGlobalPrefsBuffer
|
|
||||||
; /!\ execution falls through here to glue.prorwts/SaveSmallFile
|
; /!\ execution falls through here to glue.prorwts/SaveSmallFile
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; SaveSmallFile
|
; SaveSmallFile
|
||||||
; Save a file into memory all at once, using ProRWTS2.
|
; Save a file into memory all at once, using ProRWTS2.
|
||||||
; /!\ Only first block (512 bytes) is written. Keep those files small. /!\
|
; /!\ Only first block (512 bytes) is written. Keep those files small. /!\
|
||||||
; /!\ All 512 bytes are written to disk. Clear buffer before calling. /!\
|
; /!\ All 512 bytes are written to disk. Clear buffer before calling. /!\
|
||||||
|
; /!\ Address is hardcoded to kGlobalPrefsBuffer /!\
|
||||||
;
|
;
|
||||||
; supports paths, see note
|
; supports paths, see note
|
||||||
;
|
;
|
||||||
@ -233,7 +233,6 @@ pref_set
|
|||||||
; all registers clobbered
|
; all registers clobbered
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
SaveSmallFile
|
SaveSmallFile
|
||||||
;; +ST16 ldrlo ; set data buffer address for ProRWTS2
|
|
||||||
jsr SwitchToBank2
|
jsr SwitchToBank2
|
||||||
jsr SaveSmallFileInternal
|
jsr SaveSmallFileInternal
|
||||||
jmp SwitchToBank1
|
jmp SwitchToBank1
|
||||||
|
Loading…
Reference in New Issue
Block a user