Previous 199869 Revisions Next

r18041 Thursday 20th September, 2012 at 13:07:33 UTC by Miodrag Milanović
used read8_delegate instead of read8_space_func for vga port read (nw)
[src/emu/video]pc_vga.c pc_vga.h
[src/mame/drivers]calchase.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_cirrus.h isa_svga_s3.c isa_svga_s3.h isa_svga_tseng.c isa_svga_tseng.h isa_vga.c isa_vga.h isa_vga_ati.c isa_vga_ati.h

trunk/src/mame/drivers/su2000.c
r18040r18041
8181   DECLARE_READ8_MEMBER(get_slave_ack);
8282   virtual void machine_start();
8383   virtual void machine_reset();
84   DECLARE_READ8_MEMBER(vga_setting);
8485};
8586
8687
r18040r18041
169170 *
170171 *************************************************************/
171172
172static READ8_HANDLER( vga_setting )
173READ8_MEMBER(su2000_state::vga_setting )
173174{
174175   /* TODO */
175176   return 0xff;
r18040r18041
286287
287288   kbdc8042_init(machine(), &at8042);
288289
289   pc_vga_init(machine(), vga_setting, NULL);
290   pc_vga_init(machine(), read8_delegate(FUNC(su2000_state::vga_setting),this), NULL);
290291   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
291292}
292293
trunk/src/mame/drivers/voyager.c
r18040r18041
6969   DECLARE_DRIVER_INIT(voyager);
7070   virtual void machine_start();
7171   virtual void machine_reset();
72   DECLARE_READ8_MEMBER(vga_setting);
7273};
7374
7475
r18040r18041
650651   return pic8259_acknowledge( state->m_pic8259_1);
651652}
652653
653static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
654READ8_MEMBER(voyager_state::vga_setting ) { return 0xff; } // hard-code to color
654655
655656void voyager_state::machine_start()
656657{
r18040r18041
800801{
801802   m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4);
802803
803   pc_vga_init(machine(), vga_setting, NULL);
804   pc_vga_init(machine(), read8_delegate(FUNC(voyager_state::vga_setting),this), NULL);
804805   pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
805806   init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, voyager_set_keyb_int);
806807
trunk/src/mame/drivers/queen.c
r18040r18041
636636   pic8259_ir6_w(drvstate->m_pic8259_2, state);
637637}
638638
639static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
639READ8_MEMBER(queen_state::vga_setting ) { return 0xff; } // hard-code to color
640640
641641void queen_state::machine_start()
642642{
r18040r18041
655655   intel82439tx_init(machine());
656656
657657   kbdc8042_init(machine(), &at8042);
658   pc_vga_init(machine(), ::vga_setting, NULL);
658   pc_vga_init(machine(), read8_delegate(FUNC(queen_state::vga_setting),this), NULL);
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/savquest.c
r18040r18041
9494   DECLARE_WRITE_LINE_MEMBER(savquest_pic8259_1_set_int_line);
9595   virtual void machine_start();
9696   virtual void machine_reset();
97   DECLARE_READ8_MEMBER(vga_setting);
9798};
9899
99100// Intel 82439TX System Controller (MXTC)
r18040r18041
516517   pic8259_ir6_w(drvstate->m_pic8259_2, state);
517518}
518519
519static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
520READ8_MEMBER(savquest_state::vga_setting ) { return 0xff; } // hard-code to color
520521
521522void savquest_state::machine_start()
522523{
r18040r18041
528529   intel82439tx_init(machine());
529530
530531   kbdc8042_init(machine(), &at8042);
531   pc_vga_init(machine(), vga_setting, NULL);
532   pc_vga_init(machine(), read8_delegate(FUNC(savquest_state::vga_setting),this), NULL);
532533   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
533534}
534535
trunk/src/mame/drivers/gamtor.c
r18040r18041
3535      : driver_device(mconfig, type, tag){ }
3636   DECLARE_WRITE32_MEMBER(gamtor_unk_w);
3737   DECLARE_DRIVER_INIT(gaminator);
38   DECLARE_READ8_MEMBER(vga_setting);
3839};
3940
4041WRITE32_MEMBER(gaminator_state::gamtor_unk_w)
r18040r18041
12481249   ROM_LOAD( "llc_92_5.6-0", 0x0000, 0x2000000, CRC(c8c2a5d3) SHA1(ec23eff63871cc515ec58a894446d4d639d864e4) )
12491250ROM_END
12501251
1251static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
1252READ8_MEMBER(gaminator_state::vga_setting ) { return 0xff; } // hard-code to color
12521253
12531254
12541255DRIVER_INIT_MEMBER(gaminator_state,gaminator)
12551256{
1256   pc_vga_init(machine(), vga_setting, NULL);
1257   pc_vga_init(machine(), read8_delegate(FUNC(gaminator_state::vga_setting),this), NULL);
12571258   pc_vga_gamtor_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x44000000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x40000000);
12581259}
12591260
trunk/src/mame/drivers/photoply.c
r18040r18041
5353   DECLARE_WRITE_LINE_MEMBER(at_pit8254_out2_changed);
5454   DECLARE_DRIVER_INIT(photoply);
5555   virtual void machine_start();
56   DECLARE_READ8_MEMBER(vga_setting);
5657};
5758
5859
r18040r18041
335336   //there's also a 8x16 entry (just after the 8x8)
336337GFXDECODE_END
337338
338static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
339READ8_MEMBER(photoply_state::vga_setting ) { return 0xff; } // hard-code to color
339340
340341static MACHINE_CONFIG_START( photoply, photoply_state )
341342   /* basic machine hardware */
r18040r18041
377378
378379DRIVER_INIT_MEMBER(photoply_state,photoply)
379380{
380   pc_vga_init(machine(), vga_setting, NULL);
381   pc_vga_init(machine(), read8_delegate(FUNC(photoply_state::vga_setting),this), NULL);
381382   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
382383}
383384
trunk/src/mame/drivers/midqslvr.c
r18040r18041
9898   DECLARE_WRITE_LINE_MEMBER(midqslvr_pic8259_1_set_int_line);
9999   virtual void machine_start();
100100   virtual void machine_reset();
101   DECLARE_READ8_MEMBER(vga_setting);
101102};
102103
103104
r18040r18041
652653   pic8259_ir6_w(drvstate->m_pic8259_2, state);
653654}
654655
655static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
656READ8_MEMBER( midqslvr_state::vga_setting ) { return 0xff; } // hard-code to color
656657
657658void midqslvr_state::machine_start()
658659{
r18040r18041
671672   intel82439tx_init(machine());
672673
673674   kbdc8042_init(machine(), &at8042);
674   pc_vga_init(machine(), vga_setting, NULL);
675   pc_vga_init(machine(), read8_delegate(FUNC(midqslvr_state::vga_setting),this), NULL);
675676   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
676677}
677678
trunk/src/mame/drivers/calchase.c
r18040r18041
175175   DECLARE_DRIVER_INIT(calchase);
176176   virtual void machine_start();
177177   virtual void machine_reset();
178   DECLARE_READ8_MEMBER(vga_setting);
178179};
179180
180181
r18040r18041
804805   return pic8259_acknowledge( state->m_pic8259_1);
805806}
806807
807static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
808READ8_MEMBER( calchase_state::vga_setting ) { return 0xff; } // hard-code to color
808809
809810void calchase_state::machine_start()
810811{
r18040r18041
976977{
977978   m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4);
978979
979   pc_vga_init(machine(), vga_setting, NULL);
980   pc_vga_init(machine(), read8_delegate(FUNC(calchase_state::vga_setting),this), NULL);
980981   pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
981982   init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, calchase_set_keyb_int);
982983
trunk/src/mame/drivers/xtom3d.c
r18040r18041
115115   DECLARE_WRITE_LINE_MEMBER(xtom3d_pic8259_1_set_int_line);
116116   virtual void machine_start();
117117   virtual void machine_reset();
118   DECLARE_READ8_MEMBER(vga_setting);
118119};
119120
120121// Intel 82439TX System Controller (MXTC)
r18040r18041
644645   pic8259_ir6_w(drvstate->m_pic8259_2, state);
645646}
646647
647static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
648READ8_MEMBER(xtom3d_state::vga_setting ) { return 0xff; } // hard-code to color
648649
649650void xtom3d_state::machine_start()
650651{
r18040r18041
663664   intel82439tx_init(machine());
664665
665666   kbdc8042_init(machine(), &at8042);
666   pc_vga_init(machine(), vga_setting, NULL);
667   pc_vga_init(machine(), read8_delegate(FUNC(xtom3d_state::vga_setting),this), NULL);
667668   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
668669}
669670
trunk/src/mame/drivers/pcat_dyn.c
r18040r18041
4545
4646   DECLARE_DRIVER_INIT(pcat_dyn);
4747   virtual void machine_start();
48   DECLARE_READ8_MEMBER(vga_setting);
4849};
4950
5051
r18040r18041
109110   pic8259_ir1_w(machine.device("pic8259_1"), state);
110111}
111112
112static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
113READ8_MEMBER(pcat_dyn_state::vga_setting ) { return 0xff; } // hard-code to color
113114
114115static void set_gate_a20(running_machine &machine, int a20)
115116{
r18040r18041
196197
197198DRIVER_INIT_MEMBER(pcat_dyn_state,pcat_dyn)
198199{
199   pc_vga_init(machine(), vga_setting, NULL);
200   pc_vga_init(machine(), read8_delegate(FUNC(pcat_dyn_state::vga_setting),this), NULL);
200201   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
201202}
202203
trunk/src/mame/drivers/pcat_nit.c
r18040r18041
112112   DECLARE_WRITE_LINE_MEMBER(at_com_interrupt_1);
113113   DECLARE_DRIVER_INIT(pcat_nit);
114114   virtual void machine_start();
115   DECLARE_READ8_MEMBER(vga_setting);
115116};
116117
117118WRITE_LINE_MEMBER(pcat_nit_state::microtouch_out)
r18040r18041
227228   pic8259_ir1_w(machine.device("pic8259_1"), state);
228229}
229230
230static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
231READ8_MEMBER(pcat_nit_state::vga_setting ) { return 0xff; } // hard-code to color
231232
232233void pcat_nit_state::machine_start()
233234{
r18040r18041
426427   m_banked_nvram = auto_alloc_array(machine(), UINT8, 0x2000);
427428   machine().device<nvram_device>("nvram")->set_base(m_banked_nvram, 0x2000);
428429
429   pc_vga_init(machine(), vga_setting, NULL);
430   pc_vga_init(machine(), read8_delegate(FUNC(pcat_nit_state::vga_setting),this), NULL);
430431   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
431432}
432433
trunk/src/mame/drivers/magtouch.c
r18040r18041
100100   DECLARE_WRITE_LINE_MEMBER(at_com_interrupt_1);
101101   DECLARE_DRIVER_INIT(magtouch);
102102   virtual void machine_start();
103   DECLARE_READ8_MEMBER(vga_setting);
103104};
104105
105106
r18040r18041
196197   pic8259_ir1_w(machine.device("pic8259_1"), state);
197198}
198199
199static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
200READ8_MEMBER( magtouch_state::vga_setting ) { return 0xff; } // hard-code to color
200201
201202void magtouch_state::machine_start()
202203{
r18040r18041
248249
249250DRIVER_INIT_MEMBER(magtouch_state,magtouch)
250251{
251   pc_vga_init(machine(), vga_setting, NULL);
252   pc_vga_init(machine(), read8_delegate(FUNC(magtouch_state::vga_setting),this), NULL);
252253   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
253254}
254255
trunk/src/mame/drivers/pangofun.c
r18040r18041
107107
108108   DECLARE_DRIVER_INIT(pangofun);
109109   virtual void machine_start();
110   DECLARE_READ8_MEMBER(vga_setting);
110111};
111112
112113
r18040r18041
164165   pic8259_ir1_w(machine.device("pic8259_1"), state);
165166}
166167
167static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
168READ8_MEMBER(pangofun_state::vga_setting ) { return 0xff; } // hard-code to color
168169
169170static void set_gate_a20(running_machine &machine, int a20)
170171{
r18040r18041
243244
244245DRIVER_INIT_MEMBER(pangofun_state,pangofun)
245246{
246   pc_vga_init(machine(), vga_setting, NULL);
247   pc_vga_init(machine(), read8_delegate(FUNC(pangofun_state::vga_setting),this), NULL);
247248   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
248249}
249250
trunk/src/mame/drivers/taitowlf.c
r18040r18041
8383   virtual void machine_reset();
8484   virtual void palette_init();
8585   UINT32 screen_update_taitowlf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
86   DECLARE_READ8_MEMBER(vga_setting);
8687};
8788
8889#if !ENABLE_VGA
r18040r18041
696697}
697698
698699#if ENABLE_VGA
699static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
700READ8_MEMBER(taitowlf_state::vga_setting ) { return 0xff; } // hard-code to color
700701#endif
701702
702703DRIVER_INIT_MEMBER(taitowlf_state,taitowlf)
r18040r18041
709710
710711   kbdc8042_init(machine(), &at8042);
711712   #if ENABLE_VGA
712   pc_vga_init(machine(), vga_setting, NULL);
713   pc_vga_init(machine(), read8_delegate(FUNC(taitowlf_state::vga_setting),this), NULL);
713714   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
714715   #endif
715716}
trunk/src/mame/drivers/pntnpuzl.c
r18040r18041
153153   DECLARE_READ16_MEMBER(pntnpuzl_eeprom_r);
154154   DECLARE_WRITE16_MEMBER(pntnpuzl_eeprom_w);
155155   DECLARE_DRIVER_INIT(pip);
156   DECLARE_READ8_MEMBER(vga_setting);
156157};
157158
158159
r18040r18041
356357   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D)
357358INPUT_PORTS_END
358359
359static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color
360READ8_MEMBER(pntnpuzl_state::vga_setting ) { return 0xff; } // hard-code to color
360361
361362static MACHINE_CONFIG_START( pntnpuzl, pntnpuzl_state )
362363   MCFG_CPU_ADD("maincpu", M68000, 12000000)//??
r18040r18041
384385//  UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base();
385386//  rom[0x2696/2] = 0x4e71;
386387//  rom[0x26a0/2] = 0x4e71;
387   pc_vga_init(machine(), vga_setting, NULL);
388   pc_vga_init(machine(), read8_delegate(FUNC(pntnpuzl_state::vga_setting),this), NULL);
388389   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3c0000);
389390
390391}
trunk/src/emu/video/pc_vga.c
r18040r18041
5454
5555static struct
5656{
57   read8_space_func read_dipswitch;
57   read8_delegate read_dipswitch;
5858   struct pc_svga_interface svga_intf;
5959
6060   UINT8 *memory;
r18040r18041
16141614         switch ((vga.miscellaneous_output>>2)&3)
16151615         {
16161616            case 3:
1617               if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x01)
1617               if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x01)
16181618                  data |= 0x10;
16191619               break;
16201620            case 2:
1621               if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x02)
1621               if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x02)
16221622                  data |= 0x10;
16231623               break;
16241624            case 1:
1625               if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x04)
1625               if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x04)
16261626                  data |= 0x10;
16271627               break;
16281628            case 0:
1629               if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x08)
1629               if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x08)
16301630                  data |= 0x10;
16311631               break;
16321632         }
r18040r18041
20172017   }
20182018}
20192019
2020void pc_vga_init(running_machine &machine, read8_space_func read_dipswitch, const struct pc_svga_interface *svga_intf)
2020void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf)
20212021{
20222022   memset(&vga, 0, sizeof(vga));
20232023
trunk/src/emu/video/pc_vga.h
r18040r18041
2525   void (*choosevideomode)(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer, const UINT8 *crtc, int *width, int *height);
2626};
2727
28void pc_vga_init(running_machine &machine, read8_space_func read_dipswitch, const struct pc_svga_interface *svga_intf);
28void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf);
2929void pc_vga_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
3030void pc_vga_gamtor_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
3131void pc_svga_trident_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset);
trunk/src/mess/machine/pc.c
r18040r18041
14051405   mess_init_pc_common(machine(), 0, NULL, pc_set_irq_line);
14061406}
14071407
1408static READ8_HANDLER( input_port_0_r ) { return space.machine().root_device().ioport("IN0")->read(); }
1408READ8_MEMBER(pc_state::input_port_0_r ) { return machine().root_device().ioport("IN0")->read(); }
14091409
14101410DRIVER_INIT_MEMBER(pc_state,pc1640)
14111411{
r18040r18041
14211421{
14221422   mess_init_pc_common(machine(), PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
14231423
1424   pc_vga_init(machine(), ::input_port_0_r, NULL);
1424   pc_vga_init(machine(), read8_delegate(FUNC(pc_state::input_port_0_r),this), NULL);
14251425   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000);
14261426}
14271427
trunk/src/mess/video/isa_vga_ati.c
r18040r18041
6161//-------------------------------------------------
6262//  device_start - device-specific startup
6363//-------------------------------------------------
64static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
64READ8_MEMBER(isa16_vga_gfxultra_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
6565
6666void isa16_vga_gfxultra_device::device_start()
6767{
r18040r18041
6969
7070   video_start_vga( machine() );
7171
72   pc_vga_init(machine(), input_port_0_r, NULL);
72   pc_vga_init(machine(), read8_delegate(FUNC(isa16_vga_gfxultra_device::input_port_0_r),this), NULL);
7373
7474   int i;
7575   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_vga_ati.h
r18040r18041
3030      // optional information overrides
3131      virtual machine_config_constructor device_mconfig_additions() const;
3232      virtual const rom_entry *device_rom_region() const;
33     
34      DECLARE_READ8_MEMBER(input_port_0_r);
3335protected:
3436        // device-level overrides
3537        virtual void device_start();
trunk/src/mess/video/cirrus.c
r18040r18041
162162
163163void cirrus_device::device_start()
164164{
165   pc_vga_init(machine(), NULL, &cirrus_svga_interface);
165   pc_vga_init(machine(), read8_delegate(), &cirrus_svga_interface);
166166   pc_vga_io_init(machine(), machine().device("ppc1")->memory().space(AS_PROGRAM), 0xC00A0000, machine().device("ppc1")->memory().space(AS_PROGRAM), 0x80000000);
167167}
168168
trunk/src/mess/video/isa_svga_cirrus.c
r18040r18041
5858//-------------------------------------------------
5959//  device_start - device-specific startup
6060//-------------------------------------------------
61static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
61READ8_MEMBER(isa8_svga_cirrus_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
6262
6363void isa8_svga_cirrus_device::device_start()
6464{
r18040r18041
6666
6767   video_start_vga( machine() );
6868
69   pc_vga_init(machine(), input_port_0_r, NULL);
69   pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_cirrus_device::input_port_0_r),this), NULL);
7070
7171   int i;
7272   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_svga_cirrus.h
r18040r18041
2323      // optional information overrides
2424      virtual machine_config_constructor device_mconfig_additions() const;
2525      virtual const rom_entry *device_rom_region() const;
26     
27      DECLARE_READ8_MEMBER(input_port_0_r);
2628protected:
2729        // device-level overrides
2830        virtual void device_start();
trunk/src/mess/video/isa_svga_tseng.c
r18040r18041
5757//-------------------------------------------------
5858//  device_start - device-specific startup
5959//-------------------------------------------------
60static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
60READ8_MEMBER(isa8_svga_et4k_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
6161
6262void isa8_svga_et4k_device::device_start()
6363{
r18040r18041
6565
6666   video_start_vga( machine() );
6767
68   pc_vga_init(machine(), input_port_0_r, NULL);
68   pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_et4k_device::input_port_0_r),this), NULL);
6969
7070   int i;
7171   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_svga_tseng.h
r18040r18041
2323      // optional information overrides
2424      virtual machine_config_constructor device_mconfig_additions() const;
2525      virtual const rom_entry *device_rom_region() const;
26     
27      DECLARE_READ8_MEMBER(input_port_0_r);
2628protected:
2729        // device-level overrides
2830        virtual void device_start();
trunk/src/mess/video/isa_vga.c
r18040r18041
5757//-------------------------------------------------
5858//  device_start - device-specific startup
5959//-------------------------------------------------
60static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
60READ8_MEMBER( isa8_vga_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
6161
6262void isa8_vga_device::device_start()
6363{
r18040r18041
6565
6666   video_start_vga( machine() );
6767
68   pc_vga_init(machine(), input_port_0_r, NULL);
68   pc_vga_init(machine(), read8_delegate(FUNC(isa8_vga_device::input_port_0_r),this), NULL);
6969
7070   int i;
7171   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_vga.h
r18040r18041
2323      // optional information overrides
2424      virtual machine_config_constructor device_mconfig_additions() const;
2525      virtual const rom_entry *device_rom_region() const;
26     
27      DECLARE_READ8_MEMBER(input_port_0_r);
2628protected:
2729        // device-level overrides
2830        virtual void device_start();
trunk/src/mess/video/isa_svga_s3.c
r18040r18041
5858//-------------------------------------------------
5959//  device_start - device-specific startup
6060//-------------------------------------------------
61static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
61READ8_MEMBER(isa16_svga_s3_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
6262
6363void isa16_svga_s3_device::device_start()
6464{
r18040r18041
6666
6767   video_start_vga( machine() );
6868
69   pc_vga_init(machine(), input_port_0_r, NULL);
69   pc_vga_init(machine(), read8_delegate(FUNC(isa16_svga_s3_device::input_port_0_r),this), NULL);
7070
7171   int i;
7272   for (i = 0; i < 0x100; i++)
trunk/src/mess/video/isa_svga_s3.h
r18040r18041
2323      // optional information overrides
2424      virtual machine_config_constructor device_mconfig_additions() const;
2525      virtual const rom_entry *device_rom_region() const;
26     
27      DECLARE_READ8_MEMBER(input_port_0_r);
2628protected:
2729        // device-level overrides
2830        virtual void device_start();
trunk/src/mess/drivers/indiana.c
r18040r18041
2222      : driver_device(mconfig, type, tag) { }
2323   DECLARE_DRIVER_INIT(indiana);
2424   virtual void machine_reset();
25   DECLARE_READ8_MEMBER(indiana_vga_setting);
2526};
2627
2728
r18040r18041
7677   MCFG_FRAGMENT_ADD( pcvideo_vga )
7778MACHINE_CONFIG_END
7879
79READ8_HANDLER( indiana_vga_setting )
80READ8_MEMBER(indiana_state::indiana_vga_setting)
8081{
8182   return 0xff;   // TODO
8283}
8384
8485DRIVER_INIT_MEMBER(indiana_state,indiana)
8586{
86   pc_vga_init(machine(), indiana_vga_setting, NULL);
87   pc_vga_init(machine(), read8_delegate(FUNC(indiana_state::indiana_vga_setting),this), NULL);
8788   pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f7a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f600000);
8889}
8990

Previous 199869 Revisions Next


© 1997-2024 The MAME Team