summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/dislot.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/dislot.h')
-rw-r--r--src/emu/dislot.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/emu/dislot.h b/src/emu/dislot.h
index 4cc0448732c..764962a3ee0 100644
--- a/src/emu/dislot.h
+++ b/src/emu/dislot.h
@@ -13,13 +13,13 @@
// LEGACY MACROS
//**************************************************************************
-#define MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_option, _fixed) MCFG_SLOT_OPTION_RESET MCFG_FRAGMENT_ADD(slot_options_##_slot_intf) MCFG_SLOT_DEFAULT_OPTION(_def_option) MCFG_SLOT_FIXED(_fixed)
-#define SLOT_INTERFACE_NAME(name) MACHINE_CONFIG_NAME(slot_options_##name)
-#define SLOT_INTERFACE_START(name) MACHINE_CONFIG_START(slot_options_##name)
+#define MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_option, _fixed) MCFG_SLOT_OPTION_RESET slot_options_##_slot_intf(device); MCFG_SLOT_DEFAULT_OPTION(_def_option) MCFG_SLOT_FIXED(_fixed)
+#define SLOT_INTERFACE_NAME(name) slot_options_##name
+#define SLOT_INTERFACE_START(name) void slot_options_##name(device_t *device) {
#define SLOT_INTERFACE(name,device) MCFG_SLOT_OPTION_ADD(name, device)
#define SLOT_INTERFACE_INTERNAL(name,device) MCFG_SLOT_OPTION_ADD(name, device) MCFG_SLOT_OPTION_SELECTABLE(name, false)
-#define SLOT_INTERFACE_END MACHINE_CONFIG_END
-#define SLOT_INTERFACE_EXTERN(name) MACHINE_CONFIG_EXTERN(slot_options_##name)
+#define SLOT_INTERFACE_END }
+#define SLOT_INTERFACE_EXTERN(name) void slot_options_##name(device_t *device)
#define MCFG_DEVICE_CARD_DEFAULT_BIOS(_option, _default_bios) MCFG_SLOT_OPTION_DEFAULT_BIOS(_option, _default_bios)
#define MCFG_DEVICE_CARD_MACHINE_CONFIG(_option, _machine_config_name) MCFG_SLOT_OPTION_MACHINE_CONFIG(_option, _machine_config_name)
#define MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS(_option, _dev_inp_def) MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS(_option, _dev_inp_def)
@@ -49,7 +49,7 @@
device_slot_interface::static_set_option_default_bios(*device, _option, _default_bios);
#define MCFG_SLOT_OPTION_MACHINE_CONFIG(_option, _machine_config_name) \
- device_slot_interface::static_set_option_machine_config(*device, _option, MACHINE_CONFIG_NAME(_machine_config_name));
+ device_slot_interface::static_set_option_machine_config(*device, _option, _machine_config_name);
#define MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS(_option, _dev_inp_def) \
device_slot_interface::static_set_option_device_input_defaults(*device, _option, DEVICE_INPUT_DEFAULTS_NAME(_dev_inp_def));
@@ -75,7 +75,7 @@ public:
const device_type &devtype() const { return m_devtype; }
bool selectable() const { return m_selectable; }
const char *default_bios() const { return m_default_bios; }
- machine_config_constructor machine_config() const { return m_machine_config; }
+ std::function<void (device_t *)> machine_config() const { return m_machine_config; }
const input_device_default *input_device_defaults() const { return m_input_device_defaults; }
u32 clock() const { return m_clock; }
@@ -85,7 +85,7 @@ private:
const device_type &m_devtype;
bool m_selectable;
const char *m_default_bios;
- machine_config_constructor m_machine_config;
+ std::function<void (device_t *)> m_machine_config;
const input_device_default *m_input_device_defaults;
u32 m_clock;
};
@@ -134,7 +134,7 @@ public:
static void static_option_add(device_t &device, const char *option, const device_type &devtype);
static void static_set_option_selectable(device_t &device, const char *option, bool selectable){ static_option(device, option)->m_selectable = selectable; }
static void static_set_option_default_bios(device_t &device, const char *option, const char *default_bios) { static_option(device, option)->m_default_bios = default_bios; }
- static void static_set_option_machine_config(device_t &device, const char *option, const machine_config_constructor machine_config) { static_option(device, option)->m_machine_config = machine_config; }
+ static void static_set_option_machine_config(device_t &device, const char *option, std::function<void (device_t *)> machine_config) { static_option(device, option)->m_machine_config = machine_config; }
static void static_set_option_device_input_defaults(device_t &device, const char *option, const input_device_default *default_input) { static_option(device, option)->m_input_device_defaults = default_input; }
static void static_set_option_clock(device_t &device, const char *option, u32 default_clock) { static_option(device, option)->m_clock = default_clock; }
bool fixed() const { return m_fixed; }