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