some comments

This commit is contained in:
4am 2020-04-01 11:57:21 -04:00
parent bfa15e51b0
commit b432732426
6 changed files with 36 additions and 11 deletions

View File

@ -1,5 +1,5 @@
;license:MIT ;license:MIT
;(c) 2018-9 by 4am & qkumba ;(c) 2018-2020 by 4am & qkumba
; ;
; text rank - an implementation of the Quicksilver search rank algorithm ; text rank - an implementation of the Quicksilver search rank algorithm
; ;
@ -11,6 +11,8 @@
; Public variables ; Public variables
; - InputLength ; [byte] number of characters typed in search mode ; - InputLength ; [byte] number of characters typed in search mode
; - InputBuffer ; [25 bytes] characters typed in search mode ; - InputBuffer ; [25 bytes] characters typed in search mode
;
; Zero page variables
; - SelectedIndex ; [byte] index in gSearchStore of currently selected game in search mode ; - SelectedIndex ; [byte] index in gSearchStore of currently selected game in search mode
; - MatchCount ; [byte] number of games that match InputBuffer ; - MatchCount ; [byte] number of games that match InputBuffer
; - BestMatchScore ; [byte] raw ranking score (0-100) of current best match (updated during TextRankCallback) ; - BestMatchScore ; [byte] raw ranking score (0-100) of current best match (updated during TextRankCallback)
@ -22,6 +24,17 @@ InputLength
InputBuffer InputBuffer
!text " " !text " "
;------------------------------------------------------------------------------
; BuildSearchStore
; Build a temporary data structure in main memory to support search UI.
; Now that gGamesListStore no longer contains full game display names, we call
; this to build a store that does. It's built in main memory and will be
; clobbered as soon as we enter attract mode (mega- or mini-), run a game,
; run a demo, or sneeze.
;
; in: none
; out: gSearchStore populated
;------------------------------------------------------------------------------
BuildSearchStore BuildSearchStore
jsr SwitchToBank2 jsr SwitchToBank2
jsr EnableAcceleratorAndSwitchToBank1 jsr EnableAcceleratorAndSwitchToBank1

View File

@ -9,8 +9,9 @@
; - DHGRSingle ; - DHGRSingle
; - BlankHGR ; - BlankHGR
; - HGRMode ; - HGRMode
; - ForceHGRMOde ; - GRMode
; - DrawGameTitleInActionSlideshowHGR ; - ForceHGRMode
; - DrawGameTitleInActionSlideshow
; - RedrawForDHGR ; - RedrawForDHGR
; ;
@ -97,8 +98,8 @@ BlankHGR
sta OffscreenPage sta OffscreenPage
; /!\ execution falls through here to HGRMode ; /!\ execution falls through here to HGRMode
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; HGRMode ; HGRMode / GRMode
; twiddles softswitches to set HGR mode (does not set page 1 or 2) ; twiddles softswitches to set (H)GR mode (does not set page 1 or 2)
; ;
; in: none ; in: none
; out: all registers preserved ; out: all registers preserved
@ -233,7 +234,18 @@ DHGRActionCallback
lda #$EA ; NOP lda #$EA ; NOP
+HIDE_NEXT_2_BYTES +HIDE_NEXT_2_BYTES
DrawGameTitleInActionSlideshowHGR ; /!\ execution falls through here to DrawGameTitleInActionSlideshowHGR
;------------------------------------------------------------------------------
; DrawGameTitleInActionSlideshow
; draw the game title in the lower left corner of the screen
;
; /!\ exits via ExecuteTransitionAt6000AndWait, and the transition code must
; already be loaded at $6000
;
; in: none
; out: exits via ExecuteTransitionAt6000AndWait
;------------------------------------------------------------------------------
DrawGameTitleInActionSlideshow
lda #$60 ; RTS lda #$60 ; RTS
sta @fallthroughForDHGR sta @fallthroughForDHGR

View File

@ -44,7 +44,7 @@ GRSingle
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; BlankGR ; BlankGR [private]
; clear and show GR page 1 without flickering ; clear and show GR page 1 without flickering
; ;
; in: none ; in: none
@ -63,7 +63,7 @@ BlankGR
jmp GRMode jmp GRMode
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; .LoadGRTransition [private] ; LoadGRTransition [private]
; ;
; in: none ; in: none
; out: all registers and flags clobbered ; out: all registers and flags clobbered
@ -78,7 +78,7 @@ LoadGRTransition
GRRTS rts GRRTS rts
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; .GRActionCallback [private] ; GRActionCallback [private]
; callback called by okvs_iter on gSlideshowStore ; callback called by okvs_iter on gSlideshowStore
; to load and display a single GR action screenshot ; to load and display a single GR action screenshot

View File

@ -163,4 +163,4 @@ HGRActionCallback
+ !word $FDFD ; SMC + !word $FDFD ; SMC
!word $3FF8 !word $3FF8
jsr DecompressHGR jsr DecompressHGR
jmp DrawGameTitleInActionSlideshowHGR jmp DrawGameTitleInActionSlideshow

View File

@ -58,6 +58,7 @@ SHRSingle
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; LoadSHGRTransition [private] ; LoadSHGRTransition [private]
; load the SHR transition effect code (currently always the same file)
; ;
; in: none ; in: none
; out: all registers and flags clobbered ; out: all registers and flags clobbered

View File

@ -10,7 +10,6 @@
; - WaitForKeyFor30Seconds ; - WaitForKeyFor30Seconds
; - CoverFade ; - CoverFade
; /!\ execution falls through here from ui.attract.dhgr/DHGRActionCallback
ExecuteTransitionAt6000AndWait ExecuteTransitionAt6000AndWait
ldy #$60 ldy #$60
+HIDE_NEXT_2_BYTES +HIDE_NEXT_2_BYTES