From 7c800204e6ee392a6b2b70d2e67274c084e8b58f Mon Sep 17 00:00:00 2001 From: Andrea Odetti Date: Mon, 24 Aug 2026 10:59:24 +0100 Subject: [PATCH] Run tape loading at the correct emulated speed. Not at the "wall clock" speed, which the user can modify. Fixes https://github.com/audetto/AppleWin/issues/401 Signed-off-by: Andrea Odetti --- source/linux/cassettetape.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/linux/cassettetape.cpp b/source/linux/cassettetape.cpp index ef646fd9f..6c6fdb72b 100644 --- a/source/linux/cassettetape.cpp +++ b/source/linux/cassettetape.cpp @@ -67,8 +67,9 @@ CassetteTape::tape_data_t CassetteTape::getCurrentWave(size_t &pos) const { if (myBaseCycles) { + const double clock = Get6502BaseClock(); const double delta = g_nCumulativeCycles - *myBaseCycles; - const double position = delta / g_fCurrentCLK6502 * myFrequency; + const double position = delta / clock * myFrequency; pos = static_cast(position); if (pos + 1 < myData.size())