diff options
37 files changed, 196 insertions, 164 deletions
diff --git a/src/devices/cpu/arm7/lpc210x.cpp b/src/devices/cpu/arm7/lpc210x.cpp index 19f21ea7b00..62c0732c194 100644 --- a/src/devices/cpu/arm7/lpc210x.cpp +++ b/src/devices/cpu/arm7/lpc210x.cpp @@ -276,5 +276,6 @@ void lpc210x_device::write_timer(address_space &space, int timer, int offset, ui -MACHINE_CONFIG_START(lpc210x_device::device_add_mconfig) -MACHINE_CONFIG_END +void lpc210x_device::device_add_mconfig(machine_config &config) +{ +} diff --git a/src/devices/cpu/z80/kl5c80a12.cpp b/src/devices/cpu/z80/kl5c80a12.cpp index 44e1d9256b3..a061f3e7cf3 100644 --- a/src/devices/cpu/z80/kl5c80a12.cpp +++ b/src/devices/cpu/z80/kl5c80a12.cpp @@ -46,5 +46,6 @@ void kl5c80a12_device::device_reset() /* CPU interface */ -MACHINE_CONFIG_START(kl5c80a12_device::device_add_mconfig) -MACHINE_CONFIG_END +void kl5c80a12_device::device_add_mconfig(machine_config &config) +{ +} diff --git a/src/devices/machine/68153bim.cpp b/src/devices/machine/68153bim.cpp index 30be9ea5e81..8df821a813e 100644 --- a/src/devices/machine/68153bim.cpp +++ b/src/devices/machine/68153bim.cpp @@ -67,12 +67,13 @@ DEFINE_DEVICE_TYPE(EI68C153, ei68c153_device, "ei68c153", "EPIC // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(bim68153_device::device_add_mconfig) - MCFG_DEVICE_ADD(CHN0_TAG, MC68153_CHANNEL, 0) - MCFG_DEVICE_ADD(CHN1_TAG, MC68153_CHANNEL, 0) - MCFG_DEVICE_ADD(CHN2_TAG, MC68153_CHANNEL, 0) - MCFG_DEVICE_ADD(CHN3_TAG, MC68153_CHANNEL, 0) -MACHINE_CONFIG_END +void bim68153_device::device_add_mconfig(machine_config &config) +{ + MC68153_CHANNEL(config, m_chn[0], 0); + MC68153_CHANNEL(config, m_chn[1], 0); + MC68153_CHANNEL(config, m_chn[2], 0); + MC68153_CHANNEL(config, m_chn[3], 0); +} //************************************************************************** // LIVE DEVICE diff --git a/src/devices/machine/akiko.cpp b/src/devices/machine/akiko.cpp index 0394750fe30..eb5fa929059 100644 --- a/src/devices/machine/akiko.cpp +++ b/src/devices/machine/akiko.cpp @@ -38,8 +38,9 @@ DEFINE_DEVICE_TYPE(AKIKO, akiko_device, "akiko", "CBM AKIKO") // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(akiko_device::device_add_mconfig) -MACHINE_CONFIG_END +void akiko_device::device_add_mconfig(machine_config &config) +{ +} //************************************************************************** diff --git a/src/devices/machine/fdc37c665gt.cpp b/src/devices/machine/fdc37c665gt.cpp index 4c6f23651db..f2df880d2e8 100644 --- a/src/devices/machine/fdc37c665gt.cpp +++ b/src/devices/machine/fdc37c665gt.cpp @@ -49,9 +49,10 @@ void fdc37c665gt_device::device_start() { } -MACHINE_CONFIG_START(fdc37c665gt_device::device_add_mconfig) - MCFG_DEVICE_ADD("uart1", NS16550, XTAL(24'000'000)/13) - MCFG_DEVICE_ADD("uart2", NS16550, XTAL(24'000'000)/13) -MACHINE_CONFIG_END +void fdc37c665gt_device::device_add_mconfig(machine_config &config) +{ + NS16550(config, m_uart1, XTAL(24'000'000)/13); + NS16550(config, m_uart2, XTAL(24'000'000)/13); +} DEFINE_DEVICE_TYPE(FDC37C665GT, fdc37c665gt_device, "fdc37c665gt", "FDC37C665GT") diff --git a/src/devices/machine/ie15_kbd.cpp b/src/devices/machine/ie15_kbd.cpp index 13ee3ea5744..79a4bb86aad 100644 --- a/src/devices/machine/ie15_kbd.cpp +++ b/src/devices/machine/ie15_kbd.cpp @@ -122,8 +122,9 @@ const tiny_rom_entry *ie15_keyboard_device::device_rom_region() const return ROM_NAME( ie15_keyboard ); } -MACHINE_CONFIG_START(ie15_keyboard_device::device_add_mconfig) -MACHINE_CONFIG_END +void ie15_keyboard_device::device_add_mconfig(machine_config &config) +{ +} void ie15_keyboard_device::device_start() diff --git a/src/devices/machine/ldv1000.cpp b/src/devices/machine/ldv1000.cpp index 4a9b1295b75..4f7a0196e40 100644 --- a/src/devices/machine/ldv1000.cpp +++ b/src/devices/machine/ldv1000.cpp @@ -272,7 +272,8 @@ const tiny_rom_entry *pioneer_ldv1000_device::device_rom_region() const // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(pioneer_ldv1000_device::device_add_mconfig) +void pioneer_ldv1000_device::device_add_mconfig(machine_config &config) +{ Z80(config, m_z80_cpu, XTAL(5'000'000)/2); m_z80_cpu->set_daisy_config(daisy_chain); m_z80_cpu->set_addrmap(AS_PROGRAM, &pioneer_ldv1000_device::ldv1000_map); @@ -291,7 +292,7 @@ MACHINE_CONFIG_START(pioneer_ldv1000_device::device_add_mconfig) ldvppi1.in_pa_callback().set(FUNC(pioneer_ldv1000_device::ppi1_porta_r)); ldvppi1.out_pb_callback().set(FUNC(pioneer_ldv1000_device::ppi1_portb_w)); ldvppi1.out_pc_callback().set(FUNC(pioneer_ldv1000_device::ppi1_portc_w)); -MACHINE_CONFIG_END +} //------------------------------------------------- diff --git a/src/devices/machine/scc2698b.cpp b/src/devices/machine/scc2698b.cpp index 1f6c537f52d..8a362e26d45 100644 --- a/src/devices/machine/scc2698b.cpp +++ b/src/devices/machine/scc2698b.cpp @@ -768,7 +768,8 @@ attotime scc2698b_device::generate_baudrate(int block, int tx, int table_index) -MACHINE_CONFIG_START(scc2698b_device::device_add_mconfig) +void scc2698b_device::device_add_mconfig(machine_config &config) +{ for (required_device<scc2698b_channel> &channel : m_channel) SCC2698B_CHANNEL(config, channel, 0); -MACHINE_CONFIG_END +} diff --git a/src/devices/machine/spg110.cpp b/src/devices/machine/spg110.cpp index 01ec544d52b..d1d4f9cfabd 100644 --- a/src/devices/machine/spg110.cpp +++ b/src/devices/machine/spg110.cpp @@ -212,7 +212,8 @@ GFXDECODE_END -MACHINE_CONFIG_START(spg110_device::device_add_mconfig) +void spg110_device::device_add_mconfig(machine_config &config) +{ // PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x100); // PALETTE(config, m_palette).set_format(palette_device::RGB_565, 0x100); // PALETTE(config, m_palette).set_format(palette_device::IRGB_4444, 0x100); @@ -221,7 +222,7 @@ MACHINE_CONFIG_START(spg110_device::device_add_mconfig) PALETTE(config, m_palette, palette_device::BLACK, 256); GFXDECODE(config, m_gfxdecode, m_palette, gfx); -MACHINE_CONFIG_END +} device_memory_interface::space_config_vector spg110_device::memory_space_config() const diff --git a/src/devices/sound/es1373.cpp b/src/devices/sound/es1373.cpp index 9279e3558cd..dbc0c6a96d8 100644 --- a/src/devices/sound/es1373.cpp +++ b/src/devices/sound/es1373.cpp @@ -71,10 +71,11 @@ #define ES_PCI_READ 0 #define ES_PCI_WRITE 1 -MACHINE_CONFIG_START(es1373_device::device_add_mconfig) +void es1373_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -MACHINE_CONFIG_END +} DEFINE_DEVICE_TYPE(ES1373, es1373_device, "es1373", "Creative Labs Ensoniq AudioPCI97 ES1373") diff --git a/src/devices/video/gba_lcd.cpp b/src/devices/video/gba_lcd.cpp index 36c8e83b27e..36214bb1ad4 100644 --- a/src/devices/video/gba_lcd.cpp +++ b/src/devices/video/gba_lcd.cpp @@ -1807,11 +1807,12 @@ void gba_lcd_device::device_reset() m_hbl_timer->adjust(attotime::never); } -MACHINE_CONFIG_START(gba_lcd_device::device_add_mconfig) - MCFG_SCREEN_ADD("screen", LCD) - MCFG_SCREEN_RAW_PARAMS(XTAL(16'777'216) / 4, 308, 0, 240, 228, 0, 160) - MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, gba_lcd_device, screen_update) - MCFG_SCREEN_PALETTE("palette") +void gba_lcd_device::device_add_mconfig(machine_config &config) +{ + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); + screen.set_raw(XTAL(16'777'216) / 4, 308, 0, 240, 228, 0, 160); + screen.set_screen_update(FUNC(gba_lcd_device::screen_update)); + screen.set_palette("palette"); PALETTE(config, "palette", FUNC(gba_lcd_device::gba_palette), 32768); -MACHINE_CONFIG_END +} diff --git a/src/devices/video/ps2gs.cpp b/src/devices/video/ps2gs.cpp index 79ba24339d2..298b3779bbe 100644 --- a/src/devices/video/ps2gs.cpp +++ b/src/devices/video/ps2gs.cpp @@ -52,9 +52,10 @@ ps2_gs_device::~ps2_gs_device() { } -MACHINE_CONFIG_START(ps2_gs_device::device_add_mconfig) - MCFG_DEVICE_ADD(m_gif, SONYPS2_GIF, clock(), DEVICE_SELF, m_vu1) -MACHINE_CONFIG_END +void ps2_gs_device::device_add_mconfig(machine_config &config) +{ + SONYPS2_GIF(config, m_gif, clock(), DEVICE_SELF, m_vu1); +} void ps2_gs_device::device_start() { diff --git a/src/mame/machine/abc80kb.cpp b/src/mame/machine/abc80kb.cpp index dcf61566f86..80f1117b651 100644 --- a/src/mame/machine/abc80kb.cpp +++ b/src/mame/machine/abc80kb.cpp @@ -126,11 +126,12 @@ void abc80_keyboard_device::abc80_keyboard_io(address_map &map) // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(abc80_keyboard_device::device_add_mconfig) - MCFG_DEVICE_ADD(I8048_TAG, I8048, 4000000) - MCFG_DEVICE_IO_MAP(abc80_keyboard_io) - MCFG_DEVICE_DISABLE() -MACHINE_CONFIG_END +void abc80_keyboard_device::device_add_mconfig(machine_config &config) +{ + I8048(config, m_maincpu, 4000000); + m_maincpu->set_addrmap(AS_IO, &abc80_keyboard_device::abc80_keyboard_io); + m_maincpu->set_disable(); +} //------------------------------------------------- diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp index 8a99cd83a71..466b5b6cb2c 100644 --- a/src/mame/machine/apollo.cpp +++ b/src/mame/machine/apollo.cpp @@ -1047,7 +1047,8 @@ static void apollo_isa_cards(device_slot_interface &device) device.option_add("3c505", ISA16_3C505); // 3Com 3C505 Ethernet card } -MACHINE_CONFIG_START(apollo_state::common) +void apollo_state::common(machine_config &config) +{ // configuration MUST be reset first ! APOLLO_CONF(config, APOLLO_CONF_TAG, 0); @@ -1134,16 +1135,16 @@ MACHINE_CONFIG_START(apollo_state::common) m_isa->drq6_callback().set(m_dma8237_2, FUNC(am9517a_device::dreq2_w)); m_isa->drq7_callback().set(m_dma8237_2, FUNC(am9517a_device::dreq3_w)); - MCFG_DEVICE_ADD("isa1", ISA16_SLOT, 0, APOLLO_ISA_TAG, apollo_isa_cards, "wdc", false) // FIXME: determine ISA bus clock - MCFG_DEVICE_ADD("isa2", ISA16_SLOT, 0, APOLLO_ISA_TAG, apollo_isa_cards, "ctape", false) - MCFG_DEVICE_ADD("isa3", ISA16_SLOT, 0, APOLLO_ISA_TAG, apollo_isa_cards, "3c505", false) - MCFG_DEVICE_ADD("isa4", ISA16_SLOT, 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false) - MCFG_DEVICE_ADD("isa5", ISA16_SLOT, 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false) - MCFG_DEVICE_ADD("isa6", ISA16_SLOT, 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false) - MCFG_DEVICE_ADD("isa7", ISA16_SLOT, 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false) + ISA16_SLOT(config, "isa1", 0, APOLLO_ISA_TAG, apollo_isa_cards, "wdc", false); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "isa2", 0, APOLLO_ISA_TAG, apollo_isa_cards, "ctape", false); + ISA16_SLOT(config, "isa3", 0, APOLLO_ISA_TAG, apollo_isa_cards, "3c505", false); + ISA16_SLOT(config, "isa4", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); + ISA16_SLOT(config, "isa5", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); + ISA16_SLOT(config, "isa6", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); + ISA16_SLOT(config, "isa7", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); SOFTWARE_LIST(config, "ctape_list").set_original("apollo_ctape"); -MACHINE_CONFIG_END +} // for machines with the keyboard and a graphics head void apollo_state::apollo(machine_config &config) diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp index df35df56944..faff3d4cdeb 100644 --- a/src/mame/machine/at.cpp +++ b/src/mame/machine/at.cpp @@ -54,7 +54,8 @@ void at_mb_device::at_softlists(machine_config &config) SOFTWARE_LIST(config, "at_cdrom_list").set_original("ibm5170_cdrom"); } -MACHINE_CONFIG_START(at_mb_device::device_add_mconfig) +void at_mb_device::device_add_mconfig(machine_config &config) +{ PIT8254(config, m_pit8254, 0); m_pit8254->set_clk<0>(4772720/4); /* heartbeat IRQ */ m_pit8254->out_handler<0>().set("pic8259_master", FUNC(pic8259_device::ir0_w)); @@ -134,8 +135,7 @@ MACHINE_CONFIG_START(at_mb_device::device_add_mconfig) /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); at_keyboard_controller_device &keybc(AT_KEYBOARD_CONTROLLER(config, "keybc", 12_MHz_XTAL)); keybc.hot_res().set_inputline(":maincpu", INPUT_LINE_RESET); @@ -144,10 +144,10 @@ MACHINE_CONFIG_START(at_mb_device::device_add_mconfig) keybc.kbd_clk().set("pc_kbdc", FUNC(pc_kbdc_device::clock_write_from_mb)); keybc.kbd_data().set("pc_kbdc", FUNC(pc_kbdc_device::data_write_from_mb)); - MCFG_DEVICE_ADD("pc_kbdc", PC_KBDC, 0) - MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE("keybc", at_keyboard_controller_device, kbd_clk_w)) - MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE("keybc", at_keyboard_controller_device, kbd_data_w)) -MACHINE_CONFIG_END + pc_kbdc_device &pc_kbdc(PC_KBDC(config, "pc_kbdc", 0)); + pc_kbdc.out_clock_cb().set("keybc", FUNC(at_keyboard_controller_device::kbd_clk_w)); + pc_kbdc.out_data_cb().set("keybc", FUNC(at_keyboard_controller_device::kbd_data_w)); +} void at_mb_device::map(address_map &map) diff --git a/src/mame/machine/cedar_magnet_plane.cpp b/src/mame/machine/cedar_magnet_plane.cpp index 0fd0301d2c9..12f3596a8ba 100644 --- a/src/mame/machine/cedar_magnet_plane.cpp +++ b/src/mame/machine/cedar_magnet_plane.cpp @@ -71,10 +71,11 @@ WRITE8_MEMBER(cedar_magnet_plane_device::plane_portcf_w) m_cf_data = data; } -MACHINE_CONFIG_START(cedar_magnet_plane_device::device_add_mconfig) - MCFG_DEVICE_ADD("planecpu", Z80,4000000) - MCFG_DEVICE_PROGRAM_MAP(cedar_magnet_plane_map) - MCFG_DEVICE_IO_MAP(cedar_magnet_plane_io) +void cedar_magnet_plane_device::device_add_mconfig(machine_config &config) +{ + z80_device &planecpu(Z80(config, "planecpu", 4000000)); + planecpu.set_addrmap(AS_PROGRAM, &cedar_magnet_plane_device::cedar_magnet_plane_map); + planecpu.set_addrmap(AS_IO, &cedar_magnet_plane_device::cedar_magnet_plane_io); z80pio_device& pio0(Z80PIO(config, "z80pio0", 4000000/2)); // pio0.out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); @@ -89,7 +90,7 @@ MACHINE_CONFIG_START(cedar_magnet_plane_device::device_add_mconfig) pio1.out_pa_callback().set(FUNC(cedar_magnet_plane_device::pio1_pa_w)); // pio1.in_pb_callback().set(FUNC(cedar_magnet_plane_device::pio1_pb_r)); pio1.out_pb_callback().set(FUNC(cedar_magnet_plane_device::pio1_pb_w)); -MACHINE_CONFIG_END +} READ8_MEMBER(cedar_magnet_plane_device::pio0_pa_r) diff --git a/src/mame/machine/cedar_magnet_sprite.cpp b/src/mame/machine/cedar_magnet_sprite.cpp index 4c21f4da167..a871fd3b7ab 100644 --- a/src/mame/machine/cedar_magnet_sprite.cpp +++ b/src/mame/machine/cedar_magnet_sprite.cpp @@ -201,10 +201,11 @@ WRITE8_MEMBER(cedar_magnet_sprite_device::sprite_port9c_w) // printf("%s:sprite_port9c_w %02x\n", machine().describe_context().c_str(), data); } -MACHINE_CONFIG_START(cedar_magnet_sprite_device::device_add_mconfig) - MCFG_DEVICE_ADD("spritecpu", Z80,4000000) - MCFG_DEVICE_PROGRAM_MAP(cedar_magnet_sprite_map) - MCFG_DEVICE_IO_MAP(cedar_magnet_sprite_io) +void cedar_magnet_sprite_device::device_add_mconfig(machine_config &config) +{ + z80_device &spritecpu(Z80(config, "spritecpu", 4000000)); + spritecpu.set_addrmap(AS_PROGRAM, &cedar_magnet_sprite_device::cedar_magnet_sprite_map); + spritecpu.set_addrmap(AS_IO, &cedar_magnet_sprite_device::cedar_magnet_sprite_io); Z80PIO(config, m_pio0, 4000000/2); // m_pio0->out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); @@ -228,8 +229,8 @@ MACHINE_CONFIG_START(cedar_magnet_sprite_device::device_add_mconfig) m_pio2->out_pb_callback().set(FUNC(cedar_magnet_sprite_device::pio2_pb_w)); - ADDRESS_MAP_BANK(config, "sp_sub_ram").set_map(&cedar_magnet_sprite_device::cedar_magnet_sprite_sub_ram_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); -MACHINE_CONFIG_END + ADDRESS_MAP_BANK(config, m_sprite_ram_bankdev).set_map(&cedar_magnet_sprite_device::cedar_magnet_sprite_sub_ram_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); +} READ8_MEMBER(cedar_magnet_sprite_device::pio0_pa_r) diff --git a/src/mame/machine/cit101_kbd.cpp b/src/mame/machine/cit101_kbd.cpp index 9f26b0e5f3c..dedefb7e335 100644 --- a/src/mame/machine/cit101_kbd.cpp +++ b/src/mame/machine/cit101_kbd.cpp @@ -153,11 +153,11 @@ INPUT_PORTS_START(cit101_hle_keyboard) PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_UNUSED) // actually used for special stop code INPUT_PORTS_END -MACHINE_CONFIG_START(cit101_hle_keyboard_device::device_add_mconfig) +void cit101_hle_keyboard_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("beeper", BEEP, 786) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + BEEP(config, m_beeper, 786).add_route(ALL_OUTPUTS, "mono", 0.50); +} ioport_constructor cit101_hle_keyboard_device::device_input_ports() const { diff --git a/src/mame/machine/cuda.cpp b/src/mame/machine/cuda.cpp index 4ee92a6a68c..cd7de260827 100644 --- a/src/mame/machine/cuda.cpp +++ b/src/mame/machine/cuda.cpp @@ -85,10 +85,11 @@ void cuda_device::cuda_map(address_map &map) // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(cuda_device::device_add_mconfig) - MCFG_DEVICE_ADD(CUDA_CPU_TAG, M68HC05EG, XTAL(32'768)*192) // 32.768 kHz input clock, can be PLL'ed to x128 = 4.1 MHz under s/w control - MCFG_DEVICE_PROGRAM_MAP(cuda_map) -MACHINE_CONFIG_END +void cuda_device::device_add_mconfig(machine_config &config) +{ + M68HC05EG(config, m_maincpu, XTAL(32'768)*192); // 32.768 kHz input clock, can be PLL'ed to x128 = 4.1 MHz under s/w control + m_maincpu->set_addrmap(AS_PROGRAM, &cuda_device::cuda_map); +} const tiny_rom_entry *cuda_device::device_rom_region() const { diff --git a/src/mame/machine/egret.cpp b/src/mame/machine/egret.cpp index 6b3054dd537..0959485bfad 100644 --- a/src/mame/machine/egret.cpp +++ b/src/mame/machine/egret.cpp @@ -84,10 +84,11 @@ void egret_device::egret_map(address_map &map) // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(egret_device::device_add_mconfig) - MCFG_DEVICE_ADD(EGRET_CPU_TAG, M68HC05EG, XTAL(32'768)*192) // 32.768 kHz input clock, can be PLL'ed to x128 = 4.1 MHz under s/w control - MCFG_DEVICE_PROGRAM_MAP(egret_map) -MACHINE_CONFIG_END +void egret_device::device_add_mconfig(machine_config &config) +{ + M68HC05EG(config, m_maincpu, XTAL(32'768)*192); // 32.768 kHz input clock, can be PLL'ed to x128 = 4.1 MHz under s/w control + m_maincpu->set_addrmap(AS_PROGRAM, &egret_device::egret_map); +} const tiny_rom_entry *egret_device::device_rom_region() const { diff --git a/src/mame/machine/esqlcd.cpp b/src/mame/machine/esqlcd.cpp index 78d6b6f91d1..a9348a5bde2 100644 --- a/src/mame/machine/esqlcd.cpp +++ b/src/mame/machine/esqlcd.cpp @@ -162,9 +162,10 @@ static unsigned char const Font5x7[][5] = { }; //-------------------------------------------------------------------------------------------------------------------------------------------- -MACHINE_CONFIG_START(esq2x16_sq1_device::device_add_mconfig) +void esq2x16_sq1_device::device_add_mconfig(machine_config &config) +{ config.set_default_layout(layout_esq2by16); -MACHINE_CONFIG_END +} //-------------------------------------------------------------------------------------------------------------------------------------------- void esq2x16_sq1_device::write_char(int data) diff --git a/src/mame/machine/esqvfd.cpp b/src/mame/machine/esqvfd.cpp index 987e0b72596..b8c2ad44f31 100644 --- a/src/mame/machine/esqvfd.cpp +++ b/src/mame/machine/esqvfd.cpp @@ -169,9 +169,10 @@ void esqvfd_device::update_display() /* 2x40 VFD display used in the ESQ-1, VFX-SD, SD-1, and others */ -MACHINE_CONFIG_START(esq2x40_device::device_add_mconfig) +void esq2x40_device::device_add_mconfig(machine_config &config) +{ config.set_default_layout(layout_esq2by40); -MACHINE_CONFIG_END +} void esq2x40_device::write_char(int data) { @@ -302,9 +303,10 @@ esq2x40_device::esq2x40_device(const machine_config &mconfig, const char *tag, d /* 1x22 display from the VFX (not right, but it'll do for now) */ -MACHINE_CONFIG_START(esq1x22_device::device_add_mconfig) +void esq1x22_device::device_add_mconfig(machine_config &config) +{ config.set_default_layout(layout_esq1by22); -MACHINE_CONFIG_END +} void esq1x22_device::write_char(int data) @@ -349,9 +351,10 @@ esq1x22_device::esq1x22_device(const machine_config &mconfig, const char *tag, d } /* SQ-1 display, I think it's really an LCD but we'll deal with it for now */ -MACHINE_CONFIG_START(esq2x40_sq1_device::device_add_mconfig) +void esq2x40_sq1_device::device_add_mconfig(machine_config &config) +{ config.set_default_layout(layout_esq2by40); // we use the normal 2x40 layout -MACHINE_CONFIG_END +} void esq2x40_sq1_device::write_char(int data) { diff --git a/src/mame/machine/hng64_net.cpp b/src/mame/machine/hng64_net.cpp index fe98e1ee974..eb862354e57 100644 --- a/src/mame/machine/hng64_net.cpp +++ b/src/mame/machine/hng64_net.cpp @@ -142,8 +142,9 @@ void hng64_state::reset_net() m_mmub[5] = 0; // rolls back to 0xffff } -MACHINE_CONFIG_START(hng64_state::hng64_network) - MCFG_DEVICE_ADD("network", KL5C80A12, HNG64_MASTER_CLOCK / 4) /* KL5C80A12CFP - binary compatible with Z80. */ - MCFG_DEVICE_PROGRAM_MAP(hng_comm_map) - MCFG_DEVICE_IO_MAP(hng_comm_io_map) -MACHINE_CONFIG_END +void hng64_state::hng64_network(machine_config &config) +{ + KL5C80A12(config, m_comm, HNG64_MASTER_CLOCK / 4); /* KL5C80A12CFP - binary compatible with Z80. */ + m_comm->set_addrmap(AS_PROGRAM, &hng64_state::hng_comm_map); + m_comm->set_addrmap(AS_IO, &hng64_state::hng_comm_io_map); +} diff --git a/src/mame/machine/hp9825_tape.cpp b/src/mame/machine/hp9825_tape.cpp index d53b75652c5..f2f12135ef1 100644 --- a/src/mame/machine/hp9825_tape.cpp +++ b/src/mame/machine/hp9825_tape.cpp @@ -99,7 +99,8 @@ hp9825_tape_device::hp9825_tape_device(const machine_config &mconfig, const char { } -MACHINE_CONFIG_START(hp9825_tape_device::device_add_mconfig) +void hp9825_tape_device::device_add_mconfig(machine_config &config) +{ TTL74123(config , m_short_gap_timer , 0); m_short_gap_timer->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE); m_short_gap_timer->set_resistor_value(RES_K(37.9)); @@ -114,7 +115,7 @@ MACHINE_CONFIG_START(hp9825_tape_device::device_add_mconfig) m_long_gap_timer->set_capacitor_value(CAP_U(0.22)); m_long_gap_timer->set_clear_pin_value(1); m_long_gap_timer->out_cb().set(FUNC(hp9825_tape_device::long_gap_w)); -MACHINE_CONFIG_END +} void hp9825_tape_device::device_start() { diff --git a/src/mame/machine/inder_vid.cpp b/src/mame/machine/inder_vid.cpp index 761227478f2..e5005ea52b3 100644 --- a/src/mame/machine/inder_vid.cpp +++ b/src/mame/machine/inder_vid.cpp @@ -96,7 +96,8 @@ void inder_vid_device::ramdac_map(address_map &map) map(0x000, 0x3ff).rw("ramdac", FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb888_w)); } -MACHINE_CONFIG_START(inder_vid_device::device_add_mconfig) +void inder_vid_device::device_add_mconfig(machine_config &config) +{ TMS34010(config, m_tms, XTAL(40'000'000)); m_tms->set_addrmap(AS_PROGRAM, &inder_vid_device::megaphx_tms_map); m_tms->set_halt_on_reset(true); @@ -107,17 +108,16 @@ MACHINE_CONFIG_START(inder_vid_device::device_add_mconfig) m_tms->set_shiftreg_in_callback(FUNC(inder_vid_device::to_shiftreg)); m_tms->set_shiftreg_out_callback(FUNC(inder_vid_device::from_shiftreg)); - MCFG_SCREEN_ADD("inder_screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL(40'000'000)/12, 424, 0, 338-1, 262, 0, 246-1) - MCFG_SCREEN_UPDATE_DEVICE("tms", tms34010_device, tms340x0_rgb32) + screen_device &screen(SCREEN(config, "inder_screen", SCREEN_TYPE_RASTER)); + screen.set_raw(XTAL(40'000'000)/12, 424, 0, 338-1, 262, 0, 246-1); + screen.set_screen_update("tms", FUNC(tms34010_device::tms340x0_rgb32)); - MCFG_PALETTE_ADD(m_palette, 256) + PALETTE(config, m_palette).set_entries(256); ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); ramdac.set_addrmap(0, &inder_vid_device::ramdac_map); ramdac.set_split_read(1); - -MACHINE_CONFIG_END +} void inder_vid_device::device_start() diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp index 52204b8c4d5..6a585fc24ec 100644 --- a/src/mame/machine/iteagle_fpga.cpp +++ b/src/mame/machine/iteagle_fpga.cpp @@ -51,7 +51,8 @@ iteagle_fpga_device::iteagle_fpga_device(const machine_config &mconfig, const ch set_ids(0x55cc33aa, 0xaa, 0xaaaaaa, 0x00); } -MACHINE_CONFIG_START(iteagle_fpga_device::device_add_mconfig) +void iteagle_fpga_device::device_add_mconfig(machine_config &config) +{ NVRAM(config, "eagle2_rtc", nvram_device::DEFAULT_ALL_0); NVRAM(config, "eagle1_bram", nvram_device::DEFAULT_ALL_1); @@ -72,7 +73,7 @@ MACHINE_CONFIG_START(iteagle_fpga_device::device_add_mconfig) com2.rxd_handler().set(m_scc1, FUNC(scc85c30_device::rxa_w)); com2.dcd_handler().set(m_scc1, FUNC(scc85c30_device::dcda_w)); com2.cts_handler().set(m_scc1, FUNC(scc85c30_device::ctsa_w)); -MACHINE_CONFIG_END +} void iteagle_fpga_device::device_start() { diff --git a/src/mame/machine/k7659kb.cpp b/src/mame/machine/k7659kb.cpp index e7338a105b2..e7fe62bc645 100644 --- a/src/mame/machine/k7659kb.cpp +++ b/src/mame/machine/k7659kb.cpp @@ -61,9 +61,9 @@ const tiny_rom_entry *k7659_keyboard_device::device_rom_region() const // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(k7659_keyboard_device::device_add_mconfig) - -MACHINE_CONFIG_END +void k7659_keyboard_device::device_add_mconfig(machine_config &config) +{ +} //------------------------------------------------- diff --git a/src/mame/machine/m20_8086.cpp b/src/mame/machine/m20_8086.cpp index d479a1b2590..d961cef1014 100644 --- a/src/mame/machine/m20_8086.cpp +++ b/src/mame/machine/m20_8086.cpp @@ -57,12 +57,13 @@ void m20_8086_device::i86_io(address_map &map) map(0x7ffa, 0x7ffd).w(FUNC(m20_8086_device::handshake_w)); } -MACHINE_CONFIG_START(m20_8086_device::device_add_mconfig) - MCFG_DEVICE_ADD("8086", I8086, XTAL(24'000'000)/3) - MCFG_DEVICE_PROGRAM_MAP(i86_prog) - MCFG_DEVICE_IO_MAP(i86_io) - MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(m20_8086_device, int_cb) -MACHINE_CONFIG_END +void m20_8086_device::device_add_mconfig(machine_config &config) +{ + I8086(config, m_8086, XTAL(24'000'000)/3); + m_8086->set_addrmap(AS_PROGRAM, &m20_8086_device::i86_prog); + m_8086->set_addrmap(AS_IO, &m20_8086_device::i86_io); + m_8086->set_irq_acknowledge_callback(FUNC(m20_8086_device::int_cb)); +} READ16_MEMBER(m20_8086_device::z8000_io_r) { diff --git a/src/mame/machine/m2comm.cpp b/src/mame/machine/m2comm.cpp index 6b43ecdf428..bccabacd422 100644 --- a/src/mame/machine/m2comm.cpp +++ b/src/mame/machine/m2comm.cpp @@ -182,8 +182,9 @@ DEFINE_DEVICE_TYPE(M2COMM, m2comm_device, "m2comm", "Model 2 Communication Board // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(m2comm_device::device_add_mconfig) -MACHINE_CONFIG_END +void m2comm_device::device_add_mconfig(machine_config &config) +{ +} //************************************************************************** // LIVE DEVICE diff --git a/src/mame/machine/m3comm.cpp b/src/mame/machine/m3comm.cpp index 57163cce44a..a4c72c7801b 100644 --- a/src/mame/machine/m3comm.cpp +++ b/src/mame/machine/m3comm.cpp @@ -118,12 +118,13 @@ DEFINE_DEVICE_TYPE(M3COMM, m3comm_device, "m3comm", "Model 3 Communication Board // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(m3comm_device::device_add_mconfig) - MCFG_DEVICE_ADD(M68K_TAG, M68000, 10000000) // random - MCFG_DEVICE_PROGRAM_MAP(m3comm_mem) +void m3comm_device::device_add_mconfig(machine_config &config) +{ + M68000(config, m_commcpu, 10000000); // random + m_commcpu->set_addrmap(AS_PROGRAM, &m3comm_device::m3comm_mem); RAM(config, RAM_TAG).set_default_size("128K"); -MACHINE_CONFIG_END +} //************************************************************************** // LIVE DEVICE diff --git a/src/mame/machine/mmboard.cpp b/src/mame/machine/mmboard.cpp index 67d86c7c260..2e00ab158f9 100644 --- a/src/mame/machine/mmboard.cpp +++ b/src/mame/machine/mmboard.cpp @@ -320,14 +320,15 @@ mephisto_display_modul_device::mephisto_display_modul_device(const machine_confi // device_add_mconfig //------------------------------------------------- -MACHINE_CONFIG_START(mephisto_display_modul_device::device_add_mconfig) +void mephisto_display_modul_device::device_add_mconfig(machine_config &config) +{ /* video hardware */ - MCFG_SCREEN_ADD("screen", LCD) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_SCREEN_SIZE(16*6, 9*2) - MCFG_SCREEN_VISIBLE_AREA(0, 16*6-1, 0, 9*2-3) - MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update) - MCFG_SCREEN_PALETTE("palette") + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); + screen.set_refresh_hz(50); + screen.set_size(16*6, 9*2); + screen.set_visarea(0, 16*6-1, 0, 9*2-3); + screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update)); + screen.set_palette("palette"); PALETTE(config, "palette", FUNC(mephisto_display_modul_device::lcd_palette), 2); HD44780(config, m_lcdc, 0); @@ -335,9 +336,8 @@ MACHINE_CONFIG_START(mephisto_display_modul_device::device_add_mconfig) /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("beeper", BEEP, 3250) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -MACHINE_CONFIG_END + BEEP(config, m_beeper, 3250).add_route(ALL_OUTPUTS, "mono", 1.0); +} void mephisto_display_modul_device::lcd_palette(palette_device &palette) const diff --git a/src/mame/machine/pgmprot_orlegend.cpp b/src/mame/machine/pgmprot_orlegend.cpp index 65e10823144..1b3460530bd 100644 --- a/src/mame/machine/pgmprot_orlegend.cpp +++ b/src/mame/machine/pgmprot_orlegend.cpp @@ -220,6 +220,7 @@ INPUT_PORTS_START( orlegendk ) INPUT_PORTS_END -MACHINE_CONFIG_START(pgm_asic3_state::pgm_asic3) +void pgm_asic3_state::pgm_asic3(machine_config &config) +{ pgmbase(config); -MACHINE_CONFIG_END +} diff --git a/src/mame/machine/s32comm.cpp b/src/mame/machine/s32comm.cpp index 761e0a14981..5015d445f7d 100644 --- a/src/mame/machine/s32comm.cpp +++ b/src/mame/machine/s32comm.cpp @@ -84,8 +84,9 @@ DEFINE_DEVICE_TYPE(S32COMM, s32comm_device, "s32comm", "System 32 Communication // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(s32comm_device::device_add_mconfig) -MACHINE_CONFIG_END +void s32comm_device::device_add_mconfig(machine_config &config) +{ +} //************************************************************************** // LIVE DEVICE diff --git a/src/mame/machine/saturn_cdb.cpp b/src/mame/machine/saturn_cdb.cpp index cd7662e7a64..e31761bdd2f 100644 --- a/src/mame/machine/saturn_cdb.cpp +++ b/src/mame/machine/saturn_cdb.cpp @@ -28,11 +28,12 @@ void saturn_cdb_device::saturn_cdb_map(address_map &map) map(0x00000000, 0x0000ffff).rom(); } -MACHINE_CONFIG_START(saturn_cdb_device::device_add_mconfig) - MCFG_DEVICE_ADD("cdbcpu", SH1, DERIVED_CLOCK(1, 1)) - MCFG_DEVICE_PROGRAM_MAP(saturn_cdb_map) - MCFG_DEVICE_DISABLE() // we're not actually using the CD Block ROM for now -MACHINE_CONFIG_END +void saturn_cdb_device::device_add_mconfig(machine_config &config) +{ + sh1_device &cdbcpu(SH1(config, "cdbcpu", DERIVED_CLOCK(1, 1))); + cdbcpu.set_addrmap(AS_PROGRAM, &saturn_cdb_device::saturn_cdb_map); + cdbcpu.set_disable(); // we're not actually using the CD Block ROM for now +} ROM_START( satcdb ) ROM_REGION( 0x10000, "cdbcpu", 0 ) diff --git a/src/mame/machine/teleprinter.cpp b/src/mame/machine/teleprinter.cpp index 6cbc53090cf..8ef1576a2c2 100644 --- a/src/mame/machine/teleprinter.cpp +++ b/src/mame/machine/teleprinter.cpp @@ -211,20 +211,20 @@ uint32_t teleprinter_device::tp_update(screen_device &device, bitmap_rgb32 &bitm /*************************************************************************** VIDEO HARDWARE ***************************************************************************/ -MACHINE_CONFIG_START(teleprinter_device::device_add_mconfig) - MCFG_SCREEN_ADD(TELEPRINTER_SCREEN_TAG, RASTER) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ - MCFG_SCREEN_SIZE(teleprinter_device::WIDTH*8, teleprinter_device::HEIGHT*8) - MCFG_SCREEN_VISIBLE_AREA(0, teleprinter_device::WIDTH*8-1, 0, teleprinter_device::HEIGHT*8-1) - MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, teleprinter_device, tp_update) +void teleprinter_device::device_add_mconfig(machine_config &config) +{ + screen_device &screen(SCREEN(config, TELEPRINTER_SCREEN_TAG, SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(50); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_size(teleprinter_device::WIDTH*8, teleprinter_device::HEIGHT*8); + screen.set_visarea(0, teleprinter_device::WIDTH*8-1, 0, teleprinter_device::HEIGHT*8-1); + screen.set_screen_update(FUNC(teleprinter_device::tp_update)); generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); keyboard.set_keyboard_callback(FUNC(generic_terminal_device::kbd_put)); SPEAKER(config, "bell").front_center(); - MCFG_DEVICE_ADD("beeper", BEEP, 2'000) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bell", 0.50) -MACHINE_CONFIG_END + BEEP(config, "beeper", 2'000).add_route(ALL_OUTPUTS, "bell", 0.50); +} /*------------------------------------------------- diff --git a/src/mame/machine/v1050kb.cpp b/src/mame/machine/v1050kb.cpp index da37c65dd14..6b4d20fb4f5 100644 --- a/src/mame/machine/v1050kb.cpp +++ b/src/mame/machine/v1050kb.cpp @@ -72,7 +72,8 @@ DISCRETE_SOUND_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(v1050_keyboard_device::device_add_mconfig) +void v1050_keyboard_device::device_add_mconfig(machine_config &config) +{ I8049(config, m_maincpu, XTAL(4'608'000)); m_maincpu->p1_in_cb().set(FUNC(v1050_keyboard_device::kb_p1_r)); m_maincpu->p1_out_cb().set(FUNC(v1050_keyboard_device::kb_p1_w)); @@ -81,9 +82,8 @@ MACHINE_CONFIG_START(v1050_keyboard_device::device_add_mconfig) // discrete sound SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, v1050kb_discrete) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) -MACHINE_CONFIG_END + DISCRETE(config, m_discrete, v1050kb_discrete).add_route(ALL_OUTPUTS, "mono", 0.80); +} //------------------------------------------------- diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp index 2235c321ab4..486e5dcc3e6 100644 --- a/src/mame/machine/xbox.cpp +++ b/src/mame/machine/xbox.cpp @@ -838,12 +838,13 @@ void xbox_base_state::xbox_base_map_io(address_map &map) #endif } -MACHINE_CONFIG_START(xbox_base_state::xbox_base) +void xbox_base_state::xbox_base(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD(m_maincpu, PENTIUM3, 733333333) /* Wrong! family 6 model 8 stepping 10 */ - MCFG_DEVICE_PROGRAM_MAP(xbox_base_map) - MCFG_DEVICE_IO_MAP(xbox_base_map_io) - MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(xbox_base_state, irq_callback) + PENTIUM3(config, m_maincpu, 733333333); /* Wrong! family 6 model 8 stepping 10 */ + m_maincpu->set_addrmap(AS_PROGRAM, &xbox_base_state::xbox_base_map); + m_maincpu->set_addrmap(AS_IO, &xbox_base_state::xbox_base_map_io); + m_maincpu->set_irq_acknowledge_callback(FUNC(xbox_base_state::irq_callback)); config.m_minimum_quantum = attotime::from_hz(6000); @@ -867,11 +868,11 @@ MACHINE_CONFIG_START(xbox_base_state::xbox_base) NV2A_GPU(config, ":pci:1e.0:00.0", 0, m_maincpu).interrupt_handler().set(FUNC(xbox_base_state::nv2a_interrupt_changed)); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ - MCFG_SCREEN_SIZE(640, 480) - MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479) - MCFG_SCREEN_UPDATE_DRIVER(xbox_base_state, screen_update_callback) - MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, xbox_base_state, vblank_callback)) -MACHINE_CONFIG_END + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_size(640, 480); + screen.set_visarea(0, 639, 0, 479); + screen.set_screen_update(FUNC(xbox_base_state::screen_update_callback)); + screen.screen_vblank().set(FUNC(xbox_base_state::vblank_callback)); +} |