View Single Post
Old 11-26-2012, 01:04 PM   #165
smartgenes
Member
smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.smartgenes got an A in P-Chem.
 
Posts: 14
Karma: 6494
Join Date: Nov 2012
Device: Kindle 3
gnuboy.ini in launchpad folder:

[Actions]

## Launch the Gameboy Emulator
G B = !/mnt/us/fbgnuboy/ rungame.sh

script:
Spoiler:
#!/bin/sh
#================================================= ==
# getkb - get translated ascii keys from K3 keyboard
# v1.2 by geekmaster
# STDOUT: pressed keys, until Enter key pressed.
#---------------------------------------------------
getkb() {
eips -z 2 38 # scroll
XP=0
YP=39
DN=/dev/null
KN="1234567890____qwertyuiop____asdfghjkl_____zxc v bnm_."
KS="1234567890____QWERTYUIOP____ASDFGHJKL_____ZXC V BNM_,"
KP="1234567890____~@#$%^&*()____<>[]{}?/\_____;:'|-+=_?"
KM=$KN
ST=""
while :;do
eips $XP $YP "$ST""_ "
L="_"
set $(waitforkey); K=$1 D=$2
[[ $D -eq 0 ]]&& continue
# [[ $K -eq 28 ]]&& break # enter
[[ $K -eq 190 ]]&& break # use Aa for enter
[[ $K -eq 14 ]]&& ST="$(echo ${ST%?})" && continue # del
[[ $K -eq 42 ]]&& KM=$KS && continue # shift
[[ $K -eq 126 ]]&& KM=$KP && continue # Sym
[[ $K -eq 57 ]]&& L=" " # space
[[ $K -le 52 ]]&& L="$(echo \"$KM\"|cut -b$K-$K)"
# [[ "$L" == "_" ]]&& L="($K)"
[[ "$L" == "_" ]]&& continue
# echo -n "$L"
ST="$ST$L"
KM=$KN
done
echo "$ST"
}

putei() {
st=$1
ii=${#st}
while [ $ii -ge 0 ]
do
eips -z 2 38 # scroll
eips 0 39 "$(echo $st | cut -b-50)" # write to the bottom
st="$(echo $st | cut -b51-)"
ii=$(( ii - 50 ))
done
}


killall -stop cvm launchpad 2> /dev/null
cd /mnt/us/fbgnuboy
eips -c;
putei "fbgnuboy - Game Boy Advanced Emulator"
putei ""
putei "Available ROMS -"
putei "$(ls ./roms)"
putei ""
putei "Execute Which ROM?"
game="$(getkb)"
#draw picture frame
eips -g ./gb-flash.jpg
sleep 1
HOME=/tmp ./fbgnuboy ./roms/"$game".g* 2> /mnt/us/gnuboy.log
killall -cont cvm launchpad 2> /dev/null


Could there be a compatibility problem between Kindle 3 and eips?
Attached Thumbnails
Click image for larger version

Name:	folder.jpg
Views:	323
Size:	45.7 KB
ID:	96855  
smartgenes is offline   Reply With Quote