From 42fc925ec0df2cb8d924bec1c9fb782c12bd8364 Mon Sep 17 00:00:00 2001 From: bellard Date: Mon, 25 Sep 2006 21:41:20 +0000 Subject: [PATCH] VBE 4 bit bank selection fix (Volker Rupper) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2181 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/vga.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/vga.c b/hw/vga.c index 0609f84..5acacf9 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -447,7 +447,11 @@ static void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val) } break; case VBE_DISPI_INDEX_BANK: - val &= s->vbe_bank_mask; + if (s->vbe_regs[VBE_DISPI_INDEX_BPP] == 4) { + val &= (s->vbe_bank_mask >> 2); + } else { + val &= s->vbe_bank_mask; + } s->vbe_regs[s->vbe_index] = val; s->bank_offset = (val << 16); break; -- 2.7.4