summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/spc1000.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/spc1000.cpp')
-rw-r--r--src/mame/drivers/spc1000.cpp52
1 files changed, 28 insertions, 24 deletions
diff --git a/src/mame/drivers/spc1000.cpp b/src/mame/drivers/spc1000.cpp
index 51d1c928844..23c5d8699e2 100644
--- a/src/mame/drivers/spc1000.cpp
+++ b/src/mame/drivers/spc1000.cpp
@@ -466,20 +466,22 @@ void spc1000_exp(device_slot_interface &device)
device.option_add("vdp", SPC1000_VDP_EXP);
}
-MACHINE_CONFIG_START(spc1000_state::spc1000)
+void spc1000_state::spc1000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(spc1000_mem)
- MCFG_DEVICE_IO_MAP(spc1000_io)
+ Z80(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &spc1000_state::spc1000_mem);
+ m_maincpu->set_addrmap(AS_IO, &spc1000_state::spc1000_io);
/* video hardware */
- MCFG_SCREEN_MC6847_NTSC_ADD("screen", "mc6847")
-
- MCFG_DEVICE_ADD("mc6847", MC6847_NTSC, XTAL(3'579'545))
- MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, spc1000_state, irq_w))
- MCFG_MC6847_INPUT_CALLBACK(READ8(*this, spc1000_state, mc6847_videoram_r))
- MCFG_MC6847_CHARROM_CALLBACK(spc1000_state, get_char_rom)
- MCFG_MC6847_FIXED_MODE(mc6847_ntsc_device::MODE_GM2)
+ SCREEN(config, "screen", SCREEN_TYPE_RASTER);
+
+ MC6847_NTSC(config, m_vdg, XTAL(3'579'545));
+ m_vdg->set_screen("screen");
+ m_vdg->fsync_wr_callback().set(FUNC(spc1000_state::irq_w));
+ m_vdg->input_callback().set(FUNC(spc1000_state::mc6847_videoram_r));
+ m_vdg->set_get_char_rom(FUNC(spc1000_state::get_char_rom));
+ m_vdg->set_get_fixed_mode(mc6847_ntsc_device::MODE_GM2);
// other lines not connected
/* sound hardware */
@@ -488,26 +490,28 @@ MACHINE_CONFIG_START(spc1000_state::spc1000)
ay8910.port_a_read_callback().set(FUNC(spc1000_state::porta_r));
ay8910.port_b_write_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
ay8910.add_route(ALL_OUTPUTS, "mono", 1.00);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.05);
+
+ SPC1000_EXP_SLOT(config, "ext1", spc1000_exp);
- MCFG_DEVICE_ADD("ext1", SPC1000_EXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(spc1000_exp, nullptr, false)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(spc1000_state::centronics_busy_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, spc1000_state, centronics_busy_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(spc1000_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED)
- MCFG_CASSETTE_INTERFACE("spc1000_cass")
+ INPUT_BUFFER(config, "cent_status_in");
- MCFG_SOFTWARE_LIST_ADD("cass_list", "spc1000_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_formats(spc1000_cassette_formats);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED);
+ m_cass->set_interface("spc1000_cass");
+
+ SOFTWARE_LIST(config, "cass_list").set_original("spc1000_cass");
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( spc1000 )