| // If timer B is running, and timer B tracks timer A underflows | // If timer B is running, and timer B tracks timer A underflows | ||||
| // tick timer B (or, tick it if CNT is positive) | // tick timer B (or, tick it if CNT is positive) | ||||
| if (BITM.isOn(cia.__CTB, 0)){ | if (BITM.isOn(cia.__CTB, 0)){ | ||||
| let cs = (this.__CTB & 0x60) >> 5; | |||||
| let cs = (cia.__CTB & 0x60) >> 5; | |||||
| if (cs === 2 || (cs === 3 && cia.__CNT === 1)) | if (cs === 2 || (cs === 3 && cia.__CNT === 1)) | ||||
| TimerBTick(cia); | TimerBTick(cia); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| cia.__CNT = 0; | |||||
| //cia.__CNT = 0; | |||||
| } | } | ||||