mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-23 12:33:32 +00:00
refactor okvs_init
This commit is contained in:
parent
6983328969
commit
661e4b35fb
@ -9,7 +9,7 @@
|
||||
; D000..E5F4 - persistent data structures (per-game cheat categories,
|
||||
; gGlobalPrefsStore, gGamesListStore)
|
||||
; ...unused...
|
||||
; EA5C..FFF9 - main program code
|
||||
; EABB..FFF9 - main program code
|
||||
; FFFA..FFFF - NMI, reset, IRQ vectors
|
||||
;
|
||||
; LC RAM BANK 2
|
||||
|
@ -64,15 +64,13 @@
|
||||
;------------------------------------------------------------------------------
|
||||
; okvs_init
|
||||
;
|
||||
; in: stack contains 2 bytes of parameters:
|
||||
; +1 [word] handle to storage space
|
||||
; in: A/Y = handle to storage space
|
||||
; out: $00/$01 clobbered
|
||||
; $02/$03 clobbered
|
||||
; all registers clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
okvs_init
|
||||
+PARAMS_ON_STACK 2
|
||||
jsr GetStoreAddress
|
||||
jsr GetStoreAddressFromAY
|
||||
; PTR -> store
|
||||
; Y = 0
|
||||
tya
|
||||
|
@ -32,8 +32,8 @@ ParseKeyValueList
|
||||
+PARAMS_ON_STACK 5
|
||||
|
||||
+LDPARAM 1
|
||||
+STAY @store1
|
||||
+STAY @store2
|
||||
jsr okvs_init ; reset key/value store
|
||||
|
||||
+LDPARAM 3
|
||||
+STAY $FE
|
||||
@ -55,8 +55,6 @@ ParseKeyValueList
|
||||
bcs +
|
||||
dey
|
||||
+ sty $FF
|
||||
jsr okvs_init ; reset key/value store
|
||||
@store1 !word $FDFD ; SMC
|
||||
|
||||
ldy #$00 ; index into ($FE) pointing to current character
|
||||
@newkey ldx #$00 ; X = index into current key
|
||||
|
@ -28,8 +28,8 @@ ParseGamesList
|
||||
+PARAMS_ON_STACK 4
|
||||
|
||||
+LDPARAM 1
|
||||
+STAY @store1
|
||||
+STAY @store2
|
||||
jsr okvs_init ; reset key/value store
|
||||
|
||||
+LDPARAM 3
|
||||
+STAY $FE
|
||||
@ -47,8 +47,6 @@ ParseGamesList
|
||||
bcs +
|
||||
dey
|
||||
+ sty $FF
|
||||
jsr okvs_init ; reset key/value store
|
||||
@store1 !word $FDFD ; SMC
|
||||
|
||||
ldy #$00 ; index into ($FE) pointing to current character
|
||||
@newkey ldx #$00 ; X = index into current key
|
||||
|
Loading…
Reference in New Issue
Block a user