[Freemint-list] [PATCH] Always poll the character buffer

Vincent Rivière vincent.riviere at freesbee.fr
Wed Oct 19 02:35:47 MSD 2016


Hello.

Here is a tiny patch to always poll the character buffer, even when 
NO_AKP_KEYBOARD is not defined. This allows the official mintv4e.prg to run 
on ColdFire Evaluation Boards, with both RS-232 terminal and Eiffel on CAN bus.

kintr.patch
Always poll the character buffer. Contributed by Vincent Rivière.

Alan, please commit!

-- 
Vincent Rivière
-------------- next part --------------
diff -aurN -x CVS freemint.orig/sys/arch/intr.S freemint/sys/arch/intr.S
--- freemint.orig/sys/arch/intr.S	2016-06-26 13:19:50.781250000 +0200
+++ freemint/sys/arch/intr.S	2016-10-18 23:53:02.842276200 +0200
@@ -237,7 +237,16 @@
 #endif
 	addq.l	#0x01,_c20ms
 
-#ifdef NO_AKP_KEYBOARD
+// Poll the character buffer.
+// This is mandatory when NO_AKP_KEYBOARD is defined,
+// because that buffer is filled by the TOS IKBD interrupt.
+// It is also useful to do that even when FreeMiNT installs its own IKBD hook,
+// because this allows external software to directly generate ASCII characters
+// without dealing with scancodes.
+// This is specially necessary for EmuTOS "Serial Console" feature used on
+// ColdFire evaluation boards. ASCII characters are received on the serial
+// port and directly put into the character buffer.
+
 	move.l	_keyrec,a0
 	move.w	6(a0),d0
 	cmp.w	8(a0),d0
@@ -247,7 +256,6 @@
 #else
 	sne	_kintr+1
 #endif
-#endif
 
 	lea	_proc_clock,a0
 #ifdef __mcoldfire__


More information about the Freemint-list mailing list