Re: Another 12C+ Bug Message #13 Posted by cyrille de Brébisson on 28 Aug 2009, 10:38 a.m., in response to message #12 by Bart (UK)
Hello,
the keyboard scanner is under interrupt, so when you press a key, it toggles an interrupt and scans the keypad immediately.
Since there is then no way to detect directly further key presses on the same column or all key releases cases, a timer is set that scans the keyboard every 10ms until all keys are released...
The problem does not stem from there...
The problem stems from the fact that the original 12C WAITED for all keys to be released before going in 'IDLE' mode. This is not a problem for eric's windows based emulator who can just ignore that wait loop.
However, on the real hardware, where a typical keypress last around 250ms but executes in <10ms, this would lead to a lot of wasted battery power...
So, the emulator attempts to detect when the old ROM is entering this 'wait for all key released mode' and tells the old ROM that all keys have been released (even if they have not), but there is a need to program a lot of special cases to handle this (problems with SST for example, or the PREFIX and MEMORY functions are examples)... and I guess that there is still something wrong with the way the key detection is done in the AMORT function...
regards, cyrille
|