Mednafen (Emulator) configuration (GBC/GBA/SNES/NES)


#114

I tried that .sh but it’s not listing anything for me, but it does fit the screen easily.

Is there an easy way to specify a folder it looks into?


#115

I did try first specifying my USB in the code, but i think if you runs the following in terminal, it searches all directories?

find . -name *.gba

I could be wrong.

EDIT 2: removed incorrect code

EDIT 2: Moving the .sh file up in the directory alows you to search more folders, ie.
running the script in /home/chip/Downloads will only return single file names "ffta.gba"
Running the script from /home/ will return results from different folder, ie “/chip/.Downloads/ffta.gba”

hope all of this helps and is relevant :stuck_out_tongue:


#116

I see what I got wrong.
’’*.$filtype’’ was 's not "s


#117

Is there a way to launch the game without having to go to terminal? Launch mednafen and then bworse select the rom?


#118

i’m sure some of you have seen this, but i followed everything he did and it worked wonderfully.
now playing super mario.


A few questions about the Pocket Chip power
#119

Make a shortcut using a modified Pocket-Home launcher that allows custom icons.


#120

Hey, yes I got that installed already.

I meant what is the command to be executed when pressing the icon?

Should I input mednafen -fs 1 ? or else?

Thanks


#121

mednafen -fs 1 /path/to/roms/file.nes

Although I suggest following the steps above about making a executable shortcut and then using this script along with installing Zenity. Then using that shortcut as the command for the icon.

That way you can have the file selector without going into the terminal.


#122

ok I will give that a try, thanks!


#123

Hey everyone, I’ve worked on my script a little more and have something that I believe is much better than my last one.

I’ve taken some inspiration from SiR_Carlos7 here but gone without text input and requires a little better formatting of where you put the roms.

Idea is to put roms in folders matching system. You’ll get a choice of folder first then a list of all files in that folder.

I’ve also increased the dialog to take up the entire screen so it feels a bit more like an app rather than a dialog.

#!/bin/bash

cd /home/chip/roms

folderpath=$(ls)

system=$(eval zenity --list --column System $folderpath --width=480 --height=272)

cd $system

files=$(ls -Q)

rom=$(eval zenity --list --column “Roms” $files --width=480 --height=272)

if [ $? == 1 ]; then
echo "Cancelled."
else
mednafen -fs 1 “$rom”

fi


#124

That hit the spot. Aaaahhh. Nice.


#125

Nice idea @soupboy! 10 internet points for you!


#126

Nice Job, I thought I’d make a minor change to assist with the lack of errors, etc.

 #!/bin/bash
cd /home/chip/roms
folderpath=$(ls)
system=$(eval zenity --list --column System $folderpath --width=480 --height=272)
if [ "$?" -eq 1 ]; then
  echo "Cancelled."
else
  cd $system
  files=$(ls -Q)
  rom=$(eval zenity --list --column "Roms" $files --width=480 --height=272)
  if [ "$?" -eq 1 ]; then
    echo "Cancelled."
  else
    mednafen -fs 1 "$rom"
  fi
fi

This way you won’t get the second box popup if you cancel at the rom directory list.


#127

Thanks, I’m just piecing this together as I go so excuse all the crazy coding mistakes.

I was attempting to use the --title command to read “Select your System” or “Choose your Game” but for some reason it would only read the first word then put the other words into the list itself. Gave up on this as it was purely cosmetic.


#128

I started reading this zenity stuff when you posted it earlier… I’ve been reading up on it ever since.

I made a quick change:

 #!/bin/bash
cd /home/chip/roms
folderpath=$(ls)
system=$(eval zenity --list --column System $folderpath --width=480 --height=272)
if [ "$?" -eq 1 ]; then
  echo "Cancelled."
else
  cd $system
  system="$system-Roms"
  files=$(ls -Q)
  rom=$(eval zenity --list --column system $files --width=480 --height=272)
  if [ "$?" -eq 1 ]; then
    echo "Cancelled."
  else
    mednafen -fs 1 "$rom"
  fi
fi

Now after choosing a rom path, you’ll get “gba-Roms” or “nds-Roms” as the header. Zenity is weird, in that it won’t join strings properly. If there is a gap between “$system” and “Roms” it will treat it as two words and separate them into two columns.

I hope that helps a little bit.


#129

I can return the favour with this. You missed the $ for the system in the second zenity command.

#!/bin/bash

cd /home/chip/roms

folderpath=$(ls)

system=$(eval zenity --list --column System $folderpath --width=480 --height=272)

if [ “$?” -eq 1 ]; then
echo "Cancelled.“
else
cd $system
system=”$system-Roms"
files=$(ls -Q)
rom=$(eval zenity --list --column $system $files --width=480 --height=272)

if [ “$?” -eq 1 ]; then
echo "Cancelled."
else
mednafen -fs 1 "$rom"
fi
fi


Veiwing issues with mednafen and scummvm on pocket chip
#130

Thanks.

I must admit, I’m stumped. If I type the commands into the shell, they work fine.

eg: zenity --list --title “Hello World” --column Test

And it’ll show up fine. The same can’t be said when running through a script, and I don’t understand why…


#131

I have no idea either. I’ve read a few things on it tonight and it doesn’t seem to be an issue until its in a script like we have above. On the scale of things though it doesn’t matter. A few weeks and no-one will be using the script anyway as we will most likely have worked out a better format :slight_smile:


#132

Just tried this one out and it’s working a lot faster. It doesn’t have to search for a filetype if you just organize everything for each system into a folder of it’s own, which I usually do anyway.

Doesn’t allow further folder organization beyond that, but I bet someone could combine the searching function if they wish to scan all subdirectories for files.


#133

Hello I’m new user! And first thing I tried on my Pocket CHIP was installing the emulator, but I get stuck on the first step (hahaha), because after the sudo, I can’t find the app :frowning:

Help please!! Thank you!