Author Topic: New Zfceu Gui... Sorta  (Read 3596 times)

x86Daddy

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
New Zfceu Gui... Sorta
« on: December 21, 2004, 03:01:21 pm »
On the SL-5500, I consider zfceu my favorite NES emulator.  However, the zfceu_gui program doesn't work, even with compat libs.  After seeing MrSquishy's Post on how he made a front-end for snes9x, I modded his script to work with zfceu as follows:

Code: [Select]
#!/bin/sh
#Path to your Roms

LOCATION=/root/Documents/roms

#Load a game from your list
ROM=`   cd $LOCATION; ls -1 *.nes \
       | opie-sh -i -l -t "Roms" -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=$?

#Hitting "OK" returns 255, so if you press "OK" you get sound.
case $RETURNCODE in
       255) SOUND=11000;;
       0)  SOUND=11000;;
       1)  SOUND=0;;
esac
}

setsound

if [ "$SOUND" = "" ]; then
       exit
fi
zfceu -frameskip 40 -sound $SOUND $LOCATION/$ROM

And a corresponding .desktop file to launch it:

Code: [Select]
[Desktop Entry]
Comment=ZFCEU Game Selector
Exec=ZFCEU.sh
Icon=package_games
Type=Application
Name=ZFCEU

I have this working quite nicely on my SL-5500 using OZ 3.5.2.  I still don't like the zfceu keymapping...  everytime I slip when pressing the up key and hit Home... game over man; game over.  Other than that, though, I'm pleased with the results.

uberjoe

  • Full Member
  • ***
  • Posts: 131
    • View Profile
New Zfceu Gui... Sorta
« Reply #1 on: January 10, 2005, 07:19:48 pm »
Thats pretty cool. Where do I put the script to make it work?
SL-5500 hentges rom 3.5.2 w/cardfs and opie 1.1.8
Belkin IR keyboard
64mb cf card
256 sd card
Spectrum24 cf wi-fi card

MrSquishy

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • http://
New Zfceu Gui... Sorta
« Reply #2 on: January 10, 2005, 08:50:35 pm »
Somewhere in your path.

I dump mine in /mnt/card/opt/QtPalmtop/bin and symlink them for the sake of consistency.

Anywhere should be fine though.

uberjoe

  • Full Member
  • ***
  • Posts: 131
    • View Profile
New Zfceu Gui... Sorta
« Reply #3 on: January 10, 2005, 08:59:19 pm »
Thanks for that script by the way. I had considered just making .desktop files for all of my roms with sound and frameskip options, but this should work better.

I put it in /mnt/card/opt/QtPalmtop/bin and symlinked it to /opt/QtPalmtop/bin put the .desktop file in /mnt/card/opt/QtPalmtop/apps/games and smylinked that to /opt/QtPalmtop/apps/games but when I tap on the icon I get a "could not locate application ZFCEU.sh error"
AFAICT I've done everything right, but it still does not work. Did I miss something obvious?
SL-5500 hentges rom 3.5.2 w/cardfs and opie 1.1.8
Belkin IR keyboard
64mb cf card
256 sd card
Spectrum24 cf wi-fi card

uberjoe

  • Full Member
  • ***
  • Posts: 131
    • View Profile
New Zfceu Gui... Sorta
« Reply #4 on: January 13, 2005, 07:49:26 pm »
Got it to work, I had to change permissions from my windows user where I synced the file from to root on my z. It worked but pressing yes for sound resulted in no sound. Also 11000 for sound produced very slow sound. I made a few changes to the script and It works like a champ.

Quote
#!/bin/sh
#Path to your Roms

LOCATION=/mnt/card/games/nes/

#Load a game from your list
ROM=`   cd $LOCATION; ls -1 *.nes \
      | opie-sh -i -l -t "Roms" -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=$?

#Hitting "OK" returns 255, so if you press "OK" you get sound.
case $RETURNCODE in
      255) SOUND=22050;;
      1)  SOUND=22050;;
      0)  SOUND=0;;
esac
}

setsound

if [ "$SOUND" = "" ]; then
      exit
fi
zfceu -frameskip 40 -sound $SOUND $LOCATION/$ROM
Changed sound from 11000 to 22050 and the returncode 0 to 1 and 1 to 0.
« Last Edit: January 13, 2005, 08:48:23 pm by uberjoe »
SL-5500 hentges rom 3.5.2 w/cardfs and opie 1.1.8
Belkin IR keyboard
64mb cf card
256 sd card
Spectrum24 cf wi-fi card

javamatte

  • Newbie
  • *
  • Posts: 18
    • View Profile
New Zfceu Gui... Sorta
« Reply #5 on: January 20, 2005, 12:59:59 pm »
Sweet, NES on the Z

I had to change zfceu to run with the compat libs on OZ 3.5.2, just change the last line of the script to:

runcompat zfceu -frameskip 40 -sound $SOUND $LOCATION/$ROM

One question, though.  My screen (SL-5500) seems to be just a few pixels too low.  The last few lines get cut off the bottom.  Is there a way to tell zfceu to push it up a line or 3?  Other than that, though, the demo roms I tried seem to work great, and the little opie-sh script is just the example I've been looking for to do some other things!  Thanks guys!!

-Matt

MrSquishy

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • http://
New Zfceu Gui... Sorta
« Reply #6 on: January 20, 2005, 01:31:18 pm »
You can run
makecompat /opt/QtPalmtop/bin/zfceu
on the command line to tell it to always run zfceu with the compat libs.

This is my opie-sh-nes.sh script
Code: [Select]
#!/bin/sh
#Path to your Roms

LOCATION=/mnt/card/games/nes

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

zfceu -subase 1 -frameskip 30 -sound 11025 $LOCATION/$ROM
the -subase 1 makes it so that your savegames get put into /root/.zfceu/sav which I have symlinked to /mnt/card/games/nes/saves.
I just like to keep my roms tidy.

I also dont have the sound button because I found that it runs about the same with or without sound, where as Snes9x (which this script it modified from) gets a noticable boost if you turn off the sound.

I've been trying to track down  the zfceu source, as I'd like to try recompiling it for 3.5.2.
Ideally, I'd like to have River City Ransom work.

I was going to make a Landscape/Portrait option, but znester doesnt run on 3.5.2 even with compat libs.
« Last Edit: January 20, 2005, 01:45:30 pm by MrSquishy »

javamatte

  • Newbie
  • *
  • Posts: 18
    • View Profile
New Zfceu Gui... Sorta
« Reply #7 on: January 20, 2005, 02:00:27 pm »
Do you have the same problem with the screen being positioned too low?  On mine, the last few pixels (5 or 10 maybe, hard to tell) are off the bottom of the screen.

uberjoe

  • Full Member
  • ***
  • Posts: 131
    • View Profile
New Zfceu Gui... Sorta
« Reply #8 on: January 31, 2005, 03:34:28 pm »
Quote
Do you have the same problem with the screen being positioned too low?

No problem with that. It the screen always off or just with zfceu?
SL-5500 hentges rom 3.5.2 w/cardfs and opie 1.1.8
Belkin IR keyboard
64mb cf card
256 sd card
Spectrum24 cf wi-fi card

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
New Zfceu Gui... Sorta
« Reply #9 on: February 13, 2005, 07:34:07 pm »
Would one of you please post a link to or attach the zfceu binary or ipk that your using for this... all the links I have found are dead today.

Thanks

Greg

MrSquishy

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • http://
New Zfceu Gui... Sorta
« Reply #10 on: February 13, 2005, 08:39:54 pm »
I think this is the one Im using.

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
New Zfceu Gui... Sorta
« Reply #11 on: February 13, 2005, 11:05:44 pm »
Thanks MrSquishy, I will give your opie-sh-nes script a try tomorrow.

Greg