From 6f532fb35f9c292b32c4af2bd463e66b7d1716e3 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 13 Apr 2026 20:42:31 +0300 Subject: [PATCH] Do not allow clock sync until uae boot rom interrupt handler is installed --- filesys.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/filesys.cpp b/filesys.cpp index 7ad6720a..c090a1c8 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -126,7 +126,7 @@ static volatile int shellexecute2_queued; static uae_u32 filesys_shellexecute2_process(int mode, TrapContext *ctx); static void filesys_shellexecute2_run_queue(void); static void shellexecute2_free(struct ShellExecute2 *se2); - +static bool exter_added; static int bootrom_header; static uae_u32 dlg (uae_u32 a) @@ -1937,8 +1937,12 @@ bool filesys_heartbeat(void) void setsystime (void) { - if (!currprefs.tod_hack || !rtarea_bank.baseaddr) + if (!currprefs.tod_hack || !rtarea_bank.baseaddr) { + return; + } + if (!exter_added) { return; + } uae_ClockSync(); } @@ -7392,6 +7396,7 @@ static void filesys_reset2 (void) void filesys_reset (void) { + exter_added = false; if (isrestore ()) return; load_injected_icons(); @@ -9137,6 +9142,7 @@ static uae_u32 REGPARAM2 mousehack_done (TrapContext *ctx) uaecptr diminfo = trap_get_areg(ctx, 2); uaecptr dispinfo = trap_get_areg(ctx, 3); uaecptr vp = trap_get_areg(ctx, 4); + exter_added = true; return input_mousehack_status(ctx, mode, diminfo, dispinfo, vp, trap_get_dreg(ctx, 2)); } else if (mode == 10) { amiga_clipboard_die(ctx); -- 2.47.3