Load bitmap font from file into main memory

This commit is contained in:
Bobbi Webber-Manners 2021-09-22 20:42:58 -04:00
parent 58daf0d7ec
commit ae4511bac5
5 changed files with 18 additions and 0 deletions

Binary file not shown.

View File

@ -58,6 +58,9 @@ COPYBUF EQU $9200 ; File copy needs separate buffer
* Location of FDraw library in main memory
FDRAWADDR EQU $9400
* Location of bitmap font in main memory
FONTADDR EQU $A900
* Address in aux memory where ROM will be loaded
AUXADDR EQU $8000

BIN
font.dat Normal file

Binary file not shown.

View File

@ -30,6 +30,15 @@ START JSR CROUT
CLC ; Load into main
JSR LOADCODE
LDA #<:FNTFILE
STA OPENPL+1
LDA #>:FNTFILE
STA OPENPL+2
LDA #>FONTADDR ; Address in main
LDX #<FONTADDR
CLC ; Load into main
JSR LOADCODE
LDA #<MOSSHIM ; Start address of MOS shim
STA A1L
LDA #>MOSSHIM
@ -69,6 +78,7 @@ START JSR CROUT
>>> XF2AUX,AUXMOS1
:FDFILE STR "FDRAW.FAST" ; Filename for FDraw lib
:FNTFILE STR "FONT.DAT" ; Filename for bitmap font
* Load image from file into memory
* On entry: OPENPL set up to point to file to load

View File

@ -1129,6 +1129,11 @@ GFXINIT JSR FDRAWADDR+0 ; Initialize FDRAW library
JSR FDRAWADDR+22 ; FDRAW: clear HGR screen
RTS
* Draw character on graphics screen (byte aligned)
* On entry: Character in A
DRAWCHAR
RTS
FGCOLOR DB $00 ; Foreground colour
BGCOLOR DB $00 ; Background colour
LINETYPE DB $00 ; 0 normal, 1 XOR