From mint-bounce@lists.fishpool.fi Sun Sep 12 12:19:19 2010 Message-ID: <4C8CFCB7.20605@freesbee.fr> Date: Sun, 12 Sep 2010 18:15:51 +0200 From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] No keyboard with GEM=ROM References: <4C8B6E68.9030505@freesbee.fr> <4C8B81CF.4040302@freesbee.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id o8CGJIZM030520 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