[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] key-repeat-bug on bootup
Helmut Karlowski wrote:
BTW: The repeat-fix does not work on TT.
Kbdvbase() returns a pointer to an array of IKBD vectors, named KBDVECS
below. Just before this array, there is an additional vector named kbdvec.
It is used when a keyboard-only packet is received, and can be used to
simulate key press/releases without dealing with the ACIA.
From EmuTOS sources, in bios/aciavecs.S:
// In addition to the documented features, it was deemed necessary to add
// the following undocumented features, located in memory immediately before
// and after the documented part of the KBDVECS structure:
//
// struct UNDOCUMENTED {
// void (*kbdvec)( UBYTE data ); /* KBD Input, TOS >= 2.0 */
// KBDVECS kbdvecs;
// char ikbdstate;
// char kbdlength;
// };
//
//- kbdvec (undocumented feature of TOS >= 2.0) is called with the
// received data byte in d0.
We must make a list of OS versions where this kbdvec vector exists, and use
it only when available. Note that the actual routine has always existed as a
private function in the TOS. When that vector is not available, we could
even imagine jumping directly to the well-known ROM address determined form
the OS version (would be very ugly).
We must keep in mind the final goal: its about stopping the key-repeat
routine triggered by the VBL. Unfortunately the variable disabling the
active key repeat is undocumented and its address is not the same between
TOS versions. Thus I got the idea to access that variable indirectly by
generating a fake key release.
--
Vincent Rivière