shave some bytes

This commit is contained in:
4am 2019-10-08 14:49:53 -04:00
parent a544cb9621
commit 940ae5bc4b
2 changed files with 6 additions and 7 deletions

View File

@ -9,7 +9,7 @@
; D000..E611 - persistent data structures (per-game cheat categories,
; gGlobalPrefsStore, gGamesListStore)
; ...unused...
; EC22..FFF9 - main program code
; EC23..FFF9 - main program code
; FFFA..FFFF - NMI, reset, IRQ vectors
;
; LC RAM BANK 2

View File

@ -69,7 +69,7 @@ kCheat
+STAY $00
ldy #0
lda ($00),y
beq +
beq .RTS
tay
clc
adc $FE
@ -79,9 +79,9 @@ kCheat
sta ($FE),y
bne -
stx $FE
bcc +
bcc .RTS
inc $FF
+ rts
.RTS rts
;------------------------------------------------------------------------------
; pref_get
@ -123,7 +123,7 @@ pref_get
+ !word $FDFD ; SMC
bcs .useDefaultValue ; if pref key is not found, use default value
ldx .store1+1
beq .done ; if no OKVS to validate against, we're done
beq .RTS ; if no OKVS to validate against, we're done
+STAY +
+STAY PTR
ldy #0
@ -137,8 +137,7 @@ pref_get
ldx #0
+
+LDAY .store1
jsr okvs_nth
.done rts
jmp okvs_nth
;------------------------------------------------------------------------------
; pref_set