summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/megadrive
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/devices/bus/megadrive
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/devices/bus/megadrive')
-rw-r--r--src/devices/bus/megadrive/eeprom.cpp49
-rw-r--r--src/devices/bus/megadrive/ggenie.cpp9
-rw-r--r--src/devices/bus/megadrive/jcart.cpp14
-rw-r--r--src/devices/bus/megadrive/md_slot.h18
-rw-r--r--src/devices/bus/megadrive/sk.cpp9
-rw-r--r--src/devices/bus/megadrive/svp.cpp11
6 files changed, 62 insertions, 48 deletions
diff --git a/src/devices/bus/megadrive/eeprom.cpp b/src/devices/bus/megadrive/eeprom.cpp
index a39daf4fb52..32787dec152 100644
--- a/src/devices/bus/megadrive/eeprom.cpp
+++ b/src/devices/bus/megadrive/eeprom.cpp
@@ -107,33 +107,40 @@ md_eeprom_blara_device::md_eeprom_blara_device(const machine_config &mconfig, co
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(md_std_eeprom_device::device_add_mconfig)
- MCFG_24C01_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_std_eeprom_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C01(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(md_eeprom_nbajam_device::device_add_mconfig)
- MCFG_24C02_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_eeprom_nbajam_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C02(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(md_eeprom_nbajamte_device::device_add_mconfig)
- MCFG_24C02_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_eeprom_nbajamte_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C01(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(md_eeprom_cslam_device::device_add_mconfig)
- MCFG_24C64_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_eeprom_cslam_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C64(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(md_eeprom_nflqb_device::device_add_mconfig)
- MCFG_24C16_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_eeprom_nflqb_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C16(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(md_eeprom_nhlpa_device::device_add_mconfig)
- MCFG_24C01_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_eeprom_nhlpa_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C01(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(md_eeprom_blara_device::device_add_mconfig)
- MCFG_24C64_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_eeprom_blara_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C64(config, m_i2cmem);
+}
void md_std_eeprom_device::device_start()
{
diff --git a/src/devices/bus/megadrive/ggenie.cpp b/src/devices/bus/megadrive/ggenie.cpp
index a6001971529..17dbb78fc1d 100644
--- a/src/devices/bus/megadrive/ggenie.cpp
+++ b/src/devices/bus/megadrive/ggenie.cpp
@@ -172,7 +172,8 @@ static void ggenie_sub_cart(device_slot_interface &device)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(md_rom_ggenie_device::device_add_mconfig)
- MCFG_MD_CARTRIDGE_ADD("subslot", ggenie_sub_cart, nullptr)
- MCFG_MD_CARTRIDGE_NOT_MANDATORY
-MACHINE_CONFIG_END
+void md_rom_ggenie_device::device_add_mconfig(machine_config &config)
+{
+ MD_CART_SLOT(config, m_exp, ggenie_sub_cart, nullptr);
+ m_exp->set_must_be_loaded(false);
+}
diff --git a/src/devices/bus/megadrive/jcart.cpp b/src/devices/bus/megadrive/jcart.cpp
index aa6d763e517..76f38ff0dd3 100644
--- a/src/devices/bus/megadrive/jcart.cpp
+++ b/src/devices/bus/megadrive/jcart.cpp
@@ -81,13 +81,15 @@ md_seprom_mm96_device::md_seprom_mm96_device(const machine_config &mconfig, cons
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(md_seprom_codemast_device::device_add_mconfig)
- MCFG_24C08_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_seprom_codemast_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C08(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(md_seprom_mm96_device::device_add_mconfig)
- MCFG_24C16A_ADD("i2cmem")
-MACHINE_CONFIG_END
+void md_seprom_mm96_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C16A(config, m_i2cmem);
+}
static INPUT_PORTS_START( jcart_ipt )
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index c9372ada7df..42fd2503f76 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -211,6 +211,16 @@ class md_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
+ template <typename T>
+ md_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : md_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
+
md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const override { return "megadriv_cart"; }
virtual const char *file_extensions() const override { return "smd,bin,md,gen"; }
@@ -269,12 +279,4 @@ DECLARE_DEVICE_TYPE(COPERA_CART_SLOT, copera_cart_slot_device)
#define MDSLOT_ROM_REGION_TAG ":cart:rom"
-#define MCFG_MD_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
- MCFG_DEVICE_ADD(_tag, MD_CART_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-#define MCFG_MD_CARTRIDGE_NOT_MANDATORY \
- static_cast<md_cart_slot_device *>(device)->set_must_be_loaded(false);
-
-
#endif // MAME_BUS_MEGADRIVE_MD_SLOT_H
diff --git a/src/devices/bus/megadrive/sk.cpp b/src/devices/bus/megadrive/sk.cpp
index b48163e9b94..c45574ff1a3 100644
--- a/src/devices/bus/megadrive/sk.cpp
+++ b/src/devices/bus/megadrive/sk.cpp
@@ -79,7 +79,8 @@ static void sk_sub_cart(device_slot_interface &device)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(md_rom_sk_device::device_add_mconfig)
- MCFG_MD_CARTRIDGE_ADD("subslot", sk_sub_cart, nullptr)
- MCFG_MD_CARTRIDGE_NOT_MANDATORY
-MACHINE_CONFIG_END
+void md_rom_sk_device::device_add_mconfig(machine_config &config)
+{
+ MD_CART_SLOT(config, m_exp, sk_sub_cart, nullptr);
+ m_exp->set_must_be_loaded(false);
+}
diff --git a/src/devices/bus/megadrive/svp.cpp b/src/devices/bus/megadrive/svp.cpp
index 2ed4e40ba1f..fe4ae33536e 100644
--- a/src/devices/bus/megadrive/svp.cpp
+++ b/src/devices/bus/megadrive/svp.cpp
@@ -347,11 +347,12 @@ void md_rom_svp_device::md_svp_ext_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(md_rom_svp_device::device_add_mconfig)
- MCFG_DEVICE_ADD("svp", SSP1601, MASTER_CLOCK_NTSC / 7 * 3) /* ~23 MHz (guessed) */
- MCFG_DEVICE_PROGRAM_MAP(md_svp_ssp_map)
- MCFG_DEVICE_IO_MAP(md_svp_ext_map)
-MACHINE_CONFIG_END
+void md_rom_svp_device::device_add_mconfig(machine_config &config)
+{
+ SSP1601(config, m_svp, MASTER_CLOCK_NTSC / 7 * 3); /* ~23 MHz (guessed) */
+ m_svp->set_addrmap(AS_PROGRAM, &md_rom_svp_device::md_svp_ssp_map);
+ m_svp->set_addrmap(AS_IO, &md_rom_svp_device::md_svp_ext_map);
+}
ioport_constructor md_rom_svp_device::device_input_ports() const
{