From 8e15a98d096fb343b7592d89719b10947e62e934 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sun, 8 Sep 2024 20:18:32 +0200 Subject: funtech/supracan.cpp: fine tune FRC a bit --- src/mame/funtech/supracan.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mame/funtech/supracan.cpp b/src/mame/funtech/supracan.cpp index 66e229f12e8..24dda45bff8 100644 --- a/src/mame/funtech/supracan.cpp +++ b/src/mame/funtech/supracan.cpp @@ -1570,6 +1570,8 @@ void supracan_state::update_frc_state() { if ((m_frc_control & 0xff00) == 0xa200) { + const u32 period = ((m_frc_control & 0xff << 16) | (m_frc_frequency)); + // HACK: handle case by case until we resolve the equation // (particularly with variable frequencies) switch(m_frc_control & 0xf) @@ -1585,7 +1587,7 @@ void supracan_state::update_frc_state() // - causes a crash at boot if too fast; // - takes roughly 6 seconds for a title screen individual kanji to move right-to-left; case 1: - m_frc_timer->adjust(attotime::from_hz(30)); + m_frc_timer->adjust(m_maincpu->cycles_to_attotime(1024 * period), 0); break; // gamblord: sets 0xa20f normally, plays with frequency register a lot. @@ -1593,8 +1595,9 @@ void supracan_state::update_frc_state() // - takes ~1 second for character screen to switch; // - during gameplay sometimes switches to 0xa200 / 0xffff; case 0xf: - m_frc_timer->adjust(attotime::from_hz(120)); + m_frc_timer->adjust(m_maincpu->cycles_to_attotime(8192 * period), 0); break; + default: popmessage("Attempt to fire up FRC with %04x %04x", m_frc_control, m_frc_frequency); break; -- cgit v1.2.3