diff --git a/src/constants.a b/src/constants.a index b67bdbc39..d43337595 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... -; EC28..FFF9 - main program code +; EC41..FFF9 - main program code ; FFFA..FFFF - NMI, reset, IRQ vectors ; ; LC RAM BANK 2 diff --git a/src/ui.animation.a b/src/ui.animation.a index b9ef7708a..d9f35c314 100644 --- a/src/ui.animation.a +++ b/src/ui.animation.a @@ -9,29 +9,22 @@ ; /!\ execution falls through from ui.search.mode/FindMatchingTitle MaybeAnimateTitle ; out: C clear - lda OffscreenPage + lda #$3F + ldy OffscreenPage bne + - lda #$5F - +HIDE_NEXT_2_BYTES -+ lda #$3F - sta SAVE+1 + eor #$60 ++ sta SAVE+1 + and #$60 + sta @a+2 + eor #$60 + sta @b+2 lda #$FD sta SAVE ldy #0 lda (SAVE),y ; see if there is a hidden JMP to an cmp #$4C ; animation routine for this screen bne @exit - ldx #$20 ; copy new HGR screen to the other - ldy #$40 - lda OffscreenPage - beq + - stx @a+2 - sty @b+2 - jmp ++ -+ sty @a+2 - stx @b+2 -++ ldx #$20 - ldy #0 + ldx #$20 @a lda $FD00,y ; SMC @b sta $FD00,y ; SMC iny diff --git a/src/ui.offscreen.a b/src/ui.offscreen.a index 1a8b7a84e..08cfeaf35 100644 --- a/src/ui.offscreen.a +++ b/src/ui.offscreen.a @@ -18,11 +18,6 @@ ; - OffscreenPage ; -OffscreenPage - !byte 0 ; 0 = currently showing HGR page 2 - ; (so offscreen is page 1 @ $2000) - ; 1 = currently showing HGR page 1 - ; (so offscreen is page 2 @ $4000) ;------------------------------------------------------------------------------ ; GetOffscreenAddress @@ -33,7 +28,12 @@ OffscreenPage ; preserves X/Y ;------------------------------------------------------------------------------ GetOffscreenAddress - lda OffscreenPage +OffscreenPage = * + 1 + lda #$00 ; SMC + ; 0 = currently showing HGR page 2 + ; (so offscreen is page 1 @ $2000) + ; 1 = currently showing HGR page 1 + ; (so offscreen is page 2 @ $4000) beq + lda #$40 rts diff --git a/src/ui.overlay.a b/src/ui.overlay.a index 012ca69fe..29332b8aa 100644 --- a/src/ui.overlay.a +++ b/src/ui.overlay.a @@ -73,13 +73,12 @@ sCheatDescriptionSuffix ; out: all flags and registers clobbered ;------------------------------------------------------------------------------ DrawUIWithoutDots - lda #" " - clc - bcc + + lda #" " * 2 + +HIDE_NEXT_2_BYTES DrawUI - lda #$7F - sec -+ sta @printCursor+1 ; set up cursor printing based on entry point + lda #$FF ; #$7F * 2 + lsr + sta @printCursor+1 ; set up cursor printing based on entry point php ldy #39 diff --git a/src/ui.search.mode.a b/src/ui.search.mode.a index f1ae01d42..b747cd193 100644 --- a/src/ui.search.mode.a +++ b/src/ui.search.mode.a @@ -74,8 +74,15 @@ InputKeyDispatch beq .foundSearchKey ldx #kInputError +HIDE_NEXT_2_BYTES +.IsArrow + ldx #kInputBrowse +!if kInputSearch > 0 { + +HIDE_NEXT_2_BYTES .foundSearchKey ldx #kInputSearch +} else { +.foundSearchKey +} ; execution falls through here to .InputDispatch .InputDispatch ldy InputDispatchTableLo,x @@ -115,10 +122,7 @@ SearchMode ; that mode finds and dispatches the arrow key. jsr IsUpDownOrRightArrow - bne @notArrow - ldx #kInputBrowse - bne .InputDispatch ; always branches -@notArrow + beq .IsArrow bit CLEARKBD ldy #kNumBrowseKeys