[Freemint-list] [PATCH] Milan keyboard handler for ColdFire
Vincent Rivière
vincent.riviere at freesbee.fr
Wed Jun 8 16:16:21 MSD 2016
On 08/06/2016 08:16, Jo Even Skarstein wrote:
> Out of curiosity - what is the purpose of this patch? AFAICS this code
> is only compiled for the Milan.
True... At the moment :-)
Actually, FreeMiNT can hook the keyboard in 2 ways to do its advanced
AKP stuff:
1) The Milan way. It is the simplest approach. Hook the undocumented
"kbdvec" vector, which is present just before the pointer returned by
Kbdvbase(). That vector is called for each IKBD byte related to the
keyboard, exactly what FreeMiNT needs. But that vector is only available
in TOS >= 2.x and EmuTOS. This is why FreeMiNT does not use it by default.
2) The ikbdsys way. This standard vector is called each time a byte is
present on the keyboard ACIA. The handler needs to read the byte from
the ACIA, and dispatch it to the right vector. This is what FreeMiNT
does by default. Unfortunately, that callback needs to access the ACIA
hardware, so it is not compatible with non-Atari hardware.
I noticed that FreeMiNT also hooks the main IKBD/MIDI ACIA vector at
0x118. I still don't understand why FreeMiNT does that.
Since non-Atari hardware is only supported by EmuTOS (Amiga and ColdFire
EVB) and FireTOS (ColdFire EVB), it is safe to always use the Milan way
in that case. That will be the object of a future patch.
--
Vincent Rivière
More information about the Freemint-list
mailing list