1
0
Fork 0

Add alternate font tables and associated loading logic in video BIOS, allowing correct gaps between "wide" characters (e.g. m,w,M,W,T,Z,0) in all VGA machine types.

Update all related BIOS memory values and CRTC registers when loading fonts, fixing quirks in some textmode programs like Inertia Player. Based in part on a patch by h-a-l-9000.

Improve support for MDA emulation in the vgaonly machine type, as it is the only way the video BIOS can make use of the 14-line alternate symbols.

Be compatible by setting the INT 43h vector to the first half of the 8-line font table for standard text modes. Fixes a few obscure games and demos that rely on this BIOS behavior.

Move VESA mode table and OEM string before font tables in the video ROM, which is a more compatible ordering and gives the data low address offsets that work around a bug in some programs such as the Abuse game and Molejo demo.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3932
This commit is contained in:
ripsaw8080 2015-08-28 14:37:25 +00:00
parent f66ff6e3d7
commit 1b7b92ed8a
5 changed files with 254 additions and 80 deletions

View file

@ -52,7 +52,7 @@ static Bitu INT10_Handler(void) {
switch (reg_ah) {
case 0x00: /* Set VideoMode */
Mouse_BeforeNewVideoMode(true);
INT10_SetVideoMode(reg_al);
INT10_SetVideoMode(reg_al);
Mouse_AfterNewVideoMode(true);
break;
case 0x01: /* Set TextMode Cursor Shape */
@ -210,15 +210,15 @@ static Bitu INT10_Handler(void) {
/* Textmode calls */
case 0x00: /* Load user font */
case 0x10:
INT10_LoadFont(SegPhys(es)+reg_bp,reg_al==0x10,reg_cx,reg_dx,reg_bl,reg_bh);
INT10_LoadFont(SegPhys(es)+reg_bp,reg_al==0x10,reg_cx,reg_dx,reg_bl&0x7f,reg_bh);
break;
case 0x01: /* Load 8x14 font */
case 0x11:
INT10_LoadFont(Real2Phys(int10.rom.font_14),reg_al==0x11,256,0,reg_bl,14);
INT10_LoadFont(Real2Phys(int10.rom.font_14),reg_al==0x11,256,0,reg_bl&0x7f,14);
break;
case 0x02: /* Load 8x8 font */
case 0x12:
INT10_LoadFont(Real2Phys(int10.rom.font_8_first),reg_al==0x12,256,0,reg_bl,8);
INT10_LoadFont(Real2Phys(int10.rom.font_8_first),reg_al==0x12,256,0,reg_bl&0x7f,8);
break;
case 0x03: /* Set Block Specifier */
IO_Write(0x3c4,0x3);IO_Write(0x3c5,reg_bl);
@ -226,7 +226,7 @@ static Bitu INT10_Handler(void) {
case 0x04: /* Load 8x16 font */
case 0x14:
if (!IS_VGA_ARCH) break;
INT10_LoadFont(Real2Phys(int10.rom.font_16),reg_al==0x14,256,0,reg_bl,16);
INT10_LoadFont(Real2Phys(int10.rom.font_16),reg_al==0x14,256,0,reg_bl&0x7f,16);
break;
/* Graphics mode calls */
case 0x20: /* Set User 8x8 Graphics characters */
@ -288,7 +288,6 @@ graphics_chars:
reg_bp=RealOff(int10.rom.font_8_second);
break;
case 0x05: /* alpha alternate 9x14 */
if (!IS_VGA_ARCH) break;
SegSet16(es,RealSeg(int10.rom.font_14_alternate));
reg_bp=RealOff(int10.rom.font_14_alternate);
break;
@ -542,8 +541,8 @@ graphics_chars:
break;
case 0x02: /* Set videomode */
Mouse_BeforeNewVideoMode(true);
reg_al=0x4f;
reg_ah=VESA_SetSVGAMode(reg_bx);
reg_al=0x4f;
reg_ah=VESA_SetSVGAMode(reg_bx);
Mouse_AfterNewVideoMode(true);
break;
case 0x03: /* Get videomode */
@ -764,7 +763,5 @@ void INT10_Init(Section* /*sec*/) {
//Init the 0x40 segment and init the datastructures in the the video rom area
INT10_SetupRomMemory();
INT10_Seg40Init();
INT10_SetupVESA();
INT10_SetupRomMemoryChecksum();//SetupVesa modifies the rom as well.
INT10_SetVideoMode(0x3);
}