From: Toni Wilen Date: Sat, 19 Apr 2025 17:41:00 +0000 (+0300) Subject: Fixed unreliable DIWHIGH statefile load X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=0b8eef0ed826021b6d5278421cb92139dfabcffd;p=francis%2Fwinuae.git Fixed unreliable DIWHIGH statefile load --- diff --git a/custom.cpp b/custom.cpp index ffe1d98e..8040adb9 100644 --- a/custom.cpp +++ b/custom.cpp @@ -7829,6 +7829,7 @@ uae_u8 *restore_custom(uae_u8 *src) denise_update_reg(0x104, bplcon2); denise_update_reg(0x106, bplcon3); denise_update_reg(0x10c, bplcon4); + denise_update_reg(0x1e4, diwhigh); denise_update_reg(0x08e, diwstrt); denise_update_reg(0x090, diwstop); if (diwhigh_written) { diff --git a/drawing.cpp b/drawing.cpp index 5ac70bca..d8c8ea87 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -3857,6 +3857,24 @@ void denise_update_reg(uae_u16 reg, uae_u16 v) expand_drga_early2x(&dr); expand_drga_early(&dr); expand_drga(&dr); + // handle all queued writes immediately + reswitch_unalign = 0; + update_bplcon1(); + if (denise_diwhigh2 >= 0) { + denise_diwhigh = denise_diwhigh2; + denise_diwhigh2 = -1; + diwhigh_written = true; + calchdiw(); + } + if (aga_delayed_color_idx >= 0) { + update_color(aga_delayed_color_idx, aga_delayed_color_val, aga_delayed_color_con2, aga_delayed_color_con3); + aga_delayed_color_idx = -1; + } + bplmode = bplmode_new; + sbasecol[0] = sbasecol2[0]; + sbasecol[1] = sbasecol2[1]; + aga_unalign0 = 0; + aga_unalign1 = 0; check_lts_request(); }