1
0
Fork 0

Initial font selection

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1228
This commit is contained in:
Sjoerd van der Berg 2003-09-04 15:49:00 +00:00
parent 6de41171d1
commit 2fd4a98dde
2 changed files with 9 additions and 1 deletions

View file

@ -115,6 +115,8 @@ typedef struct {
Bitu lines;
Bit8u font_height;
Bit8u font[64*1024];
Bitu font1_start;
Bitu font2_start;
Bitu rows,cols;
struct {
Bit8u sline,eline;

View file

@ -67,7 +67,13 @@ void write_p3c5(Bit32u port,Bit8u val) {
*/
break;
case 3: /* Character Map Select */
seq(character_map_select)=val;
{
seq(character_map_select)=val;
Bit8u font1=(val & 0x3) | ((val & 0x10) >> 2);
vga.draw.font1_start=((font1&3) * 16*1024) + ((font1 > 4) ? (8*1024) : 0);
Bit8u font2=((val & 0xc) >> 2) | ((val & 0x20) >> 3);
vga.draw.font2_start=((font2&3) * 16*1024) + ((font2 > 4) ? (8*1024) : 0);
}
/*
0,1,4 Selects VGA Character Map (0..7) if bit 3 of the character
attribute is clear.