Commit 42fc925ec0df2cb8d924bec1c9fb782c12bd8364

Authored by bellard
1 parent 6f15b608

VBE 4 bit bank selection fix (Volker Rupper)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2181 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 1 deletions
hw/vga.c
... ... @@ -447,7 +447,11 @@ static void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
447 447 }
448 448 break;
449 449 case VBE_DISPI_INDEX_BANK:
450   - val &= s->vbe_bank_mask;
  450 + if (s->vbe_regs[VBE_DISPI_INDEX_BPP] == 4) {
  451 + val &= (s->vbe_bank_mask >> 2);
  452 + } else {
  453 + val &= s->vbe_bank_mask;
  454 + }
451 455 s->vbe_regs[s->vbe_index] = val;
452 456 s->bank_offset = (val << 16);
453 457 break;
... ...