VBE 4 bit bank selection fix (Volker Rupper)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2181 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-09-25 21:41:20 +00:00
parent 6f15b608f2
commit 42fc925ec0

View File

@ -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;