[OpenBIOS] r755 - cpu/x86/pc/olpc
svn at openbios.org
svn at openbios.org
Thu Dec 27 10:13:03 CET 2007
Author: wmb
Date: 2007-12-27 10:13:03 +0100 (Thu, 27 Dec 2007)
New Revision: 755
Modified:
cpu/x86/pc/olpc/gamekeys.fth
Log:
OLPC Trac 5585 - Show game key status during "release the game key to continue".
Modified: cpu/x86/pc/olpc/gamekeys.fth
===================================================================
--- cpu/x86/pc/olpc/gamekeys.fth 2007-12-27 01:33:11 UTC (rev 754)
+++ cpu/x86/pc/olpc/gamekeys.fth 2007-12-27 09:13:03 UTC (rev 755)
@@ -12,6 +12,23 @@
0 value game-key-mask
+: show-key ( mask x y -- )
+ at-xy game-key-mask and if ." *" else ." o" then
+;
+: update-game-keys ( mask -- )
+ dup game-key-mask or to game-key-mask
+ rocker-up 2 2 show-key
+ rocker-left 0 3 show-key
+ rocker-right 4 3 show-key
+ rocker-down 2 4 show-key
+ button-rotate 2 6 show-key
+
+ button-o 9 2 show-key
+ button-square 7 3 show-key
+ button-check d# 11 3 show-key
+ button-x 9 4 show-key
+;
+
: read-game-keys ( -- )
[ifdef] lx-devel false exit [then]
board-revision h# b18 < if
@@ -20,8 +37,9 @@
then
game-key@ dup to game-key-mask if
- ." Release the game key to continue" cr
- begin d# 100 ms game-key@ 0= until
+ ." Release the game keys to continue" cr
+ begin d# 100 ms game-key@ dup update-game-keys 0= until
+ 0 7 at-xy
then
;
: game-key? ( mask -- flag ) game-key-mask and 0<> ;
More information about the OpenBIOS
mailing list