Text can be shown on HGR screen now. No scrolling.

This commit is contained in:
Bobbi Webber-Manners 2021-09-23 17:56:39 -04:00
parent 00e52ca2da
commit a9e80db0f5
4 changed files with 33 additions and 5 deletions

Binary file not shown.

View File

@ -335,6 +335,7 @@ PRCHR3 TYA
PRCHR4 PHY
JSR CHARADDR ; Find character address
PLA ; Get character back
PHA ; Stash it again
PHP ; Disable IRQs while
SEI ; toggling memory
BCC PRCHR6 ; Aux memory
@ -355,8 +356,10 @@ PRCHR6 STA (VDUADDR),Y ; Store it
STA HGRADDR+1
STA $C005 ; Write to aux
PLP ; Restore IRQs
PLA ; Recover character
>>> XF2MAIN,DRAWCHAR ; Plot char on HGR screen
:DONE RTS
:DONE PLA ; Discard character
RTS
PUTCHRET
>>> ENTAUX

BIN
font.dat

Binary file not shown.

View File

@ -76,13 +76,38 @@ GFXINIT JSR FDRAWADDR+0 ; Initialize FDRAW library
RTS
* Plot bitmap character on the HGR screen
* On entry: char is in A
DRAWCHAR >>> ENTMAIN
LDA HGRADDR+0
AND #$7F
STA A1L ; A*8 -> A1L,A1H
STZ A1H
ASL A1L
ROL A1H
ASL A1L
ROL A1H
ASL A1L
ROL A1H
CLC ; FONTADDR+A*8 -> A1L,A1H
LDA A1L
ADC #<FONTADDR
STA A1L
LDA HGRADDR+1
LDA A1H
ADC #>FONTADDR
STA A1H
LDA #$FF
STA (A1L)
LDA HGRADDR+0 ; HGRADDR -> A4L,A4H
STA A4L
LDA HGRADDR+1
STA A4H
LDY #$00
:L1 LDA (A1L),Y ; Load line of pixels from font
STA (A4L) ; Store them on screen
INC A4H ; Skip 1024 bytes to next row
INC A4H
INC A4H
INC A4H
INY
CPY #$08 ; All eight rows done?
BNE :L1
>>> XF2AUX,PUTCHRET
FGCOLOR DB $00 ; Foreground colour