summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/m5.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/mame/drivers/m5.cpp
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/mame/drivers/m5.cpp')
-rw-r--r--src/mame/drivers/m5.cpp75
1 files changed, 36 insertions, 39 deletions
diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp
index ecef78735a7..74ec56eb5ac 100644
--- a/src/mame/drivers/m5.cpp
+++ b/src/mame/drivers/m5.cpp
@@ -718,9 +718,8 @@ void m5_state::m5_io(address_map &map)
map.unmap_value_high();
map.global_mask(0xff);
map(0x00, 0x03).mirror(0x0c).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
- map(0x10, 0x10).mirror(0x0e).rw("tms9928a", FUNC(tms9928a_device::vram_r), FUNC(tms9928a_device::vram_w));
- map(0x11, 0x11).mirror(0x0e).rw("tms9928a", FUNC(tms9928a_device::register_r), FUNC(tms9928a_device::register_w));
- map(0x20, 0x20).mirror(0x0f).w(SN76489AN_TAG, FUNC(sn76489a_device::command_w));
+ map(0x10, 0x11).mirror(0x0e).rw("tms9928a", FUNC(tms9928a_device::read), FUNC(tms9928a_device::write));
+ map(0x20, 0x20).mirror(0x0f).w(SN76489AN_TAG, FUNC(sn76489a_device::write));
map(0x30, 0x30).mirror(0x08).portr("Y0").w(FUNC(m5_state::mem64KBF_w)); // 64KBF paging
map(0x31, 0x31).mirror(0x08).portr("Y1");
map(0x32, 0x32).mirror(0x08).portr("Y2");
@@ -1040,9 +1039,8 @@ void brno_state::brno_io(address_map &map)
map.unmap_value_high();
map.global_mask(0xff);
map(0x00, 0x03).mirror(0x0c).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
- map(0x10, 0x10).mirror(0x0e).rw("tms9928a", FUNC(tms9928a_device::vram_r), FUNC(tms9928a_device::vram_w));
- map(0x11, 0x11).mirror(0x0e).rw("tms9928a", FUNC(tms9928a_device::register_r), FUNC(tms9928a_device::register_w));
- map(0x20, 0x20).mirror(0x0f).w(SN76489AN_TAG, FUNC(sn76489a_device::command_w));
+ map(0x10, 0x11).mirror(0x0e).rw("tms9928a", FUNC(tms9928a_device::read), FUNC(tms9928a_device::write));
+ map(0x20, 0x20).mirror(0x0f).w(SN76489AN_TAG, FUNC(sn76489a_device::write));
map(0x30, 0x30).portr("Y0");
map(0x31, 0x31).portr("Y1");
map(0x32, 0x32).portr("Y2");
@@ -1401,24 +1399,24 @@ void brno_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( m5 )
+// machine_config( m5 )
//-------------------------------------------------
-MACHINE_CONFIG_START(m5_state::m5)
+void m5_state::m5(machine_config &config)
+{
// basic machine hardware
Z80(config, m_maincpu, 14.318181_MHz_XTAL / 4);
m_maincpu->set_addrmap(AS_PROGRAM, &m5_state::m5_mem);
m_maincpu->set_addrmap(AS_IO, &m5_state::m5_io);
m_maincpu->set_daisy_config(m5_daisy_chain);
- MCFG_DEVICE_ADD(m_fd5cpu, Z80, 14.318181_MHz_XTAL / 4)
- MCFG_DEVICE_PROGRAM_MAP(fd5_mem)
- MCFG_DEVICE_IO_MAP(fd5_io)
+ Z80(config, m_fd5cpu, 14.318181_MHz_XTAL / 4);
+ m_fd5cpu->set_addrmap(AS_PROGRAM, &m5_state::fd5_mem);
+ m_fd5cpu->set_addrmap(AS_IO, &m5_state::fd5_io);
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489AN_TAG, SN76489A, 14.318181_MHz_XTAL / 4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, SN76489AN_TAG, 14.318181_MHz_XTAL / 4).add_route(ALL_OUTPUTS, "mono", 1.00);
// devices
Z80CTC(config, m_ctc, 14.318181_MHz_XTAL / 4);
@@ -1426,15 +1424,16 @@ MACHINE_CONFIG_START(m5_state::m5)
// CK0 = EXINT, CK1 = GND, CK2 = TCK, CK3 = VDP INT
// ZC2 = EXCLK
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, m5_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(m5_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ 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(sordm5_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("m5_cass")
+ CASSETTE(config, m_cassette);
+ m_cassette->set_formats(sordm5_cassette_formats);
+ m_cassette->set_default_state(CASSETTE_PLAY);
+ m_cassette->set_interface("m5_cass");
I8255(config, m_ppi);
m_ppi->in_pa_callback().set(FUNC(m5_state::ppi_pa_r));
@@ -1445,25 +1444,25 @@ MACHINE_CONFIG_START(m5_state::m5)
UPD765A(config, m_fdc, 8'000'000, true, true);
m_fdc->intrq_wr_callback().set_inputline(m_fd5cpu, INPUT_LINE_IRQ0);
- MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", m5_floppies, "525dd", m5_state::floppy_formats)
+ FLOPPY_CONNECTOR(config, UPD765_TAG ":0", m5_floppies, "525dd", m5_state::floppy_formats);
// cartridge
- MCFG_M5_CARTRIDGE_ADD("cartslot1", m5_cart, nullptr)
- MCFG_M5_CARTRIDGE_ADD("cartslot2", m5_cart, nullptr)
+ M5_CART_SLOT(config, m_cart1, m5_cart, nullptr);
+ M5_CART_SLOT(config, m_cart2, m5_cart, nullptr);
// software lists
- MCFG_SOFTWARE_LIST_ADD("cart_list", "m5_cart")
- MCFG_SOFTWARE_LIST_ADD("cass_list", "m5_cass")
- //MCFG_SOFTWARE_LIST_ADD("flop_list", "m5_flop")
+ SOFTWARE_LIST(config, "cart_list").set_original("m5_cart");
+ SOFTWARE_LIST(config, "cass_list").set_original("m5_cass");
+ //SOFTWARE_LIST(config, "flop_list").set_original("m5_flop");
// internal ram
//68K is not possible, 'cos internal ram always overlays any expansion memory in that area
RAM(config, RAM_TAG).set_default_size("4K").set_extra_options("36K,64K");
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
-// MACHINE_CONFIG_START( ntsc )
+// machine_config( ntsc )
//-------------------------------------------------
void m5_state::ntsc(machine_config &config)
@@ -1479,7 +1478,7 @@ void m5_state::ntsc(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG_START( pal )
+// machine_config( pal )
//-------------------------------------------------
void m5_state::pal(machine_config &config)
@@ -1494,11 +1493,12 @@ void m5_state::pal(machine_config &config)
}
//-------------------------------------------------
-// MACHINE_CONFIG( m5p_brno )
+// machine_config( m5p_brno )
//-------------------------------------------------
-MACHINE_CONFIG_START(brno_state::brno)
+void brno_state::brno(machine_config &config)
+{
m5(config);
// basic machine hardware
@@ -1520,19 +1520,16 @@ MACHINE_CONFIG_START(brno_state::brno)
// floppy
WD2797(config, m_fdc, 1_MHz_XTAL);
- MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":0", brno_floppies, "35hd", brno_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":1", brno_floppies, "35hd", brno_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
+ FLOPPY_CONNECTOR(config, WD2797_TAG":0", brno_floppies, "35hd", brno_state::floppy_formats).enable_sound(true);
+ FLOPPY_CONNECTOR(config, WD2797_TAG":1", brno_floppies, "35hd", brno_state::floppy_formats).enable_sound(true);
// only one floppy drive
- //MCFG_DEVICE_REMOVE(WD2797_TAG":1")
+ //config.device_remove(WD2797_TAG":1");
//MCFG_SNAPSHOT_ADD("snapshot", brno_state, brno, "rmd", 0)
// software list
- MCFG_SOFTWARE_LIST_ADD("flop_list","m5_flop")
-
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "flop_list").set_original("m5_flop");
+}
//**************************************************************************