     internal func readByte(_ position: UInt8) -> UInt8 {
         switch position {
         case 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E:
-            return UInt8(truncatingIfNeeded: state.m_x[Int(position >> 1)])
+            return UInt8(truncatingIfNeeded: state.nextPipe.m_x[Int(position >> 1)])
         case 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F:
             return state.m_y[Int((position - 1) >> 1)]
         case 0x10:
-            var value = (state.m_x[0] & 0xFF00) >> 8
-            value |= (state.m_x[1] & 0xFF00) >> 7
-            value |= (state.m_x[2] & 0xFF00) >> 6
-            value |= (state.m_x[3] & 0xFF00) >> 5
-            value |= (state.m_x[4] & 0xFF00) >> 4
-            value |= (state.m_x[5] & 0xFF00) >> 3
-            value |= (state.m_x[6] & 0xFF00) >> 2
-            value |= (state.m_x[7] & 0xFF00) >> 1
+            var value = (state.nextPipe.m_x[0] & 0xFF00) >> 8
+            value |= (state.nextPipe.m_x[1] & 0xFF00) >> 7
+            value |= (state.nextPipe.m_x[2] & 0xFF00) >> 6
+            value |= (state.nextPipe.m_x[3] & 0xFF00) >> 5
+            value |= (state.nextPipe.m_x[4] & 0xFF00) >> 4
+            value |= (state.nextPipe.m_x[5] & 0xFF00) >> 3
+            value |= (state.nextPipe.m_x[6] & 0xFF00) >> 2
+            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)

        //TODO: this will cause the next 2 frames to be skipped, as the actual buffers are in VIC, figure this later
        //      Good enough for now
        let screenBuffer = UnsafeMutableBufferPointer<UInt32>(start: calloc(512 * 512, MemoryLayout<UInt32>.size).assumingMemoryBound(to: UInt32.self), count: 512 * 512)
        return VICState(ioMemory: binaryDump.next(64), videoMatrix: binaryDump.next(40), colorLine: binaryDump.next(40), mp: binaryDump.next(), screenBuffer: screenBuffer, currentCycle: binaryDump.next(), currentLine: binaryDump.next(), m_x: binaryDump.next(8), m_y: binaryDump.next(8), yScroll: binaryDump.next(), rsel: binaryDump.next(), den: binaryDump.next(), bmm: binaryDump.next(), ecm: binaryDump.next(), raster: binaryDump.next(), me: binaryDump.next(), xScroll: binaryDump.next(), csel:binaryDump.next(), mcm: binaryDump.next(), mye: binaryDump.next(), vm: binaryDump.next(), cb: binaryDump.next(), ir: binaryDump.next(), ier: binaryDump.next(), ec: binaryDump.next(), mdp: binaryDump.next(), mmc: binaryDump.next(), mxe: binaryDump.next(), mm: binaryDump.next(), md: binaryDump.next(), b0c: binaryDump.next(), b1c: binaryDump.next(), b2c: binaryDump.next(), b3c: binaryDump.next(), mm0: binaryDump.next(), mm1: binaryDump.next(), m_c: binaryDump.next(8), vc: binaryDump.next(), vcbase: binaryDump.next(), rc: binaryDump.next(), vmli: binaryDump.next(), displayState: binaryDump.next(), rasterX: binaryDump.next(), rasterInterruptLine: binaryDump.next(), ref: binaryDump.next(), mc: binaryDump.next(8), mcbase: binaryDump.next(8), yExpansion: binaryDump.next(8), pipe: binaryDump.next(), nextPipe: binaryDump.next(), addressBus: binaryDump.next(), dataBus: binaryDump.next(), memoryBankAddress: binaryDump.next(), bufferPosition: binaryDump.next(), badLinesEnabled: binaryDump.next(), isBadLine: binaryDump.next(), baPin: binaryDump.next(), baLowCount: binaryDump.next(), currentSprite: binaryDump.next(), spriteDma: binaryDump.next(8), spriteDisplay: binaryDump.next(8), anySpriteDisplaying: binaryDump.next(), spriteSequencerData: binaryDump.next(8), spriteShiftRegisterCount: binaryDump.next(8), graphicsShiftRegister: binaryDump.next())
    }
    
    var description: String {

    fileprivate var currentLine: UInt16 = 0
    
    //MARK: Registers
    fileprivate var m_y: [UInt8] = [UInt8](repeating: 0, count: 8) // Y Coordinate Sprite
    fileprivate var yScroll: UInt8 = 0 // Y Scroll
    fileprivate var rsel = true // (Rows selection)?
