                 state.interruptDelay = 1
             }
         case 0x0E:
+            // bit4: force load
+            if byte & 0x10 != 0 {
+                state.timerAState.setLoadNextCycle()
+            }
             if byte & 0x01 != 0 {
-                if state.cra & 0x01 == 0 && state.timerACountDelay == 0 {
-                    state.timerACountDelay = 2
+                state.timerAState.start()
+                if state.cra & 0x01 == 0 {
                     state.pb6Toggle = true
                 }
             } else {
-                if state.cra & 0x01 == 1 {
-                    state.timerAStopDelay = 2
-                }
-            }
-            // bit4: force load
-            if byte & 0x10 != 0 && state.timerALoadDelay == 0 {
-                state.timerALoadDelay = 2
+               state.timerAState.stop()
             }
             state.cra = byte
         case 0x0F:
+            // bit4: force load
+            if byte & 0x10 != 0 {
+                state.timerBState.setLoadNextCycle()
+            }
             if byte & 0x01 != 0 {
-                if state.crb & 0x01 == 0 && state.timerBCountDelay == 0 {
-                    state.timerBCountDelay = 2
+                state.timerBState.start()
+                if state.crb & 0x01 == 0 {
                     state.pb7Toggle = true
                 }
             } else {
-                if state.crb & 0x01 == 1 {
-                    state.timerBStopDelay = 2
-                }
-            }
-            // bit4: force load
-            if byte & 0x10 != 0 && state.timerBLoadDelay == 0 {
-                state.timerBLoadDelay = 2
+                state.timerBState.stop()
             }
             state.crb = byte
         default:

            //TODO: serial i/o
            return
        case 0x0D:
            if ((byte & 0x80) != 0) {
                state.imr |= (byte & 0x1F)
            } else {
                state.imr &= ~(byte & 0x1F)

    
    //MARK: Helpers
    private var interruptPin: Bool = true
    private var timerAState: CIATimerState = CIATimerState()
    private var timerBState: CIATimerState = CIATimerState()
    private var interruptDelay: Int8 = -1
    private var todLatched: Bool = false
    private var todRunning: Bool = false
