]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Both COPxJMP strobe emulation update
authorToni Wilen <twilen@winuae.net>
Sun, 15 Sep 2024 14:59:05 +0000 (17:59 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 15 Sep 2024 14:59:05 +0000 (17:59 +0300)
custom.cpp

index 8087baceccd62b50ca17f22f2532cca535b97799..8623228b796c472f837c4cb2a38daaae15238932 100644 (file)
@@ -8633,8 +8633,6 @@ static void compute_spcflag_copper(void);
 // normal COPJMP write: takes 2 more cycles
 static void COPJMP(int num, int vblank)
 {
-       bool wasstopped = cop_state.state == COP_stop && !vblank;
-
        unset_special(SPCFLAG_COPPER);
        cop_state.ignore_next = 0;
 
@@ -8677,7 +8675,11 @@ static void COPJMP(int num, int vblank)
        }
        cop_state.vblankip = cop1lc;
        copper_enabled_thisline = 0;
-       cop_state.strobe |= num;
+       if (vblank) {
+               cop_state.strobe = num;
+       } else {
+               cop_state.strobe |= num;
+       }
        cop_state.last_strobe = num;
 
        if (custom_disabled) {
@@ -8685,12 +8687,7 @@ static void COPJMP(int num, int vblank)
                return;
        }
 
-       if (wasstopped) {
-               /* dma disabled, copper idle and accessed both COPxJMPs -> copper stops! */
-               cop_state.state = COP_stop;
-       } else if (is_copper_dma(false)) {
-               compute_spcflag_copper();
-       }
+       compute_spcflag_copper();
 }
 
 STATIC_INLINE void COPCON(uae_u16 a)
@@ -11086,11 +11083,11 @@ static void do_copper_fetch(int hpos, uae_u16 id)
                        }
 
                        if (reg == 0x88) {
-                               cop_state.strobe |= 1;
+                               cop_state.strobe = 1;
                                cop_state.last_strobe = 1;
                                cop_state.state = COP_strobe_delay1;
                        } else if (reg == 0x8a) {
-                               cop_state.strobe |= 2;
+                               cop_state.strobe = 2;
                                cop_state.last_strobe = 2;
                                cop_state.state = COP_strobe_delay1;
                        } else {