From ba0ef5938d267dc47ca6d30af18b596190b4f932 Mon Sep 17 00:00:00 2001 From: Greg King Date: Wed, 15 Jul 2020 04:55:38 -0400 Subject: [PATCH] Moved the font into a separate module in the library. The font can be replaced, at link-time, by a custom file. --- libsrc/pce/conio.s | 8 +++----- libsrc/pce/{vga.inc => vga.s} | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) rename libsrc/pce/{vga.inc => vga.s} (99%) diff --git a/libsrc/pce/conio.s b/libsrc/pce/conio.s index 8fefe01f6..ac306f193 100644 --- a/libsrc/pce/conio.s +++ b/libsrc/pce/conio.s @@ -3,6 +3,7 @@ .import vdc_init .import psg_init .import colors + .import _pce_font .importzp ptr1, tmp1 .include "pce.inc" @@ -53,8 +54,8 @@ load_font: ; rts ; (fall through) ; Point to the font data. -copy: lda #font +copy: lda #<_pce_font + ldx #>_pce_font sta ptr1 stx ptr1+1 @@ -84,6 +85,3 @@ fillloop: bne charloop ; next character rts - -.rodata -font: .include "vga.inc" diff --git a/libsrc/pce/vga.inc b/libsrc/pce/vga.s similarity index 99% rename from libsrc/pce/vga.inc rename to libsrc/pce/vga.s index 72c173146..630fbe8db 100644 --- a/libsrc/pce/vga.inc +++ b/libsrc/pce/vga.s @@ -1,10 +1,15 @@ ;---------------------------------------------------------------------------- ; VGA font for the PC-Engine conio implementation + .export _pce_font + ; The character tiles use only two colors from each pallette. Color zero ; comes from pallette zero; color one is different in each pallette. The ; color of a character is set by choosing one of the 16 pallettes. +.rodata + +_pce_font: .byte $00, $00, $00, $00, $00, $00, $00, $00 .byte %00000000