From mint-bounce@lists.fishpool.fi Sat Sep 12 07:53:56 2009 Message-ID: <4AAB8B1E.5020709@freesbee.fr> Date: Sat, 12 Sep 2009 13:50:54 +0200 From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: mint Subject: Re: [MiNT] FreeMiNT initial key stuck References: <4AA183C6.6040207@freesbee.fr> <4AAB7765.4060904@freesbee.fr> In-Reply-To: <4AAB7765.4060904@freesbee.fr> Content-Type: multipart/mixed; boundary="------------000105040801030604010907" X-Antivirus: avast! (VPS 090911-0, 11/09/2009), Outbound message X-Antivirus-Status: Clean 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: This is a multi-part message in MIME format. --------------000105040801030604010907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable And the following crappy patch fixes the problem :-) However it works only with TOS >=3D 2, so we must find another clean solu= tion. --=20 Vincent Rivi=E8re --------------000105040801030604010907 Content-Type: text/plain; name="keyboard.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="keyboard.patch" diff -aurN freemint-CVS-20090912.orig/sys/arch/init_intr.c freemint-CVS-20090912/sys/arch/init_intr.c --- freemint-CVS-20090912.orig/sys/arch/init_intr.c 2009-09-12 13:35:31.828125000 +0200 +++ freemint-CVS-20090912/sys/arch/init_intr.c 2009-09-12 13:44:05.015625000 +0200 @@ -96,6 +96,19 @@ # ifndef NO_AKP_KEYBOARD { + /* Send a key release to the TOS 2.x keyboard handler + * to disable its key repetition routine + * if a key is hold at startup. + */ + __asm__ volatile + ( + "move.l %0,a0\n\t" + "move.w #0x80,d0\n\t" + "jsr (a0)" + : /* outputs */ + : "g"(*(((long*)syskey)-1)) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + ); #ifndef MILAN savesr = splhigh(); syskey->ikbdsys = (long)ikbdsys_handler; --------------000105040801030604010907--