1
0
Fork 0

Fix loading a new font always setting vga range to b800-bffff, should fix monochromo text mode

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1459
This commit is contained in:
Sjoerd van der Berg 2003-11-22 17:03:49 +00:00
parent 5152dda24e
commit fb6045aef1

View file

@ -47,15 +47,17 @@ static Bit16u map_offset[8]={
void INT10_LoadFont(PhysPt font,bool reload,Bitu count,Bitu offset,Bitu map,Bitu height) {
PhysPt where=PhysMake(0xa000,map_offset[map & 0x7]+offset*32);
IO_Write(0x3c4,0x2);IO_Write(0x3c5,0x4); //Enable plane 2
IO_Write(0x3ce,0x6);IO_Write(0x3cf,0x0); //Disable odd/even and a0000 adressing
IO_Write(0x3ce,0x6);Bitu old_6=IO_Read(0x3cf);
IO_Write(0x3cf,0x0); //Disable odd/even and a0000 adressing
for (Bitu i=0;i<count;i++) {
MEM_BlockCopy(where,font,height);
where+=32;
font+=height;
}
IO_Write(0x3c4,0x2);IO_Write(0x3c5,0xf); //Enable all planes
IO_Write(0x3c4,0x2);
IO_Write(0x3c5,0xf); //Enable all planes
IO_Write(0x3ce,0x6);
IO_Write(0x3cf,0x0e); //odd/even and b8000 adressing
IO_Write(0x3cf,old_6); //odd/even and b8000 adressing
/* Reload tables and registers with new values based on this height */
if (reload) {
//Max scanline