[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] No keyboard with GEM=ROM



Helmut Karlowski wrote:
Could you please explain what is happening ? What is the difference
between GEM and textmode programs ?

I guess I already did (what I think I know of it):

http://sparemint.org/mailinglist/Mailing-Lists/MiNT-List.201006/892706.395683007-sendEmail@descaro.text


In text- (and XaAES-)mode the kernel has control, in GEM not. This was an
 issue in the first MiNT-versions, where no multitasking took place when
 running a GEM-app.

The MiNT-keyboard-handler needs a certain timer-interrupt to occur.

Sorry but that stuff is still obscure.

I looked further into MiNT's keyboard handling. I saw that the interrupt
handler used for keyboard data is ikbd_scan() inside sys/keyboard.c.
Basically, it puts the new scancode into the scanb buffer and it calls
addroottimeout(IkbdScan).

If I understand well, the interrupt handler does a minimal amount of work,
then addroottimeout() asks MiNT's main process to do the remaining job on
next task switch, isn't it ?
And that task switch never happens in GEM programs, maybe because the ROM
AES runs in supervisor mode, do it doesn't work inside form_do() ?

Well, these are suppositions.
What could be the clean fix ?

NB: I saw the direct call to IkbdScan() when WITH_SINGLE_TASK_SUPPORT is
defined.

--
Vincent Rivière