             value |= (state.nextPipe.m_x[7] & 0xFF00) >> 1
             return UInt8(truncatingIfNeeded: value)
         case 0x11:
-            return (state.yScroll & 0x07) | (state.rsel ? 0x08 : 0) | (state.den ? 0x10 : 0) | (state.bmm ? 0x20 : 0) | (state.ecm ? 0x40 : 0) | UInt8((state.raster & 0x100) >> 1)
+            return (state.yScroll & 0x07) | (state.rsel ? 0x08 : 0) | (state.den ? 0x10 : 0) | (state.nextPipe.bmm ? 0x20 : 0) | (state.ecm ? 0x40 : 0) | UInt8((state.raster & 0x100) >> 1)
         case 0x12:
             return UInt8(truncatingIfNeeded: state.raster)
         case 0x15:

            borderComparison.top = state.rsel ? 51 : 55
            borderComparison.bottom = state.rsel ? 251 : 247
            state.den = byte & 0x10 != 0
            state.bmm = byte & 0x20 != 0
            state.ecm = byte & 0x40 != 0
            if case let newRasterInterruptLine = UInt16(byte & 0x80) << 1 | (state.rasterInterruptLine & 0x00FF), newRasterInterruptLine != state.rasterInterruptLine {
                state.rasterInterruptLine = newRasterInterruptLine

        default:
            break
        }
        // BMM delay
        state.pipe.bmm = state.nextPipe.bmm
        if state.currentCycle >= 12 && state.currentCycle <= 54 {
            if state.isBadLine {
                setBAPin(false)
