mirror of
https://github.com/holub/mame
synced 2025-07-07 02:50:50 +03:00
ymfm: Don't pre-mask status bits with the status mask; apply instead at time of consumption. Fixes missing music in kickball.
This commit is contained in:
parent
47e9aa7d6b
commit
17e0ffb32b
@ -3103,7 +3103,7 @@ void ymfm_engine_base<RegisterType>::write(u16 regnum, u8 data)
|
||||
template<class RegisterType>
|
||||
u8 ymfm_engine_base<RegisterType>::status() const
|
||||
{
|
||||
u8 result = m_status & ~STATUS_BUSY;
|
||||
u8 result = m_status & ~STATUS_BUSY & ~m_regs.status_mask();
|
||||
if (m_device.machine().time() < m_busy_end)
|
||||
result |= STATUS_BUSY;
|
||||
return result;
|
||||
@ -3210,7 +3210,7 @@ TIMER_CALLBACK_MEMBER(ymfm_engine_base<RegisterType>::check_interrupts)
|
||||
{
|
||||
// update the state
|
||||
u8 old_state = m_irq_state;
|
||||
m_irq_state = ((m_status & m_irq_mask) != 0);
|
||||
m_irq_state = ((m_status & m_irq_mask & ~m_regs.status_mask()) != 0);
|
||||
|
||||
// set the IRQ status bit
|
||||
if (m_irq_state)
|
||||
|
@ -801,8 +801,8 @@ public:
|
||||
u32 irq_reset() const { return byte(0x04, 7, 1); }
|
||||
u32 reset_timer_b() const { return byte(0x04, 7, 1) | byte(0x04, 5, 1); }
|
||||
u32 reset_timer_a() const { return byte(0x04, 7, 1) | byte(0x04, 6, 1); }
|
||||
u32 enable_timer_b() const { return byte(0x04, 5, 1) ^ 1; }
|
||||
u32 enable_timer_a() const { return byte(0x04, 6, 1) ^ 1; }
|
||||
u32 enable_timer_b() const { return 1; }
|
||||
u32 enable_timer_a() const { return 1; }
|
||||
u32 load_timer_b() const { return byte(0x04, 1, 1); }
|
||||
u32 load_timer_a() const { return byte(0x04, 0, 1); }
|
||||
u32 csm() const { return IsOpl3Plus ? 0 : byte(0x08, 7, 1); }
|
||||
@ -1300,7 +1300,7 @@ public:
|
||||
// set/reset bits in the status register, updating the IRQ status
|
||||
u8 set_reset_status(u8 set, u8 reset)
|
||||
{
|
||||
m_status = (m_status | set) & ~reset & ~m_regs.status_mask();
|
||||
m_status = (m_status | set) & ~reset;
|
||||
schedule_check_interrupts();
|
||||
return m_status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user