Revert "FIX: search cache incorrectly returned if a shorter input buffer matched"

This reverts commit 6b3e5509a5.
This commit is contained in:
4am 2021-11-09 17:23:18 -05:00
parent 70de373dd3
commit 89d2f3cdc4
9 changed files with 22 additions and 16 deletions

View File

@ -70,14 +70,20 @@ def main():
if not index4: continue
if index4 != index3:
cache[a][b][c][d] = index4
if not cache[a][b][c]:
if (len(cache[a][b][c]) == 1) and (" " in cache[a][b][c]):
cache[a][b][c] = cache[a][b][c][" "]
elif not cache[a][b][c]:
del cache[a][b][c]
if not cache[a][b]:
if (len(cache[a][b]) == 1) and (" " in cache[a][b]):
cache[a][b] = cache[a][b][" "]
elif not cache[a][b]:
del cache[a][b]
if not cache[a]:
if (len(cache[a]) == 1) and (" " in cache[a]):
cache[a] = cache[a][" "]
elif not cache[a]:
del cache[a]
print('*=$A000')
print('*=$B000')
for a in cache:
print(f' !text "{a}"')
if type(cache[a]) == int:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -20,14 +20,14 @@ HGR4.IDX=Type(06),AuxType(4000),Access(C3)
HGR5.IDX=Type(06),AuxType(4000),Access(C3)
HGR6.IDX=Type(06),AuxType(4000),Access(C3)
DHGR.IDX=Type(06),AuxType(4000),Access(C3)
SEARCH00.IDX=Type(06),AuxType(6000),Access(C3)
SEARCH01.IDX=Type(06),AuxType(6000),Access(C3)
SEARCH10.IDX=Type(06),AuxType(6000),Access(C3)
SEARCH11.IDX=Type(06),AuxType(6000),Access(C3)
CACHE00.IDX=Type(06),AuxType(A000),Access(C3)
CACHE01.IDX=Type(06),AuxType(A000),Access(C3)
CACHE10.IDX=Type(06),AuxType(A000),Access(C3)
CACHE11.IDX=Type(06),AuxType(A000),Access(C3)
SEARCH00.IDX=Type(06),AuxType(8200),Access(C3)
SEARCH01.IDX=Type(06),AuxType(8200),Access(C3)
SEARCH10.IDX=Type(06),AuxType(8200),Access(C3)
SEARCH11.IDX=Type(06),AuxType(B000),Access(C3)
CACHE00.IDX=Type(06),AuxType(B000),Access(C3)
CACHE01.IDX=Type(06),AuxType(B000),Access(C3)
CACHE10.IDX=Type(06),AuxType(B000),Access(C3)
CACHE11.IDX=Type(06),AuxType(B000),Access(C3)
COVER=Type(06),AuxType(2000),Access(C3)
TITLE=Type(06),AuxType(2000),Access(C3)
HELP=Type(06),AuxType(2000),Access(C3)

View File

@ -123,7 +123,7 @@ ResetVector ; 6 bytes, copied to $100
!source "src/hw.vbl.a"
!source "src/ui.wait.a"
gSearchStore
!word $6000
!word $8200
gSlideshowStore
!word $0800
gGlobalPrefsStore

View File

@ -116,8 +116,8 @@ UI_ToPlay = $1FF7
gValLen = $1F80
gVal = $1F81
gSearchIndex = $6000
gSearchCache = $A000
gSearchIndex = $8200
gSearchCache = $B000
; LC RAM 1
iLoadFileDirect = $FFEF

View File

@ -15,7 +15,7 @@
; - kCheat
;
kGlobalPrefsBuffer = $BD00
kGlobalPrefsBuffer = $8000
; valid pref keys
kNextAttract