src/emu/video/pc_vga.c
| r14042 | r14043 | |
| 455 | 455 | switch(cur_mode) |
| 456 | 456 | { |
| 457 | 457 | case 0: bitmap.fill(get_black_pen(screen.machine()), cliprect);break; |
| 458 | | case 1: vga_vh_text(screen.machine(), bitmap,cliprect); break; |
| 459 | | case 2: vga_vh_vga (screen.machine(), bitmap,cliprect); break; |
| 460 | | case 3: vga_vh_ega (screen.machine(), bitmap,cliprect); break; |
| 461 | | /* Nothing uses this so far, to be nuked */ |
| 462 | | case 4: vga.svga_intf.choosevideomode(vga.sequencer.data, vga.crtc.data, vga.gc.data, &w, &h); break; |
| 458 | case 1: vga_vh_text(screen.machine(), bitmap, cliprect); break; |
| 459 | case 2: vga_vh_vga (screen.machine(), bitmap, cliprect); break; |
| 460 | case 3: vga_vh_ega (screen.machine(), bitmap, cliprect); break; |
| 461 | case 4: vga.svga_intf.choosevideomode(screen.machine(), bitmap, cliprect, vga.sequencer.data, vga.crtc.data, vga.gc.data, &w, &h); break; |
| 463 | 462 | } |
| 464 | 463 | |
| 465 | 464 | return 0; |
src/emu/video/pc_vga.h
| r14042 | r14043 | |
| 9 | 9 | #ifndef PC_VGA_H |
| 10 | 10 | #define PC_VGA_H |
| 11 | 11 | |
| 12 | | typedef void (*pc_video_update_proc)(bitmap_ind16 &bitmap); |
| 13 | | |
| 14 | 12 | MACHINE_CONFIG_EXTERN( pcvideo_vga ); |
| 15 | 13 | |
| 16 | 14 | struct pc_vga_interface |
| r14042 | r14043 | |
| 37 | 35 | int seq_regcount; |
| 38 | 36 | int gc_regcount; |
| 39 | 37 | int crtc_regcount; |
| 40 | | pc_video_update_proc (*choosevideomode)(const UINT8 *sequencer, const UINT8 *crtc, const UINT8 *gc, int *width, int *height); |
| 38 | void (*choosevideomode)(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer, const UINT8 *crtc, const UINT8 *gc, int *width, int *height); |
| 41 | 39 | }; |
| 42 | 40 | |
| 43 | 41 | void pc_vga_init(running_machine &machine, const struct pc_vga_interface *vga_intf, const struct pc_svga_interface *svga_intf); |
src/mess/video/cirrus.c
| r14042 | r14043 | |
| 68 | 68 | |
| 69 | 69 | #define LOG_PCIACCESS 0 |
| 70 | 70 | |
| 71 | | static void cirrus_update_8bpp(bitmap_ind16 &bitmap) |
| 71 | static void cirrus_update_8bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 72 | 72 | { |
| 73 | | UINT16 *line; |
| 73 | UINT32 *line; |
| 74 | 74 | const UINT8 *vram; |
| 75 | 75 | int y, x; |
| 76 | 76 | |
| r14042 | r14043 | |
| 78 | 78 | |
| 79 | 79 | for (y = 0; y < 480; y++) |
| 80 | 80 | { |
| 81 | | line = &bitmap.pix16(y); |
| 81 | line = &bitmap.pix32(y); |
| 82 | 82 | |
| 83 | 83 | for (x = 0; x < 640; x++) |
| 84 | | *line++ = *vram++; |
| 84 | *line++ = machine.pens[*vram++]; |
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 | |
| 90 | | static void cirrus_update_16bpp(bitmap_ind16 &bitmap) |
| 90 | static void cirrus_update_16bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 91 | 91 | { |
| 92 | 92 | fatalerror("NYI"); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
| 96 | 96 | |
| 97 | | static void cirrus_update_24bpp(bitmap_ind16 &bitmap) |
| 97 | static void cirrus_update_24bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 98 | 98 | { |
| 99 | 99 | fatalerror("NYI"); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | |
| 103 | 103 | |
| 104 | | static void cirrus_update_32bpp(bitmap_ind16 &bitmap) |
| 104 | static void cirrus_update_32bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 105 | 105 | { |
| 106 | 106 | fatalerror("NYI"); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
| 110 | 110 | |
| 111 | | static pc_video_update_proc cirrus_choosevideomode(const UINT8 *sequencer, |
| 111 | static void cirrus_choosevideomode(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer, |
| 112 | 112 | const UINT8 *crtc, const UINT8 *gc, int *width, int *height) |
| 113 | 113 | { |
| 114 | | pc_video_update_proc proc = NULL; |
| 115 | | |
| 116 | 114 | if ((sequencer[0x06] == 0x12) && (sequencer[0x07] & 0x01)) |
| 117 | 115 | { |
| 118 | 116 | *width = 640; |
| r14042 | r14043 | |
| 120 | 118 | |
| 121 | 119 | switch(sequencer[0x07] & 0x0E) |
| 122 | 120 | { |
| 123 | | case 0x00: proc = cirrus_update_8bpp; break; |
| 124 | | case 0x02: proc = cirrus_update_16bpp; break; |
| 125 | | case 0x04: proc = cirrus_update_24bpp; break; |
| 126 | | case 0x06: proc = cirrus_update_16bpp; break; |
| 127 | | case 0x08: proc = cirrus_update_32bpp; break; |
| 121 | case 0x00: cirrus_update_8bpp(machine, bitmap, cliprect); break; |
| 122 | case 0x02: cirrus_update_16bpp(machine, bitmap, cliprect); break; |
| 123 | case 0x04: cirrus_update_24bpp(machine, bitmap, cliprect); break; |
| 124 | case 0x06: cirrus_update_16bpp(machine, bitmap, cliprect); break; |
| 125 | case 0x08: cirrus_update_32bpp(machine, bitmap, cliprect); break; |
| 128 | 126 | } |
| 129 | 127 | } |
| 130 | | return proc; |
| 131 | 128 | } |
| 132 | 129 | |
| 133 | 130 | //************************************************************************** |