mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
Resolve devices specified for vblank/periodic interrupts relative to the
owner device, not the device itself, to make it consistent with devcb2 patterns. This change is mostly hidden since most drivers use MCFG_DEVICE_VBLANK_INT_DRIVER and MCFG_DEVICE_PERIODIC_INT_DRIVER. But for those few cases where a device was explicitly specified, it reduces the awkwardness. We should probably standardize this when using device_delegates for consistency. A full rebuild is necessary after taking this change, since the macros mentioned above have changed their parameters.
This commit is contained in:
parent
45505e51b0
commit
c96889730f
@ -532,8 +532,8 @@ void device_execute_interface::interface_validity_check(validity_checker &valid)
|
||||
void device_execute_interface::interface_pre_start()
|
||||
{
|
||||
// bind delegates
|
||||
m_vblank_interrupt.bind_relative_to(device());
|
||||
m_timed_interrupt.bind_relative_to(device());
|
||||
m_vblank_interrupt.bind_relative_to(*device().owner());
|
||||
m_timed_interrupt.bind_relative_to(*device().owner());
|
||||
m_driver_irq.bind_relative_to(device());
|
||||
|
||||
// fill in the initial states
|
||||
|
@ -119,13 +119,13 @@ enum
|
||||
#define MCFG_DEVICE_VBLANK_INT(_tag, _func) \
|
||||
device_execute_interface::static_set_vblank_int(*device, _func, _tag);
|
||||
#define MCFG_DEVICE_VBLANK_INT_DRIVER(_tag, _class, _func) \
|
||||
device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF_OWNER, (_class *)0), _tag);
|
||||
device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0), _tag);
|
||||
#define MCFG_DEVICE_VBLANK_INT_DEVICE(_devtag, _tag, _class, _func) \
|
||||
device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)0), _tag);
|
||||
#define MCFG_DEVICE_PERIODIC_INT(_func, _rate) \
|
||||
device_execute_interface::static_set_periodic_int(*device, _func, attotime::from_hz(_rate));
|
||||
#define MCFG_DEVICE_PERIODIC_INT_DRIVER(_class, _func, _rate) \
|
||||
device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF_OWNER, (_class *)0), attotime::from_hz(_rate));
|
||||
device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)0), attotime::from_hz(_rate));
|
||||
#define MCFG_DEVICE_PERIODIC_INT_DEVICE(_devtag, _class, _func, _rate) \
|
||||
device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)0), attotime::from_hz(_rate));
|
||||
|
||||
|
@ -795,7 +795,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_i_stereo )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa1_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("^soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "jsa", WRITELINE(atarigen_state, sound_int_write_line))
|
||||
@ -840,7 +840,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_i_mono_speech )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa1_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("^soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "jsa", WRITELINE(atarigen_state, sound_int_write_line))
|
||||
@ -863,7 +863,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_ii_mono )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa2_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("^soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "jsa", WRITELINE(atarigen_state, sound_int_write_line))
|
||||
@ -908,7 +908,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_iiis_stereo )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa3s_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("^soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "jsa", WRITELINE(atarigen_state, sound_int_write_line))
|
||||
|
@ -436,7 +436,7 @@ ADDRESS_MAP_END
|
||||
static MACHINE_CONFIG_FRAGMENT( midway_ssio )
|
||||
MCFG_CPU_ADD("cpu", Z80, SSIO_CLOCK/2/4)
|
||||
MCFG_CPU_PROGRAM_MAP(ssio_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE(DEVICE_SELF_OWNER, midway_ssio_device, clock_14024, SSIO_CLOCK/2/16/10)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE(DEVICE_SELF, midway_ssio_device, clock_14024, SSIO_CLOCK/2/16/10)
|
||||
|
||||
MCFG_SOUND_ADD("ay0", AY8910, SSIO_CLOCK/2/4)
|
||||
MCFG_SOUND_CONFIG(ssio_ay8910_interface_1)
|
||||
|
@ -1238,7 +1238,7 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state )
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6502, SOUND_CLOCK/8)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("^soundcomm", atari_sound_comm_device, sound_irq_gen, (double)MASTER_CLOCK/2/16/16/16/10)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)MASTER_CLOCK/2/16/16/16/10)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(atarisy2_state,atarisy2)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(atarisy2_state,atarisy2)
|
||||
|
@ -409,7 +409,7 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state )
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("^soundcomm", atari_sound_comm_device, sound_irq_gen, (double)ATARI_CLOCK_14MHz/4/4/16/16/14)
|
||||
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)ATARI_CLOCK_14MHz/4/4/16/16/14)
|
||||
|
||||
MCFG_CPU_ADD("extra", M68000, ATARI_CLOCK_14MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(extra_map)
|
||||
|
Loading…
Reference in New Issue
Block a user