Previous 199869 Revisions Next

r17581 Thursday 30th August, 2012 at 14:27:14 UTC by Miodrag Milanović
Removed legacy inline_config support and updated devices using it (no whatsnew)
[src/emu]devlegcy.c devlegcy.h
[src/emu/machine]68681.c 74148.c 74148.h 74153.c 74153.h idectrl.c idectrl.h latch8.c latch8.h smc91c9x.c smc91c9x.h
[src/emu/video]tlc34076.c tlc34076.h voodoo.c voodoo.h
[src/mame/audio]namco54.c namco54.h
[src/mame/drivers]artmagic.c atlantis.c btoads.c calchase.c carpolo.c chihiro.c cobra.c coolpool.c djmain.c funkball.c galaga.c gamecstl.c gticlub.c hornet.c itech8.c jaguar.c kinst.c magictg.c mediagx.c midqslvr.c midvunit.c nwk-tr.c polepos.c qdrmfgp.c queen.c savquest.c seattle.c skeetsht.c taitogn.c taitotz.c taitowlf.c tickee.c twinkle.c vcombat.c vegas.c vertigo.c viper.c voyager.c xtheball.c xtom3d.c zn.c
[src/mame/machine]decocass.c namco06.c namco06.h
[src/mess/drivers]aim65.c bebox.c cybiko.c sitcom.c
[src/mess/machine]a2cffa.c c64_ide64.c isa_ide.c kc_d004.c omti8621.c sst39vfx.c sst39vfx.h
[src/mess/machine/ti99]tn_ide.c
[src/mess/video]dl1416.c dl1416.h

trunk/src/mame/audio/namco54.c
r17580r17581
164164
165165static DEVICE_START( namco_54xx )
166166{
167   namco_54xx_config *config = (namco_54xx_config *)downcast<const legacy_device_base *>(device)->inline_config();
167   namco_54xx_config *config = (namco_54xx_config *)device->static_config();
168168   namco_54xx_state *state = get_safe_token(device);
169169   astring tempstring;
170170
r17580r17581
191191
192192  case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(namco_54xx_state); break;
193193
194  case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(namco_54xx_config); break;
195
196194  case DEVINFO_PTR_ROM_REGION: info->romregion = ROM_NAME(namco_54xx); break;
197195
198196  case DEVINFO_PTR_MACHINE_CONFIG: info->machine_config = MACHINE_CONFIG_NAME(namco_54xx); break;
trunk/src/mame/audio/namco54.h
r17580r17581
1313};
1414
1515
16#define MCFG_NAMCO_54XX_ADD(_tag, _clock, _discrete, _firstnode) \
16#define MCFG_NAMCO_54XX_ADD(_tag, _clock, _config) \
1717   MCFG_DEVICE_ADD(_tag, NAMCO_54XX, _clock) \
18   MCFG_DEVICE_CONFIG_DATAPTR(namco_54xx_config, discrete, _discrete) \
19   MCFG_DEVICE_CONFIG_DATA32(namco_54xx_config, firstnode, _firstnode)
18   MCFG_DEVICE_CONFIG(_config)
2019
2120
2221WRITE8_DEVICE_HANDLER( namco_54xx_write );
trunk/src/mame/machine/namco06.c
r17580r17581
220220
221221static DEVICE_START( namco_06xx )
222222{
223   const namco_06xx_config *config = (const namco_06xx_config *)downcast<const legacy_device_base *>(device)->inline_config();
223   const namco_06xx_config *config = (const namco_06xx_config *)device->static_config();
224224   namco_06xx_state *state = get_safe_token(device);
225225   int devnum;
226226
r17580r17581
299299
300300  case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(namco_06xx_state); break;
301301
302  case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(namco_06xx_config); break;
303
304302  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(namco_06xx); break;
305303
306304  case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(namco_06xx); break;
trunk/src/mame/machine/namco06.h
r17580r17581
1515};
1616
1717
18#define MCFG_NAMCO_06XX_ADD(_tag, _clock, _nmicpu, _chip0, _chip1, _chip2, _chip3) \
18#define MCFG_NAMCO_06XX_ADD(_tag, _clock, _config) \
1919   MCFG_DEVICE_ADD(_tag, NAMCO_06XX, _clock) \
20   MCFG_DEVICE_CONFIG_DATAPTR(namco_06xx_config, nmicpu, _nmicpu) \
21   MCFG_DEVICE_CONFIG_DATAPTR(namco_06xx_config, chip0, _chip0) \
22   MCFG_DEVICE_CONFIG_DATAPTR(namco_06xx_config, chip1, _chip1) \
23   MCFG_DEVICE_CONFIG_DATAPTR(namco_06xx_config, chip2, _chip2) \
24   MCFG_DEVICE_CONFIG_DATAPTR(namco_06xx_config, chip3, _chip3)
20   MCFG_DEVICE_CONFIG(_config)
2521
2622
2723READ8_DEVICE_HANDLER( namco_06xx_data_r );
trunk/src/mame/machine/decocass.c
r17580r17581
22282228   /* validate some basic stuff */
22292229   assert(device != NULL);
22302230   assert(device->static_config() == NULL);
2231   assert(downcast<const legacy_device_base *>(device)->inline_config() == NULL);
22322231
22332232   /* fetch the data pointer */
22342233   tape->timer = device->machine().scheduler().timer_alloc(FUNC(tape_clock_callback), (void *)device);
trunk/src/mame/drivers/skeetsht.c
r17580r17581
265265
266266   MCFG_MACHINE_RESET(skeetsht)
267267
268   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
268   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
269269
270270   MCFG_SCREEN_ADD("screen", RASTER)
271271   MCFG_SCREEN_RAW_PARAMS(48000000 / 8, 156*4, 0, 100*4, 328, 0, 300) // FIXME
trunk/src/mame/drivers/hornet.c
r17580r17581
975975   "rscreen", 1
976976};
977977
978static const voodoo_config hornet_voodoo_intf =
979{
980   2, //            fbmem;
981   4,//            tmumem0;
982   0,//            tmumem1;
983   "screen",//         screen;
984   "dsp",//         cputag;
985   voodoo_vblank_0,//   vblank;
986   NULL,//            stall;
987};
988
978989static MACHINE_CONFIG_START( hornet, hornet_state )
979990
980991   /* basic machine hardware */
r17580r17581
9961007
9971008   MCFG_EEPROM_93C46_ADD("eeprom")
9981009
999   MCFG_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, 2, "screen")
1000   MCFG_3DFX_VOODOO_CPU("dsp")
1001   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
1002   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_0)
1010   MCFG_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, hornet_voodoo_intf)
10031011
10041012   MCFG_K033906_ADD("k033906_1", hornet_k033906_intf_0)
10051013
r17580r17581
10481056   }
10491057}
10501058
1059static const voodoo_config voodoo_l_intf =
1060{
1061   2, //            fbmem;
1062   4,//            tmumem0;
1063   0,//            tmumem1;
1064   "lscreen",//      screen;
1065   "dsp",//         cputag;
1066   voodoo_vblank_0,//   vblank;
1067   NULL,//            stall;
1068};
1069
1070static const voodoo_config voodoo_r_intf =
1071{
1072   2, //            fbmem;
1073   4,//            tmumem0;
1074   0,//            tmumem1;
1075   "rscreen",//      screen;
1076   "dsp2",//         cputag;
1077   voodoo_vblank_1,//   vblank;
1078   NULL,//            stall;
1079};
1080
10511081static MACHINE_CONFIG_DERIVED( hornet_2board, hornet )
10521082
10531083   MCFG_CPU_ADD("dsp2", ADSP21062, 36000000)
r17580r17581
10621092   MCFG_K037122_ADD("k037122_2", hornet_k037122_intf_r)
10631093
10641094   MCFG_DEVICE_REMOVE("voodoo0")
1065   MCFG_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, 2, "lscreen")
1066   MCFG_3DFX_VOODOO_CPU("dsp")
1067   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
1068   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_0)
1095   MCFG_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, voodoo_l_intf)
1096   MCFG_3DFX_VOODOO_1_ADD("voodoo1", STD_VOODOO_1_CLOCK, voodoo_r_intf)
10691097
1070   MCFG_3DFX_VOODOO_1_ADD("voodoo1", STD_VOODOO_1_CLOCK, 2, "rscreen")
1071   MCFG_3DFX_VOODOO_CPU("dsp2")
1072   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
1073   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_1)
1074
10751098   MCFG_K033906_ADD("k033906_2", hornet_k033906_intf_1)
10761099
10771100   /* video hardware */
r17580r17581
11011124static MACHINE_CONFIG_DERIVED( hornet_2board_v2, hornet_2board )
11021125
11031126   MCFG_DEVICE_REMOVE("voodoo0")
1104   MCFG_3DFX_VOODOO_2_ADD("voodoo0", STD_VOODOO_2_CLOCK, 2, "lscreen")
1105   MCFG_3DFX_VOODOO_CPU("dsp")
1106   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
1107   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_0)
1127   MCFG_3DFX_VOODOO_2_ADD("voodoo0", STD_VOODOO_2_CLOCK, voodoo_l_intf)
11081128
11091129   MCFG_DEVICE_REMOVE("voodoo1")
1110   MCFG_3DFX_VOODOO_2_ADD("voodoo1", STD_VOODOO_2_CLOCK, 2, "rscreen")
1111   MCFG_3DFX_VOODOO_CPU("dsp2")
1112   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
1113   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_1)
1130   MCFG_3DFX_VOODOO_2_ADD("voodoo1", STD_VOODOO_2_CLOCK, voodoo_r_intf)
11141131MACHINE_CONFIG_END
11151132
11161133static MACHINE_CONFIG_DERIVED( sscope2, hornet_2board_v2)
trunk/src/mame/drivers/mediagx.c
r17580r17581
11511151   0
11521152};
11531153
1154static const ide_config ide_intf =
1155{
1156   ide_interrupt,
1157   NULL,
1158   0
1159};
1160
11541161static MACHINE_CONFIG_START( mediagx, mediagx_state )
11551162
11561163   /* basic machine hardware */
r17580r17581
11741181
11751182   MCFG_PIC8259_ADD( "pic8259_slave", mediagx_pic8259_2_config )
11761183
1177   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
1184   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
11781185
11791186   MCFG_TIMER_ADD("sound_timer", sound_timer_callback)
11801187
trunk/src/mame/drivers/carpolo.c
r17580r17581
223223   GFXDECODE_ENTRY( "gfx3", 0, alphalayout,  12*2+2*16, 4 )
224224GFXDECODE_END
225225
226static const ttl74148_config carpolo_ttl74148_intf =
227{
228   carpolo_74148_3s_cb
229};
226230
231static const ttl74153_config carpolo_ttl74153_intf =
232{
233   NULL
234};
235
227236/*************************************
228237 *
229238 *  Machine driver
r17580r17581
257266   MCFG_7474_ADD("7474_1a_1", NULL, NULL, NULL)
258267   MCFG_7474_ADD("7474_1a_2", NULL, NULL, NULL)
259268
260   MCFG_74148_ADD("74148_3s", carpolo_74148_3s_cb)
261   MCFG_74153_ADD("74153_1k", NULL)
269   MCFG_74148_ADD("74148_3s", carpolo_ttl74148_intf)
270   MCFG_74153_ADD("74153_1k", carpolo_ttl74153_intf)
262271
263272   /* video hardware */
264273   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/mame/drivers/zn.c
r17580r17581
15231523   devtag_reset(machine, "ide");
15241524}
15251525
1526static const ide_config ide_intf =
1527{
1528   atpsx_interrupt,
1529   NULL,
1530   0
1531};
1532
15261533static MACHINE_CONFIG_DERIVED( coh1000w, zn1_2mb_vram )
15271534   MCFG_MACHINE_RESET( coh1000w )
15281535
1529   MCFG_IDE_CONTROLLER_ADD("ide", atpsx_interrupt, ide_devices, "hdd", NULL, true)
1536   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
15301537   MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( atpsx_dma_read ), (zn_state *) owner ) )
15311538   MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( atpsx_dma_write ), (zn_state *) owner ) )
15321539MACHINE_CONFIG_END
r17580r17581
21972204   MCFG_MACHINE_RESET( coh1000a )
21982205MACHINE_CONFIG_END
21992206
2207static const ide_config jdredd_ide_intf =
2208{
2209   jdredd_ide_interrupt,
2210   NULL,
2211   0
2212};
2213
22002214static MACHINE_CONFIG_DERIVED( coh1000a_ide, zn1_2mb_vram )
22012215
22022216   MCFG_DEVICE_MODIFY( "gpu" )
r17580r17581
22042218
22052219   MCFG_MACHINE_RESET( coh1000a )
22062220
2207   MCFG_IDE_CONTROLLER_ADD("ide", jdredd_ide_interrupt, ide_devices, "hdd", NULL, true)
2221   MCFG_IDE_CONTROLLER_ADD("ide", jdredd_ide_intf, ide_devices, "hdd", NULL, true)
22082222MACHINE_CONFIG_END
22092223
22102224/*
trunk/src/mame/drivers/vertigo.c
r17580r17581
9898INPUT_PORTS_END
9999
100100
101
101static const ttl74148_config vertigo_ttl74148_intf =
102{
103   vertigo_update_irq
104};
102105/*************************************
103106 *
104107 *  Machine driver
r17580r17581
116119
117120   MCFG_PIT8254_ADD( "pit8254", vertigo_pit8254_config )
118121
119   MCFG_74148_ADD( "74148", vertigo_update_irq )
122   MCFG_74148_ADD( "74148", vertigo_ttl74148_intf )
120123
121124   /* motor controller */
122125   /*
trunk/src/mame/drivers/xtheball.c
r17580r17581
345345   MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
346346
347347   /* video hardware */
348   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
348   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
349349
350350   MCFG_SCREEN_ADD("screen", RASTER)
351351   MCFG_SCREEN_RAW_PARAMS(10000000, 640, 114, 626, 257, 24, 248)
trunk/src/mame/drivers/atlantis.c
r17580r17581
140140   16384            /* data cache size */
141141};
142142
143static const ide_config ide_intf =
144{
145   ide_interrupt,
146   NULL,
147   0
148};
143149
144150static MACHINE_CONFIG_START( mwskins, atlantis_state )
145151
r17580r17581
151157   MCFG_MACHINE_START(mwskins)
152158   MCFG_MACHINE_RESET(mwskins)
153159
154   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
160   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
155161
156162   /* video hardware */
157163   MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
trunk/src/mame/drivers/viper.c
r17580r17581
19291929   //mpc8240_interrupt(device->machine, MPC8240_IRQ3);
19301930}
19311931
1932static void voodoo_vblank(const device_t *device, int param)
1932static void voodoo_vblank(device_t *device, int state)
19331933{
19341934   mpc8240_interrupt(device->machine(), MPC8240_IRQ4);
19351935}
r17580r17581
19671967   ide_features[67*2+1] = 0x00;
19681968}
19691969
1970static const ide_config ide_intf =
1971{
1972   ide_interrupt,
1973   NULL,
1974   0
1975};
1976
1977static const voodoo_config voodoo_intf =
1978{
1979   8, //            fbmem;
1980   0,//            tmumem0;
1981   0,//            tmumem1;
1982   "screen",//         screen;
1983   "maincpu",//      cputag;
1984   voodoo_vblank,//   vblank;
1985   NULL,//            stall;
1986};
1987
19701988static MACHINE_CONFIG_START( viper, viper_state )
19711989
19721990   /* basic machine hardware */
r17580r17581
19822000   MCFG_PCI_BUS_LEGACY_DEVICE(0, "mpc8240", mpc8240_pci_r, mpc8240_pci_w)
19832001   MCFG_PCI_BUS_LEGACY_DEVICE(12, "voodoo", voodoo3_pci_r, voodoo3_pci_w)
19842002
1985   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
1986   MCFG_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, 8, "screen")
1987   MCFG_3DFX_VOODOO_CPU("maincpu")
1988   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank)
2003   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
2004   MCFG_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, voodoo_intf)
19892005
19902006   /* video hardware */
19912007   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/mame/drivers/kinst.c
r17580r17581
662662   16384            /* data cache size */
663663};
664664
665static const ide_config ide_intf =
666{
667   ide_interrupt,
668   NULL,
669   0
670};
665671
666672static MACHINE_CONFIG_START( kinst, kinst_state )
667673
r17580r17581
674680   MCFG_MACHINE_START(kinst)
675681   MCFG_MACHINE_RESET(kinst)
676682
677   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
683   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
678684
679685   /* video hardware */
680686   MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
trunk/src/mame/drivers/btoads.c
r17580r17581
332332   MCFG_NVRAM_ADD_1FILL("nvram")
333333
334334   /* video hardware */
335   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
335   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
336336
337337   MCFG_SCREEN_ADD("screen", RASTER)
338338   MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 640, 0, 512, 257, 0, 224)
trunk/src/mame/drivers/voyager.c
r17580r17581
763763   pic8259_ir1_w(drvstate->m_pic8259_1, state);
764764}
765765
766static const ide_config ide_intf =
767{
768   ide_interrupt,
769   NULL,
770   0
771};
772
766773static MACHINE_CONFIG_START( voyager, voyager_state )
767774   MCFG_CPU_ADD("maincpu", PENTIUM, 133000000) // actually AMD Duron CPU of unknown clock
768775   MCFG_CPU_PROGRAM_MAP(voyager_map)
r17580r17581
776783   MCFG_I8237_ADD( "dma8237_2", XTAL_14_31818MHz/3, dma8237_2_config )
777784   MCFG_PIC8259_ADD( "pic8259_1", voyager_pic8259_1_config )
778785   MCFG_PIC8259_ADD( "pic8259_2", voyager_pic8259_2_config )
779   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
786   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
780787
781788   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
782789   MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
trunk/src/mame/drivers/chihiro.c
r17580r17581
18221822   SLOT_INTERFACE("bb", IDE_BASEBOARD)
18231823SLOT_INTERFACE_END
18241824
1825static const ide_config ide_intf =
1826{
1827   ide_interrupt,
1828   "maincpu",
1829   AS_PROGRAM
1830};
1831
18251832static MACHINE_CONFIG_START( chihiro_base, chihiro_state )
18261833
18271834   /* basic machine hardware */
r17580r17581
18431850   MCFG_PIC8259_ADD( "pic8259_1", chihiro_pic8259_1_config )
18441851   MCFG_PIC8259_ADD( "pic8259_2", chihiro_pic8259_2_config )
18451852   MCFG_PIT8254_ADD( "pit8254", chihiro_pit8254_config )
1846   MCFG_IDE_CONTROLLER_ADD( "ide", ide_interrupt , ide_baseboard, NULL, "bb", true)
1847   MCFG_IDE_BUS_MASTER_SPACE( "ide", "maincpu", PROGRAM )
1853   MCFG_IDE_CONTROLLER_ADD( "ide", ide_intf , ide_baseboard, NULL, "bb", true)
18481854
18491855   /* video hardware */
18501856   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/mame/drivers/jaguar.c
r17580r17581
17321732   jaguar_dsp_cpu_int
17331733};
17341734
1735static const ide_config ide_intf =
1736{
1737   jaguar_external_int,
1738   NULL,
1739   0
1740};
17351741
17361742static MACHINE_CONFIG_START( cojagr3k, cojag_state )
17371743
r17580r17581
17511757   MCFG_MACHINE_RESET(cojag)
17521758   MCFG_NVRAM_ADD_1FILL("nvram")
17531759
1754   MCFG_IDE_CONTROLLER_ADD("ide", jaguar_external_int, ide_devices, "hdd", NULL, true)
1760   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
17551761
17561762   MCFG_TIMER_ADD("serial_timer", jaguar_serial_callback)
17571763
trunk/src/mame/drivers/queen.c
r17580r17581
671671
672672
673673
674static const ide_config ide_intf =
675{
676   ide_interrupt,
677   NULL,
678   0
679};
674680
675
676681static MACHINE_CONFIG_START( queen, queen_state )
677682   MCFG_CPU_ADD("maincpu", PENTIUM, 533000000/16) // Celeron or Pentium 3, 533 Mhz
678683   MCFG_CPU_PROGRAM_MAP(queen_map)
r17580r17581
693698   MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
694699   MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
695700
696   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
701   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
697702
698703   /* video hardware */
699704   MCFG_FRAGMENT_ADD( pcvideo_vga )
trunk/src/mame/drivers/taitotz.c
r17580r17581
24702470   DEVCB_DRIVER_MEMBER(taitotz_state, tlcs900_port_write),
24712471};
24722472
2473static const ide_config ide_intf =
2474{
2475   ide_interrupt,
2476   NULL,
2477   0
2478};
24732479
24742480static MACHINE_CONFIG_START( taitotz, taitotz_state )
24752481   /* IBM EMPPC603eBG-100 */
r17580r17581
24902496   MCFG_MACHINE_START( taitotz )
24912497   MCFG_MACHINE_RESET( taitotz )
24922498
2493   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
2499   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
24942500   MCFG_NVRAM_ADD_0FILL("nvram")
24952501
24962502   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/mame/drivers/djmain.c
r17580r17581
14481448   djmain_tile_callback, "none"
14491449};
14501450
1451static const ide_config ide_intf =
1452{
1453   ide_interrupt,
1454   NULL,
1455   0
1456};
1457
14511458static MACHINE_CONFIG_START( djmain, djmain_state )
14521459
14531460   /* basic machine hardware */
r17580r17581
14601467   MCFG_MACHINE_START(djmain)
14611468   MCFG_MACHINE_RESET(djmain)
14621469
1463   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
1470   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
14641471
14651472   /* video hardware */
14661473   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/mame/drivers/tickee.c
r17580r17581
774774   MCFG_TICKET_DISPENSER_ADD("ticket2", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH)
775775
776776   /* video hardware */
777   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
777   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
778778
779779   MCFG_VIDEO_START(tickee)
780780
r17580r17581
814814   MCFG_NVRAM_ADD_1FILL("nvram")
815815
816816   /* video hardware */
817   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
817   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
818818
819819   MCFG_VIDEO_START(tickee)
820820
r17580r17581
844844   MCFG_TICKET_DISPENSER_ADD("ticket2", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH)
845845
846846   /* video hardware */
847   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
847   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
848848
849849   MCFG_SCREEN_ADD("screen", RASTER)
850850   MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200)
trunk/src/mame/drivers/vcombat.c
r17580r17581
604604   MCFG_QUANTUM_PERFECT_CPU("maincpu")
605605#endif
606606
607   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
607   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
608608
609609   /* Disabled for now as it can't handle multiple screens */
610610//  MCFG_MC6845_ADD("crtc", MC6845, 6000000 / 16, mc6845_intf)
r17580r17581
641641   MCFG_NVRAM_ADD_0FILL("nvram")
642642   MCFG_MACHINE_RESET(shadfgtr)
643643
644   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
644   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
645645
646646   MCFG_MC6845_ADD("crtc", MC6845, XTAL_20MHz / 4 / 16, mc6845_intf)
647647
trunk/src/mame/drivers/savquest.c
r17580r17581
536536   machine.root_device().membank("bank1")->set_base(machine.root_device().memregion("bios")->base() + 0x20000);
537537}
538538
539static const ide_config ide_intf =
540{
541   ide_interrupt,
542   NULL,
543   0
544};
539545
540546static MACHINE_CONFIG_START( savquest, savquest_state )
541547   MCFG_CPU_ADD("maincpu", PENTIUM, 450000000)   // actually Pentium II 450
r17580r17581
557563   MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
558564   MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
559565
560   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
566   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
561567
562568   /* video hardware */
563569   MCFG_FRAGMENT_ADD( pcvideo_vga )
trunk/src/mame/drivers/cobra.c
r17580r17581
31853185   cobra->m_renderer->gfx_reset(machine);
31863186}
31873187
3188static const ide_config ide_intf =
3189{
3190   ide_interrupt,
3191   NULL,
3192   0
3193};
3194
31883195static MACHINE_CONFIG_START( cobra, cobra_state )
31893196
31903197   /* basic machine hardware */
r17580r17581
32073214   MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
32083215   MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, mpc106_pci_r, mpc106_pci_w)
32093216
3210   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
3217   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
32113218
32123219   /* video hardware */
32133220   MCFG_VIDEO_START(cobra)
trunk/src/mame/drivers/twinkle.c
r17580r17581
901901   DEVCB_NULL
902902};
903903
904static const ide_config ide_intf =
905{
906   ide_interrupt,
907   NULL,
908   0
909};
910
904911static MACHINE_CONFIG_START( twinkle, twinkle_state )
905912   /* basic machine hardware */
906913   MCFG_CPU_ADD( "maincpu", CXD8530CQ, XTAL_67_7376MHz )
r17580r17581
921928   MCFG_SCSIDEV_ADD("scsi:cdrom", SCSICD, SCSI_ID_4)
922929   MCFG_AM53CF96_ADD("scsi:am53cf96", am53cf96_intf)
923930
924   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
931   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
925932   MCFG_RTC65271_ADD("rtc", twinkle_rtc)
926933
927934   /* video hardware */
trunk/src/mame/drivers/artmagic.c
r17580r17581
849849   MCFG_NVRAM_ADD_1FILL("nvram")
850850
851851   /* video hardware */
852   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
852   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
853853
854854   MCFG_VIDEO_START(artmagic)
855855
trunk/src/mame/drivers/midqslvr.c
r17580r17581
685685   machine.root_device().membank("video_bank2")->set_base(machine.root_device().memregion("video_bios")->base() + 0x4000);
686686}
687687
688static const ide_config ide_intf =
689{
690   ide_interrupt,
691   NULL,
692   0
693};
688694
689695static MACHINE_CONFIG_START( midqslvr, midqslvr_state )
690696   MCFG_CPU_ADD("maincpu", PENTIUM, 333000000)   // actually Celeron 333
r17580r17581
706712   MCFG_PCI_BUS_LEGACY_DEVICE( 0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
707713   MCFG_PCI_BUS_LEGACY_DEVICE(31, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
708714
709   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
715   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
710716
711717   /* video hardware */
712718   MCFG_FRAGMENT_ADD( pcvideo_vga )
trunk/src/mame/drivers/coolpool.c
r17580r17581
898898   MCFG_TIMER_ADD("nvram_timer", nvram_write_timeout)
899899
900900   /* video hardware */
901   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
901   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
902902
903903   MCFG_SCREEN_ADD("screen", RASTER)
904904   MCFG_SCREEN_RAW_PARAMS(XTAL_40MHz/6, 424, 0, 320, 262, 0, 240)
trunk/src/mame/drivers/calchase.c
r17580r17581
917917   pic8259_ir1_w(drvstate->m_pic8259_1, state);
918918}
919919
920static const ide_config ide_intf =
921{
922   ide_interrupt,
923   NULL,
924   0
925};
926
920927static MACHINE_CONFIG_START( calchase, calchase_state )
921928   MCFG_CPU_ADD("maincpu", PENTIUM, 133000000) // Cyrix 686MX-PR200 CPU
922929   MCFG_CPU_PROGRAM_MAP(calchase_map)
r17580r17581
930937   MCFG_I8237_ADD( "dma8237_2", XTAL_14_31818MHz/3, dma8237_2_config )
931938   MCFG_PIC8259_ADD( "pic8259_1", calchase_pic8259_1_config )
932939   MCFG_PIC8259_ADD( "pic8259_2", calchase_pic8259_2_config )
933   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
940   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
934941
935942   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
936943   MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
trunk/src/mame/drivers/vegas.c
r17580r17581
770770   switch (offset)
771771   {
772772      case 0x00:      /* ID register: 0x0002 = SST-2, 0x121a = 3dfx */
773         if (voodoo_type == VOODOO_2)
773         if (voodoo_type == TYPE_VOODOO_2)
774774            result = 0x0002121a;
775775         else
776776            result = 0x0003121a;
r17580r17581
805805   switch (offset)
806806   {
807807      case 0x04:      /* address register */
808         if (voodoo_type == VOODOO_2)
808         if (voodoo_type == TYPE_VOODOO_2)
809809            state->m_pci_3dfx_regs[offset] &= 0xff000000;
810810         else
811811            state->m_pci_3dfx_regs[offset] &= 0xfe000000;
r17580r17581
813813         break;
814814
815815      case 0x05:      /* address register */
816         if (voodoo_type >= VOODOO_BANSHEE)
816         if (voodoo_type >= TYPE_VOODOO_BANSHEE)
817817         {
818818            state->m_pci_3dfx_regs[offset] &= 0xfe000000;
819819            remap_dynamic_addresses(space->machine());
r17580r17581
821821         break;
822822
823823      case 0x06:      /* I/O register */
824         if (voodoo_type >= VOODOO_BANSHEE)
824         if (voodoo_type >= TYPE_VOODOO_BANSHEE)
825825         {
826826            state->m_pci_3dfx_regs[offset] &= 0xffffff00;
827827            remap_dynamic_addresses(space->machine());
r17580r17581
829829         break;
830830
831831      case 0x0c:      /* romBaseAddr register */
832         if (voodoo_type >= VOODOO_BANSHEE)
832         if (voodoo_type >= TYPE_VOODOO_BANSHEE)
833833         {
834834            state->m_pci_3dfx_regs[offset] &= 0xffff0000;
835835            remap_dynamic_addresses(space->machine());
r17580r17581
16571657      base = state->m_pci_3dfx_regs[0x04] & 0xfffffff0;
16581658      if (base >= state->m_rambase.bytes() && base < 0x20000000)
16591659      {
1660         if (voodoo_type == VOODOO_2)
1660         if (voodoo_type == TYPE_VOODOO_2)
16611661            add_dynamic_device_address(state, state->m_voodoo, base + 0x000000, base + 0xffffff, voodoo_r, voodoo_w);
16621662         else
16631663            add_dynamic_device_address(state, state->m_voodoo, base + 0x000000, base + 0x1ffffff, banshee_r, banshee_w);
16641664      }
16651665
1666      if (voodoo_type >= VOODOO_BANSHEE)
1666      if (voodoo_type >= TYPE_VOODOO_BANSHEE)
16671667      {
16681668         base = state->m_pci_3dfx_regs[0x05] & 0xfffffff0;
16691669            if (base >= state->m_rambase.bytes() && base < 0x20000000)
r17580r17581
22222222   SYSTEM_CLOCK   /* system clock rate */
22232223};
22242224
2225static const ide_config ide_intf =
2226{
2227   ide_interrupt,
2228   "maincpu",
2229   AS_PROGRAM
2230};
2231
2232static const smc91c9x_config ethernet_intf =
2233{
2234   ethernet_interrupt
2235};
2236
2237static const voodoo_config voodoo_intf =
2238{
2239   2, //            fbmem;
2240   4,//            tmumem0;
2241   4,//            tmumem1;
2242   "screen",//      screen;
2243   "maincpu",//         cputag;
2244   vblank_assert,//   vblank;
2245   NULL,//            stall;
2246};
2247
22252248static MACHINE_CONFIG_START( vegascore, vegas_state )
22262249
22272250   /* basic machine hardware */
r17580r17581
22332256   MCFG_MACHINE_RESET(vegas)
22342257   MCFG_M48T37_ADD("timekeeper")
22352258
2236   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
2237   MCFG_IDE_BUS_MASTER_SPACE("ide", "maincpu", PROGRAM)
2259   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
22382260
2239   MCFG_SMC91C94_ADD("ethernet", ethernet_interrupt)
2261   MCFG_SMC91C94_ADD("ethernet", ethernet_intf)
22402262
2241   MCFG_3DFX_VOODOO_2_ADD("voodoo", STD_VOODOO_2_CLOCK, 2, "screen")
2242   MCFG_3DFX_VOODOO_CPU("maincpu")
2243   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
2244   MCFG_3DFX_VOODOO_TMU_MEMORY(1, 4)
2245   MCFG_3DFX_VOODOO_VBLANK(vblank_assert)
2263   MCFG_3DFX_VOODOO_2_ADD("voodoo", STD_VOODOO_2_CLOCK, voodoo_intf)
22462264
22472265   /* video hardware */
22482266   MCFG_SCREEN_ADD("screen", RASTER)
r17580r17581
22742292MACHINE_CONFIG_END
22752293
22762294
2295static const voodoo_config vegasban_voodoo_intf =
2296{
2297   16, //            fbmem;
2298   0,//            tmumem0;
2299   0,//            tmumem1;
2300   "screen",//      screen;
2301   "maincpu",//         cputag;
2302   vblank_assert,//   vblank;
2303   NULL,//            stall;
2304};
22772305static MACHINE_CONFIG_DERIVED( vegasban, vegascore )
22782306   MCFG_FRAGMENT_ADD(dcs2_audio_2104)
22792307
r17580r17581
22812309   MCFG_CPU_PROGRAM_MAP(vegas_map_32mb)
22822310
22832311   MCFG_DEVICE_REMOVE("voodoo")
2284   MCFG_3DFX_VOODOO_BANSHEE_ADD("voodoo", STD_VOODOO_BANSHEE_CLOCK, 16, "screen")
2285   MCFG_3DFX_VOODOO_CPU("maincpu")
2286   MCFG_3DFX_VOODOO_VBLANK(vblank_assert)
2312   MCFG_3DFX_VOODOO_BANSHEE_ADD("voodoo", STD_VOODOO_BANSHEE_CLOCK, vegasban_voodoo_intf)   
22872313MACHINE_CONFIG_END
22882314
22892315
r17580r17581
22932319   MCFG_CPU_PROGRAM_MAP(vegas_map_8mb)
22942320
22952321   MCFG_DEVICE_REMOVE("voodoo")
2296   MCFG_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, 16, "screen")
2297   MCFG_3DFX_VOODOO_CPU("maincpu")
2298   MCFG_3DFX_VOODOO_VBLANK(vblank_assert)
2322   MCFG_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, vegasban_voodoo_intf)
22992323MACHINE_CONFIG_END
23002324
23012325
r17580r17581
23072331   MCFG_CPU_PROGRAM_MAP(vegas_map_32mb)
23082332
23092333   MCFG_DEVICE_REMOVE("voodoo")
2310   MCFG_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, 16, "screen")
2311   MCFG_3DFX_VOODOO_CPU("maincpu")
2312   MCFG_3DFX_VOODOO_VBLANK(vblank_assert)
2334   MCFG_3DFX_VOODOO_3_ADD("voodoo", STD_VOODOO_3_CLOCK, vegasban_voodoo_intf)
23132335MACHINE_CONFIG_END
23142336
23152337
trunk/src/mame/drivers/magictg.c
r17580r17581
898898   0,//timer_enable_callback   /* callback for timer fired */
899899};
900900
901static const voodoo_config voodoo_1_intf =
902{
903   2, //            fbmem;
904   4,//            tmumem0;
905   0,//            tmumem1;
906   "screen",//         screen;
907   "mips",//         cputag;
908   NULL,//            vblank;
909   NULL,//            stall;
910};
901911
912static const voodoo_config voodoo_2_intf =
913{
914   2, //            fbmem;
915   4,//            tmumem0;
916   0,//            tmumem1;
917   "screen",//         screen;
918   "mips",//         cputag;
919   NULL,//vblank_assert            vblank;
920   NULL,//   voodoo_stall         stall;
921};
902922/*************************************
903923 *
904924 *  Machine driver
r17580r17581
933953#endif
934954   MCFG_PCI_BUS_LEGACY_DEVICE(9, "zr36120", zr36120_pci_r, zr36120_pci_w)
935955
936   MCFG_3DFX_VOODOO_1_ADD("voodoo_0", STD_VOODOO_1_CLOCK, 2, "screen")
937   MCFG_3DFX_VOODOO_CPU("mips")
938   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
956   MCFG_3DFX_VOODOO_1_ADD("voodoo_0", STD_VOODOO_1_CLOCK, voodoo_1_intf)
939957
940   MCFG_3DFX_VOODOO_1_ADD("voodoo_1", STD_VOODOO_1_CLOCK, 2, "screen")
941   MCFG_3DFX_VOODOO_CPU("mips")
942   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
943//  MCFG_3DFX_VOODOO_VBLANK(vblank_assert)
944//  MCFG_3DFX_VOODOO_STALL(voodoo_stall)
958   MCFG_3DFX_VOODOO_1_ADD("voodoo_1", STD_VOODOO_1_CLOCK, voodoo_2_intf)
945959
946960   MCFG_SCREEN_ADD("screen", RASTER)
947961   MCFG_SCREEN_REFRESH_RATE(60)
trunk/src/mame/drivers/xtom3d.c
r17580r17581
677677   machine.root_device().membank("video_bank2")->set_base(machine.root_device().memregion("video_bios")->base() + 0x4000);
678678}
679679
680static const ide_config ide_intf =
681{
682   ide_interrupt,
683   NULL,
684   0
685};
680686
681687static MACHINE_CONFIG_START( xtom3d, xtom3d_state )
682688   MCFG_CPU_ADD("maincpu", PENTIUM, 450000000/16)   // actually Pentium II 450
r17580r17581
698704   MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
699705   MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
700706
701   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
707   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
702708
703709   /* video hardware */
704710   MCFG_FRAGMENT_ADD( pcvideo_vga )
trunk/src/mame/drivers/gticlub.c
r17580r17581
882882   cputag_set_input_line(machine, "dsp2", INPUT_LINE_RESET, ASSERT_LINE);
883883}
884884
885static const voodoo_config voodoo_l_intf =
886{
887   2, //            fbmem;
888   2,//            tmumem0;
889   2,//            tmumem1;
890   "lscreen",//      screen;
891   "dsp",//         cputag;
892   voodoo_vblank_0,//   vblank;
893   NULL,//            stall;
894};
895
896static const voodoo_config voodoo_r_intf =
897{
898   2, //            fbmem;
899   2,//            tmumem0;
900   2,//            tmumem1;
901   "rscreen",//      screen;
902   "dsp2",//         cputag;
903   voodoo_vblank_1,//   vblank;
904   NULL,//            stall;
905};
906
885907static MACHINE_CONFIG_START( hangplt, gticlub_state )
886908
887909   /* basic machine hardware */
r17580r17581
909931   MCFG_ADC1038_ADD("adc1038", thunderh_adc1038_intf)
910932   MCFG_K056230_ADD("k056230", gticlub_k056230_intf)
911933
912   MCFG_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, 2, "lscreen")
913   MCFG_3DFX_VOODOO_CPU("dsp")
914   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 2)
915   MCFG_3DFX_VOODOO_TMU_MEMORY(1, 2)
916   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_0)
934   MCFG_3DFX_VOODOO_1_ADD("voodoo0", STD_VOODOO_1_CLOCK, voodoo_l_intf)
935   MCFG_3DFX_VOODOO_1_ADD("voodoo1", STD_VOODOO_1_CLOCK, voodoo_r_intf)
917936
918   MCFG_3DFX_VOODOO_1_ADD("voodoo1", STD_VOODOO_1_CLOCK, 2, "rscreen")
919   MCFG_3DFX_VOODOO_CPU("dsp2")
920   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 2)
921   MCFG_3DFX_VOODOO_TMU_MEMORY(1, 2)
922   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_1)
923
924937   MCFG_K033906_ADD("k033906_1", hangplt_k033906_intf_0)
925938   MCFG_K033906_ADD("k033906_2", hangplt_k033906_intf_1)
926939
trunk/src/mame/drivers/polepos.c
r17580r17581
863863   1            /* stereo */
864864};
865865
866const namco_06xx_config polepos_namco_06xx_intf =
867{
868   "maincpu", "51xx", "53xx", "52xx", "54xx"
869};
866870
871const namco_54xx_config polepos_namco_54xx_intf =
872{
873   "discrete", NODE_01
874};
875
867876/*********************************************************************
868877 * Machine driver
869878 *********************************************************************/
r17580r17581
884893   MCFG_NAMCO_51XX_ADD("51xx", MASTER_CLOCK/8/2, namco_51xx_intf)      /* 1.536 MHz */
885894   MCFG_NAMCO_52XX_ADD("52xx", MASTER_CLOCK/8/2, namco_52xx_intf)      /* 1.536 MHz */
886895   MCFG_NAMCO_53XX_ADD("53xx", MASTER_CLOCK/8/2, namco_53xx_intf)      /* 1.536 MHz */
887   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/8/2, "discrete", NODE_01)   /* 1.536 MHz */
896   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/8/2, polepos_namco_54xx_intf)   /* 1.536 MHz */
888897
889   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/8/64, "maincpu", "51xx", "53xx", "52xx", "54xx")
898   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/8/64, polepos_namco_06xx_intf)
890899
891900   MCFG_WATCHDOG_VBLANK_INIT(16)   // 128V clocks the same as VBLANK
892901
r17580r17581
945954   }
946955};
947956
957const namco_06xx_config topracern_namco_06xx_intf =
958{
959   "maincpu", "51xx", NULL, NULL, NULL
960};
948961
949962static MACHINE_CONFIG_START( topracern, polepos_state )
950963
r17580r17581
961974
962975   /* todo, remove these devices too, this bootleg doesn't have them, but the emulation doesn't boot without them.. */
963976   MCFG_NAMCO_51XX_ADD("51xx", MASTER_CLOCK/8/2, namco_51xx_bl_intf)      /* 1.536 MHz */
964   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/8/64, "maincpu", "51xx", NULL, NULL, NULL)
977   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/8/64, topracern_namco_06xx_intf)
965978
966979   MCFG_WATCHDOG_VBLANK_INIT(16)   // 128V clocks the same as VBLANK
967980
trunk/src/mame/drivers/qdrmfgp.c
r17580r17581
667667 *  Machine driver
668668 *
669669 *************************************/
670static const ide_config ide_intf =
671{
672   ide_interrupt,
673   NULL,
674   0
675};
670676
671677static MACHINE_CONFIG_START( qdrmfgp, qdrmfgp_state )
672678
r17580r17581
679685   MCFG_MACHINE_RESET(qdrmfgp)
680686   MCFG_NVRAM_ADD_1FILL("nvram")
681687
682   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
688   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
683689
684690   /* video hardware */
685691   MCFG_SCREEN_ADD("screen", RASTER)
r17580r17581
704710   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
705711MACHINE_CONFIG_END
706712
713static const ide_config qdrmfgp2_ide_intf =
714{
715   gp2_ide_interrupt,
716   NULL,
717   0
718};
707719static MACHINE_CONFIG_START( qdrmfgp2, qdrmfgp_state )
708720
709721   /* basic machine hardware */
r17580r17581
715727   MCFG_MACHINE_RESET(qdrmfgp)
716728   MCFG_NVRAM_ADD_1FILL("nvram")
717729
718   MCFG_IDE_CONTROLLER_ADD("ide", gp2_ide_interrupt, ide_devices, "hdd", NULL, true)
730   MCFG_IDE_CONTROLLER_ADD("ide", qdrmfgp2_ide_intf, ide_devices, "hdd", NULL, true)
719731
720732   /* video hardware */
721733   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/mame/drivers/itech8.c
r17580r17581
16941694   MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
16951695
16961696   /* video hardware */
1697   MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
1697   MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf)
16981698
16991699   MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
17001700   MCFG_VIDEO_START(itech8)
trunk/src/mame/drivers/seattle.c
r17580r17581
25232523   SYSTEM_CLOCK   /* system clock rate */
25242524};
25252525
2526static const ide_config ide_intf =
2527{
2528   ide_interrupt,
2529   "maincpu",
2530   AS_PROGRAM
2531};
2532
2533static const voodoo_config voodoo_intf =
2534{
2535   2, //            fbmem;
2536   4,//            tmumem0;
2537   0,//            tmumem1;
2538   "screen",//         screen;
2539   "maincpu",//         cputag;
2540   vblank_assert,//   vblank;
2541   voodoo_stall,//            stall;
2542};
2543
25262544static MACHINE_CONFIG_START( seattle_common, seattle_state )
25272545
25282546   /* basic machine hardware */
r17580r17581
25342552   MCFG_MACHINE_RESET(seattle)
25352553   MCFG_NVRAM_ADD_1FILL("nvram")
25362554
2537   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
2538   MCFG_IDE_BUS_MASTER_SPACE("ide", "maincpu", PROGRAM)
2555   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
25392556
2540   MCFG_3DFX_VOODOO_1_ADD("voodoo", STD_VOODOO_1_CLOCK, 2, "screen")
2541   MCFG_3DFX_VOODOO_CPU("maincpu")
2542   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
2543   MCFG_3DFX_VOODOO_VBLANK(vblank_assert)
2544   MCFG_3DFX_VOODOO_STALL(voodoo_stall)
2557   MCFG_3DFX_VOODOO_1_ADD("voodoo", STD_VOODOO_1_CLOCK, voodoo_intf)
25452558
25462559   /* video hardware */
25472560   MCFG_SCREEN_ADD("screen", RASTER)
r17580r17581
25712584   MCFG_CPU_PROGRAM_MAP(seattle_map)
25722585MACHINE_CONFIG_END
25732586
2587static const smc91c9x_config ethernet_intf =
2588{
2589   ethernet_interrupt
2590};
25742591
25752592static MACHINE_CONFIG_DERIVED( seattle150_widget, seattle150 )
2576   MCFG_SMC91C94_ADD("ethernet", ethernet_interrupt)
2593   MCFG_SMC91C94_ADD("ethernet", ethernet_intf)
25772594MACHINE_CONFIG_END
25782595
25792596
r17580r17581
25872604
25882605
25892606static MACHINE_CONFIG_DERIVED( seattle200_widget, seattle200 )
2590   MCFG_SMC91C94_ADD("ethernet", ethernet_interrupt)
2607   MCFG_SMC91C94_ADD("ethernet", ethernet_intf)
25912608MACHINE_CONFIG_END
25922609
2610static const voodoo_config voodoo_2_intf =
2611{
2612   2, //            fbmem;
2613   4,//            tmumem0;
2614   4,//            tmumem1;
2615   "screen",//         screen;
2616   "maincpu",//         cputag;
2617   vblank_assert,//   vblank;
2618   voodoo_stall,//            stall;
2619};
25932620
25942621static MACHINE_CONFIG_DERIVED( flagstaff, seattle_common )
25952622   MCFG_FRAGMENT_ADD(cage_seattle)
r17580r17581
25982625   MCFG_CPU_CONFIG(r5000_config)
25992626   MCFG_CPU_PROGRAM_MAP(seattle_map)
26002627
2601   MCFG_SMC91C94_ADD("ethernet", ethernet_interrupt)
2628   MCFG_SMC91C94_ADD("ethernet", ethernet_intf)
26022629
2603   MCFG_3DFX_VOODOO_MODIFY("voodoo")
2604   MCFG_3DFX_VOODOO_TMU_MEMORY(1, 4)
2630   MCFG_DEVICE_REMOVE("voodoo")
2631   MCFG_3DFX_VOODOO_1_ADD("voodoo", STD_VOODOO_1_CLOCK, voodoo_2_intf)
26052632MACHINE_CONFIG_END
26062633
26072634
trunk/src/mame/drivers/midvunit.c
r17580r17581
10431043   MCFG_FRAGMENT_ADD(dcs_audio_2k)
10441044MACHINE_CONFIG_END
10451045
1046static const ide_config ide_intf =
1047{
1048   NULL,
1049   NULL,
1050   0
1051};
10461052
10471053static MACHINE_CONFIG_DERIVED( midvplus, midvcommon )
10481054
r17580r17581
10551061   MCFG_DEVICE_REMOVE("nvram")
10561062   MCFG_NVRAM_HANDLER(midway_serial_pic2)
10571063
1058   MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_devices, "hdd", NULL, true)
1064   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
10591065
10601066   /* sound hardware */
10611067   MCFG_FRAGMENT_ADD(dcs2_audio_2115)
trunk/src/mame/drivers/galaga.c
r17580r17581
16551655      device_set_input_line(device, 0, ASSERT_LINE);
16561656}
16571657
1658const namco_06xx_config bosco_namco_06xx_0_intf =
1659{
1660   "maincpu", "51xx",   NULL,   "50xx_1", "54xx"
1661};
1662
1663const namco_06xx_config bosco_namco_06xx_1_intf =
1664{
1665   "sub",     "50xx_2", "52xx", NULL,     NULL
1666};
1667
1668const namco_54xx_config namco_54xx_intf =
1669{
1670   "discrete", NODE_01
1671};
1672
16581673static MACHINE_CONFIG_START( bosco, bosco_state )
16591674
16601675   /* basic machine hardware */
r17580r17581
16731688   MCFG_NAMCO_50XX_ADD("50xx_2", MASTER_CLOCK/6/2)   /* 1.536 MHz */
16741689   MCFG_NAMCO_51XX_ADD("51xx", MASTER_CLOCK/6/2, namco_51xx_intf)      /* 1.536 MHz */
16751690   MCFG_NAMCO_52XX_ADD("52xx", MASTER_CLOCK/6/2, namco_52xx_intf)      /* 1.536 MHz */
1676   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/6/2, "discrete", NODE_01)   /* 1.536 MHz */
1691   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/6/2, namco_54xx_intf)      /* 1.536 MHz */
16771692
1678   MCFG_NAMCO_06XX_ADD("06xx_0", MASTER_CLOCK/6/64, "maincpu", "51xx",   NULL,   "50xx_1", "54xx")
1679   MCFG_NAMCO_06XX_ADD("06xx_1", MASTER_CLOCK/6/64, "sub",     "50xx_2", "52xx", NULL,     NULL)
1693   MCFG_NAMCO_06XX_ADD("06xx_0", MASTER_CLOCK/6/64, bosco_namco_06xx_0_intf)
1694   MCFG_NAMCO_06XX_ADD("06xx_1", MASTER_CLOCK/6/64, bosco_namco_06xx_1_intf)
16801695
16811696   MCFG_WATCHDOG_VBLANK_INIT(8)
16821697   MCFG_QUANTUM_TIME(attotime::from_hz(6000))   /* 100 CPU slices per frame - an high value to ensure proper */
r17580r17581
17101725MACHINE_CONFIG_END
17111726
17121727
1728const namco_06xx_config galaga_namco_06xx_intf =
1729{
1730   "maincpu", "51xx", NULL, NULL, "54xx"
1731};
1732
17131733static MACHINE_CONFIG_START( galaga, galaga_state )
17141734
17151735   /* basic machine hardware */
r17580r17581
17251745   MCFG_CPU_PROGRAM_MAP(galaga_map)
17261746
17271747   MCFG_NAMCO_51XX_ADD("51xx", MASTER_CLOCK/6/2, namco_51xx_intf)      /* 1.536 MHz */
1728   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/6/2, "discrete", NODE_01)   /* 1.536 MHz */
1748   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/6/2, namco_54xx_intf)      /* 1.536 MHz */
17291749
1730   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", NULL, NULL, "54xx")
1750   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, galaga_namco_06xx_intf)
17311751
17321752   MCFG_WATCHDOG_VBLANK_INIT(8)
17331753   MCFG_QUANTUM_TIME(attotime::from_hz(6000))   /* 100 CPU slices per frame - an high value to ensure proper */
r17580r17581
17601780   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
17611781MACHINE_CONFIG_END
17621782
1783const namco_06xx_config galagab_namco_06xx_intf =
1784{
1785   "maincpu", "51xx", NULL, NULL, NULL
1786};
1787
17631788static MACHINE_CONFIG_DERIVED( galagab, galaga )
17641789
17651790   /* basic machine hardware */
r17580r17581
17681793   MCFG_DEVICE_REMOVE("06xx")
17691794
17701795   /* FIXME: bootlegs should not have any Namco custom chip. However, this workaround is needed atm */
1771   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", NULL, NULL, NULL)
1796   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, galagab_namco_06xx_intf)
17721797
17731798   MCFG_CPU_ADD("sub3", Z80, MASTER_CLOCK/6)   /* 3.072 MHz */
17741799   MCFG_CPU_PROGRAM_MAP(galaga_mem4)
r17580r17581
17771802   MCFG_DEVICE_REMOVE("discrete")
17781803MACHINE_CONFIG_END
17791804
1805const namco_06xx_config xevious_namco_06xx_intf =
1806{
1807   "maincpu", "51xx", NULL, "50xx", "54xx"
1808};
17801809
17811810static MACHINE_CONFIG_START( xevious, xevious_state )
17821811
r17580r17581
17941823
17951824   MCFG_NAMCO_50XX_ADD("50xx", MASTER_CLOCK/6/2)   /* 1.536 MHz */
17961825   MCFG_NAMCO_51XX_ADD("51xx", MASTER_CLOCK/6/2, namco_51xx_intf)      /* 1.536 MHz */
1797   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/6/2, "discrete", NODE_01)   /* 1.536 MHz */
1826   MCFG_NAMCO_54XX_ADD("54xx", MASTER_CLOCK/6/2, namco_54xx_intf)      /* 1.536 MHz */
17981827
1799   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", NULL, "50xx", "54xx")
1828   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, xevious_namco_06xx_intf)
18001829
18011830   MCFG_WATCHDOG_VBLANK_INIT(8)
18021831   MCFG_QUANTUM_TIME(attotime::from_hz(60000))   /* 1000 CPU slices per frame - an high value to ensure proper */
r17580r17581
18281857   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
18291858MACHINE_CONFIG_END
18301859
1860const namco_06xx_config battles_namco_06xx_intf =
1861{
1862   "maincpu", "51xx", NULL, NULL, NULL
1863};
1864
18311865static MACHINE_CONFIG_DERIVED( battles, xevious )
18321866
18331867   /* basic machine hardware */
r17580r17581
18371871   MCFG_DEVICE_REMOVE("06xx")
18381872
18391873   /* FIXME: bootlegs should not have any Namco custom chip. However, this workaround is needed atm */
1840   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", NULL, NULL, NULL)
1874   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, battles_namco_06xx_intf)
18411875
18421876   MCFG_CPU_ADD("sub3", Z80, MASTER_CLOCK/6)   /* 3.072 MHz */
18431877   MCFG_CPU_PROGRAM_MAP(battles_mem4)
r17580r17581
18571891   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
18581892MACHINE_CONFIG_END
18591893
1894const namco_06xx_config digdug_namco_06xx_intf =
1895{
1896   "maincpu", "51xx", "53xx", NULL, NULL
1897};
18601898
18611899static MACHINE_CONFIG_START( digdug, digdug_state )
18621900
r17580r17581
18751913   MCFG_NAMCO_51XX_ADD("51xx", MASTER_CLOCK/6/2, namco_51xx_intf)      /* 1.536 MHz */
18761914   MCFG_NAMCO_53XX_ADD("53xx", MASTER_CLOCK/6/2, namco_53xx_intf)      /* 1.536 MHz */
18771915
1878   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, "maincpu", "51xx", "53xx", NULL, NULL)
1916   MCFG_NAMCO_06XX_ADD("06xx", MASTER_CLOCK/6/64, digdug_namco_06xx_intf)
18791917
18801918   MCFG_QUANTUM_TIME(attotime::from_hz(6000))   /* 100 CPU slices per frame - an high value to ensure proper */
18811919                     /* synchronization of the CPUs */
trunk/src/mame/drivers/taitowlf.c
r17580r17581
616616}
617617#endif
618618
619static const ide_config ide_intf =
620{
621   ide_interrupt,
622   NULL,
623   0
624};
625
619626static MACHINE_CONFIG_START( taitowlf, taitowlf_state )
620627
621628   /* basic machine hardware */
r17580r17581
635642   MCFG_I8237_ADD( "dma8237_2", XTAL_14_31818MHz/3, dma8237_2_config )
636643   MCFG_PIC8259_ADD( "pic8259_1", taitowlf_pic8259_1_config )
637644   MCFG_PIC8259_ADD( "pic8259_2", taitowlf_pic8259_2_config )
638   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
645   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
639646   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
640647
641648   /* video hardware */
trunk/src/mame/drivers/taitogn.c
r17580r17581
938938   }
939939}
940940
941static const ide_config ide_intf =
942{
943   NULL,
944   NULL,
945   0
946};
947
941948static MACHINE_CONFIG_START( coh3002t, taitogn_state )
942949   /* basic machine hardware */
943950   MCFG_CPU_ADD( "maincpu", CXD8661R, XTAL_100MHz )
r17580r17581
956963   MCFG_MACHINE_RESET( coh3002t )
957964
958965   MCFG_AT28C16_ADD( "at28c16", 0 )
959   MCFG_IDE_CONTROLLER_ADD( "card", 0, ide_devices, "hdd", NULL, true)
966   MCFG_IDE_CONTROLLER_ADD( "card", ide_intf, ide_devices, "hdd", NULL, true)
960967
961968   MCFG_MB3773_ADD("mb3773")
962969
trunk/src/mame/drivers/funkball.c
r17580r17581
116116   required_device<i8237_device> m_dma8237_2;
117117   required_device<pic8259_device> m_pic8259_1;
118118   required_device<pic8259_device> m_pic8259_2;
119   required_device<voodoo_device> m_voodoo;
119   required_device<voodoo_1_device> m_voodoo;
120120
121121   required_shared_ptr<UINT32> m_unk_ram;
122122
r17580r17581
11401140   return 0;
11411141}
11421142
1143static const ide_config ide_intf =
1144{
1145   ide_interrupt,
1146   NULL,
1147   0
1148};
1149
1150static const voodoo_config voodoo_intf =
1151{
1152   2, //            fbmem;
1153   4,//            tmumem0;
1154   0,//            tmumem1;
1155   "screen",//         screen;
1156   "maincpu",//      cputag;
1157   NULL,//            vblank;
1158   NULL,//            stall;
1159};
1160
11431161static MACHINE_CONFIG_START( funkball, funkball_state )
11441162   MCFG_CPU_ADD("maincpu", MEDIAGX, 66666666*3.5) // 66,6 MHz x 3.5
11451163   MCFG_CPU_PROGRAM_MAP(funkball_map)
r17580r17581
11601178   MCFG_PCI_BUS_LEGACY_DEVICE(7, "voodoo_0", voodoo_0_pci_r, voodoo_0_pci_w)
11611179   MCFG_PCI_BUS_LEGACY_DEVICE(18, NULL, cx5510_pci_r, cx5510_pci_w)
11621180
1163   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
1181   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
11641182
11651183   /* video hardware */
1166   MCFG_3DFX_VOODOO_1_ADD("voodoo_0", STD_VOODOO_1_CLOCK, 2, "screen")
1167   MCFG_3DFX_VOODOO_CPU("maincpu")
1168   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 4)
1184   MCFG_3DFX_VOODOO_1_ADD("voodoo_0", STD_VOODOO_1_CLOCK, voodoo_intf)
11691185
11701186   MCFG_SCREEN_ADD("screen", RASTER)
11711187   MCFG_SCREEN_REFRESH_RATE(60)
trunk/src/mame/drivers/gamecstl.c
r17580r17581
685685   }
686686};
687687
688static const ide_config ide_intf =
689{
690   ide_interrupt,
691   NULL,
692   0
693};
694
688695static MACHINE_CONFIG_START( gamecstl, gamecstl_state )
689696
690697   /* basic machine hardware */
r17580r17581
709716
710717   MCFG_PIC8259_ADD( "pic8259_2", gamecstl_pic8259_2_config )
711718
712   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_devices, "hdd", NULL, true)
719   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true)
713720
714721   MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
715722
trunk/src/mame/drivers/nwk-tr.c
r17580r17581
677677   cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
678678}
679679
680static const voodoo_config voodoo_intf =
681{
682   2, //            fbmem;
683   2,//            tmumem0;
684   2,//            tmumem1;
685   "screen",//         screen;
686   "dsp",//         cputag;
687   voodoo_vblank_0,//   vblank;
688   NULL,//            stall;
689};
690
680691static MACHINE_CONFIG_START( nwktr, nwktr_state )
681692
682693   /* basic machine hardware */
r17580r17581
695706   MCFG_MACHINE_START(nwktr)
696707   MCFG_MACHINE_RESET(nwktr)
697708
698   MCFG_3DFX_VOODOO_1_ADD("voodoo", STD_VOODOO_1_CLOCK, 2, "screen")
699   MCFG_3DFX_VOODOO_CPU("dsp")
700   MCFG_3DFX_VOODOO_TMU_MEMORY(0, 2)
701   MCFG_3DFX_VOODOO_TMU_MEMORY(1, 2)
702   MCFG_3DFX_VOODOO_VBLANK(voodoo_vblank_0)
709   MCFG_3DFX_VOODOO_1_ADD("voodoo", STD_VOODOO_1_CLOCK, voodoo_intf)
703710
704711   MCFG_K033906_ADD("k033906_1", nwktr_k033906_interface)
705712
trunk/src/emu/video/tlc34076.c
r17580r17581
3535   rgb_t pens[0x100];
3636};
3737
38const tlc34076_config tlc34076_6_bit_intf =
39{
40   TLC34076_6_BIT
41};
3842
43
3944/*************************************
4045 *
4146 *  Inline functions
r17580r17581
262267
263268static DEVICE_START( tlc34076 )
264269{
265   tlc34076_config *config = (tlc34076_config *)downcast<const legacy_device_base *>(device)->inline_config();
270   tlc34076_config *config = (tlc34076_config *)device->static_config();
266271   tlc34076_state *state = get_safe_token(device);
267272
268273   state->dacbits = config->res_sel ? 8 : 6;
r17580r17581
282287 {
283288  case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(tlc34076_state); break;
284289
285  case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(tlc34076_config); break;
286
287290  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(tlc34076); break;
288291
289292  case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(tlc34076); break;
trunk/src/emu/video/tlc34076.h
r17580r17581
2323   int res_sel;
2424};
2525
26extern const tlc34076_config tlc34076_6_bit_intf;
27
2628DECLARE_LEGACY_DEVICE(TLC34076, tlc34076);
2729
2830
r17580r17581
3032    DEVICE CONFIGURATION MACROS
3133***************************************************************************/
3234
33#define MCFG_TLC34076_ADD(_tag, _res_sel) \
35#define MCFG_TLC34076_ADD(_tag, _config) \
3436   MCFG_DEVICE_ADD(_tag, TLC34076, 0) \
35   MCFG_DEVICE_CONFIG_DATA32(tlc34076_config, res_sel, _res_sel)
37   MCFG_DEVICE_CONFIG(_config)
3638
3739
3840/***************************************************************************
trunk/src/emu/video/voodoo.c
r17580r17581
314314INLINE voodoo_state *get_safe_token(device_t *device)
315315{
316316   assert(device != NULL);
317   assert(device->type() == VOODOO_GRAPHICS);
317   assert((device->type() == VOODOO_1) || (device->type() == VOODOO_2) || (device->type() == VOODOO_BANSHEE) ||  (device->type() == VOODOO_3));
318318
319319   return (voodoo_state *)downcast<legacy_device_base *>(device)->token();
320320}
r17580r17581
339339   v->fbi.video_changed = FALSE;
340340
341341   /* if we are blank, just fill with black */
342   if (v->type <= VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(v->reg[fbiInit1].u))
342   if (v->type <= TYPE_VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(v->reg[fbiInit1].u))
343343   {
344344      bitmap.fill(0, cliprect);
345345      return changed;
r17580r17581
351351      UINT8 rtable[32], gtable[64], btable[32];
352352
353353      /* Voodoo/Voodoo-2 have an internal 33-entry CLUT */
354      if (v->type <= VOODOO_2)
354      if (v->type <= TYPE_VOODOO_2)
355355      {
356356         /* kludge: some of the Midway games write 0 to the last entry when they obviously mean FF */
357357         if ((v->fbi.clut[32] & 0xffffff) == 0 && (v->fbi.clut[31] & 0xffffff) != 0)
r17580r17581
512512
513513   /* init the pens */
514514   f->clut_dirty = TRUE;
515   if (v->type <= VOODOO_2)
515   if (v->type <= TYPE_VOODOO_2)
516516   {
517517      for (pen = 0; pen < 32; pen++)
518518         v->fbi.clut[pen] = MAKE_ARGB(pen, pal5bit(pen), pal5bit(pen), pal5bit(pen));
r17580r17581
533533   f->fifo.size = f->fifo.in = f->fifo.out = 0;
534534
535535   /* set the fog delta mask */
536   f->fogdelta_mask = (v->type < VOODOO_2) ? 0xff : 0xfc;
536   f->fogdelta_mask = (v->type < TYPE_VOODOO_2) ? 0xff : 0xfc;
537537}
538538
539539
r17580r17581
589589   t->mask = tmem - 1;
590590   t->reg = reg;
591591   t->regdirty = TRUE;
592   t->bilinear_mask = (v->type >= VOODOO_2) ? 0xff : 0xf0;
592   t->bilinear_mask = (v->type >= TYPE_VOODOO_2) ? 0xff : 0xf0;
593593
594594   /* mark the NCC tables dirty and configure their registers */
595595   t->ncc[0].dirty = t->ncc[1].dirty = TRUE;
r17580r17581
603603   t->texel[3] = v->tmushare.int8;
604604   t->texel[4] = v->tmushare.ai44;
605605   t->texel[5] = t->palette;
606   t->texel[6] = (v->type >= VOODOO_2) ? t->palettea : NULL;
606   t->texel[6] = (v->type >= TYPE_VOODOO_2) ? t->palettea : NULL;
607607   t->texel[7] = NULL;
608608   t->texel[8] = v->tmushare.rgb332;
609609   t->texel[9] = t->ncc[0].texel;
r17580r17581
617617
618618   /* attach the palette to NCC table 0 */
619619   t->ncc[0].palette = t->palette;
620   if (v->type >= VOODOO_2)
620   if (v->type >= TYPE_VOODOO_2)
621621      t->ncc[0].palettea = t->palettea;
622622
623623   /* set up texture address calculations */
624   if (v->type <= VOODOO_2)
624   if (v->type <= TYPE_VOODOO_2)
625625   {
626626      t->texaddr_mask = 0x0fffff;
627627      t->texaddr_shift = 3;
r17580r17581
647647   }
648648
649649   /* recompute video memory to get the FBI FIFO base recomputed */
650   if (v->type <= VOODOO_2)
650   if (v->type <= TYPE_VOODOO_2)
651651      recompute_video_memory(v);
652652}
653653
r17580r17581
799799   }
800800
801801   /* register states: banshee */
802   if (v->type >= VOODOO_BANSHEE)
802   if (v->type >= TYPE_VOODOO_BANSHEE)
803803   {
804804      device->save_item(NAME(v->banshee.io));
805805      device->save_item(NAME(v->banshee.agp));
r17580r17581
883883   v->reg[fbiSwapHistory].u = (v->reg[fbiSwapHistory].u << 4) | count;
884884
885885   /* rotate the buffers */
886   if (v->type <= VOODOO_2)
886   if (v->type <= TYPE_VOODOO_2)
887887   {
888      if (v->type < VOODOO_2 || !v->fbi.vblank_dont_swap)
888      if (v->type < TYPE_VOODOO_2 || !v->fbi.vblank_dont_swap)
889889      {
890890         if (v->fbi.rgboffs[2] == ~0)
891891         {
r17580r17581
10001000   v->fbi.vblank = FALSE;
10011001
10021002   // TODO: Vblank IRQ enable is VOODOO3 only?
1003   if (v->type >= VOODOO_3)
1003   if (v->type >= TYPE_VOODOO_3)
10041004   {
10051005      if (v->reg[intrCtrl].u & 0x8)      // call IRQ handler if VSYNC interrupt (falling) is enabled
10061006      {
r17580r17581
10561056   v->fbi.vblank = TRUE;
10571057
10581058   // TODO: Vblank IRQ enable is VOODOO3 only?
1059   if (v->type >= VOODOO_3)
1059   if (v->type >= TYPE_VOODOO_3)
10601060   {
10611061      if (v->reg[intrCtrl].u & 0x4)      // call IRQ handler if VSYNC interrupt (rising) is enabled
10621062      {
r17580r17581
11181118
11191119   /* memory config is determined differently between V1 and V2 */
11201120   memory_config = FBIINIT2_ENABLE_TRIPLE_BUF(v->reg[fbiInit2].u);
1121   if (v->type == VOODOO_2 && memory_config == 0)
1121   if (v->type == TYPE_VOODOO_2 && memory_config == 0)
11221122      memory_config = FBIINIT5_BUFFER_ALLOCATION(v->reg[fbiInit5].u);
11231123
11241124   /* tiles are 64x16/32; x_tiles specifies how many half-tiles */
1125   v->fbi.tile_width = (v->type == VOODOO_1) ? 64 : 32;
1126   v->fbi.tile_height = (v->type == VOODOO_1) ? 16 : 32;
1125   v->fbi.tile_width = (v->type == TYPE_VOODOO_1) ? 64 : 32;
1126   v->fbi.tile_height = (v->type == TYPE_VOODOO_1) ? 16 : 32;
11271127   v->fbi.x_tiles = FBIINIT1_X_VIDEO_TILES(v->reg[fbiInit1].u);
1128   if (v->type == VOODOO_2)
1128   if (v->type == TYPE_VOODOO_2)
11291129   {
11301130      v->fbi.x_tiles = (v->fbi.x_tiles << 1) |
11311131                  (FBIINIT1_X_VIDEO_TILES_BIT5(v->reg[fbiInit1].u) << 5) |
r17580r17581
17221722
17231723         if (LOG_CMDFIFO) logerror("  PACKET TYPE 1: count=%d inc=%d reg=%04X\n", count, inc, target);
17241724
1725         if (v->type >= VOODOO_BANSHEE && (target & 0x800))
1725         if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800))
17261726         {
17271727            //  Banshee/Voodoo3 2D register writes
17281728
r17580r17581
19001900
19011901         if (LOG_CMDFIFO) logerror("  PACKET TYPE 4: mask=%X reg=%04X pad=%d\n", (command >> 15) & 0x3fff, target, command >> 29);
19021902
1903         if (v->type >= VOODOO_BANSHEE && (target & 0x800))
1903         if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800))
19041904         {
19051905            //  Banshee/Voodoo3 2D register writes
19061906
r17580r17581
24472447      /* mask off invalid bits for different cards */
24482448      case fbzColorPath:
24492449         poly_wait(v->poly, v->regnames[regnum]);
2450         if (v->type < VOODOO_2)
2450         if (v->type < TYPE_VOODOO_2)
24512451            data &= 0x0fffffff;
24522452         if (chips & 1) v->reg[fbzColorPath].u = data;
24532453         break;
24542454
24552455      case fbzMode:
24562456         poly_wait(v->poly, v->regnames[regnum]);
2457         if (v->type < VOODOO_2)
2457         if (v->type < TYPE_VOODOO_2)
24582458            data &= 0x001fffff;
24592459         if (chips & 1) v->reg[fbzMode].u = data;
24602460         break;
24612461
24622462      case fogMode:
24632463         poly_wait(v->poly, v->regnames[regnum]);
2464         if (v->type < VOODOO_2)
2464         if (v->type < TYPE_VOODOO_2)
24652465            data &= 0x0000003f;
24662466         if (chips & 1) v->reg[fogMode].u = data;
24672467         break;
r17580r17581
25192519
25202520      /* gamma table access -- Voodoo/Voodoo2 only */
25212521      case clutData:
2522         if (v->type <= VOODOO_2 && (chips & 1))
2522         if (v->type <= TYPE_VOODOO_2 && (chips & 1))
25232523         {
25242524            poly_wait(v->poly, v->regnames[regnum]);
25252525            if (!FBIINIT1_VIDEO_TIMING_RESET(v->reg[fbiInit1].u))
r17580r17581
25382538
25392539      /* external DAC access -- Voodoo/Voodoo2 only */
25402540      case dacData:
2541         if (v->type <= VOODOO_2 && (chips & 1))
2541         if (v->type <= TYPE_VOODOO_2 && (chips & 1))
25422542         {
25432543            poly_wait(v->poly, v->regnames[regnum]);
25442544            if (!(data & 0x800))
r17580r17581
25532553      case vSync:
25542554      case backPorch:
25552555      case videoDimensions:
2556         if (v->type <= VOODOO_2 && (chips & 1))
2556         if (v->type <= TYPE_VOODOO_2 && (chips & 1))
25572557         {
25582558            poly_wait(v->poly, v->regnames[regnum]);
25592559            v->reg[regnum].u = data;
r17580r17581
25652565               attoseconds_t stddiff, meddiff, vgadiff;
25662566               rectangle visarea;
25672567
2568               if (v->type == VOODOO_2)
2568               if (v->type == TYPE_VOODOO_2)
25692569               {
25702570                  htotal = ((v->reg[hSync].u >> 16) & 0x7ff) + 1 + (v->reg[hSync].u & 0x1ff) + 1;
25712571                  vtotal = ((v->reg[vSync].u >> 16) & 0x1fff) + (v->reg[vSync].u & 0x1fff);
r17580r17581
26452645      /* fbiInit0 can only be written if initEnable says we can -- Voodoo/Voodoo2 only */
26462646      case fbiInit0:
26472647         poly_wait(v->poly, v->regnames[regnum]);
2648         if (v->type <= VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
2648         if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
26492649         {
26502650            v->reg[fbiInit0].u = data;
26512651            if (FBIINIT0_GRAPHICS_RESET(data))
r17580r17581
26592659      /* fbiInit5-7 are Voodoo 2-only; ignore them on anything else */
26602660      case fbiInit5:
26612661      case fbiInit6:
2662         if (v->type < VOODOO_2)
2662         if (v->type < TYPE_VOODOO_2)
26632663            break;
26642664         /* else fall through... */
26652665
r17580r17581
26692669      case fbiInit2:
26702670      case fbiInit4:
26712671         poly_wait(v->poly, v->regnames[regnum]);
2672         if (v->type <= VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
2672         if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
26732673         {
26742674            v->reg[regnum].u = data;
26752675            recompute_video_memory(v);
r17580r17581
26792679
26802680      case fbiInit3:
26812681         poly_wait(v->poly, v->regnames[regnum]);
2682         if (v->type <= VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
2682         if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
26832683         {
26842684            v->reg[regnum].u = data;
26852685            v->alt_regmap = FBIINIT3_TRI_REGISTER_REMAP(data);
r17580r17581
26902690
26912691      case fbiInit7:
26922692/*      case swapPending: -- Banshee */
2693         if (v->type == VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
2693         if (v->type == TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
26942694         {
26952695            poly_wait(v->poly, v->regnames[regnum]);
26962696            v->reg[regnum].u = data;
26972697            v->fbi.cmdfifo[0].enable = FBIINIT7_CMDFIFO_ENABLE(data);
26982698            v->fbi.cmdfifo[0].count_holes = !FBIINIT7_DISABLE_CMDFIFO_HOLES(data);
26992699         }
2700         else if (v->type >= VOODOO_BANSHEE)
2700         else if (v->type >= TYPE_VOODOO_BANSHEE)
27012701            v->fbi.swaps_pending++;
27022702         break;
27032703
27042704      /* cmdFifo -- Voodoo2 only */
27052705      case cmdFifoBaseAddr:
2706         if (v->type == VOODOO_2 && (chips & 1))
2706         if (v->type == TYPE_VOODOO_2 && (chips & 1))
27072707         {
27082708            poly_wait(v->poly, v->regnames[regnum]);
27092709            v->reg[regnum].u = data;
r17580r17581
27132713         break;
27142714
27152715      case cmdFifoBump:
2716         if (v->type == VOODOO_2 && (chips & 1))
2716         if (v->type == TYPE_VOODOO_2 && (chips & 1))
27172717            fatalerror("cmdFifoBump");
27182718         break;
27192719
27202720      case cmdFifoRdPtr:
2721         if (v->type == VOODOO_2 && (chips & 1))
2721         if (v->type == TYPE_VOODOO_2 && (chips & 1))
27222722            v->fbi.cmdfifo[0].rdptr = data;
27232723         break;
27242724
27252725      case cmdFifoAMin:
27262726/*      case colBufferAddr: -- Banshee */
2727         if (v->type == VOODOO_2 && (chips & 1))
2727         if (v->type == TYPE_VOODOO_2 && (chips & 1))
27282728            v->fbi.cmdfifo[0].amin = data;
2729         else if (v->type >= VOODOO_BANSHEE && (chips & 1))
2729         else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
27302730            v->fbi.rgboffs[1] = data & v->fbi.mask & ~0x0f;
27312731         break;
27322732
27332733      case cmdFifoAMax:
27342734/*      case colBufferStride: -- Banshee */
2735         if (v->type == VOODOO_2 && (chips & 1))
2735         if (v->type == TYPE_VOODOO_2 && (chips & 1))
27362736            v->fbi.cmdfifo[0].amax = data;
2737         else if (v->type >= VOODOO_BANSHEE && (chips & 1))
2737         else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
27382738         {
27392739            if (data & 0x8000)
27402740               v->fbi.rowpixels = (data & 0x7f) << 6;
r17580r17581
27452745
27462746      case cmdFifoDepth:
27472747/*      case auxBufferAddr: -- Banshee */
2748         if (v->type == VOODOO_2 && (chips & 1))
2748         if (v->type == TYPE_VOODOO_2 && (chips & 1))
27492749            v->fbi.cmdfifo[0].depth = data;
2750         else if (v->type >= VOODOO_BANSHEE && (chips & 1))
2750         else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
27512751            v->fbi.auxoffs = data & v->fbi.mask & ~0x0f;
27522752         break;
27532753
27542754      case cmdFifoHoles:
27552755/*      case auxBufferStride: -- Banshee */
2756         if (v->type == VOODOO_2 && (chips & 1))
2756         if (v->type == TYPE_VOODOO_2 && (chips & 1))
27572757            v->fbi.cmdfifo[0].holes = data;
2758         else if (v->type >= VOODOO_BANSHEE && (chips & 1))
2758         else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
27592759         {
27602760            int rowpixels;
27612761
r17580r17581
31213121      mask &= ~(0xf0 + LFB_DEPTH_PRESENT_MSW);
31223122
31233123   /* select the target buffer */
3124   destbuf = (v->type >= VOODOO_BANSHEE) ? (!forcefront) : LFBMODE_WRITE_BUFFER_SELECT(v->reg[lfbMode].u);
3124   destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? (!forcefront) : LFBMODE_WRITE_BUFFER_SELECT(v->reg[lfbMode].u);
31253125   switch (destbuf)
31263126   {
31273127      case 0:         /* front buffer */
r17580r17581
33173317      UINT8 *dest;
33183318
33193319      /* extract info */
3320      if (v->type <= VOODOO_2)
3320      if (v->type <= TYPE_VOODOO_2)
33213321      {
33223322         lod = (offset >> 15) & 0x0f;
33233323         tt = (offset >> 7) & 0xff;
r17580r17581
33623362      UINT16 *dest;
33633363
33643364      /* extract info */
3365      if (v->type <= VOODOO_2)
3365      if (v->type <= TYPE_VOODOO_2)
33663366      {
33673367         lod = (offset >> 15) & 0x0f;
33683368         tt = (offset >> 7) & 0xff;
r17580r17581
35543554      UINT8 access;
35553555
35563556      /* some special stuff for Voodoo 2 */
3557      if (v->type >= VOODOO_2)
3557      if (v->type >= TYPE_VOODOO_2)
35583558      {
35593559         /* we might be in CMDFIFO mode */
35603560         if (FBIINIT7_CMDFIFO_ENABLE(v->reg[fbiInit7].u))
r17580r17581
37623762            result |= 1 << 9;
37633763
37643764         /* Banshee is different starting here */
3765         if (v->type < VOODOO_BANSHEE)
3765         if (v->type < TYPE_VOODOO_BANSHEE)
37663766         {
37673767            /* bits 11:10 specifies which buffer is visible */
37683768            result |= v->fbi.frontbuf << 10;
r17580r17581
39063906   y = (offset >> 9) & 0x3ff;
39073907
39083908   /* select the target buffer */
3909   destbuf = (v->type >= VOODOO_BANSHEE) ? (!forcefront) : LFBMODE_READ_BUFFER_SELECT(v->reg[lfbMode].u);
3909   destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? (!forcefront) : LFBMODE_READ_BUFFER_SELECT(v->reg[lfbMode].u);
39103910   switch (destbuf)
39113911   {
39123912      case 0:         /* front buffer */
r17580r17581
48074807    device start callback
48084808-------------------------------------------------*/
48094809
4810static DEVICE_START( voodoo )
4810static void common_start_voodoo(device_t *device, UINT8 type)
48114811{
4812   const voodoo_config *config = (const voodoo_config *)downcast<const legacy_device_base *>(device)->inline_config();
4812   const voodoo_config *config = (const voodoo_config *)device->static_config();
48134813   voodoo_state *v = get_safe_token(device);
48144814   const raster_info *info;
48154815   void *fbmem, *tmumem[2];
48164816   UINT32 tmumem0;
48174817   int val;
48184818
4819   /* validate some basic stuff */
4820   assert(device->static_config() == NULL);
4821   assert(downcast<const legacy_device_base *>(device)->inline_config() != NULL);
4822
48234819   /* validate configuration */
48244820   assert(config->screen != NULL);
48254821   assert(config->cputag != NULL);
4826   assert(config->type >= VOODOO_1 && config->type < MAX_VOODOO_TYPES);
48274822   assert(config->fbmem > 0);
4828   assert(config->type >= VOODOO_BANSHEE || config->tmumem0 > 0);
48294823
48304824   /* store a pointer back to the device */
48314825   v->device = device;
4826   v->type = type;
48324827
48334828   /* copy config data */
48344829   v->freq = device->clock();
r17580r17581
48694864   }
48704865
48714866   /* configure type-specific values */
4872   switch (config->type)
4867   switch (v->type)
48734868   {
4874      case VOODOO_1:
4869      case TYPE_VOODOO_1:
48754870         v->regaccess = voodoo_register_access;
48764871         v->regnames = voodoo_reg_name;
48774872         v->alt_regmap = 0;
48784873         v->fbi.lfb_stride = 10;
48794874         break;
48804875
4881      case VOODOO_2:
4876      case TYPE_VOODOO_2:
48824877         v->regaccess = voodoo2_register_access;
48834878         v->regnames = voodoo_reg_name;
48844879         v->alt_regmap = 0;
48854880         v->fbi.lfb_stride = 10;
48864881         break;
48874882
4888      case VOODOO_BANSHEE:
4883      case TYPE_VOODOO_BANSHEE:
48894884         v->regaccess = banshee_register_access;
48904885         v->regnames = banshee_reg_name;
48914886         v->alt_regmap = 1;
48924887         v->fbi.lfb_stride = 11;
48934888         break;
48944889
4895      case VOODOO_3:
4890      case TYPE_VOODOO_3:
48964891         v->regaccess = banshee_register_access;
48974892         v->regnames = banshee_reg_name;
48984893         v->alt_regmap = 1;
r17580r17581
49184913   assert_always(v->screen != NULL, "Unable to find screen attached to voodoo");
49194914   v->cpu = device->machine().device(config->cputag);
49204915   assert_always(v->cpu != NULL, "Unable to find CPU attached to voodoo");
4921   v->type = config->type;
49224916   v->chipmask = 0x01;
49234917   v->attoseconds_per_cycle = ATTOSECONDS_PER_SECOND / v->freq;
49244918   v->trigger = 51324 + v->index;
r17580r17581
49364930
49374931   /* allocate memory */
49384932   tmumem0 = config->tmumem0;
4939   if (config->type <= VOODOO_2)
4933   if (v->type <= TYPE_VOODOO_2)
49404934   {
49414935      /* separate FB/TMU memory */
49424936      fbmem = auto_alloc_array(device->machine(), UINT8, config->fbmem << 20);
r17580r17581
49594953   /* set up the TMUs */
49604954   init_tmu(v, &v->tmu[0], &v->reg[0x100], tmumem[0], tmumem0 << 20);
49614955   v->chipmask |= 0x02;
4962   if (config->tmumem1 != 0 || v->type == VOODOO_3)
4956   if (config->tmumem1 != 0 || v->type == TYPE_VOODOO_3)
49634957   {
49644958      init_tmu(v, &v->tmu[1], &v->reg[0x200], tmumem[1], config->tmumem1 << 20);
49654959      v->chipmask |= 0x04;
r17580r17581
49914985   init_save_state(device);
49924986}
49934987
4988static DEVICE_START( voodoo_1 )
4989{
4990   common_start_voodoo(device, TYPE_VOODOO_1);
4991}
4992static DEVICE_START( voodoo_2 )
4993{
4994   common_start_voodoo(device, TYPE_VOODOO_2);
4995}
49944996
4997static DEVICE_START( voodoo_banshee )
4998{
4999   common_start_voodoo(device, TYPE_VOODOO_BANSHEE);
5000}
5001
5002static DEVICE_START( voodoo_3 )
5003{
5004   common_start_voodoo(device, TYPE_VOODOO_3);
5005}
5006
49955007/*-------------------------------------------------
49965008    device exit callback
49975009-------------------------------------------------*/
r17580r17581
50215033    device definition
50225034-------------------------------------------------*/
50235035
5024INLINE const char *get_voodoo_name(const device_t *device)
5025{
5026   const voodoo_config *config = (device != NULL) ? (const voodoo_config *)downcast<const legacy_device_base *>(device)->inline_config() : NULL;
5027   switch (config->type)
5028   {
5029      default:
5030      case VOODOO_1:               return "3dfx Voodoo Graphics";
5031      case VOODOO_2:               return "3dfx Voodoo 2";
5032      case VOODOO_BANSHEE:         return "3dfx Voodoo Banshee";
5033      case VOODOO_3:               return "3dfx Voodoo 3";
5034   }
5035}
5036
50375036DEVICE_GET_INFO(voodoo)
50385037{
50395038 switch (state)
50405039 {
50415040  case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(voodoo_state); break;
50425041
5043  case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(voodoo_config); break;
5044
5045  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(voodoo); break;
5046
50475042  case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(voodoo); break;
50485043
50495044  case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(voodoo); break;
5045 }
5046}
50505047
5051  case DEVINFO_STR_NAME: strcpy(info->s, get_voodoo_name(device)); break;
5048
5049DEVICE_GET_INFO(voodoo_1)
5050{
5051 switch (state)
5052 {
5053  case DEVINFO_STR_NAME: strcpy(info->s, "3dfx Voodoo Graphics"); break;
5054  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(voodoo_1); break;
5055  default: DEVICE_GET_INFO_CALL(voodoo); break;
50525056 }
50535057}
50545058
5059DEVICE_GET_INFO(voodoo_2)
5060{
5061 switch (state)
5062 {
5063  case DEVINFO_STR_NAME: strcpy(info->s, "3dfx Voodoo 2"); break;
5064  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(voodoo_2); break;
5065  default: DEVICE_GET_INFO_CALL(voodoo); break;
5066 }
5067}
5068DEVICE_GET_INFO(voodoo_banshee)
5069{
5070 switch (state)
5071 {
5072  case DEVINFO_STR_NAME: strcpy(info->s, "3dfx Voodoo Banshee"); break;
5073  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(voodoo_banshee); break;
5074  default: DEVICE_GET_INFO_CALL(voodoo); break;
5075 }
5076}
5077
5078DEVICE_GET_INFO(voodoo_3)
5079{
5080 switch (state)
5081 {
5082  case DEVINFO_STR_NAME: strcpy(info->s, "3dfx Voodoo 3"); break;
5083  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(voodoo_3); break;
5084  default: DEVICE_GET_INFO_CALL(voodoo); break;
5085 }
5086}
5087
5088
50555089/***************************************************************************
50565090    COMMAND HANDLERS
50575091***************************************************************************/
r17580r17581
50815115   if (FBZMODE_RGB_BUFFER_MASK(v->reg[fbzMode].u))
50825116   {
50835117      /* determine the draw buffer */
5084      int destbuf = (v->type >= VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u);
5118      int destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u);
50855119      switch (destbuf)
50865120      {
50875121         case 0:      /* front buffer */
r17580r17581
52195253//  poly_wait(v->poly, "triangle");
52205254
52215255   /* determine the draw buffer */
5222   destbuf = (v->type >= VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u);
5256   destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u);
52235257   switch (destbuf)
52245258   {
52255259      case 0:      /* front buffer */
r17580r17581
56795713   }
56805714}
56815715
5682DEFINE_LEGACY_DEVICE(VOODOO_GRAPHICS, voodoo);
5716DEFINE_LEGACY_DEVICE(VOODOO_1, voodoo_1);
5717DEFINE_LEGACY_DEVICE(VOODOO_2, voodoo_2);
5718DEFINE_LEGACY_DEVICE(VOODOO_BANSHEE, voodoo_banshee);
5719DEFINE_LEGACY_DEVICE(VOODOO_3, voodoo_3);
56835720
5684
56855721/***************************************************************************
56865722    GENERIC RASTERIZERS
56875723***************************************************************************/
trunk/src/emu/video/voodoo.h
r17580r17581
4848/***************************************************************************
4949    CONSTANTS
5050***************************************************************************/
51
5251/* enumeration specifying which model of Voodoo we are emulating */
5352enum
5453{
55   VOODOO_1,
56   VOODOO_2,
57   VOODOO_BANSHEE,
58   VOODOO_3,
59   MAX_VOODOO_TYPES
54   TYPE_VOODOO_1,
55   TYPE_VOODOO_2,
56   TYPE_VOODOO_BANSHEE,
57   TYPE_VOODOO_3
6058};
6159
62
6360#define STD_VOODOO_1_CLOCK         50000000
6461#define STD_VOODOO_2_CLOCK         90000000
6562#define STD_VOODOO_BANSHEE_CLOCK   90000000
r17580r17581
7774typedef struct _voodoo_config voodoo_config;
7875struct _voodoo_config
7976{
80   int               type;
8177   UINT8            fbmem;
8278   UINT8            tmumem0;
8379   UINT8            tmumem1;
r17580r17581
9389    DEVICE CONFIGURATION MACROS
9490***************************************************************************/
9591
96#define MCFG_3DFX_VOODOO_ADD(_tag, _type, _clock, _fbmem, _screen) \
97   MCFG_DEVICE_ADD(_tag, VOODOO_GRAPHICS, _clock) \
98   MCFG_DEVICE_CONFIG_DATA32(voodoo_config, type, _type) \
99   MCFG_DEVICE_CONFIG_DATA32(voodoo_config, fbmem, _fbmem) \
100   MCFG_DEVICE_CONFIG_DATAPTR(voodoo_config, screen, _screen)
92#define MCFG_3DFX_VOODOO_1_ADD(_tag, _clock, _config) \
93   MCFG_DEVICE_ADD(_tag, VOODOO_1, _clock) \
94   MCFG_DEVICE_CONFIG(_config)
10195
102#define MCFG_3DFX_VOODOO_1_ADD(_tag, _clock, _fbmem, _screen) \
103   MCFG_3DFX_VOODOO_ADD(_tag, VOODOO_1, _clock, _fbmem, _screen)
96#define MCFG_3DFX_VOODOO_2_ADD(_tag, _clock, _config) \
97   MCFG_DEVICE_ADD(_tag, VOODOO_2, _clock) \
98   MCFG_DEVICE_CONFIG(_config)
10499
105#define MCFG_3DFX_VOODOO_2_ADD(_tag, _clock, _fbmem, _screen) \
106   MCFG_3DFX_VOODOO_ADD(_tag, VOODOO_2, _clock, _fbmem, _screen)
100#define MCFG_3DFX_VOODOO_BANSHEE_ADD(_tag, _clock, _config) \
101   MCFG_DEVICE_ADD(_tag, VOODOO_BANSHEE, _clock) \
102   MCFG_DEVICE_CONFIG(_config)
107103
108#define MCFG_3DFX_VOODOO_BANSHEE_ADD(_tag, _clock, _fbmem, _screen) \
109   MCFG_3DFX_VOODOO_ADD(_tag, VOODOO_BANSHEE, _clock, _fbmem, _screen)
104#define MCFG_3DFX_VOODOO_3_ADD(_tag, _clock, _config) \
105   MCFG_DEVICE_ADD(_tag, VOODOO_3, _clock) \
106   MCFG_DEVICE_CONFIG(_config)
110107
111#define MCFG_3DFX_VOODOO_3_ADD(_tag, _clock, _fbmem, _screen) \
112   MCFG_3DFX_VOODOO_ADD(_tag, VOODOO_3, _clock, _fbmem, _screen)
113
114#define MCFG_3DFX_VOODOO_TMU_MEMORY(_tmu, _tmumem) \
115   MCFG_DEVICE_CONFIG_DATA32(voodoo_config, tmumem##_tmu, _tmumem)
116
117#define MCFG_3DFX_VOODOO_VBLANK(_vblank) \
118   MCFG_DEVICE_CONFIG_DATAPTR(voodoo_config, vblank, _vblank)
119
120#define MCFG_3DFX_VOODOO_STALL(_stall) \
121   MCFG_DEVICE_CONFIG_DATAPTR(voodoo_config, stall, _stall)
122
123#define MCFG_3DFX_VOODOO_CPU(_cputag) \
124   MCFG_DEVICE_CONFIG_DATAPTR(voodoo_config, cputag, _cputag)
125
126#define MCFG_3DFX_VOODOO_MODIFY(_tag) \
127   MCFG_DEVICE_MODIFY(_tag)
128
129
130
131108/***************************************************************************
132109    FUNCTION PROTOTYPES
133110***************************************************************************/
r17580r17581
151128
152129/* ----- device interface ----- */
153130
154DECLARE_LEGACY_DEVICE(VOODOO_GRAPHICS, voodoo);
155
131DECLARE_LEGACY_DEVICE(VOODOO_1, voodoo_1);
132DECLARE_LEGACY_DEVICE(VOODOO_2, voodoo_2);
133DECLARE_LEGACY_DEVICE(VOODOO_BANSHEE, voodoo_banshee);
134DECLARE_LEGACY_DEVICE(VOODOO_3, voodoo_3);
156135#endif
trunk/src/emu/devlegcy.c
r17580r17581
5252legacy_device_base::legacy_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, device_get_config_func get_config)
5353   : device_t(mconfig, type, "Legacy Device", tag, owner, clock),
5454     m_get_config_func(get_config),
55     m_inline_config(NULL),
5655     m_token(NULL)
5756{
58   // allocate a buffer for the inline configuration
59   UINT32 configlen = (UINT32)get_legacy_int(DEVINFO_INT_INLINE_CONFIG_BYTES);
60   if (configlen != 0)
61      m_inline_config = global_alloc_array_clear(UINT8, configlen);
62
6357   // set the proper name
6458   m_name = get_legacy_string(DEVINFO_STR_NAME);
6559   m_shortname = get_legacy_string(DEVINFO_STR_SHORTNAME);
r17580r17581
7973legacy_device_base::~legacy_device_base()
8074{
8175   global_free(m_token);
82   global_free(m_inline_config);
8376}
8477
8578
r17580r17581
137130
138131
139132//-------------------------------------------------
140//  static_set_inline32 - configuration helper to
141//  set a 32-bit value in the inline configuration
142//-------------------------------------------------
143
144void legacy_device_base::static_set_inline32(device_t &device, UINT32 offset, UINT32 size, UINT32 value)
145{
146   legacy_device_base &legacy = downcast<legacy_device_base &>(device);
147   void *dest = reinterpret_cast<UINT8 *>(legacy.m_inline_config) + offset;
148   if (size == 1)
149      *reinterpret_cast<UINT8 *>(dest) = value;
150   else if (size == 2)
151      *reinterpret_cast<UINT16 *>(dest) = value;
152   else if (size == 4)
153      *reinterpret_cast<UINT32 *>(dest) = value;
154   else
155      throw emu_fatalerror("Unexpected size %d in legacy_device_base::static_set_inline32", size);
156}
157
158
159//-------------------------------------------------
160//  static_set_inline64 - configuration helper to
161//  set a 64-bit value in the inline configuration
162//-------------------------------------------------
163
164void legacy_device_base::static_set_inline64(device_t &device, UINT32 offset, UINT32 size, UINT64 value)
165{
166   legacy_device_base &legacy = downcast<legacy_device_base &>(device);
167   void *dest = reinterpret_cast<UINT8 *>(legacy.m_inline_config) + offset;
168   if (size == 1)
169      *reinterpret_cast<UINT8 *>(dest) = value;
170   else if (size == 2)
171      *reinterpret_cast<UINT16 *>(dest) = value;
172   else if (size == 4)
173      *reinterpret_cast<UINT32 *>(dest) = value;
174   else if (size == 8)
175      *reinterpret_cast<UINT64 *>(dest) = value;
176   else
177      throw emu_fatalerror("Unexpected size %d in legacy_device_base::static_set_inline64", size);
178}
179
180
181//-------------------------------------------------
182//  static_set_inline_float - configuration helper
183//  to set a floating-point value in the inline
184//  configuration
185//-------------------------------------------------
186
187void legacy_device_base::static_set_inline_float(device_t &device, UINT32 offset, UINT32 size, float value)
188{
189   legacy_device_base &legacy = downcast<legacy_device_base &>(device);
190   void *dest = reinterpret_cast<UINT8 *>(legacy.m_inline_config) + offset;
191   if (size == 4)
192      *reinterpret_cast<float *>(dest) = value;
193   else
194      throw emu_fatalerror("Unexpected size %d in legacy_device_base::static_set_inline_float", size);
195}
196
197
198//-------------------------------------------------
199133//  device_start - called to start up a device
200134//-------------------------------------------------
201135
trunk/src/emu/devlegcy.h
r17580r17581
4848//  CONSTANTS
4949//**************************************************************************
5050
51#define DEVINFO_IMAGE_CREATE_OPTMAX   32
52
5351// state constants passed to the device_get_config_func
5452enum
5553{
r17580r17581
5755   DEVINFO_INT_FIRST = 0x00000,
5856
5957      DEVINFO_INT_TOKEN_BYTES = DEVINFO_INT_FIRST,   // R/O: bytes to allocate for the token
60      DEVINFO_INT_INLINE_CONFIG_BYTES,            // R/O: bytes to allocate for the inline configuration
6158
6259      DEVINFO_INT_ENDIANNESS,                     // R/O: either ENDIANNESS_BIG or ENDIANNESS_LITTLE
6360      DEVINFO_INT_DATABUS_WIDTH,                  // R/O: data bus size for each address space (8,16,32,64)
r17580r17581
194191#define DEVICE_RESET(name)         void DEVICE_RESET_NAME(name)(device_t *device)
195192#define DEVICE_RESET_CALL(name)      DEVICE_RESET_NAME(name)(device)
196193
197
198194//**************************************************************************
199//  DEVICE_CONFIGURATION_MACROS
200//**************************************************************************
201
202#define structsizeof(_struct, _field) sizeof(((_struct *)NULL)->_field)
203
204// inline device configurations that require 32 bits of storage in the token
205#define MCFG_DEVICE_CONFIG_DATA32_EXPLICIT(_size, _offset, _val) \
206   legacy_device_base::static_set_inline32(*device, _offset, _size, (UINT32)(_val));
207
208#define MCFG_DEVICE_CONFIG_DATA32(_struct, _field, _val) \
209   MCFG_DEVICE_CONFIG_DATA32_EXPLICIT(structsizeof(_struct, _field), offsetof(_struct, _field), _val)
210
211#define MCFG_DEVICE_CONFIG_DATA32_ARRAY(_struct, _field, _index, _val) \
212   MCFG_DEVICE_CONFIG_DATA32_EXPLICIT(structsizeof(_struct, _field[0]), offsetof(_struct, _field) + (_index) * structsizeof(_struct, _field[0]), _val)
213
214#define MCFG_DEVICE_CONFIG_DATA32_ARRAY_MEMBER(_struct, _field, _index, _memstruct, _member, _val) \
215   MCFG_DEVICE_CONFIG_DATA32_EXPLICIT(structsizeof(_memstruct, _member), offsetof(_struct, _field) + (_index) * structsizeof(_struct, _field[0]) + offsetof(_memstruct, _member), _val)
216
217
218// inline device configurations that require 64 bits of storage in the token
219#define MCFG_DEVICE_CONFIG_DATA64_EXPLICIT(_size, _offset, _val) \
220   legacy_device_base::static_set_inline64(*device, _offset, _size, (UINT64)(_val));
221
222#define MCFG_DEVICE_CONFIG_DATA64(_struct, _field, _val) \
223   MCFG_DEVICE_CONFIG_DATA64_EXPLICIT(structsizeof(_struct, _field), offsetof(_struct, _field), _val)
224
225#define MCFG_DEVICE_CONFIG_DATA64_ARRAY(_struct, _field, _index, _val) \
226   MCFG_DEVICE_CONFIG_DATA64_EXPLICIT(structsizeof(_struct, _field[0]), offsetof(_struct, _field) + (_index) * structsizeof(_struct, _field[0]), _val)
227
228#define MCFG_DEVICE_CONFIG_DATA64_ARRAY_MEMBER(_struct, _field, _index, _memstruct, _member, _val) \
229   MCFG_DEVICE_CONFIG_DATA64_EXPLICIT(structsizeof(_memstruct, _member), offsetof(_struct, _field) + (_index) * structsizeof(_struct, _field[0]) + offsetof(_memstruct, _member), _val)
230
231
232// inline device configurations that require a pointer-sized amount of storage in the token
233#ifdef PTR64
234#define MCFG_DEVICE_CONFIG_DATAPTR_EXPLICIT(_struct, _size, _offset) MCFG_DEVICE_CONFIG_DATA64_EXPLICIT(_struct, _size, _offset)
235#define MCFG_DEVICE_CONFIG_DATAPTR(_struct, _field, _val) MCFG_DEVICE_CONFIG_DATA64(_struct, _field, _val)
236#define MCFG_DEVICE_CONFIG_DATAPTR_ARRAY(_struct, _field, _index, _val) MCFG_DEVICE_CONFIG_DATA64_ARRAY(_struct, _field, _index, _val)
237#define MCFG_DEVICE_CONFIG_DATAPTR_ARRAY_MEMBER(_struct, _field, _index, _memstruct, _member, _val) MCFG_DEVICE_CONFIG_DATA64_ARRAY_MEMBER(_struct, _field, _index, _memstruct, _member, _val)
238#else
239#define MCFG_DEVICE_CONFIG_DATAPTR_EXPLICIT(_struct, _size, _offset) MCFG_DEVICE_CONFIG_DATA32_EXPLICIT(_struct, _size, _offset)
240#define MCFG_DEVICE_CONFIG_DATAPTR(_struct, _field, _val) MCFG_DEVICE_CONFIG_DATA32(_struct, _field, _val)
241#define MCFG_DEVICE_CONFIG_DATAPTR_ARRAY(_struct, _field, _index, _val) MCFG_DEVICE_CONFIG_DATA32_ARRAY(_struct, _field, _index, _val)
242#define MCFG_DEVICE_CONFIG_DATAPTR_ARRAY_MEMBER(_struct, _field, _index, _memstruct, _member, _val) MCFG_DEVICE_CONFIG_DATA32_ARRAY_MEMBER(_struct, _field, _index, _memstruct, _member, _val)
243#endif
244
245
246
247//**************************************************************************
248195//  TYPE DEFINITIONS
249196//**************************************************************************
250197
r17580r17581
299246   virtual ~legacy_device_base();
300247
301248public:
302   // access to legacy inline configuartion
303   void *inline_config() const { return m_inline_config; }
304
305   // inline configuration helpers
306   static void static_set_inline32(device_t &device, UINT32 offset, UINT32 size, UINT32 value);
307   static void static_set_inline64(device_t &device, UINT32 offset, UINT32 size, UINT64 value);
308   static void static_set_inline_float(device_t &device, UINT32 offset, UINT32 size, float value);
309
310249   // access to legacy token
311250   void *token() const { assert(m_token != NULL); return m_token; }
312251
r17580r17581
327266
328267   // configuration state
329268   device_get_config_func      m_get_config_func;
330   void *                  m_inline_config;
331269
332270   // internal state
333271   void *                  m_token;
trunk/src/emu/machine/74153.c
r17580r17581
136136
137137static DEVICE_START( ttl74153 )
138138{
139   ttl74153_config *config = (ttl74153_config *)downcast<const legacy_device_base *>(device)->inline_config();
139   ttl74153_config *config = (ttl74153_config *)device->static_config();
140140   ttl74153_state *state = get_safe_token(device);
141141    state->output_cb = config->output_cb;
142142
r17580r17581
183183
184184  case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(ttl74153_state); break;
185185
186  case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(ttl74153_config); break;
187
188186  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ttl74153); break;
189187
190188  case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ttl74153); break;
trunk/src/emu/machine/74153.h
r17580r17581
4646};
4747
4848
49#define MCFG_74153_ADD(_tag, _output_cb) \
49#define MCFG_74153_ADD(_tag, _config) \
5050   MCFG_DEVICE_ADD(_tag, TTL74153, 0) \
51   MCFG_DEVICE_CONFIG_DATAPTR(ttl74153_config, output_cb, _output_cb)
51   MCFG_DEVICE_CONFIG(_config)
5252
5353
5454
trunk/src/emu/machine/smc91c9x.c
r17580r17581
509509
510510static DEVICE_START( smc91c9x )
511511{
512   const smc91c9x_config *config = (const smc91c9x_config *)downcast<const legacy_device_base *>(device)->inline_config();
512   const smc91c9x_config *config = (const smc91c9x_config *)device->static_config();
513513   smc91c9x_state *smc = get_safe_token(device);
514514
515515   /* validate some basic stuff */
516516   assert(device != NULL);
517   assert(device->static_config() == NULL);
518   assert(downcast<const legacy_device_base *>(device)->inline_config() != NULL);
519517
520518   /* store a pointer back to the device */
521519   smc->device = device;
r17580r17581
596594   {
597595      /* --- the following bits of info are returned as 64-bit signed integers --- */
598596      case DEVINFO_INT_TOKEN_BYTES:         info->i = sizeof(smc91c9x_state);      break;
599      case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = sizeof(smc91c9x_config);      break;
600597
601598      /* --- the following bits of info are returned as pointers to data or functions --- */
602599      case DEVINFO_FCT_START:               info->start = DEVICE_START_NAME(smc91c9x); break;
trunk/src/emu/machine/smc91c9x.h
r17580r17581
3131    DEVICE CONFIGURATION MACROS
3232***************************************************************************/
3333
34#define MCFG_SMC91C94_ADD(_tag, _callback) \
34#define MCFG_SMC91C94_ADD(_tag, _config) \
3535   MCFG_DEVICE_ADD(_tag, SMC91C94, 0) \
36   MCFG_DEVICE_CONFIG_DATAPTR(smc91c9x_config, interrupt, _callback)
36   MCFG_DEVICE_CONFIG(_config)
3737
38#define MCFG_SMC91C96_ADD(_tag, _callback) \
38#define MCFG_SMC91C96_ADD(_tag, _config) \
3939   MCFG_DEVICE_ADD(_tag, SMC91C96, 0) \
40   MCFG_DEVICE_CONFIG_DATAPTR(smc91c9x_config, interrupt, _callback)
40   MCFG_DEVICE_CONFIG(_config)
4141
4242
4343
trunk/src/emu/machine/latch8.c
r17580r17581
186186   int i;
187187
188188   /* validate arguments */
189   latch8->intf = (latch8_config *)downcast<const legacy_device_base *>(device)->inline_config();
189   latch8->intf = (latch8_config *)&downcast<latch8_device *>(device)->m_inline_config;
190190
191191   latch8->value = 0x0;
192192
r17580r17581
238238   {
239239      /* --- the following bits of info are returned as 64-bit signed integers --- */
240240      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(latch8_t);            break;
241      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = sizeof(latch8_config);                     break;
242241
243242      /* --- the following bits of info are returned as pointers to data or functions --- */
244243      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(latch8);break;
r17580r17581
254253   }
255254}
256255
256latch8_device::latch8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
257       : legacy_device_base(mconfig, type, tag, owner, clock, DEVICE_GET_INFO_NAME(latch8))
258{
259   memset((void*)&m_inline_config,0,sizeof(m_inline_config));
260}
257261
258DEFINE_LEGACY_DEVICE(LATCH8, latch8);
262const device_type LATCH8 = &legacy_device_creator<latch8_device>;
trunk/src/emu/machine/latch8.h
r17580r17581
1717
1818#include "devlegcy.h"
1919
20DECLARE_LEGACY_DEVICE(LATCH8, latch8);
21
2220/***************************************************************************
2321    TYPE DEFINITIONS
2422***************************************************************************/
r17580r17581
4543   latch8_devread         devread[8];
4644};
4745
46
47DEVICE_GET_INFO( latch8 );
48
49class latch8_device : public legacy_device_base
50{
51public:
52       latch8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
53     
54      latch8_config m_inline_config;
55     
56      void set_maskout(UINT32 maskout) { m_inline_config.maskout = maskout; }
57      void set_xorvalue(UINT32 xorvalue) { m_inline_config.xorvalue = xorvalue; }
58      void set_nosync(UINT32 nosync) { m_inline_config.nosync = nosync; }
59     
60      void set_discrete_node(const char *dev_tag, int bit, UINT32 node) { m_inline_config.node_device[bit] = dev_tag;  m_inline_config.node_map[bit] = node;  }
61      void set_devread(int bit, const char *tag, read8_device_func handler, int from_bit)
62      {
63         m_inline_config.devread[bit].from_bit = from_bit;
64         m_inline_config.devread[bit].tag = tag;
65         m_inline_config.devread[bit].devread_handler = handler;         
66      }
67      void set_read(int bit, read8_space_func handler, int from_bit)
68      {
69         m_inline_config.devread[bit].from_bit = from_bit;
70         m_inline_config.devread[bit].read_handler = handler;         
71      }     
72};
73
74extern const device_type LATCH8;
4875/***************************************************************************
4976    DEVICE CONFIGURATION MACROS
5077***************************************************************************/
r17580r17581
5582
5683/* Bit mask specifying bits to be masked *out* */
5784#define MCFG_LATCH8_MASKOUT(_maskout) \
58   MCFG_DEVICE_CONFIG_DATA32(latch8_config, maskout, _maskout)
85   static_cast<latch8_device *>(device)->set_maskout(_maskout);   
5986
6087/* Bit mask specifying bits to be inverted */
6188#define MCFG_LATCH8_INVERT(_xor) \
62   MCFG_DEVICE_CONFIG_DATA32(latch8_config, xorvalue, _xor)
89   static_cast<latch8_device *>(device)->set_xorvalue(_xor);
6390
6491/* Bit mask specifying bits not needing cpu synchronization. */
6592#define MCFG_LATCH8_NOSYNC(_nosync) \
66   MCFG_DEVICE_CONFIG_DATA32(latch8_config, nosync, _nosync)
93   static_cast<latch8_device *>(device)->set_nosync(_nosync);
6794
6895/* Write bit to discrete node */
6996#define MCFG_LATCH8_DISCRETE_NODE(_device, _bit, _node) \
70   MCFG_DEVICE_CONFIG_DATAPTR_ARRAY(latch8_config, node_device, _bit, _device) \
71   MCFG_DEVICE_CONFIG_DATA32_ARRAY(latch8_config, node_map, _bit, _node)
97   static_cast<latch8_device *>(device)->set_discrete_node(_device, _bit, _node);
7298
7399/* Upon read, replace bits by reading from another device handler */
74100#define MCFG_LATCH8_DEVREAD(_bit, _tag, _handler, _from_bit) \
75   MCFG_DEVICE_CONFIG_DATA32_ARRAY_MEMBER(latch8_config, devread, _bit, latch8_devread, from_bit, _from_bit) \
76   MCFG_DEVICE_CONFIG_DATAPTR_ARRAY_MEMBER(latch8_config, devread, _bit, latch8_devread, tag, _tag) \
77   MCFG_DEVICE_CONFIG_DATAPTR_ARRAY_MEMBER(latch8_config, devread, _bit, latch8_devread, devread_handler, _handler) \
101   static_cast<latch8_device *>(device)->set_devread(_bit, _tag, _handler, _from_bit);
78102
79103/* Upon read, replace bits by reading from another machine handler */
80104#define MCFG_LATCH8_READ(_bit, _handler, _from_bit) \
81   MCFG_DEVICE_CONFIG_DATA32_ARRAY_MEMBER(latch8_config, devread, _bit, latch8_devread, from_bit, _from_bit) \
82   MCFG_DEVICE_CONFIG_DATAPTR_ARRAY_MEMBER(latch8_config, devread, _bit, latch8_devread, read_handler, _handler) \
105   static_cast<latch8_device *>(device)->set_read(_bit, _handler, _from_bit);
83106
84107/* Accessor macros */
85108
trunk/src/emu/machine/idectrl.c
r17580r17581
203203
204204INLINE void signal_interrupt(ide_state *ide)
205205{
206   const ide_config *config = (const ide_config *)downcast<const legacy_device_base *>(ide->device)->inline_config();
206   const ide_config *config = (const ide_config *)ide->device->static_config();
207207
208208   LOG(("IDE interrupt assert\n"));
209209
r17580r17581
217217
218218INLINE void clear_interrupt(ide_state *ide)
219219{
220   const ide_config *config = (const ide_config *)downcast<const legacy_device_base *>(ide->device)->inline_config();
220   const ide_config *config = (const ide_config *)ide->device->static_config();
221221
222222   LOG(("IDE interrupt clear\n"));
223223
r17580r17581
18391839
18401840   /* validate some basic stuff */
18411841   assert(device != NULL);
1842   assert(device->static_config() == NULL);
1843   assert(downcast<const legacy_device_base *>(device)->inline_config() != NULL);
1842   assert(device->static_config() != NULL);
18441843
18451844   /* store a pointer back to the device */
18461845   ide->device = device;
18471846
18481847   /* set MAME harddisk handle */
1849   config = (const ide_config *)downcast<const legacy_device_base *>(device)->inline_config();
1848   config = (const ide_config *)device->static_config();
18501849
18511850   ide->drive[0].slot = device->owner()->subdevice<ide_slot_device>("drive_0");
18521851   ide->drive[1].slot = device->owner()->subdevice<ide_slot_device>("drive_1");
r17580r17581
19541953   {
19551954      /* --- the following bits of info are returned as 64-bit signed integers --- */
19561955      case DEVINFO_INT_TOKEN_BYTES:         info->i = sizeof(ide_state);         break;
1957      case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = sizeof(ide_config);         break;
19581956
19591957      /* --- the following bits of info are returned as pointers to data or functions --- */
19601958      case DEVINFO_FCT_START:               info->start = DEVICE_START_NAME(ide_controller); break;
trunk/src/emu/machine/74148.c
r17580r17581
180180
181181static DEVICE_START( ttl74148 )
182182{
183   ttl74148_config *config = (ttl74148_config *)downcast<const legacy_device_base *>(device)->inline_config();
183   ttl74148_config *config = (ttl74148_config *)device->static_config();
184184   ttl74148_state *state = get_safe_token(device);
185185    state->output_cb = config->output_cb;
186186
r17580r17581
221221 {
222222  case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(ttl74148_state); break;
223223
224  case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(ttl74148_config); break;
225
226224  case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(ttl74148); break;
227225
228226  case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ttl74148); break;
trunk/src/emu/machine/idectrl.h
r17580r17581
146146    DEVICE CONFIGURATION MACROS
147147***************************************************************************/
148148
149#define MCFG_IDE_CONTROLLER_ADD(_tag, _callback, _slotintf, _master, _slave, _fixed) \
149#define MCFG_IDE_CONTROLLER_ADD(_tag, _config, _slotintf, _master, _slave, _fixed) \
150150   MCFG_DEVICE_ADD(_tag, IDE_CONTROLLER, 0) \
151   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, interrupt, _callback) \
151   MCFG_DEVICE_CONFIG(_config) \
152152   MCFG_IDE_SLOT_ADD("drive_0", _slotintf, _master, NULL, _fixed) \
153153   MCFG_IDE_SLOT_ADD("drive_1", _slotintf, _slave, NULL, _fixed) \
154154
155#define MCFG_IDE_BUS_MASTER_SPACE(_tag, _cpu, _space) \
156   MCFG_DEVICE_MODIFY(_tag) \
157   MCFG_DEVICE_CONFIG_DATAPTR(ide_config, bmcpu, _cpu) \
158   MCFG_DEVICE_CONFIG_DATA32(ide_config, bmspace, AS_##_space)
159
160155#define MCFG_IDE_SLOT_ADD(_tag, _slot_intf, _def_slot, _def_inp, _fixed) \
161156   MCFG_DEVICE_ADD(_tag, IDE_SLOT, 0) \
162157   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, _fixed) \
trunk/src/emu/machine/68681.c
r17580r17581
913913   {
914914      /* --- the following bits of info are returned as 64-bit signed integers --- */
915915      case DEVINFO_INT_TOKEN_BYTES:         info->i = sizeof(duart68681_state);   break;
916      case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = sizeof(duart68681_config);   break;
917916
918917      /* --- the following bits of info are returned as pointers to data or functions --- */
919918      case DEVINFO_FCT_START:               info->start = DEVICE_START_NAME(duart68681); break;
trunk/src/emu/machine/74148.h
r17580r17581
5151};
5252
5353
54#define MCFG_74148_ADD(_tag, _output_cb) \
54#define MCFG_74148_ADD(_tag, _config) \
5555   MCFG_DEVICE_ADD(_tag, TTL74148, 0) \
56   MCFG_DEVICE_CONFIG_DATAPTR(ttl74148_config, output_cb, _output_cb)
56   MCFG_DEVICE_CONFIG(_config)
5757
5858
5959/* must call ttl74148_update() after setting the inputs */
trunk/src/mess/machine/sst39vfx.c
r17580r17581
4949   assert(device != NULL);
5050   assert(device->type() == SST39VF020 || device->type() == SST39VF400A);
5151
52   return (const sst39vfx_config *) downcast<const legacy_device_base *>(device)->inline_config();
52   return (const sst39vfx_config *)device->static_config();
5353}
5454
5555
r17580r17581
189189   {
190190      /* --- the following bits of info are returned as 64-bit signed integers --- */
191191      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(sst39vfx_t);            break;
192      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = sizeof(sst39vfx_config);         break;
193192
194193      /* --- the following bits of info are returned as pointers to data or functions --- */
195194      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(sst39vf020);   break;
trunk/src/mess/machine/sst39vfx.h
r17580r17581
3131
3232DECLARE_LEGACY_DEVICE(SST39VF020, sst39vf020);
3333
34#define MCFG_SST39VF020_ADD(_tag,_cpu_datawidth,_cpu_endianess) \
34#define MCFG_SST39VF020_ADD(_tag, _config) \
3535   MCFG_DEVICE_ADD(_tag, SST39VF020, 0) \
36   MCFG_DEVICE_CONFIG_DATA32(sst39vfx_config, cpu_datawidth, _cpu_datawidth) \
37   MCFG_DEVICE_CONFIG_DATA32(sst39vfx_config, cpu_endianess, _cpu_endianess)
36   MCFG_DEVICE_CONFIG(_config)
3837
3938#define MCFG_SST39VF020_REMOVE(_tag) \
4039   MCFG_DEVICE_REMOVE(_tag)
4140
4241DECLARE_LEGACY_DEVICE(SST39VF400A, sst39vf400a);
4342
44#define MCFG_SST39VF400A_ADD(_tag,_cpu_datawidth,_cpu_endianess) \
43#define MCFG_SST39VF400A_ADD(_tag,_config) \
4544   MCFG_DEVICE_ADD(_tag, SST39VF400A, 0) \
46   MCFG_DEVICE_CONFIG_DATA32(sst39vfx_config, cpu_datawidth, _cpu_datawidth) \
47   MCFG_DEVICE_CONFIG_DATA32(sst39vfx_config, cpu_endianess, _cpu_endianess)
45   MCFG_DEVICE_CONFIG(_config)
4846
4947#define MCFG_SST39VF400A_REMOVE(_tag) \
5048   MCFG_DEVICE_REMOVE(_tag)
trunk/src/mess/machine/c64_ide64.c
r17580r17581
4646//-------------------------------------------------
4747//  MACHINE_CONFIG_FRAGMENT( c64_ide64 )
4848//-------------------------------------------------
49static const ide_config ide_intf =
50{
51   NULL,
52   NULL,
53   0
54};
4955
5056static MACHINE_CONFIG_FRAGMENT( c64_ide64 )
5157   MCFG_ATMEL_29C010_ADD(AT29C010A_TAG)
5258   MCFG_DS1302_ADD(DS1302_TAG, XTAL_32_768kHz)
5359
54   MCFG_IDE_CONTROLLER_ADD(IDE_TAG, NULL, ide_image_devices, "hdd", "hdd", false)
60   MCFG_IDE_CONTROLLER_ADD(IDE_TAG, ide_intf, ide_image_devices, "hdd", "hdd", false)
5561MACHINE_CONFIG_END
5662
5763
trunk/src/mess/machine/isa_ide.c
r17580r17581
4040   }
4141}
4242
43static const ide_config ide_intf =
44{
45   ide_interrupt,
46   NULL,
47   0
48};
4349
4450static MACHINE_CONFIG_FRAGMENT( ide )
45   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt, ide_image_devices, "hdd", "hdd", false)
51   MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_image_devices, "hdd", "hdd", false)
4652MACHINE_CONFIG_END
4753
4854static INPUT_PORTS_START( ide )
trunk/src/mess/machine/ti99/tn_ide.c
r17580r17581
334334   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, nouspikel_ide_interface_device, clock_interrupt_callback)
335335};
336336
337static const ide_config ide_intf =
338{
339   ide_interrupt_callback,
340   NULL,
341   0
342};
343
337344MACHINE_CONFIG_FRAGMENT( tn_ide )
338345   MCFG_RTC65271_ADD( "ide_rtc", ide_rtc_cfg )
339   MCFG_IDE_CONTROLLER_ADD( "ide", ide_interrupt_callback, ide_image_devices, "hdd", NULL, false)  // see idectrl.c
346   MCFG_IDE_CONTROLLER_ADD( "ide", ide_intf, ide_image_devices, "hdd", NULL, false)  // see idectrl.c
340347//  MCFG_IDE_CONTROLLER_REGIONS(":peribox:idehd0:drive", NULL)
341348MACHINE_CONFIG_END
342349
trunk/src/mess/machine/a2cffa.c
r17580r17581
3131#define CFFA2_ROM_REGION  "cffa2_rom"
3232#define CFFA2_IDE_TAG     "cffa2_ide"
3333
34static const ide_config ide_intf =
35{
36   NULL,
37   NULL,
38   0
39};
40
3441MACHINE_CONFIG_FRAGMENT( cffa2 )
35    MCFG_IDE_CONTROLLER_ADD(CFFA2_IDE_TAG, NULL, ide_image_devices, "hdd", "hdd", false)
42    MCFG_IDE_CONTROLLER_ADD(CFFA2_IDE_TAG, ide_intf, ide_image_devices, "hdd", "hdd", false)
3643MACHINE_CONFIG_END
3744
3845ROM_START( cffa2 )
trunk/src/mess/machine/kc_d004.c
r17580r17581
122122   MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(kc_d004_floppy_interface)
123123MACHINE_CONFIG_END
124124
125static const ide_config ide_intf =
126{
127   NULL,
128   NULL,
129   0
130};
125131
126132static MACHINE_CONFIG_FRAGMENT(kc_d004_gide)
127133   MCFG_FRAGMENT_ADD(kc_d004)
r17580r17581
129135   MCFG_CPU_MODIFY(Z80_TAG)
130136   MCFG_CPU_IO_MAP(kc_d004_gide_io)
131137
132   MCFG_IDE_CONTROLLER_ADD(IDE_TAG, NULL, ide_image_devices, "hdd", "hdd", false)
138   MCFG_IDE_CONTROLLER_ADD(IDE_TAG, ide_intf, ide_image_devices, "hdd", "hdd", false)
133139MACHINE_CONFIG_END
134140
135141
trunk/src/mess/machine/omti8621.c
r17580r17581
13441344   {
13451345      /* --- the following bits of info are returned as 64-bit signed integers --- */
13461346      case DEVINFO_INT_TOKEN_BYTES:         info->i = sizeof(omti8621_state);      break;
1347      case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = sizeof(omti8621_config);      break;
13481347
13491348      /* --- the following bits of info are returned as pointers to data or functions --- */
13501349      case DEVINFO_FCT_START:               info->start = DEVICE_START_NAME(omti8621); break;
trunk/src/mess/video/dl1416.c
r17580r17581
114114INLINE dl1416_state *get_safe_token(device_t *device)
115115{
116116   assert(device != NULL);
117   assert(device->type() == DL1416);
117   assert(device->type() == DL1416B || device->type() == DL1416T);
118118
119119   return (dl1416_state *)downcast<legacy_device_base *>(device)->token();
120120}
r17580r17581
128128{
129129   dl1416_state *dl1416 = get_safe_token(device);
130130
131   /* validate arguments */
132   assert(((const dl1416_interface *)(downcast<const legacy_device_base *>(device)->inline_config()))->type >= DL1416B);
133   assert(((const dl1416_interface *)(downcast<const legacy_device_base *>(device)->inline_config()))->type < MAX_DL1416_TYPES);
134
135131   /* register for state saving */
136132   state_save_register_item(device->machine(), "dl1416", device->tag(), 0, dl1416->chip_enable);
137133   state_save_register_item(device->machine(), "dl1416", device->tag(), 0, dl1416->cursor_enable);
r17580r17581
144140{
145141   int i, pattern;
146142   dl1416_state *chip = get_safe_token(device);
147   const dl1416_interface *intf = (const dl1416_interface *)downcast<const legacy_device_base *>(device)->inline_config();
143   const dl1416_interface *intf = (const dl1416_interface *)device->static_config();
148144   /* disable all lines */
149145   chip->chip_enable = FALSE;
150146   chip->write_enable = FALSE;
r17580r17581
181177   {
182178      /* --- the following bits of info are returned as 64-bit signed integers --- */
183179      case DEVINFO_INT_TOKEN_BYTES:         info->i = sizeof(dl1416_state);         break;
184      case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = sizeof(dl1416_interface);      break;
185180
186181      /* --- the following bits of info are returned as pointers to data or functions --- */
187182      case DEVINFO_FCT_START:               info->start = DEVICE_START_NAME( dl1416 );            break;
r17580r17581
197192   }
198193}
199194
195DEVICE_GET_INFO( dl1416b )
196{
197   switch (state)
198   {
199      /* --- the following bits of info are returned as NULL-terminated strings --- */
200      case DEVINFO_STR_NAME:               strcpy(info->s, "DL1416B");                  break;
201       default: DEVICE_GET_INFO_CALL(dl1416); break;
202   }
203}
200204
205DEVICE_GET_INFO( dl1416t )
206{
207   switch (state)
208   {
209      /* --- the following bits of info are returned as NULL-terminated strings --- */
210      case DEVINFO_STR_NAME:               strcpy(info->s, "DL1416T");                  break;
211       default: DEVICE_GET_INFO_CALL(dl1416); break;
212   }
213}
214
201215/*****************************************************************************
202216    IMPLEMENTATION
203217*****************************************************************************/
r17580r17581
227241WRITE8_DEVICE_HANDLER( dl1416_data_w )
228242{
229243   dl1416_state *chip = get_safe_token(device);
230   const dl1416_interface *intf = (const dl1416_interface *)downcast<const legacy_device_base *>(device)->inline_config();
244   const dl1416_interface *intf = (const dl1416_interface *)device->static_config();
231245
232246   offset &= 0x03; /* A0-A1 */
233247   data &= 0x7f;   /* D0-D6 */
r17580r17581
240254
241255      if (chip->cursor_enable) /* cursor enable is set */
242256      {
243         switch (intf->type)
257         if (device->type() == DL1416B)
244258         {
245         case DL1416B: /* DL1416B uses offset to decide cursor pos to change and D0 to hold new state */
259          /* DL1416B uses offset to decide cursor pos to change and D0 to hold new state */
246260
247261            /* The cursor will be set if D0 is high and the original */
248262            /* character restored otherwise */
r17580r17581
266280               if (intf->update)
267281                  intf->update(device, offset, pattern);
268282            }
269            break;
283         }
284         else {
285         /* DL1416T uses a bitmap of 4 data bits D0,D1,D2,D3 to decide cursor pos to change and new state */
270286
271         case DL1416T: /* DL1416T uses a bitmap of 4 data bits D0,D1,D2,D3 to decide cursor pos to change and new state */
272
273287            for (i = 0; i < 4; i++)
274288            {
275289               /* The cursor will be set if D0-D3 is high and the original */
r17580r17581
294308                  if (intf->update)
295309                     intf->update(device, i, pattern);
296310               }
297            }
298            break;
311            }         
299312         }
300313      }
301314      else /* cursor enable is not set, so standard write */
r17580r17581
322335   }
323336}
324337
325DEFINE_LEGACY_DEVICE(DL1416, dl1416);
338DEFINE_LEGACY_DEVICE(DL1416B, dl1416b);
339DEFINE_LEGACY_DEVICE(DL1416T, dl1416t);
trunk/src/mess/video/dl1416.h
r17580r17581
1616
1717#include "devcb.h"
1818
19
2019/***************************************************************************
21    CONSTANTS
22***************************************************************************/
23
24enum
25{
26   DL1416B,
27   DL1416T,
28   MAX_DL1416_TYPES
29};
30
31
32/***************************************************************************
3320    TYPE DEFINITIONS
3421***************************************************************************/
3522
r17580r17581
3825typedef struct _dl1416_interface dl1416_interface;
3926struct _dl1416_interface
4027{
41   int type;
4228   dl1416_update_func update;
4329};
4430
r17580r17581
4733    DEVICE CONFIGURATION MACROS
4834***************************************************************************/
4935
50#define MCFG_DL1416_ADD(_tag, _type, _update) \
51   MCFG_DEVICE_ADD(_tag, DL1416, 0) \
52   MCFG_DEVICE_CONFIG_DATA32(dl1416_interface, type, _type) \
53   MCFG_DEVICE_CONFIG_DATAPTR(dl1416_interface, update, _update)
36#define MCFG_DL1416B_ADD(_tag, _config) \
37   MCFG_DEVICE_ADD(_tag, DL1416B, 0) \
38   MCFG_DEVICE_CONFIG(_config)
5439
55#define MCFG_DL1416B_ADD(_tag, _update) \
56   MCFG_DL1416_ADD(_tag, DL1416B, _update)
40#define MCFG_DL1416T_ADD(_tag, _config) \
41   MCFG_DEVICE_ADD(_tag, DL1416T, 0) \
42   MCFG_DEVICE_CONFIG(_config)
5743
58#define MCFG_DL1416T_ADD(_tag, _update) \
59   MCFG_DL1416_ADD(_tag, DL1416T, _update)
6044
61
6245/***************************************************************************
6346    FUNCTION PROTOTYPES
6447***************************************************************************/
r17580r17581
7053WRITE8_DEVICE_HANDLER( dl1416_data_w );
7154
7255/* device get info callback */
73DECLARE_LEGACY_DEVICE(DL1416, dl1416);
56DECLARE_LEGACY_DEVICE(DL1416B, dl1416b);
57DECLARE_LEGACY_DEVICE(DL1416T, dl1416t);
7458
7559#endif /* DL1416_H_ */
trunk/src/mess/drivers/aim65.c
r17580r17581
226226   NULL
227227};
228228
229const dl1416_interface aim65_ds1_intf =
230{
231   aim65_update_ds1
232};
229233
234const dl1416_interface aim65_ds2_intf =
235{
236   aim65_update_ds2
237};
238
239const dl1416_interface aim65_ds3_intf =
240{
241   aim65_update_ds3
242};
243
244const dl1416_interface aim65_ds4_intf =
245{
246   aim65_update_ds4
247};
248
249const dl1416_interface aim65_ds5_intf =
250{
251   aim65_update_ds5
252};
253
230254/***************************************************************************
231255    MACHINE DRIVERS
232256***************************************************************************/
r17580r17581
241265   MCFG_DEFAULT_LAYOUT(layout_aim65)
242266
243267   /* alpha-numeric display */
244   MCFG_DL1416T_ADD("ds1", aim65_update_ds1)
245   MCFG_DL1416T_ADD("ds2", aim65_update_ds2)
246   MCFG_DL1416T_ADD("ds3", aim65_update_ds3)
247   MCFG_DL1416T_ADD("ds4", aim65_update_ds4)
248   MCFG_DL1416T_ADD("ds5", aim65_update_ds5)
268   MCFG_DL1416T_ADD("ds1", aim65_ds1_intf)
269   MCFG_DL1416T_ADD("ds2", aim65_ds2_intf)
270   MCFG_DL1416T_ADD("ds3", aim65_ds3_intf)
271   MCFG_DL1416T_ADD("ds4", aim65_ds4_intf)
272   MCFG_DL1416T_ADD("ds5", aim65_ds5_intf)
249273
250274   /* Sound - wave sound only */
251275   MCFG_SPEAKER_STANDARD_MONO("mono")
trunk/src/mess/drivers/sitcom.c
r17580r17581
8282   dl1416_cu_w(m_ds1, 1);
8383}
8484
85void sitcom_update_ds0(device_t *device, UINT8 offset, int data)
85void sitcom_update_ds0(device_t *device, int digit, int data)
8686{
87   output_set_digit_value(offset, data);
87   output_set_digit_value(digit, data);
8888}
8989
90void sitcom_update_ds1(device_t *device, UINT8 offset, int data)
90void sitcom_update_ds1(device_t *device, int digit, int data)
9191{
92   output_set_digit_value(4 + offset, data);
92   output_set_digit_value(4 + digit, data);
9393}
9494
95const dl1416_interface sitcom_ds0_intf =
96{
97   sitcom_update_ds0
98};
9599
100const dl1416_interface sitcom_ds1_intf =
101{
102   sitcom_update_ds1
103};
104
96105// SID line used as serial input from a pc
97106READ_LINE_MEMBER( sitcom_state::sid_line )
98107{
r17580r17581
120129   MCFG_CPU_CONFIG(sitcom_cpu_config)
121130
122131   /* video hardware */
123   MCFG_DL1416B_ADD("ds0", sitcom_update_ds0)
124   MCFG_DL1416B_ADD("ds1", sitcom_update_ds1)
132   MCFG_DL1416B_ADD("ds0", sitcom_ds0_intf)
133   MCFG_DL1416B_ADD("ds1", sitcom_ds1_intf)
125134   MCFG_DEFAULT_LAYOUT(layout_sitcom)
126135MACHINE_CONFIG_END
127136
trunk/src/mess/drivers/bebox.c
r17580r17581
153153   SLOT_INTERFACE("cirrus", CIRRUS)
154154SLOT_INTERFACE_END
155155
156static const ide_config ide_intf =
157{
158   bebox_ide_interrupt,
159   NULL,
160   0
161};
162
156163static MACHINE_CONFIG_START( bebox, bebox_state )
157164   /* basic machine hardware */
158165   MCFG_CPU_ADD("ppc1", PPC603, 66000000)   /* 66 MHz */
r17580r17581
195202   MCFG_SCSIDEV_ADD("scsi:cdrom", SCSICD, SCSI_ID_3)
196203   MCFG_LSI53C810_ADD( "scsi:lsi53c810", lsi53c810_intf)
197204
198   MCFG_IDE_CONTROLLER_ADD( "ide", bebox_ide_interrupt, ide_image_devices, "hdd", NULL, false )   /* FIXME */
205   MCFG_IDE_CONTROLLER_ADD( "ide", ide_intf, ide_image_devices, "hdd", NULL, false )   /* FIXME */
199206
200207   /* pci */
201208   MCFG_PCI_BUS_ADD("pcibus", 0)
trunk/src/mess/drivers/cybiko.c
r17580r17581
345345   MCFG_RAM_EXTRA_OPTIONS("1M")
346346MACHINE_CONFIG_END
347347
348const sst39vfx_config cybyko_sst39vfx_intf =
349{
350   16, ENDIANNESS_BIG
351};
352
348353static MACHINE_CONFIG_DERIVED( cybikov2, cybikov1)
349354   // cpu
350355   MCFG_CPU_REPLACE("maincpu", H8S2246, 11059200)
r17580r17581
353358   // machine
354359   MCFG_MACHINE_START(cybikov2)
355360   MCFG_MACHINE_RESET(cybikov2)
356   MCFG_SST39VF020_ADD("flash2", 16, ENDIANNESS_BIG)
361   MCFG_SST39VF020_ADD("flash2", cybyko_sst39vfx_intf)
357362
358363   /* internal ram */
359364   MCFG_RAM_MODIFY(RAM_TAG)
r17580r17581
370375   MCFG_MACHINE_START(cybikoxt)
371376   MCFG_MACHINE_RESET(cybikoxt)
372377   MCFG_DEVICE_REMOVE("flash1")
373   MCFG_SST39VF400A_ADD("flash2", 16, ENDIANNESS_BIG)
378   MCFG_SST39VF400A_ADD("flash2", cybyko_sst39vfx_intf)
374379
375380   /* internal ram */
376381   MCFG_RAM_MODIFY(RAM_TAG)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team