mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
igs/igs027a.cpp: Corrected timer interval calculation. (#12759)
Some checks failed
Rebuild BGFX shaders / rebuild (push) Has been cancelled
CI (Linux) / build-linux (-U_FORTIFY_SOURCE, gcc, gcc, g++, mametiny, tiny) (push) Has been cancelled
CI (Linux) / build-linux (clang, clang, clang++, mame, mame) (push) Has been cancelled
CI (macOS) / build-macos (push) Has been cancelled
CI (Windows) / build-windows (clang, clang, clang++, mametiny, tiny) (push) Has been cancelled
CI (Windows) / build-windows (gcc, gcc, g++, mame, mame) (push) Has been cancelled
Build documentation / build-docs (push) Has been cancelled
XML/JSON validation / validate (push) Has been cancelled
Compile UI translations / build-language (push) Has been cancelled
Some checks failed
Rebuild BGFX shaders / rebuild (push) Has been cancelled
CI (Linux) / build-linux (-U_FORTIFY_SOURCE, gcc, gcc, g++, mametiny, tiny) (push) Has been cancelled
CI (Linux) / build-linux (clang, clang, clang++, mame, mame) (push) Has been cancelled
CI (macOS) / build-macos (push) Has been cancelled
CI (Windows) / build-windows (clang, clang, clang++, mametiny, tiny) (push) Has been cancelled
CI (Windows) / build-windows (gcc, gcc, g++, mame, mame) (push) Has been cancelled
Build documentation / build-docs (push) Has been cancelled
XML/JSON validation / validate (push) Has been cancelled
Compile UI translations / build-language (push) Has been cancelled
Fixes slowdown in jking02.
This commit is contained in:
parent
126e2e3f13
commit
1797664a33
1 changed files with 10 additions and 1 deletions
|
@ -87,7 +87,16 @@ template <unsigned N>
|
||||||
void igs027a_cpu_device::timer_rate_w(u8 data)
|
void igs027a_cpu_device::timer_rate_w(u8 data)
|
||||||
{
|
{
|
||||||
// TODO: determine how timer intervals are derived from clocks
|
// TODO: determine how timer intervals are derived from clocks
|
||||||
m_irq_timers[N]->adjust(attotime::from_hz(data / 2), 0, attotime::from_hz(data / 2));
|
if (data)
|
||||||
|
{
|
||||||
|
constexpr u32 TIMER_DIVISOR = 4263;
|
||||||
|
auto period = attotime::from_ticks(TIMER_DIVISOR * (data + 1), clock());
|
||||||
|
m_irq_timers[N]->adjust(period, 0, period);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_irq_timers[N]->adjust(attotime::never, 0, attotime::never);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 igs027a_cpu_device::irq_pending_r()
|
u8 igs027a_cpu_device::irq_pending_r()
|
||||||
|
|
Loading…
Reference in a new issue