mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
gen_latch: Synchronize at start to ensure broadcast of initial "not written" state (nw)
This fixes sound in onna34ro and makes the nycaptor hack unnecessary. Occasional sound loss in flstory remains, but that driver is IMPERFECT_SOUND anyway; I suspect the fault there may lie with the emulation of the MSM5232 or its interface to the Z80 here.
This commit is contained in:
parent
76755648e1
commit
c0e752323d
@ -42,6 +42,18 @@ void generic_latch_base_device::device_start()
|
||||
{
|
||||
m_data_pending_cb.resolve_safe();
|
||||
save_item(NAME(m_latch_written));
|
||||
|
||||
// synchronization is needed since other devices may not be initialized yet
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(generic_latch_base_device::init_callback), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// init_callback - set initial state
|
||||
//-------------------------------------------------
|
||||
|
||||
void generic_latch_base_device::init_callback(void *ptr, s32 param)
|
||||
{
|
||||
m_data_pending_cb(m_latch_written ? 1 : 0);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -67,6 +67,8 @@ protected:
|
||||
void set_latch_written(bool latch_written);
|
||||
|
||||
private:
|
||||
void init_callback(void *ptr, s32 param);
|
||||
|
||||
bool m_separate_acknowledge;
|
||||
bool m_latch_written;
|
||||
devcb_write_line m_data_pending_cb;
|
||||
|
@ -733,9 +733,6 @@ void nycaptor_state::machine_start()
|
||||
save_item(NAME(m_char_bank));
|
||||
save_item(NAME(m_palette_bank));
|
||||
save_item(NAME(m_gfxctrl));
|
||||
|
||||
// hack to put input_merger in correct initial state
|
||||
m_soundnmi->in_w<0>(0);
|
||||
}
|
||||
|
||||
void nycaptor_state::machine_reset()
|
||||
|
Loading…
Reference in New Issue
Block a user