mirror of
https://github.com/holub/mame
synced 2025-05-24 14:56:21 +03:00
NVRAM custom init delegate are now device_delegates.
This commit is contained in:
parent
845c34f586
commit
fda11532bf
@ -95,8 +95,7 @@ void nvram_device::static_set_custom_handler(device_t &device, nvram_init_delega
|
|||||||
void nvram_device::device_start()
|
void nvram_device::device_start()
|
||||||
{
|
{
|
||||||
// bind our handler
|
// bind our handler
|
||||||
if (!m_custom_handler.isnull())
|
m_custom_handler.bind_relative_to(*owner());
|
||||||
m_custom_handler = nvram_init_delegate(m_custom_handler, *m_owner);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,9 +64,9 @@
|
|||||||
MCFG_DEVICE_ADD(_tag, NVRAM, 0) \
|
MCFG_DEVICE_ADD(_tag, NVRAM, 0) \
|
||||||
nvram_device::static_set_default_value(*device, nvram_device::DEFAULT_NONE); \
|
nvram_device::static_set_default_value(*device, nvram_device::DEFAULT_NONE); \
|
||||||
|
|
||||||
#define MCFG_NVRAM_ADD_CUSTOM(_tag, _class, _method) \
|
#define MCFG_NVRAM_ADD_CUSTOM_DRIVER(_tag, _class, _method) \
|
||||||
MCFG_DEVICE_ADD(_tag, NVRAM, 0) \
|
MCFG_DEVICE_ADD(_tag, NVRAM, 0) \
|
||||||
nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, (_class *)0)); \
|
nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0)); \
|
||||||
|
|
||||||
|
|
||||||
#define MCFG_NVRAM_REPLACE_0FILL(_tag) \
|
#define MCFG_NVRAM_REPLACE_0FILL(_tag) \
|
||||||
@ -81,9 +81,9 @@
|
|||||||
MCFG_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
MCFG_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
||||||
nvram_device::static_set_default_value(*device, nvram_device::DEFAULT_RANDOM); \
|
nvram_device::static_set_default_value(*device, nvram_device::DEFAULT_RANDOM); \
|
||||||
|
|
||||||
#define MCFG_NVRAM_REPLACE_CUSTOM(_tag, _class, _method) \
|
#define MCFG_NVRAM_REPLACE_CUSTOM_DRIVER(_tag, _class, _method) \
|
||||||
MCFG_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
MCFG_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
||||||
nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, (_class *)0)); \
|
nvram_device::static_set_custom_handler(*device, nvram_init_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0)); \
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ class nvram_device;
|
|||||||
|
|
||||||
|
|
||||||
// custom initialization for default state
|
// custom initialization for default state
|
||||||
typedef delegate<void (nvram_device &, void *, size_t)> nvram_init_delegate;
|
typedef device_delegate<void (nvram_device &, void *, size_t)> nvram_init_delegate;
|
||||||
|
|
||||||
|
|
||||||
// ======================> nvram_device
|
// ======================> nvram_device
|
||||||
|
@ -374,7 +374,7 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state )
|
|||||||
|
|
||||||
MCFG_MACHINE_START(capbowl)
|
MCFG_MACHINE_START(capbowl)
|
||||||
MCFG_MACHINE_RESET(capbowl)
|
MCFG_MACHINE_RESET(capbowl)
|
||||||
MCFG_NVRAM_ADD_CUSTOM("nvram", capbowl_state, init_nvram)
|
MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", capbowl_state, init_nvram)
|
||||||
|
|
||||||
MCFG_TICKET_DISPENSER_ADD("ticket", 100, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
|
MCFG_TICKET_DISPENSER_ADD("ticket", 100, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
|
||||||
|
|
||||||
|
@ -1709,7 +1709,7 @@ static MACHINE_CONFIG_START( timekill, itech32_state )
|
|||||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||||
|
|
||||||
MCFG_MACHINE_RESET(itech32)
|
MCFG_MACHINE_RESET(itech32)
|
||||||
MCFG_NVRAM_ADD_CUSTOM("nvram", itech32_state, nvram_init)
|
MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", itech32_state, nvram_init)
|
||||||
|
|
||||||
MCFG_TICKET_DISPENSER_ADD("ticket", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
|
MCFG_TICKET_DISPENSER_ADD("ticket", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
|
||||||
|
|
||||||
|
@ -1266,7 +1266,7 @@ static MACHINE_CONFIG_DERIVED( dodge, pitboss )
|
|||||||
MCFG_CPU_MODIFY("maincpu")
|
MCFG_CPU_MODIFY("maincpu")
|
||||||
MCFG_CPU_PROGRAM_MAP(dodge_map)
|
MCFG_CPU_PROGRAM_MAP(dodge_map)
|
||||||
|
|
||||||
MCFG_NVRAM_REPLACE_CUSTOM("nvram", merit_state, dodge_nvram_init)
|
MCFG_NVRAM_REPLACE_CUSTOM_DRIVER("nvram", merit_state, dodge_nvram_init)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
static MACHINE_CONFIG_DERIVED( tictac, pitboss )
|
static MACHINE_CONFIG_DERIVED( tictac, pitboss )
|
||||||
|
Loading…
Reference in New Issue
Block a user