Previous 199869 Revisions Next

r18209 Sunday 30th September, 2012 at 11:10:48 UTC by Miodrag Milanović
Made Cirrus just another vga implementation, and removed a need for additional parameter (no whatsnew)
[src/emu/video]pc_vga.c pc_vga.h
[src/mame/drivers]calchase.c gammagic.c gamtor.c magtouch.c midqslvr.c pangofun.c pcat_dyn.c pcat_nit.c photoply.c pntnpuzl.c queen.c savquest.c su2000.c taitowlf.c voyager.c xtom3d.c
[src/mess/drivers]indiana.c
[src/mess/machine]pc.c
[src/mess/video]cirrus.c isa_svga_cirrus.c isa_svga_s3.c isa_svga_tseng.c isa_vga.c isa_vga_ati.c

trunk/src/mame/drivers/su2000.c
r18208r18209
287287
288288   kbdc8042_init(machine(), &at8042);
289289
290   pc_vga_init(machine(), read8_delegate(FUNC(su2000_state::vga_setting),this), NULL);
290   pc_vga_init(machine(), read8_delegate(FUNC(su2000_state::vga_setting),this));
291291   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
292292}
293293
trunk/src/mame/drivers/savquest.c
r18208r18209
529529   intel82439tx_init(machine());
530530
531531   kbdc8042_init(machine(), &at8042);
532   pc_vga_init(machine(), read8_delegate(FUNC(savquest_state::vga_setting),this), NULL);
532   pc_vga_init(machine(), read8_delegate(FUNC(savquest_state::vga_setting),this));
533533   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
534534}
535535
trunk/src/mame/drivers/photoply.c
r18208r18209
378378
379379DRIVER_INIT_MEMBER(photoply_state,photoply)
380380{
381   pc_vga_init(machine(), read8_delegate(FUNC(photoply_state::vga_setting),this), NULL);
381   pc_vga_init(machine(), read8_delegate(FUNC(photoply_state::vga_setting),this));
382382   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
383383}
384384
trunk/src/mame/drivers/midqslvr.c
r18208r18209
672672   intel82439tx_init(machine());
673673
674674   kbdc8042_init(machine(), &at8042);
675   pc_vga_init(machine(), read8_delegate(FUNC(midqslvr_state::vga_setting),this), NULL);
675   pc_vga_init(machine(), read8_delegate(FUNC(midqslvr_state::vga_setting),this));
676676   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
677677}
678678
trunk/src/mame/drivers/calchase.c
r18208r18209
977977{
978978   m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4);
979979
980   pc_vga_init(machine(), read8_delegate(FUNC(calchase_state::vga_setting),this), NULL);
980   pc_vga_init(machine(), read8_delegate(FUNC(calchase_state::vga_setting),this));
981981   pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
982982   init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, calchase_set_keyb_int);
983983
trunk/src/mame/drivers/pcat_dyn.c
r18208r18209
197197
198198DRIVER_INIT_MEMBER(pcat_dyn_state,pcat_dyn)
199199{
200   pc_vga_init(machine(), read8_delegate(FUNC(pcat_dyn_state::vga_setting),this), NULL);
200   pc_vga_init(machine(), read8_delegate(FUNC(pcat_dyn_state::vga_setting),this));
201201   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
202202}
203203
trunk/src/mame/drivers/gamtor.c
r18208r18209
12541254
12551255DRIVER_INIT_MEMBER(gaminator_state,gaminator)
12561256{
1257   pc_vga_init(machine(), read8_delegate(FUNC(gaminator_state::vga_setting),this), NULL);
1257   pc_vga_init(machine(), read8_delegate(FUNC(gaminator_state::vga_setting),this));
12581258   pc_vga_gamtor_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x44000000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x40000000);
12591259}
12601260
trunk/src/mame/drivers/pcat_nit.c
r18208r18209
427427   m_banked_nvram = auto_alloc_array(machine(), UINT8, 0x2000);
428428   machine().device<nvram_device>("nvram")->set_base(m_banked_nvram, 0x2000);
429429
430   pc_vga_init(machine(), read8_delegate(FUNC(pcat_nit_state::vga_setting),this), NULL);
430   pc_vga_init(machine(), read8_delegate(FUNC(pcat_nit_state::vga_setting),this));
431431   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
432432}
433433
trunk/src/mame/drivers/magtouch.c
r18208r18209
249249
250250DRIVER_INIT_MEMBER(magtouch_state,magtouch)
251251{
252   pc_vga_init(machine(), read8_delegate(FUNC(magtouch_state::vga_setting),this), NULL);
252   pc_vga_init(machine(), read8_delegate(FUNC(magtouch_state::vga_setting),this));
253253   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
254254}
255255
trunk/src/mame/drivers/xtom3d.c
r18208r18209
664664   intel82439tx_init(machine());
665665
666666   kbdc8042_init(machine(), &at8042);
667   pc_vga_init(machine(), read8_delegate(FUNC(xtom3d_state::vga_setting),this), NULL);
667   pc_vga_init(machine(), read8_delegate(FUNC(xtom3d_state::vga_setting),this));
668668   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
669669}
670670
trunk/src/mame/drivers/pangofun.c
r18208r18209
244244
245245DRIVER_INIT_MEMBER(pangofun_state,pangofun)
246246{
247   pc_vga_init(machine(), read8_delegate(FUNC(pangofun_state::vga_setting),this), NULL);
247   pc_vga_init(machine(), read8_delegate(FUNC(pangofun_state::vga_setting),this));
248248   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
249249}
250250
trunk/src/mame/drivers/voyager.c
r18208r18209
801801{
802802   m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4);
803803
804   pc_vga_init(machine(), read8_delegate(FUNC(voyager_state::vga_setting),this), NULL);
804   pc_vga_init(machine(), read8_delegate(FUNC(voyager_state::vga_setting),this));
805805   pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
806806   init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, voyager_set_keyb_int);
807807
trunk/src/mame/drivers/taitowlf.c
r18208r18209
710710
711711   kbdc8042_init(machine(), &at8042);
712712   #if ENABLE_VGA
713   pc_vga_init(machine(), read8_delegate(FUNC(taitowlf_state::vga_setting),this), NULL);
713   pc_vga_init(machine(), read8_delegate(FUNC(taitowlf_state::vga_setting),this));
714714   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
715715   #endif
716716}
trunk/src/mame/drivers/pntnpuzl.c
r18208r18209
385385//  UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base();
386386//  rom[0x2696/2] = 0x4e71;
387387//  rom[0x26a0/2] = 0x4e71;
388   pc_vga_init(machine(), read8_delegate(FUNC(pntnpuzl_state::vga_setting),this), NULL);
388   pc_vga_init(machine(), read8_delegate(FUNC(pntnpuzl_state::vga_setting),this));
389389   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3c0000);
390390
391391}
trunk/src/mame/drivers/queen.c
r18208r18209
655655   intel82439tx_init(machine());
656656
657657   kbdc8042_init(machine(), &at8042);
658   pc_vga_init(machine(), read8_delegate(FUNC(queen_state::vga_setting),this), NULL);
658   pc_vga_init(machine(), read8_delegate(FUNC(queen_state::vga_setting),this));
659659   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
660660}
661661
trunk/src/mame/drivers/gammagic.c
r18208r18209
795795
796796DRIVER_INIT_MEMBER(gammagic_state,gammagic)
797797{
798   pc_vga_init(machine(), read8_delegate(FUNC(gammagic_state::vga_setting),this), NULL);
798   pc_vga_init(machine(), read8_delegate(FUNC(gammagic_state::vga_setting),this));
799799   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
800800   init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, gammagic_set_keyb_int);
801801   kbdc8042_init(machine(), &at8042);
trunk/src/emu/video/pc_vga.c
r18208r18209
5555static struct
5656{
5757   read8_delegate read_dipswitch;
58   struct pc_svga_interface svga_intf;
58   struct
59   {
60      size_t vram_size;
61      int seq_regcount;
62      int crtc_regcount;
63   } svga_intf;
5964
6065   UINT8 *memory;
6166   UINT32 pens[16]; /* the current 16 pens */
r18208r18209
888893         }
889894      }
890895
891      if (vga.svga_intf.choosevideomode) // TODO: remove this hack
896      if (svga.rgb32_en)
892897      {
893         return SVGA_HACK;
894      }
895      else if (svga.rgb32_en)
896      {
897898         return RGB32_MODE;
898899      }
899900      else if (svga.rgb24_en)
r18208r18209
951952
952953SCREEN_UPDATE_RGB32( pc_video )
953954{
954   UINT8 cur_mode = 0;
955   int w = 0, h = 0;
955   UINT8 cur_mode = pc_vga_choosevideomode(screen.machine());
956956
957   cur_mode = pc_vga_choosevideomode(screen.machine());
958
959957   //popmessage("%02x %02x",cur_mode,vga.attribute.data[0x13]);
960958   //popmessage("%d",vga.attribute.pel_shift);
961959   //popmessage("%d %d %d",vga.crtc.vert_blank_start,vga.crtc.vert_blank_end,vga.crtc.vert_total);
r18208r18209
973971      case RGB16_MODE:   svga_vh_rgb16(screen.machine(), bitmap, cliprect); break;
974972      case RGB24_MODE:   svga_vh_rgb24(screen.machine(), bitmap, cliprect); break;
975973      case RGB32_MODE:   svga_vh_rgb32(screen.machine(), bitmap, cliprect); break;
976      case SVGA_HACK:    vga.svga_intf.choosevideomode(screen.machine(), bitmap, cliprect, vga.sequencer.data, vga.crtc.data, &w, &h); break;
977974   }
978975
979976   return 0;
r18208r18209
20192016   }
20202017}
20212018
2022void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf)
2019void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch)
20232020{
20242021   memset(&vga, 0, sizeof(vga));
20252022
20262023   /* copy over interfaces */
2024   vga.read_dipswitch = read_dipswitch;   
2025   vga.svga_intf.vram_size = 0x100000;
2026   vga.svga_intf.seq_regcount = 0x05;
2027   vga.svga_intf.crtc_regcount = 0x19;
2028
2029   vga.memory         = auto_alloc_array(machine, UINT8, vga.svga_intf.vram_size);
2030   vga.sequencer.data   = auto_alloc_array(machine, UINT8, vga.svga_intf.seq_regcount);
2031   vga.crtc.data      = auto_alloc_array(machine, UINT8, 0x100);
2032   memset(vga.memory, '\0', vga.svga_intf.vram_size);
2033   memset(vga.sequencer.data, '\0', vga.svga_intf.seq_regcount);
2034   memset(vga.crtc.data, '\0', 0x100);
2035
2036   pc_vga_reset(machine);
2037
2038}
2039
2040void pc_vga_cirrus_init(running_machine &machine, read8_delegate read_dipswitch)
2041{
2042   memset(&vga, 0, sizeof(vga));
2043
2044   /* copy over interfaces */
20272045   vga.read_dipswitch = read_dipswitch;
2028   if (svga_intf)
2029   {
2030      vga.svga_intf = *svga_intf;
2046   vga.svga_intf.vram_size = 0x200000;
2047   vga.svga_intf.seq_regcount = 0x08;
2048   vga.svga_intf.crtc_regcount = 0x19;
20312049
2032      if (vga.svga_intf.seq_regcount < 0x05)
2033         fatalerror("Invalid SVGA sequencer register count\n");
2034      if (vga.svga_intf.crtc_regcount < 0x19)
2035         fatalerror("Invalid SVGA CRTC register count\n");
2036   }
2037   else
2038   {
2039      vga.svga_intf.vram_size = 0x100000;
2040      vga.svga_intf.seq_regcount = 0x05;
2041      vga.svga_intf.crtc_regcount = 0x19;
2042   }
2043
20442050   vga.memory         = auto_alloc_array(machine, UINT8, vga.svga_intf.vram_size);
20452051   vga.sequencer.data   = auto_alloc_array(machine, UINT8, vga.svga_intf.seq_regcount);
20462052   vga.crtc.data      = auto_alloc_array(machine, UINT8, 0x100);
r18208r18209
53605366   return 0x0002;
53615367}
53625368
5369/******************************************
5370
5371Cirrus SVGA card implementation
5372
5373******************************************/
5374
5375static void cirrus_define_video_mode(running_machine &machine)
5376{
5377   svga.rgb8_en = 0;
5378   svga.rgb15_en = 0;
5379   svga.rgb16_en = 0;
5380   svga.rgb24_en = 0;
5381   svga.rgb32_en = 0;
5382   if ((vga.sequencer.data[0x06] == 0x12) && (vga.sequencer.data[0x07] & 0x01))
5383   {
5384      switch(vga.sequencer.data[0x07] & 0x0E)
5385      {
5386         case 0x00:   svga.rgb8_en = 1; break;
5387         case 0x02:   svga.rgb16_en = 1; break; //double VCLK
5388         case 0x04:   svga.rgb24_en = 1; break;
5389         case 0x06:   svga.rgb16_en = 1; break;
5390         case 0x08:   svga.rgb32_en = 1; break;
5391      }
5392   }
5393}
5394
5395static UINT8 cirrus_seq_reg_read(running_machine &machine, UINT8 index)
5396{
5397   UINT8 res;
5398
5399   res = 0xff;
5400
5401   if(index <= 0x04)
5402      res = vga.sequencer.data[index];
5403   else
5404   {
5405      switch(index)
5406      {
5407         case 0x06:
5408         case 0x07:
5409            //printf("%02x\n",index);
5410            res = vga.sequencer.data[index];
5411            break;
5412      }
5413   }
5414
5415   return res;
5416}
5417
5418static void cirrus_seq_reg_write(running_machine &machine, UINT8 index, UINT8 data)
5419{
5420   if(index <= 0x04)
5421   {
5422      vga.sequencer.data[vga.sequencer.index] = data;
5423      seq_reg_write(machine,vga.sequencer.index,data);
5424   }
5425   else
5426   {
5427      switch(index)
5428      {
5429         case 0x06:
5430         case 0x07:
5431            //printf("%02x %02x\n",index,data);
5432            vga.sequencer.data[vga.sequencer.index] = data;
5433            break;
5434      }
5435   }
5436}
5437READ8_HANDLER(cirrus_03c0_r)
5438{
5439   UINT8 res;
5440
5441   switch(offset)
5442   {
5443      case 0x05:
5444         res = cirrus_seq_reg_read(space.machine(),vga.sequencer.index);
5445         break;
5446      default:
5447         res = vga_port_03c0_r(space,offset);
5448         break;
5449   }
5450
5451   return res;
5452}
5453
5454WRITE8_HANDLER(cirrus_03c0_w)
5455{
5456   switch(offset)
5457   {
5458      case 0x05:
5459         cirrus_seq_reg_write(space.machine(),vga.sequencer.index,data);
5460         break;
5461      default:
5462         vga_port_03c0_w(space,offset,data);
5463         break;
5464   }
5465   cirrus_define_video_mode(space.machine());
5466}
5467
5468void pc_svga_cirrus_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset)
5469{
5470   int buswidth;
5471   UINT64 mask = 0;
5472
5473   buswidth = machine.firstcpu->space_config(AS_PROGRAM)->m_databus_width;
5474   switch(buswidth)
5475   {
5476      case 8:
5477         mask = 0;
5478         break;
5479
5480      case 16:
5481         mask = 0xffff;
5482         break;
5483
5484      case 32:
5485         mask = 0xffffffff;
5486         break;
5487
5488      case 64:
5489         mask = -1;
5490         break;
5491
5492      default:
5493         fatalerror("VGA: Bus width %d not supported\n", buswidth);
5494         break;
5495   }
5496   io_space.install_legacy_readwrite_handler(port_offset + 0x3b0, port_offset + 0x3bf, FUNC(vga_port_03b0_r), FUNC(vga_port_03b0_w), mask);
5497   io_space.install_legacy_readwrite_handler(port_offset + 0x3c0, port_offset + 0x3cf, FUNC(cirrus_03c0_r), FUNC(cirrus_03c0_w), mask);
5498   io_space.install_legacy_readwrite_handler(port_offset + 0x3d0, port_offset + 0x3df, FUNC(vga_port_03d0_r), FUNC(vga_port_03d0_w), mask);
5499
5500   mem_space.install_legacy_readwrite_handler(mem_offset + 0x00000, mem_offset + 0x1ffff, FUNC(vga_mem_r), FUNC(vga_mem_w), mask);
5501}
trunk/src/emu/video/pc_vga.h
r18208r18209
1515MACHINE_CONFIG_EXTERN( pcvideo_ati_isa );
1616
1717VIDEO_START( vga );
18
19struct pc_svga_interface
20{
21   size_t vram_size;
22   int seq_regcount;
23   int gc_regcount;
24   int crtc_regcount;
25   void (*choosevideomode)(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer, const UINT8 *crtc, int *width, int *height);
26};
27
28void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf);
18void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch);
19void pc_vga_cirrus_init(running_machine &machine, read8_delegate read_dipswitch);
2920void pc_vga_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
3021void pc_vga_gamtor_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
3122void pc_svga_trident_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
23void pc_svga_cirrus_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
3224void pc_vga_reset(running_machine &machine);
3325void *pc_vga_memory(void);
3426size_t pc_vga_memory_size(void);
trunk/src/mess/machine/pc.c
r18208r18209
14221422{
14231423   mess_init_pc_common(machine(), PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
14241424
1425   pc_vga_init(machine(), read8_delegate(FUNC(pc_state::input_port_0_r),this), NULL);
1425   pc_vga_init(machine(), read8_delegate(FUNC(pc_state::input_port_0_r),this));
14261426   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
14271427}
14281428
trunk/src/mess/video/isa_svga_s3.c
r18208r18209
6666
6767   video_start_vga( machine() );
6868
69   pc_vga_init(machine(), read8_delegate(FUNC(isa16_svga_s3_device::input_port_0_r),this), NULL);
69   pc_vga_init(machine(), read8_delegate(FUNC(isa16_svga_s3_device::input_port_0_r),this));
7070
7171   int i;
7272   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_vga_ati.c
r18208r18209
6969
7070   video_start_vga( machine() );
7171
72   pc_vga_init(machine(), read8_delegate(FUNC(isa16_vga_gfxultra_device::input_port_0_r),this), NULL);
72   pc_vga_init(machine(), read8_delegate(FUNC(isa16_vga_gfxultra_device::input_port_0_r),this));
7373
7474   int i;
7575   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/cirrus.c
r18208r18209
6767
6868#define LOG_PCIACCESS   0
6969
70static void cirrus_update_8bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
71{
72   UINT32 *line;
73   const UINT8 *vram;
74   int y, x;
75
76   vram = (const UINT8 *) pc_vga_memory();
77
78   for (y = 0; y < 480; y++)
79   {
80      line = &bitmap.pix32(y);
81
82      for (x = 0; x < 640; x++)
83         *line++ = machine.pens[*vram++];
84   }
85}
86
87
88
89static void cirrus_update_16bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
90{
91   fatalerror("NYI\n");
92}
93
94
95
96static void cirrus_update_24bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
97{
98   fatalerror("NYI\n");
99}
100
101
102
103static void cirrus_update_32bpp(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect)
104{
105   fatalerror("NYI\n");
106}
107
108
109
110static void cirrus_choosevideomode(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer,
111   const UINT8 *crtc, int *width, int *height)
112{
113   if ((sequencer[0x06] == 0x12) && (sequencer[0x07] & 0x01))
114   {
115      *width = 640;
116      *height = 480;
117
118      switch(sequencer[0x07] & 0x0E)
119      {
120         case 0x00:   cirrus_update_8bpp(machine, bitmap, cliprect); break;
121         case 0x02:   cirrus_update_16bpp(machine, bitmap, cliprect); break;
122         case 0x04:   cirrus_update_24bpp(machine, bitmap, cliprect); break;
123         case 0x06:   cirrus_update_16bpp(machine, bitmap, cliprect); break;
124         case 0x08:   cirrus_update_32bpp(machine, bitmap, cliprect); break;
125      }
126   }
127}
128
12970//**************************************************************************
13071//  DEVICE DEFINITIONS
13172//**************************************************************************
r18208r18209
14687{
14788}
14889
149const struct pc_svga_interface cirrus_svga_interface =
150{
151   2 * 1024 * 1024,   /* 2 megs vram */
152   8,               /* 8 sequencer registers */
153   10,               /* 10 gc registers */
154   25,               /* 25 crtc registers */
155   cirrus_choosevideomode
156};
157
158
15990//-------------------------------------------------
16091//  device_start - device-specific startup
16192//-------------------------------------------------
16293
16394void cirrus_device::device_start()
16495{
165   pc_vga_init(machine(), read8_delegate(), &cirrus_svga_interface);
166   pc_vga_io_init(machine(), machine().device("ppc1")->memory().space(AS_PROGRAM), 0xC00A0000, machine().device("ppc1")->memory().space(AS_PROGRAM), 0x80000000);
96   pc_vga_cirrus_init(machine(), read8_delegate());
97   pc_svga_cirrus_io_init(machine(), machine().device("ppc1")->memory().space(AS_PROGRAM), 0xC00A0000, machine().device("ppc1")->memory().space(AS_PROGRAM), 0x80000000);
16798}
16899
169100//-------------------------------------------------
trunk/src/mess/video/isa_vga.c
r18208r18209
6565
6666   video_start_vga( machine() );
6767
68   pc_vga_init(machine(), read8_delegate(FUNC(isa8_vga_device::input_port_0_r),this), NULL);
68   pc_vga_init(machine(), read8_delegate(FUNC(isa8_vga_device::input_port_0_r),this));
6969
7070   int i;
7171   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_svga_tseng.c
r18208r18209
6565
6666   video_start_vga( machine() );
6767
68   pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_et4k_device::input_port_0_r),this), NULL);
68   pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_et4k_device::input_port_0_r),this));
6969
7070   int i;
7171   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_svga_cirrus.c
r18208r18209
6666
6767   video_start_vga( machine() );
6868
69   pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_cirrus_device::input_port_0_r),this), NULL);
69   pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_cirrus_device::input_port_0_r),this));
7070
7171   int i;
7272   for (i = 0; i < 0x100; i++)
trunk/src/mess/drivers/indiana.c
r18208r18209
8484
8585DRIVER_INIT_MEMBER(indiana_state,indiana)
8686{
87   pc_vga_init(machine(), read8_delegate(FUNC(indiana_state::indiana_vga_setting),this), NULL);
87   pc_vga_init(machine(), read8_delegate(FUNC(indiana_state::indiana_vga_setting),this));
8888   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f7a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f600000);
8989}
9090

Previous 199869 Revisions Next


© 1997-2024 The MAME Team