j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-09-29 21:26:47 +0200 (Sat, 29 Sep 2007) New Revision: 649
Added: cpu/x86/pc/olpc/gamekeys.fth Log: Moved game-key support from fw.bth into separate file.
Added: cpu/x86/pc/olpc/gamekeys.fth =================================================================== --- cpu/x86/pc/olpc/gamekeys.fth (rev 0) +++ cpu/x86/pc/olpc/gamekeys.fth 2007-09-29 19:26:47 UTC (rev 649) @@ -0,0 +1,27 @@ +purpose: Access to game keys (buttons on front panel) + +h# 1 constant button-square +h# 2 constant button-check +h# 4 constant rocker-up +h# 8 constant rocker-down +h# 10 constant rocker-left +h# 20 constant rocker-right +h# 40 constant button-rotate +h# 80 constant button-o +h# 100 constant button-x + +0 value game-key-mask + +: read-game-keys ( -- ) +[ifdef] lx-devel false exit [then] + board-revision h# b18 < if + button-x to game-key-mask \ Force slow boot + exit + then + + game-key@ dup to game-key-mask if + ." Release the game key to continue" cr + begin d# 100 ms game-key@ 0= until + then +; +: game-key? ( mask -- flag ) game-key-mask and 0<> ;