OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Prboom And Snes Problems
uberjoe
post Feb 10 2005, 10:11 AM
Post #1





Group: Members
Posts: 131
Joined: 24-March 04
Member No.: 2,471



Could someone who knows something about scripts please look at these and tell me what is wrong. If I use the command line to run the binary both snes9x and prboom work fine. But the scripts to select roms and wads don't seem to work.
Here is prboom:
QUOTE
#!/bin/sh
#Set additional files
test -e /root/.prboom/dpad.cfg || touch /root/.prboom/dpad.cfg
test -e /root/.prboom/irkeyboard.cfg || touch /root/.prboom/irkeyboard.cfg
test -e /root/.prboom/servers.list || touch /root/.prboom/servers.list

#Input method
opie-sh -m -t Input -M "Select Input Device" -g -0 "IR Keyboard" -1 D-Pad
RETURNCODE=$?
case $RETURNCODE in
      0) INPUT="-config /root/.prboom/irkeyboard.cfg";;
      1) INPUT="-config /root/.prboom/dpad.cfg";;
esac
if [ "$INPUT" = "" ]; then exit; fi

#Choose Game Version
opie-sh -m -t "Game" -M "Choose game" -g -0 Doom -1 DoomII
RETURNCODE=$?
case $RETURNCODE in
      0)IWAD=doom.wad;;
      1)IWAD=doom2.wad;;
esac

#Enable Singleplayer/Multiplayer Menu
opie-sh -m -t "Players" -M "Choose gametype" -g -0 Single -1 Multi
RETURNCODE=$?
case $RETURNCODE in
      0) NET="";;
      1) SERVER=` opie-sh -i -t "Server" -g -E -l -F \
      /root/.prboom/servers.list `; if [ "$SERVER" = "" ]; then exit; fi; \
      NET="-net $SERVER";;
esac

SDL_QT_INVERT_ROTATION=1 prboom -height 240 -iwad $IWAD $INPUT $NET


and here is snes:
QUOTE
#!/bin/sh
#Path to your Roms if you want to disable the menu
#LOCATION=/mnt/card/games/snes

# Give a default
test -e /root/Settings/opie-sh-snes.conf || echo "/mnt/card/games/snes" > /root/Settings/opie-sh-snes.conf

#Enable Menu Rom Finder
LOCATION=` opie-sh -i -t "Path to Roms" -g -E -l -F /root/Settings/opie-sh-snes.conf `

if [ "$LOCATION" = "" ]; then exit; fi
echo $LOCATION > /root/Settings/opie-sh-snes.conf

#Load a game from your list
ROM=` cd $LOCATION ; ls -1 *.zip \
| opie-sh -i -l -t "Snes9x" -F  -g `
if [ "$ROM" = "" ]; then exit; fi

#Enable Sound Button
setsound () {
opie-sh -m -t "Sound" \
-M "Do you want sound?" \
-g -0 Yes -1 No
RETURNCODE=$?

case $RETURNCODE in
        0)  SOUND=-sound ;;
        1)  SOUND=-nosound ;;
esac
}

setsound

if [ "$SOUND" = "" ]; then exit; fi


snes9x $SOUND $LOCATION/$ROM


Prboom gets to the dialogue for selecting the input and then stops. Snes goes all the way through to selecting a rom but does not start it. Again running
QUOTE
#prboom -height 240 -iwad doom2.wad

works fine and
QUOTE
#snes9x zelda3.zip

also works. So I am assuming the problem is with the scripts. But that's mostly greek to me.
Go to the top of the page
 
+Quote Post
MrSquishy
post Feb 10 2005, 01:37 PM
Post #2





Group: Members
Posts: 159
Joined: 3-June 04
Member No.: 3,558



I take it you were waiting for me, since I wrote both of them.

I take it that you do have Opie-SH installed, because they both depend on that.

If you can run opie-sh-prboom.sh and opie-sh-snes.sh from the command line, it'll spit out what the errors are and I can help you fix them.

opie-pr-boom.sh doesnt have a WAD selection path prompt.
It just asks which wad you want to use and is assuming they are in /root/.prboom
(Either symlinked to /root/.prboom or .prboom is itself a symlink)

opie-sh-snes.sh pops up a dialog box that says "/mnt/card/games/snes" the first time you run it.
You can type in that box where your roms actually are.
Then it'll go into that directory and list all the ".zip" files.


You also may want to enclose the $LOCATION/$ROM sting at the end in quotes.
That way, if you have a space in your path or rom name, it'll work.


I would like to know if anyone is successully using these scripts, as I'd feel kinda stupid "Giving back to the community" by providing scripts that dont work for anyone else.

Thanks
Go to the top of the page
 
+Quote Post
MrSquishy
post Feb 10 2005, 01:41 PM
Post #3





Group: Members
Posts: 159
Joined: 3-June 04
Member No.: 3,558



Oh oh oh!

One more (very important) thing.

When you use Opie-SH, if it is a menu item (Like asking for the Path to the Roms is) you can hit the Hardware "OK" button.

But for the "buttoned" items (like for the Sound prompt or Doom 1 vs Doom 2) you cant use the hardware "OK" button (or the X or OK buttons on the window), you need to either click the button (yes/no or Doom/DoomII) or press space.

Hardware OK and Cancel both send the same signal (255) for the button items, and I have catches setup to close the program if you hit cancel (which then also applies to "OK")

Sorry about that, I hope that fixes everything.
Go to the top of the page
 
+Quote Post
uberjoe
post Feb 10 2005, 02:39 PM
Post #4





Group: Members
Posts: 131
Joined: 24-March 04
Member No.: 2,471



QUOTE
If you can run opie-sh-prboom.sh and opie-sh-snes.sh from the command line, it'll spit out what the errors are and I can help you fix them.


Running from the command line offers no output. I enter the command, and the gui prompt comes up, I enter my options, and then nothing. The script has run and I get a new cli prompt.

My wads and roms are in the right places, the binaries snes9x and prboom all work from the command line. Your zfceu script does work and I thank you for that. It's just frustrating because I *think* I'm doing everything you are doing, and it still doesn't work. Which is contrary to my faith in computers always doing what they are told.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th May 2013 - 02:28 PM