From: Toni Wilen Date: Sun, 6 Nov 2022 17:00:34 +0000 (+0200) Subject: Reading non-existing register fix X-Git-Tag: 41000~83 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=2cf8ea7b570ce1ad35caf297b5927c1c06b3cc42;p=francis%2Fwinuae.git Reading non-existing register fix --- diff --git a/custom.cpp b/custom.cpp index 8b72c8c1..e0ad5d65 100644 --- a/custom.cpp +++ b/custom.cpp @@ -13727,8 +13727,9 @@ writeonly: // - if last cycle was DMA cycle: DMA cycle data // - if last cycle was not DMA cycle: FFFF or some ANDed old data. // - c = cycle_line_slot[hpos] & CYCLE_MASK; - bmdma = bitplane_dma_access(hpos, 0); + int hp = (hpos - 1) % maxhpos; + c = cycle_line_slot[hp] & CYCLE_MASK; + bmdma = bitplane_dma_access(hp, 0); if (aga_mode) { if (bmdma || (c > CYCLE_REFRESH && c < CYCLE_CPU)) { v = regs.chipset_latch_rw;