First post, by superfury
I'm currently using the Dosbox int10_modes.cpp to set the mode for all graphics modes (with some table changes for modes incorrectly set).
I have the current settings set to this:
VideoModeBlock ModeList_VGA[0x14] = { //VGA Modelist!
/* mode ,type ,sw ,sh ,tw ,th ,cw,ch ,pt,pstart ,plength,htot,vtot,hde,vde special flags */
{ 0x000, M_TEXT, 360, 400, 40, 25, 9, 16, 8, 0xB8000, 0x0800, 50, 449, 40, 400, _EGA_HALF_CLOCK },
{ 0x001, M_TEXT, 360, 400, 40, 25, 9, 16, 8, 0xB8000, 0x0800, 50, 449, 40, 400, _EGA_HALF_CLOCK },
{ 0x002, M_TEXT, 720, 400, 80, 25, 9, 16, 8, 0xB8000, 0x1000, 100, 449, 80, 400, 0 },
{ 0x003, M_TEXT, 720, 400, 80, 25, 9, 16, 8, 0xB8000, 0x1000, 100, 449, 80, 400, 0 },
{ 0x004, M_CGA4, 320, 200, 40, 25, 8, 8, 1, 0xB8000, 0x4000, 50, 449, 40, 400, _EGA_HALF_CLOCK | _EGA_LINE_DOUBLE },
{ 0x005, M_CGA4, 320, 200, 40, 25, 8, 8, 1, 0xB8000, 0x4000, 50, 449, 40, 400, _EGA_HALF_CLOCK | _EGA_LINE_DOUBLE },
{ 0x006, M_CGA2, 640, 200, 80, 25, 8, 8, 1, 0xB8000, 0x4000, 100, 449, 80, 400, _EGA_HALF_CLOCK | _EGA_LINE_DOUBLE },
{ 0x007, M_TEXT, 720, 400, 80, 25, 9, 16, 8, 0xB0000, 0x1000, 100, 449, 80, 400, 0 },
{ 0x00D, M_EGA, 320, 200, 40, 25, 8, 8, 8, 0xA0000, 0x2000, 50, 449, 40, 400, _EGA_HALF_CLOCK | _EGA_LINE_DOUBLE },
{ 0x00E, M_EGA, 640, 200, 80, 25, 8, 8, 4, 0xA0000, 0x4000, 100, 449, 80, 400, _EGA_LINE_DOUBLE },
{ 0x00F, M_EGA, 640, 350, 80, 25, 8, 14, 2, 0xA0000, 0x8000, 100, 449, 80, 350, 0 },/*was EGA_2*/
{ 0x010, M_EGA, 640, 350, 80, 25, 8, 14, 2, 0xA0000, 0x8000, 100, 449, 80, 350, 0 },
{ 0x011, M_EGA, 640, 480, 80, 30, 8, 16, 1, 0xA0000, 0xA000, 100, 525, 80, 480, 0 },/*was EGA_2 */
{ 0x012, M_EGA, 640, 480, 80, 30, 8, 16, 1, 0xA0000, 0xA000, 100, 525, 80, 480, 0 },
{ 0x013, M_VGA, 320, 200, 40, 25, 8, 8, 1, 0xA0000, 0x2000, 100, 449, 80, 400, _VGA_PIXEL_DOUBLE | _EGA_LINE_DOUBLE }
}; //VGA Modelist!
The rest of the tables are set the same as Dosbox.
Also, I've changed CRTC Mode Control to 0xA2, which should be the correct value (word mode, not byte mode?). I've also enabled odd/even mode: it's a CGA mode, which uses odd/even maps? Dosbox sets this incorrectly?
Now I'm getting output with 2 times the screen height and width. The top-left screen contains the full written output, the other 3 quarters of the active display area contain invalid output.
Should I remove the _EGA_HALF_CLOCK setting? We have 640 pixels horizontally, not 320 pixels to convert to 640 pixels?
Do I need to change more of the int10_modes.cpp to get this working on a real VGA? The scanline doubling doesn't seem enough for vertical output to fill the screen?
Anyone knows how to get the Dosbox mode 6h working on a REAL VGA?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io