summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author arekkusu42 <arekkusu42@users.noreply.github.com>2025-11-22 15:29:11 -0800
committer GitHub <noreply@github.com>2025-11-22 18:29:11 -0500
commite516ef8551b84ddc8532de98e3a92b04ddda0ba0 (patch)
tree50bee3378d8305bf4e9729544fdf45e52888e3fc
parent64ff4296b05e4623b63aa1484b905a7e9be2901f (diff)
apple2e: fix FLASH timing (#14554)
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.
-rw-r--r--src/mame/apple/apple2video.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mame/apple/apple2video.cpp b/src/mame/apple/apple2video.cpp
index 548602f5376..9d6c2cbd38e 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;