diff options
author | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-28 00:42:12 +0000 |
---|---|---|
committer | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-28 00:42:12 +0000 |
commit | cb5a7aa8c32141bb19a8f6571f630c779faebc25 (patch) | |
tree | 4a2e7eca158dedc324d1a85e079396d608dbe0d6 /hw/cirrus_vga.c | |
parent | 3893c124e7b768d7e7e6cd9933df77e6dbf0816f (diff) |
Optional "precise" VGA retrace support
Selected via: -vga <name>,retrace=precise
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5336 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/cirrus_vga.c')
-rw-r--r-- | hw/cirrus_vga.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 53688a0eac..55f3ced340 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -2744,8 +2744,7 @@ static uint32_t vga_ioport_read(void *opaque, uint32_t addr) case 0x3ba: case 0x3da: /* just toggle to fool polling */ - s->st01 ^= ST01_V_RETRACE | ST01_DISP_ENABLE; - val = s->st01; + val = s->st01 = s->retrace((VGAState *) s); s->ar_flip_flop = 0; break; default: @@ -2808,6 +2807,7 @@ static void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) break; case 0x3c2: s->msr = val & ~0x10; + s->update_retrace_info((VGAState *) s); break; case 0x3c4: s->sr_index = val; @@ -2819,6 +2819,7 @@ static void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) printf("vga: write SR%x = 0x%02x\n", s->sr_index, val); #endif s->sr[s->sr_index] = val & sr_mask[s->sr_index]; + if (s->sr_index == 1) s->update_retrace_info((VGAState *) s); break; case 0x3c6: cirrus_write_hidden_dac(s, val); @@ -2886,6 +2887,18 @@ static void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) s->cr[s->cr_index] = val; break; } + + switch(s->cr_index) { + case 0x00: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x11: + case 0x17: + s->update_retrace_info((VGAState *) s); + break; + } break; case 0x3ba: case 0x3da: |