mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
Revert "Fix YM synchronization in Seibu sound device."
This reverts commit c89cbcd0e5
.
This commit is contained in:
parent
5f52046250
commit
ce02c7d478
@ -1261,7 +1261,6 @@ ymfm_engine_base<RegisterType>::ymfm_engine_base(device_t &device) :
|
|||||||
m_irq_mask(STATUS_TIMERA | STATUS_TIMERB),
|
m_irq_mask(STATUS_TIMERA | STATUS_TIMERB),
|
||||||
m_irq_state(0),
|
m_irq_state(0),
|
||||||
m_busy_end(attotime::zero),
|
m_busy_end(attotime::zero),
|
||||||
m_last_irq_update(attotime::zero),
|
|
||||||
m_timer{ nullptr, nullptr },
|
m_timer{ nullptr, nullptr },
|
||||||
m_irq_handler(device),
|
m_irq_handler(device),
|
||||||
m_regdata(RegisterType::REGISTERS),
|
m_regdata(RegisterType::REGISTERS),
|
||||||
@ -1633,18 +1632,8 @@ void ymfm_engine_base<RegisterType>::check_interrupts()
|
|||||||
|
|
||||||
// if changed, signal the new state
|
// if changed, signal the new state
|
||||||
if (old_state != m_irq_state && !m_irq_handler.isnull())
|
if (old_state != m_irq_state && !m_irq_handler.isnull())
|
||||||
{
|
|
||||||
// if writes to registers aren't synchronized, it is possible to induce
|
|
||||||
// scheduling errors handling IRQs; ensure that all IRQ handler updates
|
|
||||||
// are monotonically increasing in time
|
|
||||||
attotime curtime = m_device.machine().time();
|
|
||||||
if (m_last_irq_update > curtime)
|
|
||||||
fatalerror("IRQ signalling time went backwards; writes need to be synchronized");
|
|
||||||
m_last_irq_update = curtime;
|
|
||||||
|
|
||||||
m_irq_handler(m_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
m_irq_handler(m_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Explicit template instantiation
|
// Explicit template instantiation
|
||||||
|
@ -799,7 +799,6 @@ private:
|
|||||||
u8 m_irq_mask; // mask of which bits signal IRQs
|
u8 m_irq_mask; // mask of which bits signal IRQs
|
||||||
u8 m_irq_state; // current IRQ state
|
u8 m_irq_state; // current IRQ state
|
||||||
attotime m_busy_end; // end of the busy time
|
attotime m_busy_end; // end of the busy time
|
||||||
attotime m_last_irq_update; // time of last IRQ update
|
|
||||||
emu_timer *m_timer[2]; // our two timers
|
emu_timer *m_timer[2]; // our two timers
|
||||||
devcb_write_line m_irq_handler; // IRQ callback
|
devcb_write_line m_irq_handler; // IRQ callback
|
||||||
std::unique_ptr<ymfm_channel<RegisterType>> m_channel[RegisterType::CHANNELS]; // channel pointers
|
std::unique_ptr<ymfm_channel<RegisterType>> m_channel[RegisterType::CHANNELS]; // channel pointers
|
||||||
|
@ -196,14 +196,9 @@ u8 seibu_sound_device::ym_r(offs_t offset)
|
|||||||
return m_ym_read_cb(offset);
|
return m_ym_read_cb(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
TIMER_CALLBACK_MEMBER(seibu_sound_device::ym_w_synced)
|
|
||||||
{
|
|
||||||
m_ym_write_cb(param >> 8, param & 0xff);
|
|
||||||
}
|
|
||||||
|
|
||||||
void seibu_sound_device::ym_w(offs_t offset, u8 data)
|
void seibu_sound_device::ym_w(offs_t offset, u8 data)
|
||||||
{
|
{
|
||||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(seibu_sound_device::ym_w_synced), this), data | (offset << 8));
|
m_ym_write_cb(offset, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void seibu_sound_device::bank_w(u8 data)
|
void seibu_sound_device::bank_w(u8 data)
|
||||||
|
@ -80,7 +80,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void update_irq_lines(int param);
|
void update_irq_lines(int param);
|
||||||
TIMER_CALLBACK_MEMBER(update_irq_synced);
|
TIMER_CALLBACK_MEMBER(update_irq_synced);
|
||||||
TIMER_CALLBACK_MEMBER(ym_w_synced);
|
|
||||||
|
|
||||||
// device callbacks
|
// device callbacks
|
||||||
devcb_write_line m_int_cb;
|
devcb_write_line m_int_cb;
|
||||||
|
Loading…
Reference in New Issue
Block a user