vga: add some optional CGA compatibility hacks

This patch adds some optional compatibility hacks (default
disabled) to allow Microport UNIX to function under qemu.

I've tried to structure it to be easy to add more hacks for other
old CGA programs, if anyone ever needs them.

Microport UNIX System V/386 v 2.1 (ca 1987) tries to program
the CGA registers directly with neither the assistance of BIOS, nor
with proper handling of EGA/VGA-only registers.  Note that it didn't
work on real VGA hardware, either (although in that case, the most
obvious problems seemed to be out-of-range hsync and/or vsync
signalling, rather than the issues in this patch).

Eventually real MDA and/or CGA support might provide an alternative to
this patch, although a hybrid approach like this patch might still
be useful in marginal cases.

Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net>
Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
Matthew Ogilvie 2012-08-23 00:24:42 -06:00 committed by malc
parent 39dda26062
commit 482f7bf86b
4 changed files with 74 additions and 8 deletions

View file

@ -975,6 +975,25 @@ Valid optional properties are
@item retrace=dumb|precise
Select dumb (default) or precise VGA retrace logic, useful for some
DOS games/demos.
@item cga_hacks=@var{hack1}[+@var{hack2},[...]]
Enable various extra CGA compatibility hacks for programs that are
trying to directly set CGA modes without BIOS assistance nor
real knowledge of EGA/VGA. These might only work with -vga std.
Valid hacks are
@table @option
@item palette_blanking
Wait to blank the screen until palette registers seem to actually be
modified, instead of blanking it as soon as the palette address bit (0x10)
of the attribute address register (0x3c0) is cleared.
@item font_height
Ignore attempts to change the VGA font height (index 9),
cursor start (index 10), and cursor end (index 11) of the CRTC control
registers (0x3d5) if trying to set them to the default for CGA fonts
instead of VGA fonts.
@item all
Enable all CGA hacks. More CGA hacks may be added in future versions
of qemu.
@end table
@end table
ETEXI