trunk/src/emu/video/pc_vga.c
r241621 | r241622 | |
198 | 198 | { |
199 | 199 | } |
200 | 200 | |
| 201 | // zero everything, keep vtbls |
| 202 | void vga_device::zero() |
| 203 | { |
| 204 | memset(&vga.svga_intf, 0, sizeof(vga.svga_intf)); |
| 205 | vga.memory.resize(0); |
| 206 | memset(vga.pens, 0, sizeof(vga.pens)); |
| 207 | vga.miscellaneous_output = 0; |
| 208 | vga.feature_control = 0; |
| 209 | memset(&vga.sequencer, 0, sizeof(vga.sequencer)); |
| 210 | memset(&vga.crtc, 0, sizeof(vga.crtc)); |
| 211 | memset(&vga.gc, 0, sizeof(vga.gc)); |
| 212 | memset(&vga.attribute, 0, sizeof(vga.attribute)); |
| 213 | memset(&vga.dac, 0, sizeof(vga.dac)); |
| 214 | memset(&vga.oak, 0, sizeof(vga.oak)); |
| 215 | } |
201 | 216 | |
| 217 | void svga_device::zero() |
| 218 | { |
| 219 | vga_device::zero(); |
| 220 | memset(&svga, 0, sizeof(svga)); |
| 221 | } |
| 222 | |
202 | 223 | /* VBLANK callback, start address definitely updates AT vblank, not before. */ |
203 | 224 | TIMER_CALLBACK_MEMBER(vga_device::vblank_timer_cb) |
204 | 225 | { |
r241621 | r241622 | |
208 | 229 | |
209 | 230 | void vga_device::device_start() |
210 | 231 | { |
211 | | // FIXME: this kills the vga.memory vptr |
212 | | memset(&vga, 0, sizeof(vga)); |
| 232 | zero(); |
213 | 233 | |
214 | 234 | int i; |
215 | 235 | for (i = 0; i < 0x100; i++) |
trunk/src/emu/video/pc_vga.h
r241621 | r241622 | |
26 | 26 | vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
27 | 27 | vga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); |
28 | 28 | |
29 | | |
| 29 | virtual void zero(); |
30 | 30 | virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
31 | 31 | |
32 | 32 | virtual READ8_MEMBER(port_03b0_r); |
r241621 | r241622 | |
205 | 205 | // construction/destruction |
206 | 206 | svga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); |
207 | 207 | |
| 208 | virtual void zero(); |
208 | 209 | virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
209 | 210 | protected: |
210 | 211 | void svga_vh_rgb8(bitmap_rgb32 &bitmap, const rectangle &cliprect); |