summary refs log tree commit diff stats
path: root/hw/display/vga.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-12-29 14:43:42 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-01-18 10:43:13 +0100
commit9b53b95a1c3b46e5a54734a46f37790460c9265e (patch)
tree9edfc2fa6e3c0434ac065edae3bc6c56786dffff /hw/display/vga.c
parentf9b925fd41337027e959baeb23d714b5214cd5ff (diff)
downloadfocaccia-qemu-9b53b95a1c3b46e5a54734a46f37790460c9265e.tar.gz
focaccia-qemu-9b53b95a1c3b46e5a54734a46f37790460c9265e.zip
vga: mask addresses in non-VESA modes to 256k
This allows setting the start address to a high value, and reading the
bottom of the screen from the beginning of VRAM.  Commander Keen 4
("Goodbye, Galaxy!") relies on this behavior.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/display/vga.c')
-rw-r--r--hw/display/vga.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/display/vga.c b/hw/display/vga.c
index fea26f9123..5bf4d14f34 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -47,6 +47,9 @@ bool have_vga = true;
 /* 16 state changes per vertical frame @60 Hz */
 #define VGA_TEXT_CURSOR_PERIOD_MS       (1000 * 2 * 16 / 60)
 
+/* Address mask for non-VESA modes.  */
+#define VGA_VRAM_SIZE                   (256 * KiB)
+
 /*
  * Video Graphics Array (VGA)
  *