     
     internal func readByte(position: UInt8) -> UInt8 {
         switch position {
-        case kInterruptControlRegisterAddress:
+        case 0x02:
+            return ddra
+        case 0x03:
+            return ddrb
+        case 0x0D:
             //TODO: return ICR and set it to 0
             return 0
-        case kControlRegisterAAddress:
-            return CRA & ~0x10
+        case 0x0E:
+            return cra & ~0x10
         default:
             println("todo cia read address: " + String(position, radix: 16, uppercase: true))
             abort()

    
    internal override func readByte(position: UInt8) -> UInt8 {
        switch position {
        case kDataPortRegisterAAddress:
            //TODO: Real joystick
            return 0xFF
        case kDataPortRegisterBAddress:
            //TODO: Actually read from kDataPortRegisterAAddress because of joystick that might change bits
            return keyboard.readMatrix(PRA) & PRB
        default:
            return super.readByte(position)
        }

    
    internal weak var vic: VIC!
    
    override init() {
        super.init()
        ddra = 0x3F
    }
    
    internal override func writeByte(position: UInt8, byte: UInt8) {
        switch position {
        case 0x00:
            pra = byte | ~ddra
            vic.setMemoryBank(pra & 0x3)
            // VIC + IEC stuff
        default:
            super.writeByte(position, byte: byte)
        }
