Hi,
I did a some research....
VMware doesn't actually emulate a true video card at all. It does have support for the standard video BIOS functions (including VESA/VBE functions), but for OS's like Linux and Windows you need to obtain a "special" video driver for it. It isn't compatible with CGA, VGA or any flavour of SVGA at the hardware level.
Qemu doesn't emulate a VGA card either. Instead it emulates a Cirrus Logic GD5446 video card.
Bochs emulates either a VGA card, a Cirrus Logic GD5430 video card (ISA) or a Cirrus Logic GD5446 video card (PCI), depending on how it's configured.
I guess the next question is whether the Cirrus Logic video cards (if perfectly emulated) are VGA compatible at the hardware level, or not.
First I tried searching for:
"CL-GD5446" datasheet
After finding and downloading the datasheet, I found out that it does have a "100% VGA compatible
BIOS" (which is meaningless). There's also one sentence (section 2.4 "Compatability") which states:
The CL-GD5446 includes all registers and data paths required for VGA controllers, and is updward-compatible with the CL-GD542X family. I also scrolled down to see the registers, and found "CR18 - CRTC Line Compare" listed, and everything else I (vaguely) remember about VGA registers. IMHO this probably means that it does at least attempt to be 100% VGA compatible at the hardware level.
The next step is to check some source code. For Bochs, I found things like the line compare register in the source code (vga.c) fairly quickly. The source code for the Cirrus Logic video card calls the VGA video code for anything it doesn't understand. This means, at least for Bochs, the emulated video card is 100% VGA compatible at the hardware level (or as close a practically possible), regardless of whether it's emulating a "pure VGA" or Cirrus Logic video card. Checking this source code I found that the line compare (and split screen) is supported for all VGA video modes, but it isn't supported for any SVGA video modes.
Now the last thing is to check the source code for Qemu. I compared "vga.cc" (Bochs) to "vga.c" (Qemu) - it is completely different source code. The copyrights at the top are different (Qemu's "vga.c" is copyrighted by Fabrice Bellard while for Bochs it's copyrighted by MandrakeSoft S.A.). For bochs the entire file is 3481 lines long, while for Qemu it's only 1946 lines. My general impression is that Boch's video code is much more complicated, and handles things like double scan modes correctly, while Qemu's code is much simpler.
For Qemu, there's this function:
Code: Select all
/*
* Text mode update
* Missing:
* - double scan
* - double width
* - underline
* - flashing
*/
static void vga_draw_text(VGAState *s, int full_update)
{
I searched this function for anything that would indicate support for the line compare register, but found nothing. There's also another function:
Code: Select all
/*
* graphic modes
*/
static void vga_draw_graphic(VGAState *s, int full_update)
{
This function does support the line compare register, even for SVGA modes.
The Cirrus Logic GD5446 video card supports 1600 * 1200 * 256 colour video mode. The line compare register is 10 bits wide, and the only way to disable "split screen" is by setting the line compare register to a value higher than the video mode's resolution. For a resolution like 1600 * 1200, Qemu doesn't disable the line compare, and (AFAIK) would fail to display the 1600 * 1200 * 256 colour video mode correctly because of this - it would display the first 1024 lines correctly, and then wrap back to the start of video memory when this isn't desired (you'd never be able to see the last 476 lines of display memory). Real hardware would have the same problem, so I'd assume that real hardware ignores the line compare for at least some SVGA video modes.
Summary
For VMWare you're screwed.
For Bochs, split screen should work in text modes and standard VGA modes, but not SVGA modes.
For Qemu, split screen should work for all graphics video modes, but not text modes.
Cheers,
Brendan