From 0206cc5587d39c4afac6bb5cc216e8105748bf51 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 11 Nov 2018 19:32:12 +0100 Subject: x68k: bit more accurate refresh rate (from_ticks doesn't work with fractions) (nw) --- src/mame/video/x68k_crtc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/video/x68k_crtc.cpp b/src/mame/video/x68k_crtc.cpp index 232ebb19358..bfa214088e5 100644 --- a/src/mame/video/x68k_crtc.cpp +++ b/src/mame/video/x68k_crtc.cpp @@ -203,7 +203,7 @@ void x68k_crtc_device::refresh_mode() div = BIT(m_reg[20], 0) ? 3 : 6; if ((m_reg[20] & 0x0c) == 0) div *= 2; - attotime refresh = attotime::from_ticks(scr.max_x * scr.max_y, (BIT(m_reg[20], 4) ? 69.55199_MHz_XTAL : 38.86363_MHz_XTAL) / div); + attotime refresh = attotime::from_hz((BIT(m_reg[20], 4) ? 69.55199_MHz_XTAL : 38.86363_MHz_XTAL) / div) * (scr.max_x * scr.max_y); LOG("screen().configure(%i,%i,[%i,%i,%i,%i],%f)\n", scr.max_x, scr.max_y, visiblescr.min_x, visiblescr.min_y, visiblescr.max_x, visiblescr.max_y, refresh.as_hz()); screen().configure(scr.max_x, scr.max_y, visiblescr, refresh.as_attoseconds()); } -- cgit v1.2.3