summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/c140.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/c140.cpp')
-rw-r--r--src/devices/sound/c140.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp
index 5dc5dfa5ba7..cb3288e4fd6 100644
--- a/src/devices/sound/c140.cpp
+++ b/src/devices/sound/c140.cpp
@@ -444,23 +444,30 @@ void c140_device::c140_w(offs_t offset, u8 data)
}
}
}
- else if (offset == 0x1f8 || offset == 0x1fe)
+ else if (offset == 0x1fa)
{
+ m_int1_callback(CLEAR_LINE);
+
// timing not verified
unsigned div = m_REG[0x1f8] != 0 ? m_REG[0x1f8] : 256;
attotime interval = attotime::from_ticks(div * 2, m_baserate);
if (BIT(m_REG[0x1fe], 0))
- m_int1_timer->adjust(interval, 0, interval);
+ m_int1_timer->adjust(interval);
+ }
+ else if (offset == 0x1fe)
+ {
+ if (BIT(data, 0))
+ {
+ // kyukaidk and marvlandj want the first interrupt to happen immediately
+ if (!m_int1_timer->enabled())
+ m_int1_callback(ASSERT_LINE);
+ }
else
{
m_int1_callback(CLEAR_LINE);
- m_int1_timer->adjust(attotime::never);
+ m_int1_timer->enable(false);
}
}
- else if (offset == 0x1fa)
- {
- m_int1_callback(CLEAR_LINE);
- }
}