Fix limine uefi missing SYS_FONT_PTR by hardcoding a new aux font dedicated file.

Since Zeal used a 16-bit mode BIOS INT to get an 8x8 VGA ROM font, this is incompatible if Zeal is loaded to a patched 32-bit mode by the zealbooter prekernel. To circumvent SYS_FONT_PTR never being set and fix access to the 'thick' font with Ctrl-Alt-F, I loaded Zeal bare-metal on my Thinkpad T420 and saved the VGA ROM font file with FontEd, then transferred the file to my VM.
This commit is contained in:
TomAwezome 2022-08-22 03:18:54 -04:00
parent 644a73711e
commit 1d4d8dc86e
3 changed files with 265 additions and 5 deletions

258
src/Kernel/FontAux.ZC Executable file
View file

@ -0,0 +1,258 @@
public U64 sys_font_aux[256] = {
0x0000000000000000,
0x7E8199BD81A5817E,
0x7EFFE7C3FFDBFF7E,
0x00081C3E7F7F7F36,
0x00081C3E7F3E1C08,
0x003C18E7FF183C3C,
0x001C08777F3E1C08,
0x0000183C3C180000,
0xFFFFE7C3C3E7FFFF,
0x003C664242663C00,
0x000000F818181818,
0x1E333333BEF0E0F0,
0x187E183C6666663C,
0x000F1E1050503010,
0x3870474E68582818,
0x00082A1C771C2A08,
0x0001071F7F1F0701,
0x0040707C7F7C7040,
0x00183C5A185A3C18,
0x0066006666666666,
0x00D8D8DEDBDBDBFE,
0x0E111C22221C4438,
0x007E7E7E00000000,
0x7E183C5A185A3C18,
0x00181818185A3C18,
0x00183C5A18181818,
0x000018307F301800,
0x00000C067F060C00,
0x00007F0303030000,
0x00002442FF422400,
0x00007F7F3E1C0800,
0x0000081C3E7F7F00,//
0x0000000000000000,//
0x00180018183C3C18,//!
0x0000000000242436,//"
0x0036367F367F3636,//#
0x00083F683E0B3E08,//$$
0x0033566C1B356600,//%
0x005E33731E1C321C,//&
0x000000000004080C,//'
0x00180C0606060C18,//(
0x00060C1818180C06,//)
0x0000663CFF3C6600,//*
0x00000C0C3F0C0C00,//+
0x04080C0000000000,//,
0x000000003F000000,//-
0x000C000000000000,//.
0x0003060C18306040,///
0x003E67676F7B733E,//0
0x007E1818181E1C18,//1
0x007F630E3860633E,//2
0x003E63603C60633E,//3
0x0078307F33363C38,//4
0x003E6360603F037F,//5
0x003E63633F03633E,//6
0x000C0C0C1830637F,//7
0x003E63633E63633E,//8
0x003E63607E63633E,//9
0x00000C0000000C00,//:
0x04080C0000000C00,//;
0x0030180C060C1830,//<
0x00007E00007E0000,//=
0x00060C1830180C06,//>
0x000C000C1830331E,//?
0x003E01796579413E,//@
0x006363637F63633E,//A
0x003F66663E66663F,//B
0x003E63030303633E,//C
0x003F66666666663F,//D
0x007F46161E16467F,//E
0x000F06161E16467F,//F
0x007E63730363633E,//G
0x006363637F636363,//H
0x003C18181818183C,//I
0x001E333330303078,//J
0x006766361E366667,//K
0x007F66460606060F,//L
0x0063636B7F776341,//M
0x006363737B6F6763,//N
0x003E63636363633E,//O
0x000F06063E66663F,//P
0x603E7B6B6363633E,//Q
0x006766663E66663F,//R
0x003E63603E03633E,//S
0x003C1818185A5A7E,//T
0x003E636363636363,//U
0x00081C3663636363,//V
0x004163777F6B6363,//W
0x0063361C1C1C3663,//X
0x003C18183C666666,//Y
0x007F664C1831637F,//Z
0x001E06060606061E,//[
0x00406030180C0603,//\
0x001E18181818181E,//]
0x0000000063361C08,//^
0xFF00000000000000,//_
0x000000000008040C,//`
0x006E333E301E0000,//a
0x003E66663E060607,//b
0x003E6303633E0000,//c
0x006E33333E303038,//d
0x003E037F633E0000,//e
0x001E0C0C1E0C6C38,//f
0x1E303E33336E0000,//g
0x006766666E360607,//h
0x003C1818181C0018,//i
0x1E33303038003000,//j
0x0067361E36660607,//k
0x003C18181818181C,//l
0x006B6B6B7F330000,//m
0x00666666663B0000,//n
0x003E6363633E0000,//o
0x0F063E66663B0000,//p
0x78303E33333E0000,//q
0x000F06066E7B0000,//r
0x003E603E033E0000,//s
0x00182C0C0C3F0C08,//t
0x006E333333330000,//u
0x00081C3663630000,//v
0x00367F6B6B630000,//w
0x0063361C36630000,//x
0x1F303E3333330000,//y
0x003F260C193F0000,//z
0x007018180C181870,//{
0x0018181800181818,//|
0x00070C0C180C0C07,//}
0x0000000000003B6E,//~
0x007F6363361C0800,
0x0E183E630303633E,//€
0x006E333333330033,//<2F>
0x003E037F633E0870,//
0x006E333E301C413E,//ƒ
0x006E333E301E0033,//„
0x006E333E301E0807,//…
0x006E333E301E0C0C,//†
0x0E183E03033E0000,//‡
0x003E037F633E413E,//ˆ
0x003E037F633E0063,//‰
0x003E037F633E0807,//Š
0x003C1818181C0066,//
0x003C1818181C413E,//Œ
0x003C1818181C0807,//<2F>
0x0063637F633E0063,//Ž
0x0063637F633E1C1C,//<2F>
0x007F061E067F0870,//<2F>
0x007E0B7E483E0000,//
0x007313137F13137E,//
0x003E6363633E413E,//“
0x003E6363633E0063,//”
0x003E6363633E0807,//•
0x006E33333333413E,//
0x006E333333330807,//—
0x1F303E3333330033,//˜
0x003E636363633E63,//™
0x003E636363630063,//š
0x00183E6B0B6B3E18,//
0x003B4F060F06361C,//œ
0x00187E187E183C66,//<2F>
0x60337B33231F331F,//ž
0x0E1B18183C18D870,//Ÿ
0x006E333E301E0870,// 
0x003C1818181C0870,//¡
0x003E6363633E0870,//¢
0x006E333333330870,//£
0x00666666663B1966,//¤
0x0063737B6F671966,//¥
0x00007E002C3C301C,//¦
0x00003E001C36361C,//§
0x003E6363060C000C,//¨
0x00000C06FF060C00,//©
0x000030303F000000,//ª
0x007831627F0B1303,//«
0x00307D3A370B1303,//¬
0x00183C3C18180018,//­
0x00006C361B366C00,//®
0x00001B366C361B00,//¯
0x1144114411441144,//°
0x55AA55AA55AA55AA,//±
0x77DBEEDB77DBEEDB,//²
0x0808080808080808,//³
0x080808080F080808,//´
0x0808080F0F0F0808,//µ
0x3C3C3C3C3F3C3C3C,//¶
0x3C3C3C3C3F000000,//·
0x0808080F0F0F0000,//¸
0x3C3C3C3F3F3F3C3C,//¹
0x3C3C3C3C3C3C3C3C,//º
0x3C3C3E3F1F0F0000,//»
0x0000000F1F3F3E3C,//¼
0x000000003F3C3C3C,//½
0x0000000F0F0F0808,//¾
0x0808080807000000,//¿
0x00000000F0080808,//À
0x00000000FF080808,//Á
0x08080808FF000000,//Â
0x08080808F8080808,//Ã
0x00000000FF000000,//Ä
0x08080808FF080808,//Å
0x080808F8F8F80808,//Æ
0x3C3C3C3CFC3C3C3C,//Ç
0x000000F0F8FC7C3C,//È
0x3C3C7CFCF8F00000,//É
0x000000FFFFFF3C3C,//Ê
0x3C3C3CFFFFFF0000,//Ë
0x3C3C3CFCFCFC3C3C,//Ì
0x000000FFFFFF0000,//Í
0x3C3C3CFFFFFF3C3C,//Î
0x000000FFFFFF0808,//Ï
0x00000000FF3C3C3C,//Ð
0x080808FFFFFF0000,//Ñ
0x3C3C3C3CFF000000,//Ò
0x00000000FC3C3C3C,//Ó
0x000000F8F8F80808,//Ô
0x080808F8F8F80000,//Õ
0x3C3C3C3CFC000000,//Ö
0x3C3C3C3CFF3C3C3C,//×
0x080808FFFFFF0808,//Ø
0x0000000007080808,//Ù
0x08080808F0000000,//Ú
0xFFFFFFFFFFFFFFFF,//Û
0xFFFFFFFF00000000,//Ü
0x0F0F0F0F0F0F0F0F,//Ý
0xF0F0F0F0F0F0F0F0,//Þ
0x00000000FFFFFFFF,//ß
0x006E3B13332E0000,//à
0x023B6363331B331E,//á
0x000F06060606467F,//â
0x00123636377E4000,//ã
0x007F460C180C467F,//ä
0x000E13130B7E0000,//å
0x011F333333330000,//æ
0x000818181B7E0000,//ç
0x1C083E6B6B3E081C,//è
0x003E63637F63633E,//é
0x007714366363633E,//ê
0x001E33333E18443C,//ë
0x0000669999660000,//ì
0x00033E4F793E6000,//í
0x003E031F033E0000,//î
0x0063636363633E00,//ï
0x00007F007F007F00,//ð
0x007E0018187E1818,//ñ
0x003E000C1830180C,//ò
0x003E00180C060C18,//ó
0x1818181818D8D870,//ô
0x0E1B1B1818181818,//õ
0x000018007E001800,//ö
0x00003B6E003B6E00,//÷
0x00000000001C361C,//ø
0x0000001818000000,//ù
0x0000001800000000,//ú
0x003C3637303030F0,//û
0x000000003636361B,//ü
0x000000000F030C0F,//ý
0x00003C3C3C3C0000,//þ
0xFFFFFFFFFFFFFFFF,//ÿ
};

View file

@ -83,11 +83,12 @@ U0 SysGrInit()
{
I64 i, j;
text.aux_font = MAlloc(256 * 8); //256 U64s
MemCopy(text.aux_font, *SYS_FONT_PTR(U32), 256 * 8);
// MemCopy(text.aux_font, *SYS_FONT_PTR(U32), 256 * 8);
MemCopy(text.aux_font, sys_font_aux, 256 * 8);
for (i = 0; i < 256; i++)
for (j = 0; j < 8; j++)
text.aux_font[i].u8[j] = rev_bits_table[text.aux_font[i].u8[j]];
// for (i = 0; i < 256; i++)
// for (j = 0; j < 8; j++)
// text.aux_font[i].u8[j] = rev_bits_table[text.aux_font[i].u8[j]];
text.font = sys_font_std;
@ -110,7 +111,7 @@ U0 SysGrInit()
text.buffer_size = text.screen_size * 4; //buffer for 32-bit, but only 16 colors now.
text.raw_screen = CAlloc(text.buffer_size);
text.fb_alias = sys_vbe_mode.framebuffer;
// text.fb_alias = sys_framebuffer_addr;
// text.fb_alias = sys_framebuffer_addr;
MemSetU32(text.fb_alias, BLACK32, text.screen_size);
text.vga_alias = CAlloc(text.rows * text.cols * 8);

View file

@ -30,6 +30,7 @@
#include "Sched"
#include "Memory/MakeMemory"
#include "FontStd"
#include "FontAux"
#include "StrB"
#include "KHashA"
#include "KInterrupts"