From: Alan Cox Date: Fri, 13 Feb 2015 15:40:28 +0000 (+0000) Subject: zx128: use the ROM font X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e2ee4c158afabc2f36a0028c618cba96b751a085;p=FUZIX.git zx128: use the ROM font Saves us more memory --- diff --git a/Kernel/platform-zx128/config.h b/Kernel/platform-zx128/config.h index caec8a4d..4d352cdc 100644 --- a/Kernel/platform-zx128/config.h +++ b/Kernel/platform-zx128/config.h @@ -27,9 +27,9 @@ /* Video terminal, not a serial tty */ #define CONFIG_VT -/* We want the 8x8 font */ -#define CONFIG_FONT8X8 -#define CONFIG_FONT8X8SMALL +/* We don't need a font: We will use the ROM font */ +#undef CONFIG_FONT8X8 +#undef CONFIG_FONT8X8SMALL /* We have 1 bank at C000 with 6 possible pages to map. Our choice should be CONFIG_BANK_FIXED, but we are. @@ -37,9 +37,9 @@ #undef CONFIG_BANK_FIXED -/* 6 16K banks, 1 is for kernel needs */ -#define MAX_MAPS 5 -#define MAP_SIZE 0x4000U +/* We have two mappings from our 128K of memory */ +#define MAX_MAPS 2 +#define MAP_SIZE 0x8000U /* Banks as reported to user space */ #define CONFIG_BANKS 1 diff --git a/Kernel/platform-zx128/zxvideo.s b/Kernel/platform-zx128/zxvideo.s index 6baaf9ff..f411735f 100644 --- a/Kernel/platform-zx128/zxvideo.s +++ b/Kernel/platform-zx128/zxvideo.s @@ -2,7 +2,7 @@ ; zx128 vt primitives ; - .module zx128 + .module zxvideo ; exported symbols .globl _plot_char @@ -14,8 +14,6 @@ .globl _clear_across .globl _do_beep - .globl _fontdata_8x8 - .area _VIDEO ; colors are ignored everywhere for now @@ -47,8 +45,18 @@ _plot_char: call videopos + ; + ; TODO: Map char 0x60 to a grave accent bitmap rather + ; than fudging with a quote + ; + ld b, #0 ; calculating offset in font table ld a, c + cp #0x60 + jr nz, nofiddle + ld a, #0x27 +nofiddle: + or a ; clear carry rla rl b rla @@ -57,9 +65,10 @@ _plot_char: rl b ld c, a - ld hl, #_fontdata_8x8 - 256 + ld hl, #0x3C00 ; ROM font add hl, bc ; hl points to first byte of char data + ; printing ld c, #8 plot_char_loop: