mirror of https://gitlab.com/qemu-project/qemu
CRTC register write protection fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1126 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
85571bc741
commit
9bb34eac8b
|
@ -2689,7 +2689,7 @@ static void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
||||||
printf("vga: write CR%x = 0x%02x\n", s->cr_index, val);
|
printf("vga: write CR%x = 0x%02x\n", s->cr_index, val);
|
||||||
#endif
|
#endif
|
||||||
/* handle CR0-7 protection */
|
/* handle CR0-7 protection */
|
||||||
if ((s->cr[11] & 0x80) && s->cr_index <= 7) {
|
if ((s->cr[0x11] & 0x80) && s->cr_index <= 7) {
|
||||||
/* can always write bit 4 of CR7 */
|
/* can always write bit 4 of CR7 */
|
||||||
if (s->cr_index == 7)
|
if (s->cr_index == 7)
|
||||||
s->cr[7] = (s->cr[7] & ~0x10) | (val & 0x10);
|
s->cr[7] = (s->cr[7] & ~0x10) | (val & 0x10);
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue