diff --git a/Source/Fonts/Build.cmd b/Source/Fonts/Build.cmd index ee112570..6f379618 100644 --- a/Source/Fonts/Build.cmd +++ b/Source/Fonts/Build.cmd @@ -8,7 +8,7 @@ set PATH=%TOOLS%\lzsa;%TOOLS%\fonttool;%PATH% echo. echo Preparing compressed font files... -for %%f in (font6x8 font8x8 font8x11 font8x16 fontcga fontvgarc) do call :genfont %%f +for %%f in (font6x8 font8x8 font8x11 font8x16) do call :genfont %%f goto :eof diff --git a/Source/Fonts/Makefile b/Source/Fonts/Makefile index 8ea48a82..c1f3d95a 100644 --- a/Source/Fonts/Makefile +++ b/Source/Fonts/Makefile @@ -1,8 +1,8 @@ OBJECTS = \ - font6x8u.asm font8x8u.asm font8x11u.asm font8x16u.asm fontcgau.asm fontvgarcu.asm \ - font6x8c.asm font8x8c.asm font8x11c.asm font8x16c.asm fontcgac.asm fontvgarcc.asm + font6x8u.asm font8x8u.asm font8x11u.asm font8x16u.asm \ + font6x8c.asm font8x8c.asm font8x11c.asm font8x16c.asm -OTHERS = font6x8c.bin font8x8c.bin font8x11c.bin font8x16c.bin fontcgac.bin fontvgarcc.bin +OTHERS = font6x8c.bin font8x8c.bin font8x11c.bin font8x16c.bin TOOLS = ../../Tools @@ -26,11 +26,5 @@ font8x11c.bin: font8x11u.bin font8x16c.bin: font8x16u.bin $(BINDIR)/lzsa -f2 -r $< $@ -fontcgac.bin: fontcgau.bin - $(BINDIR)/lzsa -f2 -r $< $@ - -fontvgarcc.bin: fontvgarcu.bin - $(BINDIR)/lzsa -f2 -r $< $@ - %.asm: %.bin $(BINDIR)/bin2asm $< > $@ diff --git a/Source/Fonts/font6x8.png b/Source/Fonts/font6x8.png index 77bf355f..2c1c3208 100644 Binary files a/Source/Fonts/font6x8.png and b/Source/Fonts/font6x8.png differ diff --git a/Source/Fonts/font8x16.png b/Source/Fonts/font8x16.png index 36131b53..ceb5bcd3 100644 Binary files a/Source/Fonts/font8x16.png and b/Source/Fonts/font8x16.png differ diff --git a/Source/Fonts/font8x16u.bin b/Source/Fonts/font8x16u.bin index c7ed1f51..1e360b26 100644 Binary files a/Source/Fonts/font8x16u.bin and b/Source/Fonts/font8x16u.bin differ diff --git a/Source/Fonts/font8x8.png b/Source/Fonts/font8x8.png index 7ddd1189..df1ab917 100644 Binary files a/Source/Fonts/font8x8.png and b/Source/Fonts/font8x8.png differ diff --git a/Source/Fonts/font8x8u.bin b/Source/Fonts/font8x8u.bin index 17f16d25..0abea4ef 100644 Binary files a/Source/Fonts/font8x8u.bin and b/Source/Fonts/font8x8u.bin differ diff --git a/Source/Fonts/fontcga.png b/Source/Fonts/fontcga.png deleted file mode 100644 index 3addedd6..00000000 Binary files a/Source/Fonts/fontcga.png and /dev/null differ diff --git a/Source/Fonts/fontcgau.bin b/Source/Fonts/fontcgau.bin deleted file mode 100644 index 8f20e538..00000000 Binary files a/Source/Fonts/fontcgau.bin and /dev/null differ diff --git a/Source/Fonts/fonts.txt b/Source/Fonts/fonts.txt index 2b24f378..8f4d8feb 100644 --- a/Source/Fonts/fonts.txt +++ b/Source/Fonts/fonts.txt @@ -1,12 +1,5 @@ Font files for ROMWBW. -8x8: 8x8 cell, mostly IBM CGA, first 16 differ, thin font -8x11: 8x11 cell, possibly VT-100? -8x16: 8x16 cell, IBM MDA -CGA: 8x16 cell, IBM CGA, normal (thick) CGA font, rows 8-15 are unused padding - -There are multiple fonts associated with ROMWBW supported hardware: - Board Driver Chip -------- -------- -------- ECB-SCG tms.asm 9918 @@ -17,25 +10,31 @@ There are multiple fonts associated with ROMWBW supported hardware: MBC-VDP tms.asm 9938/9958 RCBUS-VRC vrc.asm PLD RCBUS-TMS tms.asm 99x8 - XOSERA xosera.asm ? Name Glyph Cell Size Comp Board & Display Mode ------------------------------------------------------------------------------------------------ font6x8 6x8 8x8 2048 1094 ECB-SCG, MBC-VDP -font8x8 6x8 8x8 2048 1034 ECB-VGA3 (80x60) +font8x8 6x8 8x8 2048 1259 ECB-CVDU (CGA), MBC-VDC (CGA), ECB-VGA3 (80x60) font8x11 8x11 8x11 2816 1252 ECB-VGA3 (80x43) -font8x16 8x14 8x16 4096 1466 ECB-CVDU (EGA), ECB-VGA3 (80x24, 80x25, 80x30), MBC-VDC (EGA) -fontcga 8x8 8x16 4096 1280 ECB-CVDU (CGA), MBC-VDC (CGA) -fontvrc 8x8 8x8 1024 650 VGARC +font8x16 8x14 8x16 4096 1466 ECB-CVDU (EGA), MBC-VDC (EGA), ECB-VGA3 (80x24, 80x25, 80x30) ----- ----- - 16128 6776 + 11008 5071 Notes: -- The CGA font is roughly equivalent to the 8x8 font, but padded out to 8x16. Scan lines - 8-15 are unused. The CVDU driver (8563 chip) always uses fonts defined in an 8x16 cell. - When the CVDU is configured for use with a CGA monitor, an 8x8 character cell is used, - but the font definition must still be 8x16. The CGA font is used for this. +- Compression of the 6x8 font is disabled because the TMS driver must + reload the font when CP/M is warm booted. There is no memory area + where the decompression can safely be done at this point. + +- The 856x GDPs always use 16 bytes per font character. The CVDU + driver inserts dummy bytes as needed to utilize the 8x8 font when + selected. + +- The 8x11 font is not typically used and only supported by one + board. It is probably not worth the space of storing it and will + probably be eliminated in the future. + +- All fonts are in code page 437 except 8x11. For inclusion in HBIOS the .bin format files must be converted to assembler .asm format. This is achieved using the fonttool utility and is completed automatically as part of the build process. @@ -68,7 +67,3 @@ Implementation example (older version): https://cpcrulez.fr/applications_tools_cruncher_LZSA2_Z80.htm x86 lzsa compressor application: http://www.pouet.net/prod.php?which=81573 - - - - diff --git a/Source/Fonts/fontvgarc.png b/Source/Fonts/fontvgarc.png deleted file mode 100644 index 5b9ad747..00000000 Binary files a/Source/Fonts/fontvgarc.png and /dev/null differ diff --git a/Source/Fonts/fontvgarcu.bin b/Source/Fonts/fontvgarcu.bin deleted file mode 100644 index 91b53d17..00000000 Binary files a/Source/Fonts/fontvgarcu.bin and /dev/null differ diff --git a/Source/HBIOS/Makefile b/Source/HBIOS/Makefile index 04bf955d..34d56286 100644 --- a/Source/HBIOS/Makefile +++ b/Source/HBIOS/Makefile @@ -23,8 +23,9 @@ endif include $(TOOLS)/Makefile.inc -FONTS := font8x11c.asm font8x11u.asm font8x16c.asm font8x16u.asm font8x8c.asm font8x8u.asm \ - font6x8c.asm font6x8u.asm fontcgac.asm fontcgau.asm fontvgarcc.asm fontvgarcu.asm +FONTS := font6x8c.asm font6x8u.asm font8x8c.asm font8x8u.asm \ + font8x11c.asm font8x11u.asm font8x16c.asm font8x16u.asm + ifeq ($(CPUFAM),2) TASM=$(BINDIR)/uz80as -t hd64180 diff --git a/Source/HBIOS/cvdu.asm b/Source/HBIOS/cvdu.asm index 99b1c664..2b5b6298 100644 --- a/Source/HBIOS/cvdu.asm +++ b/Source/HBIOS/cvdu.asm @@ -48,8 +48,8 @@ CVDU_ROWS .EQU 25 CVDU_COLS .EQU 80 ; #IF (CVDUMON == CVDUMON_CGA) - #DEFINE USEFONTCGA - #DEFINE CVDU_FONT FONTCGA + #DEFINE USEFONT8X8 + #DEFINE CVDU_FONT FONT8X8 #ENDIF ; #IF (CVDUMON == CVDUMON_EGA) @@ -486,6 +486,10 @@ CVDU_CRTINIT2: ; ADJUST FOR 16K RAM SIZE ; LOAD FONT DATA ;---------------------------------------------------------------------- ; +; THE GDP USES 16 BYTES PER FONT EVEN WHEN THE FONT HAS ONLY 8 +; BYTES. SO, FOR FONT8X8, WE NEED TO ALTERNATELY WRITE 8 BYTES OF +; REAL FONT DATA, THEN WRITE 8 BYTES OF GARBAGE. +; CVDU_LOADFONT: LD HL,$2000 ; START OF FONT BUFFER LD C,18 ; UPDATE ADDRESS REGISTER PAIR @@ -512,8 +516,14 @@ CVDU_LOADFONT: CVDU_LOADFONT1: LD A,(HL) ; LOAD NEXT BYTE OF FONT DATA CALL CVDU_WR ; WRITE IT - INC HL ; INCREMENT FONT DATA POINTER DEC DE ; DECREMENT LOOP COUNTER +#IF (CVDUMON == CVDUMON_CGA) + ; SKIP ALTERNATING 8 BYTE PAIRS (SEE COMMENT ABOVE) + BIT 3,E ; BIT 3 CHANGES WITH EVERY 8 BYTES + JR Z,CVDU_LOADFONT2 ; WHEN ZERO, DON'T INC FONT PTR +#ENDIF + INC HL ; INCREMENT FONT DATA POINTER +CVDU_LOADFONT2: LD A,D ; CHECK DE... OR E ; FOR COUNTER EXHAUSTED JR NZ,CVDU_LOADFONT1 ; LOOP TILL DONE diff --git a/Source/HBIOS/vga.asm b/Source/HBIOS/vga.asm index 97470ff5..563df03d 100644 --- a/Source/HBIOS/vga.asm +++ b/Source/HBIOS/vga.asm @@ -551,7 +551,7 @@ VGA_LOADFONT: LD HL,$7000 | VGA_89BIT ; CLEAR FONT PAGE NUM CALL VGA_SETCFG -#IF USELZSA2 & (VGASIZ != V80X60) +#IF USELZSA2 LD (VGA_STACK),SP ; SAVE STACK LD HL,(VGA_STACK) ; AND SHIFT IT LD DE,$2000 ; DOWN 4KB TO @@ -588,7 +588,7 @@ VGA_LOADFONT2: LD HL,$7070 | VGA_89BIT ; SET FONT PAGE NUM TO 7 CALL VGA_SETCFG -#IF USELZSA2 & (VGASIZ != V80X60) +#IF USELZSA2 LD HL,(VGA_STACK) ; ERASE DECOMPRESS BUFFER LD SP,HL ; BY RESTORING THE STACK RET ; DONE diff --git a/Source/HBIOS/vrc.asm b/Source/HBIOS/vrc.asm index 22338298..c87051c6 100644 --- a/Source/HBIOS/vrc.asm +++ b/Source/HBIOS/vrc.asm @@ -21,8 +21,8 @@ VRC_KBDST .EQU $F5 ; KBD CTLR STATUS/CMD PORT VRC_ROWS .EQU 48 VRC_COLS .EQU 64 ; -#DEFINE USEFONTVGARC -#DEFINE VRC_FONT FONTVGARC +#DEFINE USEFONT8X8 +#DEFINE VRC_FONT FONT8X8 ; TERMENABLE .SET TRUE ; INCLUDE TERMINAL PSEUDODEVICE DRIVER KBDENABLE .SET TRUE ; INCLUDE KBD KEYBOARD SUPPORT