Previous 15994 Revisions Next

r14043 Sunday 15th January, 2012 at 14:58:28 UTC by Angelo Salese
Fix for regressed SVGA emulation in Bebox
[src/emu/video]pc_vga.c pc_vga.h
[src/mess/video]cirrus.c

src/emu/video/pc_vga.c
r14042r14043
455455   switch(cur_mode)
456456   {
457457      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;
463462   }
464463
465464   return 0;
src/emu/video/pc_vga.h
r14042r14043
99#ifndef PC_VGA_H
1010#define PC_VGA_H
1111
12typedef void (*pc_video_update_proc)(bitmap_ind16 &bitmap);
13
1412MACHINE_CONFIG_EXTERN( pcvideo_vga );
1513
1614struct pc_vga_interface
r14042r14043
3735   int seq_regcount;
3836   int gc_regcount;
3937   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);
4139};
4240
4341void 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
r14042r14043
6868
6969#define LOG_PCIACCESS   0
7070
71static void cirrus_update_8bpp(bitmap_ind16 &bitmap)
71static void cirrus_update_8bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
7272{
73   UINT16 *line;
73   UINT32 *line;
7474   const UINT8 *vram;
7575   int y, x;
7676
r14042r14043
7878
7979   for (y = 0; y < 480; y++)
8080   {
81      line = &bitmap.pix16(y);
81      line = &bitmap.pix32(y);
8282
8383      for (x = 0; x < 640; x++)
84         *line++ = *vram++;
84         *line++ = machine.pens[*vram++];
8585   }
8686}
8787
8888
8989
90static void cirrus_update_16bpp(bitmap_ind16 &bitmap)
90static void cirrus_update_16bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
9191{
9292   fatalerror("NYI");
9393}
9494
9595
9696
97static void cirrus_update_24bpp(bitmap_ind16 &bitmap)
97static void cirrus_update_24bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
9898{
9999   fatalerror("NYI");
100100}
101101
102102
103103
104static void cirrus_update_32bpp(bitmap_ind16 &bitmap)
104static void cirrus_update_32bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
105105{
106106   fatalerror("NYI");
107107}
108108
109109
110110
111static pc_video_update_proc cirrus_choosevideomode(const UINT8 *sequencer,
111static void cirrus_choosevideomode(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer,
112112   const UINT8 *crtc, const UINT8 *gc, int *width, int *height)
113113{
114   pc_video_update_proc proc = NULL;
115
116114   if ((sequencer[0x06] == 0x12) && (sequencer[0x07] & 0x01))
117115   {
118116      *width = 640;
r14042r14043
120118
121119      switch(sequencer[0x07] & 0x0E)
122120      {
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;
128126      }
129127   }
130   return proc;
131128}
132129
133130//**************************************************************************

Previous 15994 Revisions Next


© 1998-2018 The MESS Team