summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/msx_cart/disk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/msx_cart/disk.cpp')
-rw-r--r--src/devices/bus/msx_cart/disk.cpp74
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 7bbbdd292c0..a0e03e54920 100644
--- a/src/devices/bus/msx_cart/disk.cpp
+++ b/src/devices/bus/msx_cart/disk.cpp
@@ -197,8 +197,7 @@ void msx_cart_disk_device::initialize_cartridge()
}
-void msx_cart_vy0010_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(msx_cart_vy0010_device::device_add_mconfig)
// From VY-0010 schematic:
// HLT pulled high
// SSO/-ENMF + -DDEN + ENP + -5/8 - pulled low
@@ -207,63 +206,60 @@ void msx_cart_vy0010_device::device_add_mconfig(machine_config &config)
m_fdc->set_force_ready(true);
// Single sided 3.5" floppy drive
- FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35ssdd", msx_cart_disk_device::floppy_formats);
+ MCFG_FLOPPY_DRIVE_ADD("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.
//
- SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop");
- SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop");
-}
+ MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop")
+ MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop")
+MACHINE_CONFIG_END
-void msx_cart_fsfd1_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(msx_cart_fsfd1_device::device_add_mconfig)
WD2793(config, m_fdc, 4_MHz_XTAL / 4);
// Double sided 3.5" floppy drive
- FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats);
+ MCFG_FLOPPY_DRIVE_ADD("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.
//
- SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop");
- SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop");
-}
+ MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop")
+ MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop")
+MACHINE_CONFIG_END
-void msx_cart_fsfd1a_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(msx_cart_fsfd1a_device::device_add_mconfig)
TC8566AF(config, m_fdc, 16'000'000);
// Double sided 3.5" floppy drive
- FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats);
+ MCFG_FLOPPY_DRIVE_ADD("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.
//
- SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop");
- SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop");
-}
+ MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop")
+ MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop")
+MACHINE_CONFIG_END
-void msx_cart_fscf351_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(msx_cart_fscf351_device::device_add_mconfig)
MB8877(config, m_fdc, 4_MHz_XTAL / 4);
m_fdc->set_force_ready(true);
// Double sided 3.5" floppy drive
- FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats);
+ MCFG_FLOPPY_DRIVE_ADD("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.
//
- SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop");
- SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop");
-}
+ MCFG_SOFTWARE_LIST_ADD("flop_list","msx2_flop")
+ MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop")
+MACHINE_CONFIG_END
void msx_cart_disk_type1_device::device_start()
@@ -272,10 +268,12 @@ 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::device_post_load()
+void msx_cart_disk_type1_device::post_load()
{
uint8_t data = m_control;
@@ -340,7 +338,7 @@ void msx_cart_disk_type1_device::device_reset()
}
-uint8_t msx_cart_disk_type1_device::read_cart(offs_t offset)
+READ8_MEMBER(msx_cart_disk_type1_device::read_cart)
{
switch (offset)
{
@@ -381,7 +379,7 @@ uint8_t msx_cart_disk_type1_device::read_cart(offs_t offset)
}
-void msx_cart_disk_type1_device::write_cart(offs_t offset, uint8_t data)
+WRITE8_MEMBER(msx_cart_disk_type1_device::write_cart)
{
switch (offset)
{
@@ -427,6 +425,8 @@ 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::device_post_load()
+void msx_cart_disk_type2_device::post_load()
{
uint8_t data = m_control;
@@ -483,7 +483,7 @@ void msx_cart_disk_type2_device::set_control(uint8_t data)
}
-uint8_t msx_cart_disk_type2_device::read_cart(offs_t offset)
+READ8_MEMBER(msx_cart_disk_type2_device::read_cart)
{
switch (offset)
{
@@ -516,7 +516,7 @@ uint8_t msx_cart_disk_type2_device::read_cart(offs_t offset)
}
-void msx_cart_disk_type2_device::write_cart(offs_t offset, uint8_t data)
+WRITE8_MEMBER(msx_cart_disk_type2_device::write_cart)
{
switch (offset)
{
@@ -564,17 +564,17 @@ void msx_cart_fsfd1a_device::device_reset()
}
-uint8_t msx_cart_fsfd1a_device::read_cart(offs_t offset)
+READ8_MEMBER(msx_cart_fsfd1a_device::read_cart)
{
switch (offset)
{
case 0x7ffa:
case 0xbffa:
- return m_fdc->msr_r();
+ return m_fdc->msr_r(space, 4);
case 0x7ffb:
case 0xbffb:
- return m_fdc->fifo_r();
+ return m_fdc->fifo_r(space, 5);
}
if (offset >= 0x4000 && offset < 0x8000)
@@ -585,23 +585,23 @@ uint8_t msx_cart_fsfd1a_device::read_cart(offs_t offset)
}
-void msx_cart_fsfd1a_device::write_cart(offs_t offset, uint8_t data)
+WRITE8_MEMBER(msx_cart_fsfd1a_device::write_cart)
{
switch (offset)
{
case 0x7ff8:
case 0xbff8:
- m_fdc->dor_w(data);
+ m_fdc->dor_w(space, 2, data);
break;
case 0x7ff9:
case 0xbff9:
- m_fdc->cr1_w(data);
+ m_fdc->cr1_w(space, 3, data);
break;
case 0x7ffb:
case 0xbffb:
- m_fdc->fifo_w(data);
+ m_fdc->fifo_w(space, 5, data);
break;
default: