From 09b0c5e2ed99275a7a2bf657ca2e80bb8a3ab696 Mon Sep 17 00:00:00 2001 From: twilen Date: Wed, 18 Apr 2012 19:03:09 +0000 Subject: [PATCH] Do not touch CIA-A control register A bit 6. (Keyboard handshake bit, reset warning state ends immediately if it is cleared) git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@44643 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/m68k-amiga/timer/lowlevel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/m68k-amiga/timer/lowlevel.c b/arch/m68k-amiga/timer/lowlevel.c index 72f2c4ace3..336265ccb1 100644 --- a/arch/m68k-amiga/timer/lowlevel.c +++ b/arch/m68k-amiga/timer/lowlevel.c @@ -126,7 +126,8 @@ void CheckTimer(struct TimerBase *TimerBase, UWORD unitnum) UBYTE lo, hi; UWORD val; // already active but new item was added to head - *TimerBase->tb_micro_cr = 0x08; + *TimerBase->tb_micro_cr &= 0x40; + *TimerBase->tb_micro_cr |= 0x08; hi = *TimerBase->tb_micro_hi; lo = *TimerBase->tb_micro_lo; val = (hi << 8) | lo; @@ -241,7 +242,9 @@ AROS_UFH4(APTR, ciaint_timer, newcount = 0xffff; TimerBase->tb_micro_started = newcount; // reset control register, some badly behaving programs may have changed it - *TimerBase->tb_micro_cr = 0x08; + // do not touch bit 6 because it is used by keyboard handshake and reset warning + *TimerBase->tb_micro_cr &= 0x40; + *TimerBase->tb_micro_cr |= 0x08; // reload new timer value (timer autostarts) *TimerBase->tb_micro_lo = (UBYTE)(newcount >> 0); *TimerBase->tb_micro_hi = (UBYTE)(newcount >> 8); -- 2.11.4.GIT