delay_cycles = unalign << LORES_TO_SHRES_SHIFT;
}
+static uae_u16 BPLCON0_Denise_mask(uae_u16 v)
+{
+ if (!ecs_denise) {
+ v &= ~0x00F1;
+ } else if (!aga_mode) {
+ v &= ~0x00B0;
+ }
+
+ v &= ~((currprefs.cs_color_burst ? 0x0000 : 0x0200) | 0x0100 | 0x0080 | 0x0020);
+#if SPRBORDER
+ v |= 1;
+#endif
+ return v;
+}
+
static void reset_decisions_hsync_start(void)
{
if (nodraw()) {
thisline_decision.xor_seen = (bplcon4 & 0xff00) != 0;
thisline_decision.nr_planes = toscr_nr_planes_agnus;
+ // workaround for glitches in faster modes
+ // update Denise state immediately if bitplane DMA is idle and shifters are empty
+ if (!bprun && !plane0 && !plane0p) {
+ bplcon0d = BPLCON0_Denise_mask(bplcon0);
+ toscr_nr_planes_shifter = GET_PLANES(bplcon0d);
+ }
+
toscr_nr_planes2 = GET_PLANES(bplcon0d);
if (isocs7planes()) {
if (toscr_nr_planes2 < 6) {
//write_log (_T("%d:%d:BPL%dPTL %08X COP=%08x\n"), hpos, vpos, num, bplpt[num], cop_state.ip);
}
-static uae_u16 BPLCON0_Denise_mask(uae_u16 v)
-{
- if (!ecs_denise) {
- v &= ~0x00F1;
- } else if (!aga_mode) {
- v &= ~0x00B0;
- }
-
- v &= ~((currprefs.cs_color_burst ? 0x0000 : 0x0200) | 0x0100 | 0x0080 | 0x0020);
-#if SPRBORDER
- v |= 1;
-#endif
- return v;
-}
-
static void BPLCON0_Denise(int hpos, uae_u16 v)
{
v = BPLCON0_Denise_mask(v);