mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-11 07:30:02 +00:00
initial instructions in input buffer, add play label once game is selected
This commit is contained in:
parent
8a401f19e1
commit
c0dd16a27c
@ -4,16 +4,18 @@ CIRCUITOUS font information
|
||||
- $80 characters only (high bit is always 0)
|
||||
- $20 and above are standard ASCII
|
||||
- $00..$1F are various shapes and characters in no standard order
|
||||
- Capital letters are full-width, which makes all-caps drawing look bad, so
|
||||
don't do that
|
||||
|
||||
Font routines are near the top of LC RAM, accessible to either bank. However,
|
||||
font data is stored in LC RAM bank 2, because that's where we have space.
|
||||
Note that most strings are in LC RAM bank 1, which is admittedly inconvenient.
|
||||
You are responsible for copying characters to a place where the drawing routine
|
||||
can access them. (See src/ui.font.a) The drawing routines will switch to LC 2
|
||||
to access font data, then back to LC 1 before returning.
|
||||
font data is stored in LC RAM bank 2, because that's where we have space. Note
|
||||
that most strings are in LC RAM bank 1, which is admittedly inconvenient. You
|
||||
are responsible for copying characters to a place where the drawing routine can
|
||||
access them. (See src/ui.font.a) The drawing routines will switch to LC 2 to
|
||||
access font data, then back to LC 1 before returning.
|
||||
|
||||
Font data is stored non-consecutively. Row 0 data starts at $D600, in order,
|
||||
so row 0 of character $00 is at $D600, row 0 of character $01 is at $D601, &c.
|
||||
Font data is stored non-consecutively. Row 0 data starts at $D600, in order, so
|
||||
row 0 of character $00 is at $D600, row 0 of character $01 is at $D601, &c.
|
||||
Row 1 starts at $D680; row 2 starts at $D700. The entire font set finishes at
|
||||
$D9FF.
|
||||
|
||||
@ -31,15 +33,15 @@ $09 rounded bottom-right quadrant circuit path
|
||||
$0A
|
||||
$0B right arrow
|
||||
$0C
|
||||
$0D
|
||||
$0D carriage return symbol
|
||||
$0E
|
||||
$0F times
|
||||
$0F
|
||||
$10 dot, small
|
||||
$11 dot, medium
|
||||
$12 dot, large
|
||||
$13 dot, extra large
|
||||
$14
|
||||
$15
|
||||
$15 times
|
||||
$16
|
||||
$17
|
||||
$18
|
||||
|
@ -24,7 +24,7 @@ tmp = $F8 ; byte
|
||||
gamelength= $F9 ; byte
|
||||
firstletter= $FA ; byte
|
||||
|
||||
MaxInputLength = 24
|
||||
MaxInputLength = 26
|
||||
InputLength
|
||||
!byte 0
|
||||
InputBuffer
|
||||
|
@ -152,6 +152,11 @@ BrowseMode
|
||||
sta UILine2,y
|
||||
cpy #MaxInputLength+1
|
||||
bcc -
|
||||
ldx #8
|
||||
- lda ReturnToPlay,x ; replace games count with 'to play' label
|
||||
sta UI_ToPlay,x
|
||||
dex
|
||||
bpl -
|
||||
ldx #40
|
||||
lda #0
|
||||
- sta UILine1-1,x ; reset UI line 1
|
||||
|
@ -38,15 +38,23 @@ UILine1
|
||||
!byte 0,0,0,0,0,0,0,0,0,0
|
||||
!byte 0,0,0,0,0,0,0,0,0,0
|
||||
!byte 0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
UILine2
|
||||
!text "["
|
||||
!byte $7F
|
||||
!text " "
|
||||
!text "] "
|
||||
!byte 0,0,0,0,0,0,0,0,0,0
|
||||
!byte 0,0,0,0,0,0,0,0,0,0
|
||||
!byte 0,0,0,0,0,0,0,0,0,0
|
||||
!byte 0
|
||||
UI_ToPlay
|
||||
!byte 0,0,0,0,0,0,0,0,0
|
||||
|
||||
Instructions
|
||||
!text "[Type to search, "
|
||||
!byte $0B
|
||||
!text " to browse] "
|
||||
VisibleGameCount
|
||||
!text "000"
|
||||
!text " games"
|
||||
!text "000 games"
|
||||
ReturnToPlay
|
||||
!byte $0D
|
||||
!text " to play"
|
||||
|
||||
GetOffscreenAddress
|
||||
; in: none
|
||||
|
@ -16,6 +16,12 @@ FontDataRow0
|
||||
!byte $80
|
||||
!byte $9C
|
||||
!byte $9C
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $00
|
||||
!byte $E0
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $80
|
||||
@ -27,12 +33,6 @@ FontDataRow0
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $EC
|
||||
!byte $B0
|
||||
!byte $B0
|
||||
@ -145,6 +145,12 @@ FontDataRow1
|
||||
!byte $80
|
||||
!byte $BC
|
||||
!byte $9E
|
||||
!byte $00
|
||||
!byte $98
|
||||
!byte $00
|
||||
!byte $E0
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $80
|
||||
@ -156,12 +162,6 @@ FontDataRow1
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $98
|
||||
!byte $98
|
||||
@ -274,6 +274,12 @@ FontDataRow2
|
||||
!byte $87
|
||||
!byte $FC
|
||||
!byte $9F
|
||||
!byte $00
|
||||
!byte $B0
|
||||
!byte $00
|
||||
!byte $EC
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $88
|
||||
!byte $9C
|
||||
@ -285,12 +291,6 @@ FontDataRow2
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $FC
|
||||
!byte $BC
|
||||
!byte $80
|
||||
@ -403,6 +403,12 @@ FontDataRow3
|
||||
!byte $8F
|
||||
!byte $F8
|
||||
!byte $8F
|
||||
!byte $00
|
||||
!byte $FF
|
||||
!byte $00
|
||||
!byte $E6
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $88
|
||||
!byte $9C
|
||||
!byte $BE
|
||||
@ -414,12 +420,6 @@ FontDataRow3
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $E6
|
||||
!byte $E6
|
||||
!byte $9C
|
||||
@ -532,6 +532,12 @@ FontDataRow4
|
||||
!byte $9F
|
||||
!byte $F0
|
||||
!byte $87
|
||||
!byte $00
|
||||
!byte $FF
|
||||
!byte $00
|
||||
!byte $FF
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $9C
|
||||
!byte $BE
|
||||
@ -543,12 +549,6 @@ FontDataRow4
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $E6
|
||||
!byte $B6
|
||||
!byte $98
|
||||
@ -661,6 +661,12 @@ FontDataRow5
|
||||
!byte $9E
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $00
|
||||
!byte $B0
|
||||
!byte $00
|
||||
!byte $BF
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $88
|
||||
!byte $9C
|
||||
@ -672,12 +678,6 @@ FontDataRow5
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $EE
|
||||
!byte $9E
|
||||
!byte $B8
|
||||
@ -790,6 +790,12 @@ FontDataRow6
|
||||
!byte $9C
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $00
|
||||
!byte $98
|
||||
!byte $00
|
||||
!byte $86
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $80
|
||||
@ -801,12 +807,6 @@ FontDataRow6
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $EC
|
||||
!byte $FC
|
||||
!byte $B8
|
||||
@ -919,6 +919,12 @@ FontDataRow7
|
||||
!byte $9C
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $00
|
||||
!byte $8C
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $80
|
||||
@ -930,12 +936,6 @@ FontDataRow7
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $00
|
||||
!byte $80
|
||||
!byte $80
|
||||
!byte $80
|
||||
|
@ -38,9 +38,7 @@ SearchMode
|
||||
; we want to switch to Browse Mode with the keyboard still hot so
|
||||
; that mode finds and dispatches the arrow key.
|
||||
|
||||
cmp #$88 ; left arrow switches to browse mode
|
||||
beq @arrow
|
||||
cmp #$8B ; also right arrow
|
||||
cmp #$8B ; right arrow switches to browse mode
|
||||
beq @arrow
|
||||
cmp #$95 ; also up arrow
|
||||
beq @arrow
|
||||
@ -64,9 +62,13 @@ SearchMode
|
||||
+
|
||||
cmp #$FF ; delete key
|
||||
bne +
|
||||
ldx #kInputBack
|
||||
- ldx #kInputBack
|
||||
bne @InputDispatch ; always branches
|
||||
+
|
||||
cmp #$88 ; left arrow = delete (may as well, since
|
||||
; popular emulators remap this anyway)
|
||||
beq -
|
||||
|
||||
cmp #$89 ; TAB switches to mini attract mode
|
||||
bne + ; if there is a game selected
|
||||
ldx #kInputTab
|
||||
@ -153,18 +155,13 @@ SearchMode
|
||||
; no input, reset params and UI
|
||||
lda #$FF
|
||||
sta SelectedIndex ; no game selected
|
||||
ldx #40 ; reset visible line
|
||||
lda #0
|
||||
- sta UILine1-1,x
|
||||
ldx #39 ; reset visible line
|
||||
- lda #0
|
||||
sta UILine1,x
|
||||
lda Instructions,x
|
||||
sta UILine2,x
|
||||
dex
|
||||
bne -
|
||||
ldy #MaxInputLength ; clear visible search bar
|
||||
lda #" "
|
||||
- sta UILine2+1,y
|
||||
dey
|
||||
bne -
|
||||
lda #$7F
|
||||
sta UILine2+1
|
||||
bpl -
|
||||
jsr LoadTitleOffscreen
|
||||
jsr DrawSearchBarOffscreen
|
||||
jsr ShowOtherPage
|
||||
@ -233,6 +230,11 @@ SearchMode
|
||||
sta UILine2,y
|
||||
cpy #MaxInputLength+1
|
||||
bcc -
|
||||
ldx #8
|
||||
- lda ReturnToPlay,x ; replace games count with 'to play' label
|
||||
sta UI_ToPlay,x
|
||||
dex
|
||||
bpl -
|
||||
ldx #40
|
||||
lda #0
|
||||
- sta UILine1-1,x ; reset search bar
|
||||
@ -245,7 +247,7 @@ SearchMode
|
||||
+LOW_ASCII_TO_LOWER
|
||||
cmp InputBuffer,x
|
||||
bne +
|
||||
lda #$0B ; add dots to highlight matched characters
|
||||
lda #$11 ; add dots to highlight matched characters
|
||||
sta UILine1,y
|
||||
inx
|
||||
cpx InputLength ; if input buffer is exhausted, we're done
|
||||
|
Loading…
x
Reference in New Issue
Block a user