diff options
Diffstat (limited to 'src/devices/bus/msx_cart/disk.cpp')
-rw-r--r-- | src/devices/bus/msx_cart/disk.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/devices/bus/msx_cart/disk.cpp b/src/devices/bus/msx_cart/disk.cpp index a0e03e54920..7bbbdd292c0 100644 --- a/src/devices/bus/msx_cart/disk.cpp +++ b/src/devices/bus/msx_cart/disk.cpp @@ -197,7 +197,8 @@ void msx_cart_disk_device::initialize_cartridge() } -MACHINE_CONFIG_START(msx_cart_vy0010_device::device_add_mconfig) +void msx_cart_vy0010_device::device_add_mconfig(machine_config &config) +{ // From VY-0010 schematic: // HLT pulled high // SSO/-ENMF + -DDEN + ENP + -5/8 - pulled low @@ -206,60 +207,63 @@ MACHINE_CONFIG_START(msx_cart_vy0010_device::device_add_mconfig) m_fdc->set_force_ready(true); // Single sided 3.5" floppy drive - MCFG_FLOPPY_DRIVE_ADD("fdc:0", msx_floppies, "35ssdd", msx_cart_disk_device::floppy_formats) + FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35ssdd", msx_cart_disk_device::floppy_formats); // Attach software lists // We do not know in what kind of machine the user has inserted the floppy interface // so we list all msx floppy software lists. // - MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop") -MACHINE_CONFIG_END + SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop"); + SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); +} -MACHINE_CONFIG_START(msx_cart_fsfd1_device::device_add_mconfig) +void msx_cart_fsfd1_device::device_add_mconfig(machine_config &config) +{ WD2793(config, m_fdc, 4_MHz_XTAL / 4); // Double sided 3.5" floppy drive - MCFG_FLOPPY_DRIVE_ADD("fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats) + FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats); // Attach software lists // We do not know in what kind of machine the user has inserted the floppy interface // so we list all msx floppy software lists. // - MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop") -MACHINE_CONFIG_END + SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop"); + SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); +} -MACHINE_CONFIG_START(msx_cart_fsfd1a_device::device_add_mconfig) +void msx_cart_fsfd1a_device::device_add_mconfig(machine_config &config) +{ TC8566AF(config, m_fdc, 16'000'000); // Double sided 3.5" floppy drive - MCFG_FLOPPY_DRIVE_ADD("fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats) + FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats); // Attach software lists // We do not know in what kind of machine the user has inserted the floppy interface // so we list all msx floppy software lists. // - MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop") -MACHINE_CONFIG_END + SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop"); + SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); +} -MACHINE_CONFIG_START(msx_cart_fscf351_device::device_add_mconfig) +void msx_cart_fscf351_device::device_add_mconfig(machine_config &config) +{ MB8877(config, m_fdc, 4_MHz_XTAL / 4); m_fdc->set_force_ready(true); // Double sided 3.5" floppy drive - MCFG_FLOPPY_DRIVE_ADD("fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats) + FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats); // Attach software lists // We do not know in what kind of machine the user has inserted the floppy interface // so we list all msx floppy software lists. // - MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop") -MACHINE_CONFIG_END + SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop"); + SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); +} void msx_cart_disk_type1_device::device_start() @@ -268,12 +272,10 @@ void msx_cart_disk_type1_device::device_start() save_item(NAME(m_side_control)); save_item(NAME(m_control)); - - machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_disk_type1_device::post_load), this)); } -void msx_cart_disk_type1_device::post_load() +void msx_cart_disk_type1_device::device_post_load() { uint8_t data = m_control; @@ -338,7 +340,7 @@ void msx_cart_disk_type1_device::device_reset() } -READ8_MEMBER(msx_cart_disk_type1_device::read_cart) +uint8_t msx_cart_disk_type1_device::read_cart(offs_t offset) { switch (offset) { @@ -379,7 +381,7 @@ READ8_MEMBER(msx_cart_disk_type1_device::read_cart) } -WRITE8_MEMBER(msx_cart_disk_type1_device::write_cart) +void msx_cart_disk_type1_device::write_cart(offs_t offset, uint8_t data) { switch (offset) { @@ -425,8 +427,6 @@ void msx_cart_disk_type2_device::device_start() m_led.resolve(); save_item(NAME(m_control)); - - machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_disk_type2_device::post_load), this)); } @@ -436,7 +436,7 @@ void msx_cart_disk_type2_device::device_reset() } -void msx_cart_disk_type2_device::post_load() +void msx_cart_disk_type2_device::device_post_load() { uint8_t data = m_control; @@ -483,7 +483,7 @@ void msx_cart_disk_type2_device::set_control(uint8_t data) } -READ8_MEMBER(msx_cart_disk_type2_device::read_cart) +uint8_t msx_cart_disk_type2_device::read_cart(offs_t offset) { switch (offset) { @@ -516,7 +516,7 @@ READ8_MEMBER(msx_cart_disk_type2_device::read_cart) } -WRITE8_MEMBER(msx_cart_disk_type2_device::write_cart) +void msx_cart_disk_type2_device::write_cart(offs_t offset, uint8_t data) { switch (offset) { @@ -564,17 +564,17 @@ void msx_cart_fsfd1a_device::device_reset() } -READ8_MEMBER(msx_cart_fsfd1a_device::read_cart) +uint8_t msx_cart_fsfd1a_device::read_cart(offs_t offset) { switch (offset) { case 0x7ffa: case 0xbffa: - return m_fdc->msr_r(space, 4); + return m_fdc->msr_r(); case 0x7ffb: case 0xbffb: - return m_fdc->fifo_r(space, 5); + return m_fdc->fifo_r(); } if (offset >= 0x4000 && offset < 0x8000) @@ -585,23 +585,23 @@ READ8_MEMBER(msx_cart_fsfd1a_device::read_cart) } -WRITE8_MEMBER(msx_cart_fsfd1a_device::write_cart) +void msx_cart_fsfd1a_device::write_cart(offs_t offset, uint8_t data) { switch (offset) { case 0x7ff8: case 0xbff8: - m_fdc->dor_w(space, 2, data); + m_fdc->dor_w(data); break; case 0x7ff9: case 0xbff9: - m_fdc->cr1_w(space, 3, data); + m_fdc->cr1_w(data); break; case 0x7ffb: case 0xbffb: - m_fdc->fifo_w(space, 5, data); + m_fdc->fifo_w(data); break; default: |