     
     internal func writeByte(position: UInt8, byte: UInt8) {
         switch position {
-        case kTimerALowAddress:
+        case 0x02:
+            ddra = byte
+        case 0x03:
+            ddrb = byte
+        case 0x04:
             latchA = (latchA & 0xFF00) | UInt16(byte)
-        case kTimerAHighAddress:
+        case 0x05:
             latchA = (UInt16(byte) << 8) | (latchA & 0xFF);
-        case kInterruptControlRegisterAddress:
+        case 0x0D:
             if ((byte & 0x80) != 0) {
-                IMR |= (byte & 0x1F)
+                imr |= (byte & 0x1F)
             } else {
-                IMR &= ~(byte & 0x1F)
+                imr &= ~(byte & 0x1F)
             }
-        case kControlRegisterAAddress:
+        case 0x0E:
             // bit4: force load
             if ((byte & 0x10) != 0) {
                 counterA = latchA
             }
             //TODO: more timer stuff
-            CRA = byte
-        case kControlRegisterBAddress:
+            cra = byte
+        case 0x0F:
             //TODO: Timer stuff
-            CRB = byte
+            crb = byte
         default:
             println("todo cia write 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)
        }
