From 2342a9805d5db1d106faf752321a00e46bf1db73 Mon Sep 17 00:00:00 2001 From: arekkusu Date: Wed, 19 Nov 2025 13:37:08 -0800 Subject: [PATCH] apple2e: fix FLASH timing The 555 timer in the original Apple II is replaced in the IIe and later, by IOU video counter overflow bits. This slightly slows the FLASH blinking rate from every ~15 frames to exactly every 16 frames. --- src/mame/apple/apple2video.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mame/apple/apple2video.cpp b/src/mame/apple/apple2video.cpp index 548602f537691..9d6c2cbd38ec3 100644 --- a/src/mame/apple/apple2video.cpp +++ b/src/mame/apple/apple2video.cpp @@ -955,7 +955,16 @@ uint32_t a2_video_device::screen_update(screen_device &screen, bitmap_ind16 &bit } // always update the flash timer here so it's smooth regardless of mode switches - m_flash = ((machine().time() * 4).seconds() & 1) ? true : false; + if (Model == model::IIE || Model == model::IIGS) + { + // video scanner overflow flash timer every 16 frames, ~1.87 Hz (NTSC) + m_flash = screen.frame_number() & 0x10; + } + else + { + // approximate 555 flash timer, ~2 Hz cycle + m_flash = (machine().time() * 4).seconds() & 1; + } int text_start_row = 0;