From 940ae5bc4b73e133669b355d30bacca564b80260 Mon Sep 17 00:00:00 2001 From: 4am Date: Tue, 8 Oct 2019 14:49:53 -0400 Subject: [PATCH] shave some bytes --- src/constants.a | 2 +- src/parse.prefs.a | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/constants.a b/src/constants.a index 7d02bd3fa..a833c0530 100644 --- a/src/constants.a +++ b/src/constants.a @@ -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 diff --git a/src/parse.prefs.a b/src/parse.prefs.a index 6f048dea5..36ed0ef45 100644 --- a/src/parse.prefs.a +++ b/src/parse.prefs.a @@ -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