some comments

This commit is contained in:
4am 2022-05-04 12:41:40 -04:00
parent bcb9724095
commit b0438e6eab
3 changed files with 29 additions and 3 deletions

View File

@ -70,6 +70,13 @@ MiniAttractMode
jsr GetGameToLaunch jsr GetGameToLaunch
+ST16 @GameToLaunch +ST16 @GameToLaunch
; We want to load the mini attract index into $800 so we can get the
; index record for this game, but we now have so many games that the
; entire index is larger than $1800 bytes and loading it all at once
; would visibly overwrite bytes in HGR page 1. So the index is now
; split into 2 halves based on the first letter of the game's
; directory name, and we figure out which half we want and load it.
+ST16 PTR +ST16 PTR
ldy #1 ldy #1
lda (PTR), y lda (PTR), y
@ -90,6 +97,10 @@ MiniAttractMode
@MiniAttractIndexRecord @MiniAttractIndexRecord
!word $FDFD ; SMC !word $FDFD ; SMC
; Find the index record for this game and copy it into LC RAM so we
; can reuse it without reloading the mini attract index over and over
; during attract mode.
jsr okvs_find jsr okvs_find
!word - !word -
@GameToLaunch @GameToLaunch
@ -97,12 +108,14 @@ MiniAttractMode
jsr okvs_next_field jsr okvs_next_field
jsr SwitchToBank2 jsr SwitchToBank2
sty OKVS_CACHE sty OKVS_CACHE
ldy #4 ldy #4 ; length of index record (-1)
- lda (PTR), y - lda (PTR), y
sta OKVS_CACHE + 1, y sta OKVS_CACHE + 1, y
dey dey
bpl - bpl -
; Now, finally, start the mini attract mode
jsr BlankHGR jsr BlankHGR
; X = 0 ; X = 0
stx @MiniAttractIndex+1 stx @MiniAttractIndex+1

View File

@ -61,6 +61,9 @@ kBrowseQuit = 11
@j jsr $FDFD ; SMC @j jsr $FDFD ; SMC
jmp @BrowseModeInputLoop jmp @BrowseModeInputLoop
;------------------------------------------------------------------------------
; internal functions
OnBrowseSearch OnBrowseSearch
sta InputBuffer sta InputBuffer
lda #$01 lda #$01
@ -124,8 +127,6 @@ BrowseHelpWrapper
jsr Help jsr Help
jmp ForceBrowseChanged jmp ForceBrowseChanged
;------------------------------------------------------------------------------
BrowseDispatchTableLo BrowseDispatchTableLo
!byte <OnBrowseSearch !byte <OnBrowseSearch
!byte <OnBrowsePrevious !byte <OnBrowsePrevious

View File

@ -277,7 +277,12 @@ gDrawingOnscreen=*+1
jmp ShowOtherDHGRPage jmp ShowOtherDHGRPage
+ jmp ShowOtherPage + jmp ShowOtherPage
;------------------------------------------------------------------------------
; internal functions
CheckCheats CheckCheats
; out: (SAVE) -> length-prefixed string, either a game-specific description
; or the global 'cheats enabled' message
ldx #kCheatsEnabled ldx #kCheatsEnabled
jsr AnyGameSelected jsr AnyGameSelected
bcs + bcs +
@ -294,6 +299,13 @@ OVERLAYRTS
rts rts
MaybeRedrawUIForDHGR MaybeRedrawUIForDHGR
; If this is a DHGR title screen, then redraw the already-drawn overlay
; for double hi-res. This allows us to use a single font and drawing
; routines for both HGR and DHGR. There is a small amount of flicker
; if we're redrawing directly on the visible screen without swapping
; pages (e.g. adding a dot without changing the selected game), but
; gDrawingOnscreen tracks this and we reduce the redrawing to an
; absolute minimum to reduce flicker.
bit MachineStatus bit MachineStatus
bvc OVERLAYRTS bvc OVERLAYRTS
bit gGameToLaunchInfo bit gGameToLaunchInfo