]> git.proxmox.com Git - mirror_qemu.git/commit
vga: implement horizontal pel panning in graphics modes
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 29 Dec 2014 13:48:14 +0000 (14:48 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Jan 2024 09:43:13 +0000 (10:43 +0100)
commit973a724eb006f674301a0c45f34b3c08dee0fe49
tree62c9aabc2a8c2f447232327f13167335dbcf8145
parent9b53b95a1c3b46e5a54734a46f37790460c9265e
vga: implement horizontal pel panning in graphics modes

This implements smooth scrolling, as used for example by Commander Keen
and Second Reality.

Unfortunately, this is not enough to avoid tearing in Commander Keen,
because sometimes the wrong start address is used for a frame.
On real EGA, the panning register is sampled on every line, while
the display start is latched for the next frame at the start of the
vertical retrace.  On real VGA, the panning register is also latched,
but at the end of the vertical retrace.  It looks like Keen exploits
this by only waiting for horizontal retrace when setting the display
start, but implementing it breaks the 256-color Keen games...

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/display/cirrus_vga.c
hw/display/vga-helpers.h
hw/display/vga.c
hw/display/vga_int.h