diff options
Diffstat (limited to 'src/mame')
64 files changed, 265 insertions, 234 deletions
diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp index 1b483ff8ed8..7127d99557b 100644 --- a/src/mame/drivers/1942.cpp +++ b/src/mame/drivers/1942.cpp @@ -622,7 +622,7 @@ void _1942_state::_1942(machine_config &config) NETLIST_STREAM_INPUT(config, "snd_nl:cin5", 5, "R_AY2_3.R"); NETLIST_STREAM_OUTPUT(config, "snd_nl:cout0", 0, "R1.1").set_mult_offset(70000.0, 0.0); - //MCFG_NETLIST_STREAM_OUTPUT("snd_nl", 0, "VR.2") + //NETLIST_STREAM_OUTPUT(config, "snd_nl:cout0", 0, "VR.2"); } diff --git a/src/mame/drivers/2mindril.cpp b/src/mame/drivers/2mindril.cpp index 3b9ac3582a0..ecb9912134e 100644 --- a/src/mame/drivers/2mindril.cpp +++ b/src/mame/drivers/2mindril.cpp @@ -355,7 +355,6 @@ void _2mindril_state::drill(machine_config &config) M68000(config, m_maincpu, 16000000); m_maincpu->set_addrmap(AS_PROGRAM, &_2mindril_state::drill_map); m_maincpu->set_vblank_int("screen", FUNC(_2mindril_state::vblank_irq)); - //MCFG_DEVICE_PERIODIC_INT_DRIVER(_2mindril_state, drill_device_irq, 60) GFXDECODE(config, m_gfxdecode, m_palette, gfx_2mindril); tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp index 3abea11e6d8..2ecd557bcca 100644 --- a/src/mame/drivers/amstr_pc.cpp +++ b/src/mame/drivers/amstr_pc.cpp @@ -35,6 +35,7 @@ More information can be found at http://www.seasip.info/AmstradXT/1640tech/index #include "bus/isa/isa.h" #include "bus/isa/isa_cards.h" #include "bus/pc_joy/pc_joy.h" +#include "bus/rs232/rs232.h" #include "machine/pckeybrd.h" #include "machine/pc_lpt.h" @@ -487,9 +488,8 @@ INPUT_PORTS_END void amstrad_pc_state::cfg_com(device_t *device) { - /* has it's own mouse */ - device = device->subdevice("serport0"); - MCFG_SLOT_DEFAULT_OPTION(nullptr) + /* has its own mouse */ + device->subdevice<rs232_port_device>("serport0")->set_default_option(nullptr); } void amstrad_pc_state::cfg_fdc(device_t *device) diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp index aa5cf9db461..6f7bb41e466 100644 --- a/src/mame/drivers/amusco.cpp +++ b/src/mame/drivers/amusco.cpp @@ -601,7 +601,7 @@ void amusco_state::amusco(machine_config &config) void amusco_state::draw88pkr(machine_config &config) { amusco(config); - //MCFG_DEVICE_MODIFY("ppi_outputs") // Some bits are definitely different + // TODO: Some bits of ppi_outputs are definitely different } /************************* diff --git a/src/mame/drivers/apogee.cpp b/src/mame/drivers/apogee.cpp index 745e450de88..e603ce12142 100644 --- a/src/mame/drivers/apogee.cpp +++ b/src/mame/drivers/apogee.cpp @@ -235,7 +235,7 @@ void apogee_state::apogee(machine_config &config) m_ppi8255_1->in_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_r2)); m_ppi8255_1->out_pc_callback().set(FUNC(radio86_state::radio86_8255_portc_w2)); - //MCFG_DEVICE_ADD("ppi8255_2", I8255, 0) + //I8255(config, "ppi8255_2"); i8275_device &i8275(I8275(config, "i8275", XTAL(16'000'000) / 12)); i8275.set_character_width(6); diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp index 8d53b5a77d0..2c1be9ac4b8 100644 --- a/src/mame/drivers/atarig42.cpp +++ b/src/mame/drivers/atarig42.cpp @@ -517,7 +517,8 @@ static const atari_rle_objects_config modesc_0x400 = * *************************************/ -MACHINE_CONFIG_START(atarig42_state::atarig42) +void atarig42_state::atarig42(machine_config &config) +{ /* basic machine hardware */ M68000(config, m_maincpu, ATARI_CLOCK_14MHz); m_maincpu->set_addrmap(AS_PROGRAM, &atarig42_state::main_map); @@ -530,7 +531,9 @@ MACHINE_CONFIG_START(atarig42_state::atarig42) GFXDECODE(config, m_gfxdecode, "palette", gfx_atarig42); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); - MCFG_TILEMAP_ADD_CUSTOM("playfield", "gfxdecode", 2, atarig42_state, get_playfield_tile_info, 8,8, atarig42_playfield_scan, 128,64) + TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8); + m_playfield_tilemap->set_layout(FUNC(atarig42_state::atarig42_playfield_scan), 128,64); + m_playfield_tilemap->set_info_callback(FUNC(atarig42_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(atarig42_state::get_alpha_tile_info)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -551,7 +554,7 @@ MACHINE_CONFIG_START(atarig42_state::atarig42) m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_5); m_jsa->test_read_cb().set_ioport("IN2").bit(6); m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0); -MACHINE_CONFIG_END +} void atarig42_0x200_state::atarig42_0x200(machine_config &config) { diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index 151ed5b1d77..ca989a8e90d 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -807,8 +807,8 @@ static const atari_rle_objects_config modesc = * *************************************/ -MACHINE_CONFIG_START(atarigt_state::atarigt) - +void atarigt_state::atarigt(machine_config &config) +{ /* basic machine hardware */ M68EC020(config, m_maincpu, ATARI_CLOCK_50MHz/2); m_maincpu->set_addrmap(AS_PROGRAM, &atarigt_state::main_map); @@ -822,7 +822,9 @@ MACHINE_CONFIG_START(atarigt_state::atarigt) GFXDECODE(config, m_gfxdecode, m_palette, gfx_atarigt); PALETTE(config, m_palette).set_entries(MRAM_ENTRIES); - MCFG_TILEMAP_ADD_CUSTOM("playfield", "gfxdecode", 2, atarigt_state, get_playfield_tile_info, 8,8, atarigt_playfield_scan, 128,64) + TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8); + m_playfield_tilemap->set_layout(FUNC(atarigt_state::atarigt_playfield_scan), 128,64); + m_playfield_tilemap->set_info_callback(FUNC(atarigt_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64, 32).set_info_callback(FUNC(atarigt_state::get_alpha_tile_info)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -840,8 +842,7 @@ MACHINE_CONFIG_START(atarigt_state::atarigt) /* sound hardware */ ATARI_CAGE(config, m_cage, 0); m_cage->irq_handler().set(FUNC(atarigt_state::cage_irq_callback)); - -MACHINE_CONFIG_END +} void atarigt_state::tmek(machine_config &config) { diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp index d1716fcd31f..6d25473a84c 100644 --- a/src/mame/drivers/atarigx2.cpp +++ b/src/mame/drivers/atarigx2.cpp @@ -1489,8 +1489,8 @@ static const atari_rle_objects_config modesc_0x400 = * *************************************/ -MACHINE_CONFIG_START(atarigx2_state::atarigx2) - +void atarigx2_state::atarigx2(machine_config &config) +{ /* basic machine hardware */ M68EC020(config, m_maincpu, ATARI_CLOCK_14MHz); m_maincpu->set_addrmap(AS_PROGRAM, &atarigx2_state::main_map); @@ -1511,7 +1511,9 @@ MACHINE_CONFIG_START(atarigx2_state::atarigx2) GFXDECODE(config, m_gfxdecode, "palette", gfx_atarigx2); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); - MCFG_TILEMAP_ADD_CUSTOM("playfield", "gfxdecode", 2, atarigx2_state, get_playfield_tile_info, 8,8, atarigx2_playfield_scan, 128,64) + TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8); + m_playfield_tilemap->set_layout(FUNC(atarigx2_state::atarigx2_playfield_scan), 128,64); + m_playfield_tilemap->set_info_callback(FUNC(atarigx2_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(atarigx2_state::get_alpha_tile_info)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -1532,8 +1534,7 @@ MACHINE_CONFIG_START(atarigx2_state::atarigx2) m_jsa->test_read_cb().set_ioport("SERVICE").bit(6); m_jsa->add_route(0, "lspeaker", 1.0); m_jsa->add_route(1, "rspeaker", 1.0); -MACHINE_CONFIG_END - +} void atarigx2_state::atarigx2_0x200(machine_config &config) { diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp index 79c3ffb4f14..8ef9ff076b9 100644 --- a/src/mame/drivers/atarist.cpp +++ b/src/mame/drivers/atarist.cpp @@ -2159,9 +2159,9 @@ void ste_state::ste(machine_config &config) m_ymsnd->add_route(0, "lspeaker", 0.50); m_ymsnd->add_route(0, "rspeaker", 0.50); /* - MCFG_DEVICE_ADD("custom", CUSTOM, 0) // DAC - MCFG_SOUND_ROUTE(0, "rspeaker", 0.50) - MCFG_SOUND_ROUTE(1, "lspeaker", 0.50) + custom_device &custom_dac(CUSTOM(config, "custom", 0)); // DAC + custom_dac.add_route(0, "rspeaker", 0.50); + custom_dac.add_route(1, "lspeaker", 0.50); */ LMC1992(config, LMC1992_TAG); @@ -2202,7 +2202,7 @@ void stbook_state::stbook(machine_config &config) M68000(config, m_maincpu, U517/2); m_maincpu->set_addrmap(AS_PROGRAM, &stbook_state::stbook_map); - //MCFG_DEVICE_ADD(COP888_TAG, COP888, Y700) + //COP888(config, COP888_TAG, Y700); // video hardware SCREEN(config, m_screen, SCREEN_TYPE_LCD); diff --git a/src/mame/drivers/atarittl.cpp b/src/mame/drivers/atarittl.cpp index 9c463ed6ba6..53dd592f48b 100644 --- a/src/mame/drivers/atarittl.cpp +++ b/src/mame/drivers/atarittl.cpp @@ -348,7 +348,6 @@ void stuntcyc_state::stuntcyc(machine_config &config) /* basic machine hardware */ NETLIST_CPU(config, m_maincpu, STUNTCYC_NL_CLOCK).set_source(netlist_stuntcyc); - //MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "VIDEO_OUT", fixedfreq_device, update_vid, "fixfreq") NETLIST_LOGIC_OUTPUT(config, "maincpu:probe_bit0", 0).set_params("probe_bit0", FUNC(stuntcyc_state::probe_bit0_cb)); NETLIST_LOGIC_OUTPUT(config, "maincpu:probe_bit1", 0).set_params("probe_bit1", FUNC(stuntcyc_state::probe_bit1_cb)); NETLIST_LOGIC_OUTPUT(config, "maincpu:probe_bit2", 0).set_params("probe_bit2", FUNC(stuntcyc_state::probe_bit2_cb)); diff --git a/src/mame/drivers/atlantis.cpp b/src/mame/drivers/atlantis.cpp index 87d344b0d0d..ae666dd55a2 100644 --- a/src/mame/drivers/atlantis.cpp +++ b/src/mame/drivers/atlantis.cpp @@ -883,7 +883,7 @@ void atlantis_state::mwskins(machine_config &config) com1.dsr_handler().set(m_uart1, FUNC(ins8250_uart_device::dsr_w)); com1.ri_handler().set(m_uart1, FUNC(ins8250_uart_device::ri_w)); com1.cts_handler().set(m_uart1, FUNC(ins8250_uart_device::cts_w)); - //MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("com1", mwskins_comm) + //com1.set_option_device_input_defaults("com1", DEVICE_INPUT_DEFAULTS_NAME(mwskins_comm)); rs232_port_device &com2(RS232_PORT(config, "com2", default_rs232_devices, nullptr)); com2.rxd_handler().set(m_uart2, FUNC(ins8250_uart_device::rx_w)); diff --git a/src/mame/drivers/atpci.cpp b/src/mame/drivers/atpci.cpp index 8f6897a4198..716722de7bf 100644 --- a/src/mame/drivers/atpci.cpp +++ b/src/mame/drivers/atpci.cpp @@ -48,8 +48,8 @@ WRITE8_MEMBER(at586_state::boot_state_w) void at586_state::tx_config(device_t *device) { - MCFG_I82439TX_CPU( "maincpu" ) - MCFG_I82439TX_REGION( "isa" ) + downcast<i82439tx_device *>(device)->set_cpu("maincpu"); + downcast<i82439tx_device *>(device)->set_region("isa"); } void at586_state::sb_config(device_t *device) diff --git a/src/mame/drivers/bebox.cpp b/src/mame/drivers/bebox.cpp index c73482722b8..300ef895742 100644 --- a/src/mame/drivers/bebox.cpp +++ b/src/mame/drivers/bebox.cpp @@ -221,7 +221,7 @@ void bebox_state::bebox_peripherals(machine_config &config) pcislot0.set_option_machine_config("mpc105", mpc105_config); add_pci_slot(config, "pcibus:1", 1, "cirrus"); - /*MCFG_PCI_BUS_LEGACY_DEVICE(12, nullptr, scsi53c810_pci_read, scsi53c810_pci_write)*/ + /*PCI_BUS_LEGACY_DEVICE(12, nullptr, scsi53c810_pci_read, scsi53c810_pci_write)*/ SMC37C78(config, m_smc37c78, 24'000'000); m_smc37c78->intrq_wr_callback().set(FUNC(bebox_state::fdc_interrupt)); diff --git a/src/mame/drivers/calchase.cpp b/src/mame/drivers/calchase.cpp index 6d9f8322993..5fe5da47241 100644 --- a/src/mame/drivers/calchase.cpp +++ b/src/mame/drivers/calchase.cpp @@ -677,7 +677,8 @@ void calchase_state::machine_reset() membank("bios_ext")->set_base(memregion("bios")->base() + 0); } -MACHINE_CONFIG_START(calchase_state::calchase) +void calchase_state::calchase(machine_config &config) +{ PENTIUM(config, m_maincpu, 133000000); // Cyrix 686MX-PR200 CPU m_maincpu->set_addrmap(AS_PROGRAM, &calchase_state::calchase_map); m_maincpu->set_addrmap(AS_IO, &calchase_state::calchase_io); @@ -688,9 +689,11 @@ MACHINE_CONFIG_START(calchase_state::calchase) ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, calchase_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, calchase_state, intel82371ab_pci_r, intel82371ab_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (0, FUNC(calchase_state::intel82439tx_pci_r), this); + pcibus.set_device_write(0, FUNC(calchase_state::intel82439tx_pci_w), this); + pcibus.set_device_read (7, FUNC(calchase_state::intel82371ab_pci_r), this); + pcibus.set_device_write(7, FUNC(calchase_state::intel82371ab_pci_w), this); /* video hardware */ pcvideo_trident_vga(config); @@ -707,9 +710,10 @@ MACHINE_CONFIG_START(calchase_state::calchase) voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT); vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT); -MACHINE_CONFIG_END +} -MACHINE_CONFIG_START(calchase_state::hostinv) +void calchase_state::hostinv(machine_config &config) +{ PENTIUM(config, m_maincpu, 133000000); // Cyrix 686MX-PR200 CPU m_maincpu->set_addrmap(AS_PROGRAM, &calchase_state::calchase_map); m_maincpu->set_addrmap(AS_IO, &calchase_state::calchase_io); @@ -720,9 +724,11 @@ MACHINE_CONFIG_START(calchase_state::hostinv) ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "cdrom", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, calchase_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, calchase_state, intel82371ab_pci_r, intel82371ab_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (0, FUNC(calchase_state::intel82439tx_pci_r), this); + pcibus.set_device_write(0, FUNC(calchase_state::intel82439tx_pci_w), this); + pcibus.set_device_read (7, FUNC(calchase_state::intel82371ab_pci_r), this); + pcibus.set_device_write(7, FUNC(calchase_state::intel82371ab_pci_w), this); /* video hardware */ pcvideo_trident_vga(config); @@ -735,7 +741,7 @@ MACHINE_CONFIG_START(calchase_state::hostinv) voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT); vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT); -MACHINE_CONFIG_END +} READ32_MEMBER(calchase_state::calchase_idle_skip_r) diff --git a/src/mame/drivers/casloopy.cpp b/src/mame/drivers/casloopy.cpp index 85567a36dbe..00d23c5d65e 100644 --- a/src/mame/drivers/casloopy.cpp +++ b/src/mame/drivers/casloopy.cpp @@ -517,8 +517,8 @@ DEVICE_IMAGE_LOAD_MEMBER( casloopy_state::cart_load ) return image_init_result::PASS; } -MACHINE_CONFIG_START(casloopy_state::casloopy) - +void casloopy_state::casloopy(machine_config &config) +{ /* basic machine hardware */ SH2A(config, m_maincpu, 8000000); m_maincpu->set_addrmap(AS_PROGRAM, &casloopy_state::casloopy_map); @@ -551,7 +551,7 @@ MACHINE_CONFIG_START(casloopy_state::casloopy) /* sound hardware */ SPEAKER(config, "mono").front_center(); -MACHINE_CONFIG_END +} /*************************************************************************** diff --git a/src/mame/drivers/cliffhgr.cpp b/src/mame/drivers/cliffhgr.cpp index e93fae702f3..a000f981410 100644 --- a/src/mame/drivers/cliffhgr.cpp +++ b/src/mame/drivers/cliffhgr.cpp @@ -688,7 +688,8 @@ INPUT_PORTS_END * *************************************/ -MACHINE_CONFIG_START(cliffhgr_state::cliffhgr) +void cliffhgr_state::cliffhgr(machine_config &config) +{ Z80(config, m_maincpu, 4000000); /* 4MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &cliffhgr_state::mainmem); m_maincpu->set_addrmap(AS_IO, &cliffhgr_state::mainport); @@ -708,14 +709,14 @@ MACHINE_CONFIG_START(cliffhgr_state::cliffhgr) vdp.int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); /* override video rendering and raw screen info */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); DISCRETE(config, m_discrete, cliffhgr_discrete).add_route(ALL_OUTPUTS, "lspeaker", 1.0); -MACHINE_CONFIG_END +} diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp index d34ff34a923..5d5c4d7a3a1 100644 --- a/src/mame/drivers/cobra.cpp +++ b/src/mame/drivers/cobra.cpp @@ -3280,8 +3280,8 @@ void cobra_state::machine_reset() m_dmadac[1]->set_frequency(44100); } -MACHINE_CONFIG_START(cobra_state::cobra) - +void cobra_state::cobra(machine_config &config) +{ /* basic machine hardware */ PPC603(config, m_maincpu, 100000000); /* 603EV, 100? MHz */ m_maincpu->set_bus_frequency(XTAL(66'666'700)); /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */ @@ -3297,8 +3297,9 @@ MACHINE_CONFIG_START(cobra_state::cobra) config.m_minimum_quantum = attotime::from_hz(15005); - MCFG_PCI_BUS_LEGACY_ADD(m_legacy_pci, 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, cobra_state, mpc106_pci_r, mpc106_pci_w) + PCI_BUS_LEGACY(config, m_legacy_pci, 0, 0); + m_legacy_pci->set_device_read(0, FUNC(cobra_state::mpc106_pci_r), this); + m_legacy_pci->set_device_write(0, FUNC(cobra_state::mpc106_pci_w), this); ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, true); m_ata->irq_handler().set(FUNC(cobra_state::ide_interrupt)); @@ -3336,7 +3337,7 @@ MACHINE_CONFIG_START(cobra_state::cobra) COBRA_JVS(config, m_jvs1, 0, m_jvs_host, true); COBRA_JVS(config, m_jvs2, 0, m_jvs_host, true); COBRA_JVS(config, m_jvs3, 0, m_jvs_host, true); -MACHINE_CONFIG_END +} /*****************************************************************************/ diff --git a/src/mame/drivers/dccons.cpp b/src/mame/drivers/dccons.cpp index 3a07f574cf5..c227091bd22 100644 --- a/src/mame/drivers/dccons.cpp +++ b/src/mame/drivers/dccons.cpp @@ -594,9 +594,9 @@ INPUT_PORTS_END void dc_cons_state::gdrom_config(device_t *device) { - device = device->subdevice("cdda"); - MCFG_SOUND_ROUTE(0, "^^aica", 1.0) - MCFG_SOUND_ROUTE(1, "^^aica", 1.0) + cdda_device *cdda = device->subdevice<cdda_device>("cdda"); + cdda->add_route(0, "^^aica", 1.0); + cdda->add_route(1, "^^aica", 1.0); } void dc_cons_state::dc(machine_config &config) diff --git a/src/mame/drivers/deco_ld.cpp b/src/mame/drivers/deco_ld.cpp index c4fe0e9a003..04f2dced8be 100644 --- a/src/mame/drivers/deco_ld.cpp +++ b/src/mame/drivers/deco_ld.cpp @@ -462,8 +462,8 @@ void deco_ld_state::machine_start() { } -MACHINE_CONFIG_START(deco_ld_state::rblaster) - +void deco_ld_state::rblaster(machine_config &config) +{ /* basic machine hardware */ M6502(config, m_maincpu, 8000000/2); m_maincpu->set_addrmap(AS_PROGRAM, &deco_ld_state::rblaster_map); @@ -483,7 +483,7 @@ MACHINE_CONFIG_START(deco_ld_state::rblaster) m_laserdisc->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); GFXDECODE(config, m_gfxdecode, m_palette, gfx_rblaster); PALETTE(config, m_palette).set_format(palette_device::BGR_233_inverted, 0x800); @@ -502,7 +502,7 @@ MACHINE_CONFIG_START(deco_ld_state::rblaster) AY8910(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); AY8910(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); -MACHINE_CONFIG_END +} /*************************************************************************** diff --git a/src/mame/drivers/decstation.cpp b/src/mame/drivers/decstation.cpp index 4d7d412e1a9..04623dfa6a4 100644 --- a/src/mame/drivers/decstation.cpp +++ b/src/mame/drivers/decstation.cpp @@ -531,9 +531,7 @@ void decstation_state::threemin_map(address_map &map) void decstation_state::ncr5394(device_t *device) { - devcb_base *devcb; - (void)devcb; - MCFG_DEVICE_CLOCK(10000000) + downcast<ncr53c94_device *>(device)->set_clock(10000000); } static void dec_scsi_devices(device_slot_interface &device) diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp index 2125123dc60..c14042dd9ce 100644 --- a/src/mame/drivers/dlair.cpp +++ b/src/mame/drivers/dlair.cpp @@ -742,26 +742,28 @@ void dlair_state::dlair_base(machine_config &config) } -MACHINE_CONFIG_START(dlair_state::dlair_pr7820) +void dlair_state::dlair_pr7820(machine_config &config) +{ dlair_base(config); PIONEER_PR7820(config, m_pr7820, 0); m_pr7820->add_route(0, "lspeaker", 1.0); m_pr7820->add_route(1, "rspeaker", 1.0); - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "ld_pr7820") -MACHINE_CONFIG_END + m_pr7820->add_ntsc_screen(config, "screen"); +} -MACHINE_CONFIG_START(dlair_state::dlair_ldv1000) +void dlair_state::dlair_ldv1000(machine_config &config) +{ dlair_base(config); PIONEER_LDV1000(config, m_ldv1000, 0); m_ldv1000->add_route(0, "lspeaker", 1.0); m_ldv1000->add_route(1, "rspeaker", 1.0); - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "ld_ldv1000") -MACHINE_CONFIG_END - + m_ldv1000->add_ntsc_screen(config, "screen"); +} -MACHINE_CONFIG_START(dlair_state::dleuro) +void dlair_state::dleuro(machine_config &config) +{ /* basic machine hardware */ Z80(config, m_maincpu, MASTER_CLOCK_EURO/4); m_maincpu->set_daisy_config(dleuro_daisy_chain); @@ -785,7 +787,7 @@ MACHINE_CONFIG_START(dlair_state::dleuro) m_22vp932->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_PAL("screen", "ld_22vp932") + m_22vp932->add_pal_screen(config, "screen"); GFXDECODE(config, m_gfxdecode, m_palette, gfx_dlair); PALETTE(config, m_palette, FUNC(dlair_state::dleuro_palette), 16); @@ -797,7 +799,7 @@ MACHINE_CONFIG_START(dlair_state::dleuro) SPEAKER_SOUND(config, m_speaker); m_speaker->add_route(ALL_OUTPUTS, "lspeaker", 0.33); m_speaker->add_route(ALL_OUTPUTS, "rspeaker", 0.33); -MACHINE_CONFIG_END +} diff --git a/src/mame/drivers/esh.cpp b/src/mame/drivers/esh.cpp index 6fb6c3f2f08..ad1335700c0 100644 --- a/src/mame/drivers/esh.cpp +++ b/src/mame/drivers/esh.cpp @@ -359,7 +359,8 @@ void esh_state::machine_start() /* DRIVER */ -MACHINE_CONFIG_START(esh_state::esh) +void esh_state::esh(machine_config &config) +{ /* main cpu */ Z80(config, m_maincpu, PCB_CLOCK/6); /* The denominator is a Daphne guess based on PacMan's hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &esh_state::z80_0_mem); @@ -376,7 +377,7 @@ MACHINE_CONFIG_START(esh_state::esh) m_laserdisc->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); PALETTE(config, m_palette, FUNC(esh_state::esh_palette), 256); GFXDECODE(config, m_gfxdecode, m_palette, gfx_esh); @@ -387,7 +388,7 @@ MACHINE_CONFIG_START(esh_state::esh) SPEAKER(config, "mono").front_center(); BEEP(config, m_beep, 2000).add_route(ALL_OUTPUTS, "mono", 0.25); -MACHINE_CONFIG_END +} // we just disable even lines so we can simulate line blinking #define ROM_INTERLACED_GFX \ diff --git a/src/mame/drivers/exelv.cpp b/src/mame/drivers/exelv.cpp index f4a8b03a942..87648346998 100644 --- a/src/mame/drivers/exelv.cpp +++ b/src/mame/drivers/exelv.cpp @@ -521,7 +521,7 @@ void exelv_state::exl100(machine_config &config) PALETTE(config, "palette", palette_device::RGB_3BIT); - // MCFG_DEVICE_ADD("vsm", SPEECHROM, 0) + //SPEECHROM(config, "vsm", 0); /* sound */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp index 5f0329ae858..60f32448ccb 100644 --- a/src/mame/drivers/firefox.cpp +++ b/src/mame/drivers/firefox.cpp @@ -647,8 +647,8 @@ GFXDECODE_END * *************************************/ -MACHINE_CONFIG_START(firefox_state::firefox) - +void firefox_state::firefox(machine_config &config) +{ /* basic machine hardware */ MC6809E(config, m_maincpu, MASTER_XTAL/8); // 68B09E m_maincpu->set_addrmap(AS_PROGRAM, &firefox_state::main_map); @@ -696,8 +696,7 @@ MACHINE_CONFIG_START(firefox_state::firefox) m_laserdisc->set_overlay_palette(m_palette); m_laserdisc->add_route(0, "lspeaker", 0.50); m_laserdisc->add_route(1, "rspeaker", 0.50); - - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); X2212(config, "nvram_1c").set_auto_save(true); X2212(config, "nvram_1d").set_auto_save(true); @@ -737,7 +736,7 @@ MACHINE_CONFIG_START(firefox_state::firefox) TMS5220(config, m_tms, MASTER_XTAL/2/11); m_tms->add_route(ALL_OUTPUTS, "lspeaker", 0.75); m_tms->add_route(ALL_OUTPUTS, "rspeaker", 0.75); -MACHINE_CONFIG_END +} diff --git a/src/mame/drivers/fruitpc.cpp b/src/mame/drivers/fruitpc.cpp index 096292da98b..d47e8897a9c 100644 --- a/src/mame/drivers/fruitpc.cpp +++ b/src/mame/drivers/fruitpc.cpp @@ -111,8 +111,7 @@ DEVICE_INPUT_DEFAULTS_END void fruitpc_state::fruitpc_sb_conf(device_t *device) { - device = device->subdevice("pc_joy"); - MCFG_DEVICE_SLOT_INTERFACE(pc_joysticks, nullptr, true) // remove joystick + device->subdevice<pc_joy_device>("pc_joy")->set_default_option(nullptr); // remove joystick } void fruitpc_state::fruitpc(machine_config &config) diff --git a/src/mame/drivers/funkball.cpp b/src/mame/drivers/funkball.cpp index 7fc0c1f59f1..6c546a9aed1 100644 --- a/src/mame/drivers/funkball.cpp +++ b/src/mame/drivers/funkball.cpp @@ -763,7 +763,8 @@ static DEVICE_INPUT_DEFAULTS_START( terminal ) DEVICE_INPUT_DEFAULTS( "TERM_CONF", 0x080, 0x080 ) // Auto LF on CR DEVICE_INPUT_DEFAULTS_END -MACHINE_CONFIG_START(funkball_state::funkball) +void funkball_state::funkball(machine_config &config) +{ MEDIAGX(config, m_maincpu, 66666666*3.5); // 66,6 MHz x 3.5 m_maincpu->set_addrmap(AS_PROGRAM, &funkball_state::funkball_map); m_maincpu->set_addrmap(AS_IO, &funkball_state::funkball_io); @@ -771,9 +772,11 @@ MACHINE_CONFIG_START(funkball_state::funkball) pcat_common(config); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, funkball_state, voodoo_0_pci_r, voodoo_0_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(18, DEVICE_SELF, funkball_state, cx5510_pci_r, cx5510_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (7, FUNC(funkball_state::voodoo_0_pci_r), this); + pcibus.set_device_write(7, FUNC(funkball_state::voodoo_0_pci_w), this); + pcibus.set_device_read (18, FUNC(funkball_state::cx5510_pci_r), this); + pcibus.set_device_write(18, FUNC(funkball_state::cx5510_pci_w), this); ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); @@ -809,7 +812,7 @@ MACHINE_CONFIG_START(funkball_state::funkball) INTEL_28F320J5(config, "u29"); INTEL_28F320J5(config, "u30"); INTEL_28F320J5(config, "u3"); -MACHINE_CONFIG_END +} ROM_START( funkball ) ROM_REGION32_LE(0x20000, "bios", ROMREGION_ERASEFF) diff --git a/src/mame/drivers/gamecstl.cpp b/src/mame/drivers/gamecstl.cpp index 4e9c30d33f5..947eaced689 100644 --- a/src/mame/drivers/gamecstl.cpp +++ b/src/mame/drivers/gamecstl.cpp @@ -444,7 +444,8 @@ void gamecstl_state::machine_reset() membank("bank1")->set_base(memregion("bios")->base() + 0x30000); } -MACHINE_CONFIG_START(gamecstl_state::gamecstl) +void gamecstl_state::gamecstl(machine_config &config) +{ /* basic machine hardware */ PENTIUM3(config, m_maincpu, 200000000); m_maincpu->set_addrmap(AS_PROGRAM, &gamecstl_state::gamecstl_map); @@ -453,9 +454,11 @@ MACHINE_CONFIG_START(gamecstl_state::gamecstl) pcat_common(config); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, gamecstl_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, gamecstl_state, intel82371ab_pci_r, intel82371ab_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (0, FUNC(gamecstl_state::intel82439tx_pci_r), this); + pcibus.set_device_write(0, FUNC(gamecstl_state::intel82439tx_pci_w), this); + pcibus.set_device_read (7, FUNC(gamecstl_state::intel82371ab_pci_r), this); + pcibus.set_device_write(7, FUNC(gamecstl_state::intel82371ab_pci_w), this); ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); @@ -471,7 +474,7 @@ MACHINE_CONFIG_START(gamecstl_state::gamecstl) GFXDECODE(config, m_gfxdecode, m_palette, gfx_cga); PALETTE(config, m_palette).set_entries(16); -MACHINE_CONFIG_END +} void gamecstl_state::init_gamecstl() { diff --git a/src/mame/drivers/gammagic.cpp b/src/mame/drivers/gammagic.cpp index 55e1477f347..9b1172e634b 100644 --- a/src/mame/drivers/gammagic.cpp +++ b/src/mame/drivers/gammagic.cpp @@ -130,7 +130,8 @@ void gammagic_state::machine_start() { } -MACHINE_CONFIG_START(gammagic_state::gammagic) +void gammagic_state::gammagic(machine_config &config) +{ PENTIUM(config, m_maincpu, 133000000); // Intel Pentium 133 m_maincpu->set_addrmap(AS_PROGRAM, &gammagic_state::gammagic_map); m_maincpu->set_addrmap(AS_IO, &gammagic_state::gammagic_io); @@ -138,14 +139,15 @@ MACHINE_CONFIG_START(gammagic_state::gammagic) pcat_common(config); -// I82371SB(config, "i82371sb", 0); -// MCFG_I82439TX_ADD("i82439tx", "maincpu", "user") - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) -// MCFG_PCI_BUS_LEGACY_DEVICE(0, "i82439tx", i82439tx_pci_read, i82439tx_pci_write) -// MCFG_PCI_BUS_LEGACY_DEVICE(1, "i82371sb", i82371sb_pci_read, i82371sb_pci_write) + PCI_BUS_LEGACY(config, "pcibus", 0, 0); +// pcibus.set_device_read (0, FUNC(gammagic_state::intel82439tx_pci_r), this); +// pcibus.set_device_write(0, FUNC(gammagic_state::intel82439tx_pci_w), this); +// pcibus.set_device_read (7, FUNC(gammagic_state::intel82371ab_pci_r), this); +// pcibus.set_device_write(7, FUNC(gammagic_state::intel82371ab_pci_w), this); + /* video hardware */ pcvideo_vga(config); -MACHINE_CONFIG_END +} ROM_START( gammagic ) diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp index 974fefb172e..ba5f2b9f230 100644 --- a/src/mame/drivers/gottlieb.cpp +++ b/src/mame/drivers/gottlieb.cpp @@ -584,7 +584,7 @@ void gottlieb_state::audio_handle_zero_crossing(const attotime &zerotime, bool l } -void gottlieb_state::laserdisc_audio_process(laserdisc_device &device, int samplerate, int samples, const int16_t *ch0, const int16_t *ch1) +void gottlieb_state::laserdisc_audio_process(int samplerate, int samples, const int16_t *ch0, const int16_t *ch1) { bool logit = LOG_AUDIO_DECODE && machine().input().code_pressed(KEYCODE_L); attotime time_per_sample = attotime::from_hz(samplerate); @@ -1799,7 +1799,7 @@ void gottlieb_state::g2laser(machine_config &config) GOTTLIEB_SOUND_REV2(config, m_r2_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); PIONEER_PR8210(config, m_laserdisc, 0); - m_laserdisc->set_audio(laserdisc_device::audio_delegate(&gottlieb_state::laserdisc_audio_process, this)); + m_laserdisc->set_audio(FUNC(gottlieb_state::laserdisc_audio_process), this); m_laserdisc->set_overlay(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, FUNC(gottlieb_state::screen_update)); m_laserdisc->set_overlay_clip(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8); m_laserdisc->set_overlay_palette("palette"); @@ -1865,7 +1865,7 @@ void gottlieb_state::cobram3(machine_config &config) m_r2_sound->enable_cobram3_mods(); PIONEER_PR8210(config, m_laserdisc, 0); - m_laserdisc->set_audio(laserdisc_device::audio_delegate(&gottlieb_state::laserdisc_audio_process, this)); + m_laserdisc->set_audio(FUNC(gottlieb_state::laserdisc_audio_process), this); m_laserdisc->set_overlay(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, FUNC(gottlieb_state::screen_update)); m_laserdisc->set_overlay_clip(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8); m_laserdisc->set_overlay_palette("palette"); diff --git a/src/mame/drivers/gpworld.cpp b/src/mame/drivers/gpworld.cpp index c1aa1838129..90147b8dcdf 100644 --- a/src/mame/drivers/gpworld.cpp +++ b/src/mame/drivers/gpworld.cpp @@ -497,8 +497,8 @@ static GFXDECODE_START( gfx_gpworld ) GFXDECODE_END /* DRIVER */ -MACHINE_CONFIG_START(gpworld_state::gpworld) - +void gpworld_state::gpworld(machine_config &config) +{ /* main cpu */ Z80(config, m_maincpu, GUESSED_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &gpworld_state::mainmem); @@ -513,7 +513,7 @@ MACHINE_CONFIG_START(gpworld_state::gpworld) m_laserdisc->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gpworld); PALETTE(config, m_palette).set_entries(1024); @@ -521,7 +521,7 @@ MACHINE_CONFIG_START(gpworld_state::gpworld) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -MACHINE_CONFIG_END +} ROM_START( gpworld ) diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp index fa30e8af068..27624425f38 100644 --- a/src/mame/drivers/harddriv.cpp +++ b/src/mame/drivers/harddriv.cpp @@ -1835,7 +1835,7 @@ void racedrivc_panorama_side_board_device_state::device_add_mconfig(machine_conf /* basic machine hardware */ /* multisync board without MSP */ adsp(config); /* ADSP board */ // dsk(config); /* DSK board */ -// MCFG_DEVICE_ADD("sound_board", HARDDRIV_SOUND_BOARD, 0) /* driver sound board */ +// HARDDRIV_SOUND_BOARD(config, "sound_board", 0); /* driver sound board */ } /* Stun Runner */ diff --git a/src/mame/drivers/istellar.cpp b/src/mame/drivers/istellar.cpp index ee0b0555d17..f31809d82d2 100644 --- a/src/mame/drivers/istellar.cpp +++ b/src/mame/drivers/istellar.cpp @@ -273,7 +273,8 @@ WRITE_LINE_MEMBER(istellar_state::vblank_irq) /* DRIVER */ -MACHINE_CONFIG_START(istellar_state::istellar) +void istellar_state::istellar(machine_config &config) +{ /* main cpu */ Z80(config, m_maincpu, GUESSED_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &istellar_state::z80_0_mem); @@ -302,7 +303,7 @@ MACHINE_CONFIG_START(istellar_state::istellar) m_laserdisc->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); subdevice<screen_device>("screen")->screen_vblank().set(FUNC(istellar_state::vblank_irq)); // Daphne says "TODO: get the real interstellar resistor values" @@ -313,7 +314,7 @@ MACHINE_CONFIG_START(istellar_state::istellar) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -MACHINE_CONFIG_END +} /* There is a photo of the PCB with blurry IC locations and labels. Comments reflect what I can (barely) see. */ diff --git a/src/mame/drivers/jpmmps.cpp b/src/mame/drivers/jpmmps.cpp index c2f759d8a91..303afba7ef4 100644 --- a/src/mame/drivers/jpmmps.cpp +++ b/src/mame/drivers/jpmmps.cpp @@ -265,7 +265,7 @@ void jpmmps_state::jpmmps(machine_config &config) mainlatch.q_out_cb<6>().set_nop(); // bb mainlatch.q_out_cb<7>().set_nop(); // diagnostic led - //MCFG_DEVICE_ADD("reelmcu", TMS7041, XTAL(5'000'000)) + //TMS7041(config, "reelmcu", XTAL(5'000'000)); i8255_device &ic26(I8255(config, "ppi8255_ic26")); // Port B 0 is coin lockout diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp index b48b58dda13..5deb364a2d4 100644 --- a/src/mame/drivers/konamigx.cpp +++ b/src/mame/drivers/konamigx.cpp @@ -1634,7 +1634,7 @@ void konamigx_state::konamigx(machine_config &config) /* These parameters are actual value written to the CCU. tbyahhoo attract mode desync is caused by another matter. */ - //MCFG_SCREEN_vblank_time(ATTOSECONDS_IN_USEC(600)) + //m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(600)); // TODO: WTF, without these most games crashes? Some legacy call in video code??? m_screen->set_size(1024, 1024); m_screen->set_visarea(24, 24+288-1, 16, 16+224-1); diff --git a/src/mame/drivers/konblands.cpp b/src/mame/drivers/konblands.cpp index 4edf9ddf888..6078b275cb5 100644 --- a/src/mame/drivers/konblands.cpp +++ b/src/mame/drivers/konblands.cpp @@ -276,8 +276,8 @@ WRITE_LINE_MEMBER(konblands_state::ld_command_strobe_cb) m_maincpu->set_input_line(M6809_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); } -MACHINE_CONFIG_START(konblands_state::konblands) - +void konblands_state::konblands(machine_config &config) +{ /* basic machine hardware */ MC6809E(config, m_maincpu, MASTER_CLOCK/12); m_maincpu->set_addrmap(AS_PROGRAM, &konblands_state::konblands_map); @@ -292,7 +292,7 @@ MACHINE_CONFIG_START(konblands_state::konblands) m_laserdisc->set_overlay_palette("palette"); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); GFXDECODE(config, m_gfxdecode, "palette", gfx_konblands); diff --git a/src/mame/drivers/ldplayer.cpp b/src/mame/drivers/ldplayer.cpp index c621648f3c1..360763e8ee9 100644 --- a/src/mame/drivers/ldplayer.cpp +++ b/src/mame/drivers/ldplayer.cpp @@ -47,7 +47,7 @@ protected: virtual void machine_reset() override; // callback hook - chd_file *get_disc(laserdisc_device &device); + chd_file *get_disc(); // internal helpers void process_commands(); @@ -164,7 +164,7 @@ protected: * *************************************/ -chd_file *ldplayer_state::get_disc(laserdisc_device &device) +chd_file *ldplayer_state::get_disc() { bool found = false; // open a path to the ROMs and find the first CHD file @@ -632,32 +632,32 @@ void ldplayer_state::ldplayer_ntsc(machine_config &config) } -MACHINE_CONFIG_START(ldv1000_state::ldv1000) +void ldv1000_state::ldv1000(machine_config &config) +{ ldplayer_ntsc(config); - MCFG_LASERDISC_LDV1000_ADD("laserdisc") - MCFG_LASERDISC_GET_DISC(laserdisc_device::get_disc_delegate(&ldv1000_state::get_disc, this)) - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + pioneer_ldv1000_device &laserdisc(PIONEER_LDV1000(config, "laserdisc")); + laserdisc.set_get_disc(FUNC(ldv1000_state::get_disc), this); + laserdisc.add_ntsc_screen(config, "screen"); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MCFG_DEVICE_MODIFY("laserdisc") - MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) - MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) -MACHINE_CONFIG_END + laserdisc.add_route(0, "lspeaker", 1.0); + laserdisc.add_route(1, "rspeaker", 1.0); +} -MACHINE_CONFIG_START(pr8210_state::pr8210) +void pr8210_state::pr8210(machine_config &config) +{ ldplayer_ntsc(config); - MCFG_LASERDISC_PR8210_ADD("laserdisc") - MCFG_LASERDISC_GET_DISC(laserdisc_device::get_disc_delegate(&pr8210_state::get_disc, this)) - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + pioneer_pr8210_device &laserdisc(PIONEER_PR8210(config, "laserdisc")); + laserdisc.set_get_disc(FUNC(pr8210_state::get_disc), this); + laserdisc.add_ntsc_screen(config, "screen"); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MCFG_DEVICE_MODIFY("laserdisc") - MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) - MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) -MACHINE_CONFIG_END + laserdisc.add_route(0, "lspeaker", 1.0); + laserdisc.add_route(1, "rspeaker", 1.0); +} diff --git a/src/mame/drivers/lgp.cpp b/src/mame/drivers/lgp.cpp index 2158a992817..f2f4fc4d76d 100644 --- a/src/mame/drivers/lgp.cpp +++ b/src/mame/drivers/lgp.cpp @@ -410,7 +410,8 @@ void lgp_state::lgp_palette(palette_device &palette) const } /* DRIVER */ -MACHINE_CONFIG_START(lgp_state::lgp) +void lgp_state::lgp(machine_config &config) +{ /* main cpu */ Z80(config, m_maincpu, CPU_PCB_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &lgp_state::main_program_map); @@ -430,7 +431,7 @@ MACHINE_CONFIG_START(lgp_state::lgp) m_laserdisc->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); PALETTE(config, m_palette, FUNC(lgp_state::lgp_palette), 256); @@ -439,7 +440,7 @@ MACHINE_CONFIG_START(lgp_state::lgp) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -MACHINE_CONFIG_END +} ROM_START( lgp ) diff --git a/src/mame/drivers/magictg.cpp b/src/mame/drivers/magictg.cpp index a39a4dfb253..49815c6bcd6 100644 --- a/src/mame/drivers/magictg.cpp +++ b/src/mame/drivers/magictg.cpp @@ -910,7 +910,8 @@ INPUT_PORTS_END * *************************************/ -MACHINE_CONFIG_START(magictg_state::magictg) +void magictg_state::magictg(machine_config &config) +{ R5000BE(config, m_mips, 150000000); /* TODO: CPU type and clock are unknown */ //m_mips->set_icache_size(16384); /* TODO: Unknown */ //m_mips->set_dcache_size(16384); /* TODO: Unknown */ @@ -927,14 +928,18 @@ MACHINE_CONFIG_START(magictg_state::magictg) DMADAC(config, "dac1").add_route(ALL_OUTPUTS, "rspeaker", 1.0); DMADAC(config, "dac2").add_route(ALL_OUTPUTS, "lspeaker", 1.0); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, magictg_state, pci_dev0_r, pci_dev0_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, magictg_state, voodoo_0_pci_r, voodoo_0_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (0, FUNC(magictg_state::pci_dev0_r), this); + pcibus.set_device_write(0, FUNC(magictg_state::pci_dev0_w), this); + pcibus.set_device_read (7, FUNC(magictg_state::voodoo_0_pci_r), this); + pcibus.set_device_write(7, FUNC(magictg_state::voodoo_0_pci_w), this); #if defined(USE_TWO_3DFX) - MCFG_PCI_BUS_LEGACY_DEVICE(8, DEVICE_SELF, magictg_state, voodoo_1_pci_r, voodoo_1_pci_w) + pcibus.set_device_read (8, FUNC(magictg_state::voodoo_1_pci_r), this); + pcibus.set_device_write(8, FUNC(magictg_state::voodoo_1_pci_w), this); #endif - MCFG_PCI_BUS_LEGACY_DEVICE(9, DEVICE_SELF, magictg_state, zr36120_pci_r, zr36120_pci_w) // TODO: ZR36120 device + pcibus.set_device_read (9, FUNC(magictg_state::zr36120_pci_r), this); // TODO: ZR36120 device + pcibus.set_device_write(9, FUNC(magictg_state::zr36120_pci_w), this); // TODO: ZR36120 device VOODOO_1(config, m_voodoo[0], STD_VOODOO_1_CLOCK); m_voodoo[0]->set_fbmem(2); @@ -954,7 +959,7 @@ MACHINE_CONFIG_START(magictg_state::magictg) screen.set_size(1024, 1024); screen.set_visarea(0, 511, 16, 447); screen.set_screen_update(FUNC(magictg_state::screen_update_magictg)); -MACHINE_CONFIG_END +} /************************************* diff --git a/src/mame/drivers/magtouch.cpp b/src/mame/drivers/magtouch.cpp index 5be7b28db81..9649d47af2e 100644 --- a/src/mame/drivers/magtouch.cpp +++ b/src/mame/drivers/magtouch.cpp @@ -189,8 +189,7 @@ DEVICE_INPUT_DEFAULTS_END void magtouch_state::magtouch_sb_conf(device_t *device) { - device = device->subdevice("pc_joy"); - MCFG_DEVICE_SLOT_INTERFACE(pc_joysticks, nullptr, true) // remove joystick + device->subdevice<pc_joy_device>("pc_joy")->set_default_option(nullptr); // remove joystick } void magtouch_state::magtouch(machine_config &config) diff --git a/src/mame/drivers/mediagx.cpp b/src/mame/drivers/mediagx.cpp index 27831b89759..61f4cfae945 100644 --- a/src/mame/drivers/mediagx.cpp +++ b/src/mame/drivers/mediagx.cpp @@ -880,8 +880,8 @@ void mediagx_state::ramdac_map(address_map &map) map(0x000, 0x3ff).rw(m_ramdac, FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb666_w)); } -MACHINE_CONFIG_START(mediagx_state::mediagx) - +void mediagx_state::mediagx(machine_config &config) +{ /* basic machine hardware */ MEDIAGX(config, m_maincpu, 166000000); m_maincpu->set_addrmap(AS_PROGRAM, &mediagx_state::mediagx_map); @@ -890,8 +890,9 @@ MACHINE_CONFIG_START(mediagx_state::mediagx) pcat_common(config); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(18, DEVICE_SELF, mediagx_state, cx5510_pci_r, cx5510_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (18, FUNC(mediagx_state::cx5510_pci_r), this); + pcibus.set_device_write(18, FUNC(mediagx_state::cx5510_pci_w), this); ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set(m_pic8259_2, FUNC(pic8259_device::ir6_w)); @@ -919,7 +920,7 @@ MACHINE_CONFIG_START(mediagx_state::mediagx) DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "lspeaker", 1.0); DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "rspeaker", 1.0); -MACHINE_CONFIG_END +} void mediagx_state::init_mediagx() diff --git a/src/mame/drivers/midqslvr.cpp b/src/mame/drivers/midqslvr.cpp index af25727af8e..0c607f87f72 100644 --- a/src/mame/drivers/midqslvr.cpp +++ b/src/mame/drivers/midqslvr.cpp @@ -417,7 +417,8 @@ void midqslvr_state::machine_reset() membank("video_bank2")->set_base(memregion("video_bios")->base() + 0x4000); } -MACHINE_CONFIG_START(midqslvr_state::midqslvr) +void midqslvr_state::midqslvr(machine_config &config) +{ PENTIUM(config, m_maincpu, 333000000); // actually Celeron 333 m_maincpu->set_addrmap(AS_PROGRAM, &midqslvr_state::midqslvr_map); m_maincpu->set_addrmap(AS_IO, &midqslvr_state::midqslvr_io); @@ -425,16 +426,18 @@ MACHINE_CONFIG_START(midqslvr_state::midqslvr) pcat_common(config); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE( 0, DEVICE_SELF, midqslvr_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(31, DEVICE_SELF, midqslvr_state, intel82371ab_pci_r, intel82371ab_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read ( 0, FUNC(midqslvr_state::intel82439tx_pci_r), this); + pcibus.set_device_write( 0, FUNC(midqslvr_state::intel82439tx_pci_w), this); + pcibus.set_device_read (31, FUNC(midqslvr_state::intel82371ab_pci_r), this); + pcibus.set_device_write(31, FUNC(midqslvr_state::intel82371ab_pci_w), this); ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); /* video hardware */ pcvideo_vga(config); -MACHINE_CONFIG_END +} ROM_START( offrthnd ) diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp index 41c9f546132..c916d4055e9 100644 --- a/src/mame/drivers/pc.cpp +++ b/src/mame/drivers/pc.cpp @@ -755,7 +755,6 @@ Options: 8087 FPU, K101 memory upgrade in 64K steps, 1.2MB floppy and controller void pc_state::ncrpc4i(machine_config & config) { pccga(config); - //MCFG_DEVICE_MODIFY("mb:isa") ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock ISA8_SLOT(config, "isa7", 0, "mb:isa", pc_isa8_cards, nullptr, false); diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp index 3d776a7ce23..77d60e34fe3 100644 --- a/src/mame/drivers/pc9801.cpp +++ b/src/mame/drivers/pc9801.cpp @@ -2282,9 +2282,9 @@ void pc9801_state::pc9801_sasi(machine_config &config) void pc9801_state::cdrom_headphones(device_t *device) { - device = device->subdevice("cdda"); - MCFG_SOUND_ROUTE(0, "^^lheadphone", 1.0) - MCFG_SOUND_ROUTE(1, "^^rheadphone", 1.0) + cdda_device *cdda = device->subdevice<cdda_device>("cdda"); + cdda->add_route(0, "^^lheadphone", 1.0); + cdda->add_route(1, "^^rheadphone", 1.0); } void pc9801_state::pc9801_ide(machine_config &config) @@ -2463,7 +2463,7 @@ void pc9801_state::pc9801ux(machine_config &config) maincpu.set_addrmap(AS_IO, &pc9801_state::pc9801ux_io); maincpu.set_a20_callback(i80286_cpu_device::a20_cb(&pc9801_state::a20_286, this)); maincpu.set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); -// MCFG_DEVICE_MODIFY("i8237", AM9157A, 10000000) // unknown clock +// AM9157A(config, "i8237", 10000000); // unknown clock } void pc9801_state::pc9801bx2(machine_config &config) diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index 416b0fa45af..12ba6bb4d4c 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -159,8 +159,7 @@ DEVICE_INPUT_DEFAULTS_END void pcat_dyn_state::pcat_dyn_sb_conf(device_t *device) { - device = device->subdevice("pc_joy"); - MCFG_DEVICE_SLOT_INTERFACE(pc_joysticks, nullptr, true) // remove joystick + device->subdevice<pc_joy_device>("pc_joy")->set_default_option(nullptr); // remove joystick } void pcat_dyn_state::pcat_dyn(machine_config &config) diff --git a/src/mame/drivers/pcipc.cpp b/src/mame/drivers/pcipc.cpp index b7b430ae094..394e8bba498 100644 --- a/src/mame/drivers/pcipc.cpp +++ b/src/mame/drivers/pcipc.cpp @@ -536,7 +536,7 @@ void pcipc_state::pcipc(machine_config &config) i82371sb_ide_device &ide(I82371SB_IDE(config, ":pci:07.1", 0)); ide.irq_pri().set(":pci:07.0", FUNC(i82371sb_isa_device::pc_irq14_w)); ide.irq_sec().set(":pci:07.0", FUNC(i82371sb_isa_device::pc_irq15_w)); -// MCFG_DEVICE_ADD( ":pci:12.0", MGA2064W, 0) +// MGA2064W(config, ":pci:12.0", 0); ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", superio_config); ISA16_SLOT(config, "isa1", 0, "pci:07.0:isabus", pc_isa16_cards, "svga_et4k", false); diff --git a/src/mame/drivers/photoply.cpp b/src/mame/drivers/photoply.cpp index 0e8e8d69e10..95e4389a113 100644 --- a/src/mame/drivers/photoply.cpp +++ b/src/mame/drivers/photoply.cpp @@ -300,7 +300,8 @@ static GFXDECODE_START( gfx_photoply ) //there's also a 8x16 entry (just after the 8x8) GFXDECODE_END -MACHINE_CONFIG_START(photoply_state::photoply) +void photoply_state::photoply(machine_config &config) +{ /* basic machine hardware */ I486DX4(config, m_maincpu, 75000000); /* I486DX4, 75 or 100 Mhz */ m_maincpu->set_addrmap(AS_PROGRAM, &photoply_state::photoply_map); @@ -317,8 +318,9 @@ MACHINE_CONFIG_START(photoply_state::photoply) ide_controller_32_device &ide2(IDE_CONTROLLER_32(config, "ide2").options(ata_devices, nullptr, nullptr, true)); ide2.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir7_w)); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(5, DEVICE_SELF, photoply_state, sis_pcm_r, sis_pcm_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (5, FUNC(photoply_state::sis_pcm_r), this); + pcibus.set_device_write(5, FUNC(photoply_state::sis_pcm_w), this); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(XTAL(25'174'800),900,0,640,526,0,480); @@ -329,7 +331,7 @@ MACHINE_CONFIG_START(photoply_state::photoply) EEPROM_93C46_16BIT(config, "eeprom") .write_time(attotime::from_usec(1)) .erase_all_time(attotime::from_usec(10)); -MACHINE_CONFIG_END +} ROM_START(photoply) diff --git a/src/mame/drivers/pinball2k.cpp b/src/mame/drivers/pinball2k.cpp index eda9e7d8e0d..6d337040e06 100644 --- a/src/mame/drivers/pinball2k.cpp +++ b/src/mame/drivers/pinball2k.cpp @@ -602,8 +602,8 @@ void pinball2k_state::ramdac_map(address_map &map) map(0x000, 0x3ff).rw("ramdac", FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb666_w)); } -MACHINE_CONFIG_START(pinball2k_state::mediagx) - +void pinball2k_state::mediagx(machine_config &config) +{ /* basic machine hardware */ MEDIAGX(config, m_maincpu, 166000000); m_maincpu->set_addrmap(AS_PROGRAM, &pinball2k_state::mediagx_map); @@ -612,8 +612,9 @@ MACHINE_CONFIG_START(pinball2k_state::mediagx) pcat_common(config); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(18, DEVICE_SELF, pinball2k_state, cx5510_pci_r, cx5510_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (18, FUNC(pinball2k_state::cx5510_pci_r), this); + pcibus.set_device_write(18, FUNC(pinball2k_state::cx5510_pci_w), this); ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); @@ -634,7 +635,7 @@ MACHINE_CONFIG_START(pinball2k_state::mediagx) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -MACHINE_CONFIG_END +} void pinball2k_state::init_mediagx() diff --git a/src/mame/drivers/pong.cpp b/src/mame/drivers/pong.cpp index e65af51db2b..70bf3590974 100644 --- a/src/mame/drivers/pong.cpp +++ b/src/mame/drivers/pong.cpp @@ -470,10 +470,6 @@ INPUT_PORTS_END void pong_state::pong(machine_config &config) { /* basic machine hardware */ - //MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK) - //MCFG_NETLIST_SETUP(pong) - //MCFG_NETLIST_SETUP_MEMBER(this, &pong_state::NETLIST_NAME(pong)) - NETLIST_CPU(config, "maincpu", NETLIST_CLOCK).set_source(this, &pong_state::NETLIST_NAME(pong)); NETLIST_ANALOG_INPUT(config, "maincpu:vr0", "ic_b9_R.R").set_mult_offset(1.0 / 100.0 * RES_K(50), RES_K(56) ); diff --git a/src/mame/drivers/queen.cpp b/src/mame/drivers/queen.cpp index 2d4e875db57..57cdde0a4ca 100644 --- a/src/mame/drivers/queen.cpp +++ b/src/mame/drivers/queen.cpp @@ -280,9 +280,8 @@ void queen_state::machine_reset() membank("bios_ext")->set_base(memregion("bios")->base() + 0x20000); } - - -MACHINE_CONFIG_START(queen_state::queen) +void queen_state::queen(machine_config &config) +{ PENTIUM3(config, m_maincpu, 533000000/16); // Celeron or Pentium 3, 533 Mhz m_maincpu->set_addrmap(AS_PROGRAM, &queen_state::queen_map); m_maincpu->set_addrmap(AS_IO, &queen_state::queen_io); @@ -290,9 +289,11 @@ MACHINE_CONFIG_START(queen_state::queen) pcat_common(config); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, queen_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, queen_state, intel82371ab_pci_r, intel82371ab_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (0, FUNC(queen_state::intel82439tx_pci_r), this); + pcibus.set_device_write(0, FUNC(queen_state::intel82439tx_pci_w), this); + pcibus.set_device_read (7, FUNC(queen_state::intel82371ab_pci_r), this); + pcibus.set_device_write(7, FUNC(queen_state::intel82371ab_pci_w), this); ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); @@ -302,9 +303,7 @@ MACHINE_CONFIG_START(queen_state::queen) /* video hardware */ pcvideo_vga(config); -MACHINE_CONFIG_END - - +} ROM_START( queen ) diff --git a/src/mame/drivers/savquest.cpp b/src/mame/drivers/savquest.cpp index 770b38343da..101937de541 100644 --- a/src/mame/drivers/savquest.cpp +++ b/src/mame/drivers/savquest.cpp @@ -812,7 +812,8 @@ void savquest_isa16_cards(device_slot_interface &device) device.option_add("sb16", ISA16_SOUND_BLASTER_16); } -MACHINE_CONFIG_START(savquest_state::savquest) +void savquest_state::savquest(machine_config &config) +{ PENTIUM2(config, m_maincpu, 450000000); // actually Pentium II 450 m_maincpu->set_addrmap(AS_PROGRAM, &savquest_state::savquest_map); m_maincpu->set_addrmap(AS_IO, &savquest_state::savquest_io); @@ -821,10 +822,13 @@ MACHINE_CONFIG_START(savquest_state::savquest) pcat_common(config); DS12885(config.replace(), "rtc"); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, savquest_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, savquest_state, intel82371ab_pci_r, intel82371ab_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(13, DEVICE_SELF, savquest_state, pci_3dfx_r, pci_3dfx_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read ( 0, FUNC(savquest_state::intel82439tx_pci_r), this); + pcibus.set_device_write( 0, FUNC(savquest_state::intel82439tx_pci_w), this); + pcibus.set_device_read ( 7, FUNC(savquest_state::intel82371ab_pci_r), this); + pcibus.set_device_write( 7, FUNC(savquest_state::intel82371ab_pci_w), this); + pcibus.set_device_read (13, FUNC(savquest_state::pci_3dfx_r), this); + pcibus.set_device_write(13, FUNC(savquest_state::pci_3dfx_w), this); ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); @@ -848,7 +852,7 @@ MACHINE_CONFIG_START(savquest_state::savquest) m_voodoo->set_screen_tag("screen"); m_voodoo->set_cpu_tag(m_maincpu); m_voodoo->vblank_callback().set(FUNC(savquest_state::vblank_assert)); -MACHINE_CONFIG_END +} ROM_START( savquest ) ROM_REGION32_LE(0x40000, "bios", 0) diff --git a/src/mame/drivers/sbc6510.cpp b/src/mame/drivers/sbc6510.cpp index 10ef94c8412..1092fc0852d 100644 --- a/src/mame/drivers/sbc6510.cpp +++ b/src/mame/drivers/sbc6510.cpp @@ -282,8 +282,7 @@ void sbc6510_state::sbc6510(machine_config &config) M6510(config, m_maincpu, XTAL(1'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &sbc6510_state::sbc6510_mem); - ATMEGA88(config, m_videocpu, XTAL(16'000'000)); -// MCFG_DEVICE_DISABLE() // trips SLEEP opcode, needs to be emulated + ATMEGA88(config, m_videocpu, XTAL(16'000'000)); // Video CPU trips SLEEP opcode, needs to be emulated m_videocpu->set_addrmap(AS_PROGRAM, &sbc6510_state::sbc6510_video_mem); m_videocpu->set_addrmap(AS_DATA, &sbc6510_state::sbc6510_video_data); m_videocpu->set_addrmap(AS_IO, &sbc6510_state::sbc6510_video_io); diff --git a/src/mame/drivers/segald.cpp b/src/mame/drivers/segald.cpp index 9f64b02d752..8f5f3de8a64 100644 --- a/src/mame/drivers/segald.cpp +++ b/src/mame/drivers/segald.cpp @@ -377,7 +377,8 @@ void segald_state::machine_start() /* DRIVER */ -MACHINE_CONFIG_START(segald_state::astron) +void segald_state::astron(machine_config &config) +{ /* main cpu */ Z80(config, m_maincpu, SCHEMATIC_CLOCK/4); m_maincpu->set_addrmap(AS_PROGRAM, &segald_state::mainmem); @@ -391,7 +392,7 @@ MACHINE_CONFIG_START(segald_state::astron) m_laserdisc->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); GFXDECODE(config, m_gfxdecode, m_palette, gfx_segald); PALETTE(config, m_palette).set_entries(256); @@ -399,7 +400,7 @@ MACHINE_CONFIG_START(segald_state::astron) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -MACHINE_CONFIG_END +} ROM_START( astron ) diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp index f95a0c17beb..872152d2a02 100644 --- a/src/mame/drivers/segas32.cpp +++ b/src/mame/drivers/segas32.cpp @@ -2585,9 +2585,9 @@ void segas32_state::system32_cd_map(address_map &map) void segas32_cd_state::cdrom_config(device_t *device) { - device = device->subdevice("cdda"); - MCFG_SOUND_ROUTE( 0, "^^lspeaker", 0.30 ) - MCFG_SOUND_ROUTE( 1, "^^rspeaker", 0.30 ) + cdda_device *cdda = device->subdevice<cdda_device>("cdda"); + cdda->add_route(0, "^^lspeaker", 1.0); + cdda->add_route(1, "^^rspeaker", 1.0); } void segas32_cd_state::device_add_mconfig(machine_config &config) diff --git a/src/mame/drivers/superdq.cpp b/src/mame/drivers/superdq.cpp index fe721023bde..3cc3a1267bf 100644 --- a/src/mame/drivers/superdq.cpp +++ b/src/mame/drivers/superdq.cpp @@ -336,15 +336,14 @@ void superdq_state::machine_start() } -MACHINE_CONFIG_START(superdq_state::superdq) - +void superdq_state::superdq(machine_config &config) +{ /* basic machine hardware */ Z80(config, m_maincpu, MASTER_CLOCK/8); m_maincpu->set_addrmap(AS_PROGRAM, &superdq_state::superdq_map); m_maincpu->set_addrmap(AS_IO, &superdq_state::superdq_io); m_maincpu->set_vblank_int("screen", FUNC(superdq_state::superdq_vblank)); - PIONEER_LDV1000(config, m_laserdisc, 0); m_laserdisc->set_overlay(256, 256, FUNC(superdq_state::screen_update_superdq)); m_laserdisc->set_overlay_palette(m_palette); @@ -352,7 +351,7 @@ MACHINE_CONFIG_START(superdq_state::superdq) m_laserdisc->add_route(1, "rspeaker", 1.0); /* video hardware */ - MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") + m_laserdisc->add_ntsc_screen(config, "screen"); GFXDECODE(config, m_gfxdecode, m_palette, gfx_superdq); PALETTE(config, m_palette, FUNC(superdq_state::superdq_palette), 32); @@ -362,7 +361,7 @@ MACHINE_CONFIG_START(superdq_state::superdq) SPEAKER(config, "rspeaker").front_right(); SN76496(config, "snsnd", MASTER_CLOCK/8).add_route(ALL_OUTPUTS, "lspeaker", 0.8); -MACHINE_CONFIG_END +} diff --git a/src/mame/drivers/sv8000.cpp b/src/mame/drivers/sv8000.cpp index 5725a225b8b..290be9e8908 100644 --- a/src/mame/drivers/sv8000.cpp +++ b/src/mame/drivers/sv8000.cpp @@ -414,7 +414,7 @@ void sv8000_state::sv8000(machine_config &config) /* software lists */ SOFTWARE_LIST(config, "cart_list").set_original("sv8000"); -MACHINE_CONFIG_END +} /* ROM definition */ ROM_START( sv8000 ) diff --git a/src/mame/drivers/taitowlf.cpp b/src/mame/drivers/taitowlf.cpp index 71ff3629d2e..8b6d87bbbd0 100644 --- a/src/mame/drivers/taitowlf.cpp +++ b/src/mame/drivers/taitowlf.cpp @@ -369,8 +369,8 @@ void taitowlf_state::taitowlf_palette(palette_device &palette) const } #endif -MACHINE_CONFIG_START(taitowlf_state::taitowlf) - +void taitowlf_state::taitowlf(machine_config &config) +{ /* basic machine hardware */ PENTIUM(config, m_maincpu, 200000000); m_maincpu->set_addrmap(AS_PROGRAM, &taitowlf_state::taitowlf_map); @@ -378,9 +378,11 @@ MACHINE_CONFIG_START(taitowlf_state::taitowlf) m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, taitowlf_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, taitowlf_state, intel82371ab_pci_r, intel82371ab_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (0, FUNC(taitowlf_state::intel82439tx_pci_r), this); + pcibus.set_device_write(0, FUNC(taitowlf_state::intel82439tx_pci_w), this); + pcibus.set_device_read (7, FUNC(taitowlf_state::intel82371ab_pci_r), this); + pcibus.set_device_write(7, FUNC(taitowlf_state::intel82371ab_pci_w), this); pcat_common(config); @@ -397,7 +399,7 @@ MACHINE_CONFIG_START(taitowlf_state::taitowlf) screen.set_screen_update(FUNC(taitowlf_state::screen_update_taitowlf)); PALETTE(config, m_palette, FUNC(taitowlf_state::taitowlf_palette), 256); #endif -MACHINE_CONFIG_END +} void taitowlf_state::init_taitowlf() { diff --git a/src/mame/drivers/unichamp.cpp b/src/mame/drivers/unichamp.cpp index a53ad2b4aa9..2330b244fc0 100644 --- a/src/mame/drivers/unichamp.cpp +++ b/src/mame/drivers/unichamp.cpp @@ -248,7 +248,7 @@ void unichamp_state::unichamp(machine_config &config) /* basic machine hardware */ //The CPU is really clocked this way: - //MCFG_DEVICE_ADD("maincpu", CP1610, XTAL(3'579'545)/4) + //CP1610(config, m_maincpu, XTAL(3'579'545)/4); //But since it is only running 7752/29868 th's of the time... //TODO find a more accurate method? (the emulation will be the same though) CP1610(config, m_maincpu, (7752.0/29868.0)*XTAL(3'579'545)/4); diff --git a/src/mame/drivers/vc4000.cpp b/src/mame/drivers/vc4000.cpp index 7348158c552..0fb132ba475 100644 --- a/src/mame/drivers/vc4000.cpp +++ b/src/mame/drivers/vc4000.cpp @@ -529,7 +529,7 @@ static void vc4000_cart(device_slot_interface &device) void vc4000_state::vc4000(machine_config &config) { /* basic machine hardware */ -// MCFG_DEVICE_ADD("maincpu", S2650, 865000) /* 3550000/4, 3580000/3, 4430000/3 */ +// S2650(config, m_maincpu, 865000); /* 3550000/4, 3580000/3, 4430000/3 */ S2650(config, m_maincpu, 3546875/4); m_maincpu->set_addrmap(AS_PROGRAM, &vc4000_state::vc4000_mem); m_maincpu->sense_handler().set(FUNC(vc4000_state::vc4000_vsync_r)); diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp index a8048e8cd89..140a94cfa65 100644 --- a/src/mame/drivers/viper.cpp +++ b/src/mame/drivers/viper.cpp @@ -2415,17 +2415,19 @@ void viper_state::machine_reset() m_ds2430_unk_status = 1; } -MACHINE_CONFIG_START(viper_state::viper) - +void viper_state::viper(machine_config &config) +{ /* basic machine hardware */ MPC8240(config, m_maincpu, 166666666); // Unknown m_maincpu->set_bus_frequency(100000000); m_maincpu->set_addrmap(AS_PROGRAM, &viper_state::viper_map); m_maincpu->set_vblank_int("screen", FUNC(viper_state::viper_vblank)); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, viper_state, mpc8240_pci_r, mpc8240_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(12, DEVICE_SELF, viper_state, voodoo3_pci_r, voodoo3_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read ( 0, FUNC(viper_state::mpc8240_pci_r), this); + pcibus.set_device_write( 0, FUNC(viper_state::mpc8240_pci_w), this); + pcibus.set_device_read (12, FUNC(viper_state::voodoo3_pci_r), this); + pcibus.set_device_write(12, FUNC(viper_state::voodoo3_pci_w), this); ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, true); @@ -2454,7 +2456,7 @@ MACHINE_CONFIG_START(viper_state::viper) SPEAKER(config, "rspeaker").front_right(); M48T58(config, "m48t58", 0); -MACHINE_CONFIG_END +} /*****************************************************************************/ diff --git a/src/mame/drivers/voyager.cpp b/src/mame/drivers/voyager.cpp index b441bdbcd0c..ff851556fe5 100644 --- a/src/mame/drivers/voyager.cpp +++ b/src/mame/drivers/voyager.cpp @@ -502,7 +502,8 @@ void voyager_state::machine_reset() membank("bank1")->set_base(memregion("bios")->base()); } -MACHINE_CONFIG_START(voyager_state::voyager) +void voyager_state::voyager(machine_config &config) +{ PENTIUM3(config, m_maincpu, 133000000); // actually AMD Duron CPU of unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &voyager_state::voyager_map); m_maincpu->set_addrmap(AS_IO, &voyager_state::voyager_io); @@ -513,9 +514,11 @@ MACHINE_CONFIG_START(voyager_state::voyager) ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); - MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) - MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, voyager_state, intel82439tx_pci_r, intel82439tx_pci_w) - MCFG_PCI_BUS_LEGACY_DEVICE(7, DEVICE_SELF, voyager_state, intel82371ab_pci_r, intel82371ab_pci_w) + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pcibus.set_device_read (0, FUNC(voyager_state::intel82439tx_pci_r), this); + pcibus.set_device_write(0, FUNC(voyager_state::intel82439tx_pci_w), this); + pcibus.set_device_read (7, FUNC(voyager_state::intel82371ab_pci_r), this); + pcibus.set_device_write(7, FUNC(voyager_state::intel82371ab_pci_w), this); /* video hardware */ pcvideo_trident_vga(config); @@ -523,7 +526,7 @@ MACHINE_CONFIG_START(voyager_state::voyager) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -MACHINE_CONFIG_END +} void voyager_state::init_voyager() { diff --git a/src/mame/drivers/xavix.cpp b/src/mame/drivers/xavix.cpp index 039844e905e..7132cad5cfe 100644 --- a/src/mame/drivers/xavix.cpp +++ b/src/mame/drivers/xavix.cpp @@ -1268,7 +1268,7 @@ void xavix_state::xavix(machine_config &config) m_screen->set_size(32*8, 32*8); m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1); m_screen->set_palette(m_palette); - //MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE) + //m_screen->set_video_attributes(VIDEO_UPDATE_SCANLINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_xavix); diff --git a/src/mame/drivers/xtom3d.cpp b/src/mame/drivers/xtom3d.cpp index a0a54f06372..24963181556 100644 --- a/src/mame/drivers/xtom3d.cpp +++ b/src/mame/drivers/xtom3d.cpp @@ -421,14 +421,11 @@ void xtom3d_state::xtom3d(machine_config &config) pcat_common(config); - PCI_BUS_LEGACY(config, m_pcibus, 0); - m_pcibus->set_busnum(0); - m_pcibus->set_device(0, - pci_bus_legacy_read_delegate(&xtom3d_state::intel82439tx_pci_r, "xtom3d_state::intel82439tx_pci_r", DEVICE_SELF, (xtom3d_state *)0), - pci_bus_legacy_write_delegate(&xtom3d_state::intel82439tx_pci_w, "xtom3d_state::intel82439tx_pci_w", DEVICE_SELF, (xtom3d_state *)0)); - m_pcibus->set_device(7, - pci_bus_legacy_read_delegate(&xtom3d_state::intel82371ab_pci_r, "xtom3d_state::intel82371ab_pci_r", DEVICE_SELF, (xtom3d_state *)0), - pci_bus_legacy_write_delegate(&xtom3d_state::intel82371ab_pci_w, "xtom3d_state::intel82371ab_pci_w", DEVICE_SELF, (xtom3d_state *)0)); + PCI_BUS_LEGACY(config, m_pcibus, 0, 0); + m_pcibus->set_device_read (0, FUNC(xtom3d_state::intel82439tx_pci_r), this); + m_pcibus->set_device_write(0, FUNC(xtom3d_state::intel82439tx_pci_w), this); + m_pcibus->set_device_read (7, FUNC(xtom3d_state::intel82371ab_pci_r), this); + m_pcibus->set_device_write(7, FUNC(xtom3d_state::intel82371ab_pci_w), this); /* video hardware */ pcvideo_vga(config); diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h index 1012b095d3c..d0bd03806c7 100644 --- a/src/mame/includes/gottlieb.h +++ b/src/mame/includes/gottlieb.h @@ -110,7 +110,7 @@ private: inline void audio_end_state(); void audio_process_clock(bool logit); void audio_handle_zero_crossing(const attotime &zerotime, bool logit); - void laserdisc_audio_process(laserdisc_device &device, int samplerate, int samples, const int16_t *ch0, const int16_t *ch1); + void laserdisc_audio_process(int samplerate, int samples, const int16_t *ch0, const int16_t *ch1); void gottlieb_map(address_map &map); void reactor_map(address_map &map); diff --git a/src/mame/video/mystston.cpp b/src/mame/video/mystston.cpp index ef5f62baa32..bcf5961e61f 100644 --- a/src/mame/video/mystston.cpp +++ b/src/mame/video/mystston.cpp @@ -26,7 +26,7 @@ * *************************************/ // HMC20 -// MCFG_SCREEN_RAW_PARAMS(XTAL(12'000'000)/2,384,0,256,272,8,248) +// set_raw(XTAL(12'000'000)/2, 384, 0, 256, 272, 8, 248) #define PIXEL_CLOCK (XTAL(12'000'000) / 2) #define HTOTAL (384) #define HBEND (0) |