Release Pandafe 0.2.2


nuhrin

Member
Joined
Jun 13, 2011
Messages
65
I've finally found a bit of time to pick this project back up a bit, now that my crazy life has settled down a bit. A new state, a new kid and a new house put the rebirth entry pretty far down the totem pole, but it seems a few people at least found it useful which I was glad to see.

For those unfamilar, here's my silly blurb from the README:

Pandafe is a sort of "universal" SDL frontend for Pandora games and emulators.

It was written especially for the Pandora, with the following goals:
* browse and run all roms and games from a single program
* specify commandline options for each game via a menu
* be fully configurable and extendable via the program itself
* use only dpad and buttons to do all this (no touching, heh)
* persist data via yaml, for human reading/writing/sharing
The new version is mainly about getting the build system and source cleaned up and released, which I'm happy to say has finally happened:
https://github.com/nuhrin/pandafe

Of couse, having spent a bunch of boring time on the build system I couldn't resist working on a few small updates to keep it fun. From the NEWS file:

* add support for Program-based Platforms, with ScummVM to demonstrate
* add option to install pandafe as a gui for SwitchGui
* show exit menu when Pandora key pressed (when run as a Gui)
* add ProgramMenu, allowing program to be run without game context
* merge new/updated Platform/Program definitions on first start of new version
* some interface updates aiming for more visual/behavioral consistency
* remove rebirth competition banner and show program version
* add "Most Recent" and "Most Played" views

At this point I've pretty much achieved all my original goals for the project, after two years (!) of learning new tech, writing and rewriting, squeezing in an hour here and there. It's lovely to finally get the source out there and take this off of the unfinished projects pile.

I would like to keep hacking on it though. So, now that I finally have a more proper post here, I'd love some:
* feedback
* feature requests
* bug reports
* criticism ;)
* etc

Updates:

0.2.2.4:

* make list filtering dynamic (update while typing)
* add Nintendo DS / DraStic
* auto assign platform to next known program if preferred program not installed
* update rom path chooser to remember most recent path (if default not set)
* bug fixes
 

0.2.1.4:

* fix a couple of non-critical regressions (you probably didn't notice)

0.2.1:
* fix some nasty memory leaks
* improve startup time
* GuiInstaller: show a message and offer gui switch if Pandafe is not found
* some new/updated Platforms/Programs, by request
* bug fixes
Download: 0.2.2.4-cba9
 
Last edited by a moderator:
Nice! I really like this project, it is a very good way to integrate all the emulators into a single launcher, so you don't have to deal with all those different ROM selection interfaces.
 
Interesting but crashes. Maybe missing a library? Checked preferences file, and changed the default roms directory but still no luck.


Crash happens immediately after starting the program. Black screen and back to mini menu or XFCE4


Started Pandafe from command line: /usr/pandora/scripts/pnd_run.sh -p "media/mmcblklp1/pandora/apps//pandafe.pnd" -e "bin/pandafe" -b "pandafe"


Mount the PND success


Starting the application (bin/pandafe) failed


Restoring the frame buffer status success


uMount the PND success


Thought it might be useful to check what is inside the pnd. Just checked there are only "windows only" apps to do that..... pretty strange for an Linux driven device that is called openpandora.
 
Last edited by a moderator:
Thanks for the report b_o_b. Sounds like this was your first time running this, yes? I just checked into this and indeed there is:


* a regression in the new build system that is causing the default preferences file to reference a non-existent font


* some old debugging code still in place that causes the above problem to halt the program (as opposed to just falling back to the default font).


I fix this soon and release a new pnd (edit: fixed version on repo). In the meantime you can work around this bug by

  1. editing appdata/pandafe/preferences

  2. removing the font: line ("font: /usr/local/share/pandafe/fonts/bitwise.ttf", presumably)


That should ensure that the default font is used.

Thought it might be useful to check what is inside the pnd. Just checked there are only "windows only" apps to do that..... pretty strange for an Linux driven device that is called openpandora.
This is not true, you can explore the contents of pnds quite easily from Linux, it does requires a little understanding of the format as its not natively supported by Linux distributions. Try one of these, depending on your preference:

  1. mount the pnd to a local directory using loopback
    $ sudo mount -o loop ${PND_FILE} ${TARGET_DIRECTORY}

  2. copy/rename the pnd to have an extension of .7z, then use whatever 7zip supporting software you like to open and inspect it
    $ cp ${PND_FILE} ${PND_FILE}.7z
    $ file-foller ${PND_FILE}.7z


Good luck, and enjoy!
 
Last edited by a moderator:
Good to know it is possible on Linux to check the content of PNDs. Tried one of the windows apps in Wine, but ran into issues. Not sure if it is because it doesn't work in Linux or it was my lack of knowledge of the program.. well anyway removing the font line fixed pandafe.


Yesterday and today I played with it a bit and I have to say this is an amazing piece of useful software! It seems like you thought of everything.


Without setting up it is already recognizing a lot of software and immediately very useful. It is pretty intuitive and a *lot* of adjustments possible.


Good use of the L + R button for fast selection. Love the recently played and favorites and both being platform independent.


It shows there has been put a lot of dedication into this. I am surprised this piece of ingeniousness hasn't received more love from this community. Really amazing stuff...


Still playing with it and trying to figure everything out. Had one problem with adding a folder with 2500 roms (GBA). It hang after selecting. I thought it needed a lot of time for indexing or something but it was still hanging after more than 10 hours.


My instant favorite UI. Thanks for sharing.
 
Thanks very much to both of you for you kind words!

Still playing with it and trying to figure everything out. Had one problem with adding a folder with 2500 roms (GBA). It hang after selecting. I thought it needed a lot of time for indexing or something but it was still hanging after more than 10 hours.
Wow 10 hours, that's some patience. :)


I don't have near that many games, but I tried to reproduce your issue by creating a bunch a dummy files (Game1.zip ... Game2500.zip) and scanning that (on my Pandora). That seemed to work fine, so I tried again with 25000. That took a good while (< 60s though) but eventual it showed the full list. I tried paging through all that in the list though, and after awhile things slowed to a crawl and eventual crashed, presumably having run out of memory. I have an older Pandora with only 256M memory, btw. I tried again with 10000, this time moving between different platforms and the all games list, starting some games, and monitoring the memory usage. I caused a couple more crashes and then eventually did manage to recreate a hard lockup as you experienced.


So, it sounds like I might have some memory leaks to track down, or some memory optimization work, to keep the overhead down with large lists.


Have you tried hitting your gba folder first thing when you start Pandafe, before doing anything else? I would expect that to work. If not you might try splitting up those files into a few subfolders -- you'll be able to navigate the folders in the program. If none of that works I guess its possible that the program is choking on a strange filename or something, but the lockup really does sound like an out of memory deadlock issue.


I'll try and work on some memory optimization when I can block out some time. Let me know if you find any other warts or pain points, etc, and thanks for the report!
 
If you need to track down memleaks: valgrind works pretty well on the Pandora (you need to install some *-dbg packages though iirc).
 
Wow 10 hours, that's some patience. :)
I wasn't staring at my Pandora for 10 hours if that is what you thought, I was sleeping most of it ;)

That Pandafe can't handle that many files is not a real issue for me. Enough methods to work around it. Of course it would be nice if it can be solved, but it is not a showstopper.


I ignored the programs that are not already set up at first but I ran into some problems later (the readme you provided didn't help me, but it was nice to know you consider me to be the target audience ;) )


Most programs that you can start from command line are started like this:


program_name file.xx or


program_name -x file.xx


In the program you can set it up with 'custom' and in your examples it usually refers to a .sh script that starts the main program.


Here comes the hard part for me. In Gmenu2X it was a bit easier because I always knew where to find the executable and for most command line capable programs it wasn't hard to setup.


So can you give an example how to setup a new emulator (e.g. Hatari) with roms? If I have one easy example I can probably figure out the rest on my own. Thanks.
 
the readme you provided didn't help me, but it was nice to know you consider me to be the target audience ;)
Heh, indeed. Well, I guess I'll bite the bullet and write out steps here for your Hatari example. I'll assume you have the Hatari from here.


I don't have any Atari ST games, nor have I ever used one, so you may have to change some aspects to suit your needs. For my testing I used some random demo.


Before starting, make sure you rescan your pnds, to make sure Hatari is available in the Pandafe pnd cache (press select to open the main menu and choose Scan PNDs).


Add Atari ST Platform Definition


* switch to Platform Folders view


* select the platform folder you'd like to add it to, press space to bring up the context menu and choose edit


* choose Platforms, select a location to insert the new platform, press B or enter, choose Insert Above/Below, choose New, choose Rom Based


* specify platform name, rom folder, and file extension(s). I used "msa" for the rom extension as that was what the demo used.


* choose Programs, then Insert Item, and we're on to adding program definition(s)


Add Hatari Program Definitions


* select Game/Emulator/Hatari 1.4.0 (Atari ST emu)


* change the name (if you like). I removed the "(Atari ST emu)" part.


* choose Command to bring up a GtkSourceView window to edit a custom command


Specify a Custom Command for Hatari 1.4.0


Now we've presumably come to the meat of your question. Before selecting Command in the previous step, that item listed "./run140.sh" as the current command. This is the script that is launched when you start that app directly. Our goal here is to modify that command so that it passes command line arguments from Pandafe through to the actually invocation of Hatari. Some apps already support this, but most don't.


At this stage its usually necessary to do some research on the emu in question, to understand which command line arguments they support and which need to be specified in order to launch a game directly. This is not always possible -- the emulator binary obviously needs to support this direct launching. For Hatari, I found the necessary documentation here. This was so much Greek to me, not understanding the Platform, but I found the requisite option under "Disk Options":

−−disk-a <file> Set disk image for floppy drive A
Now then, the GtkSourceView window should currently show us the contents of the "./run140.sh" (as indicated by the frame label on top). We can edit this buffer to create our custom command. Once you start making changes, the frame label will change to "Custom" to reflect this. You can press Revert to undo you changes and return to whatever you started with when you chose "Command" back in the menu. If you already had a custom command, pressing Stock will put the app's stock script in the buffer. The Open button will let you load other scripts from the mounted app, in case you want to investigate things that way. And if you need to really dig into things deeper, the Terminal tab at the top will give you a shell in the mounted app folder (/mnt/utmp/hatari.skeezix here). This allows you to, for example, run the emulator binary directly to experiment, or to run your (previously saved) custom command for testing.


OK, so getting back to it. The very bottom of the ./run140.sh script contains the invocation of the emulator (and the options used are nicely commented above it).

./hatari-1.4.0 -z 2 --tos ./tos.img --borders 0 -s 1 -d ./hdd_drive_c
We will need to edit this line to pass command line arguments received by the script to the invocation of hatari-1.4.0. This step benefits from a working knowledge of shell scripting. The short short version is that $1 represents the first argument passed, and $@ represents all arguments passed. I'll use $@, from force of habit. Its worth noting here also that Pandafe supports specifying command line options as part of a Program definition, allowing those options to be specified and stored per game. That's a rather longer topic, but in that case we'd use $@ to pass whatever all those options are. Moving on...


So we need to add something like "--disk-a /path/to/our/demo.msa" to that invocation. Using "--disk-a $@" will accomplish that. I also noticed when reading the manual that we can get fullscreen by adding "-f". Why not? Our final result then is:

./hatari-1.4.0 -z 2 --tos ./tos.img --borders 0 -s 1 -d ./hdd_drive_c -f --disk-a $@
After all that ramble, the actual actionable steps collapse to:


* add "-f --disk-a $@" to the end of the last line


* press OK (now we're back to the menu, and the Command is "(custom)"


* choose Save


Add Program Definition for Hatari 1.6.1


Might as well add another one..


* press B/Enter on Hatari 1.4.0 in the Programs list


* choose Insert Below


* repeat the above for Hatari 1.6.1 (Atari ST Emu)


* (make sure to add "-f --disk-a $@" before the "# -d ./hdd_drive_c" bit at the end of the last line (which is a comment)


Finish Up


We should now be back at the Programs list


* press space or X to move down from the list to the Cancel/Save actions for the list


* choose Save (...and not Cancel! If you happen to Cancel accidentally, you'll have to repeat the platform creation steps, but the program definitions you created will still be there and you can just add them to the platform)


* select Default Program and choose one of the new programs as the default (using right/left or B/Enter)


* choose Save


Now we're back at the list of Platforms for the Platform Folder we started out with at the beginning.


* press space or X to move down from the list to the Cancel/Save actions for the list


* choose Save (same note applies about Cancel -- the new Platform is already saved at this point, so it could still be added to the Platform Folder if you make a mistake)


* choose Save on the Edit Platform Folder screen


All done!


* close the context menu by pressing space or A or escape


At this point I was able to open the Atari ST platform and run the demo I downloaded.


Whew! Hopefully that crash course helps illustrate enough of functionality that you can get working any other platform and/or program that you set your mind to. Hmm, perhaps I should add all that to the README...


In case you ran into problems with any of this, here's a tarball with the working definitions I created. Extract it to appdata/pandafe.


Platform_AtariST__Program_Hatari.tar.gz


If you take a look at the definitions, you'll notice they're YAML, which in theory makes it possible to do all the above in a text editor. That's probably crazy talk, but hopefully it does make sharing definitions easy enough to encourage it. If you do start knocking those out, it might be nice to include them in a future Pandafe updates for others to enjoy.


Have fun! :)
 

Attachments

  • Platform_AtariST__Program_Hatari.tar.gz
    934 bytes · Views: 238
Last edited by a moderator:
If you need to track down memleaks: valgrind works pretty well on the Pandora (you need to install some *-dbg packages though iirc).
Eh? Rad. I actually ran valgrind on src/pandafe last night on my laptop to start poking around, and was wondering what it would take to do that from the Pandora. Good gracious, this little box is so damn fantastic to work with.
 
Last edited by a moderator:
Thanks for the explanation nuhrin! I just managed to add Hatari to the list. Had some issues along the way trying to install 1.6 (was constantly complaining about not finding the directory), but I could install 1.3 without a problem. Used your method and only had to adjust the filename too to make it work.


Will need a bit more experimenting to be sure, but I think I should manage to make more emulators/programs work now.
 
Hey, this is really swift!!

Any chance to add support for Vice (Commodore 64) and Coleco? Also PCSXreARMed would be nice. And GnGeo!! And MSX!! Also FBA...Atari 2600 (Stella)...and Intellivision (jzintv) if I'm not asking for too much, lol
 
Hey Kumaki. I'm on a road trip at the moment, at the start of a sort of working vacation, so it'll be a little while before I can look into adding those platforms and programs, but I'll take a look once I get a little time to tinker. Some of those at least I looked at before the initial release (ended up putting them aside to focus on finishing some features).  So not to much to ask, no.  ;)

PCSXreARMed should work out of the box though, that's one I use regularly.  Default platform folder structure has Playstation under Other, btw. Also, have you tried rescanning PNDs from within Pandafe (press Select, choose Scan PNDs)?  That doesn't happen automatically so you have to do so after installing/updating PNDs.

I have done a bit of bug fix work recently to squash some memory leaks, so after I get the chance to work on your requests I'll throw up a new release.

Thanks for the feedback, glad you're liking it.
 
* add option to install pandafe as a gui for SwitchGui
Thanks for adding this, now I can boot into my favourite ui. :)
I wasn't very lucky using this... couldn't boot into the OS anymore when I tried to select Pandafe as default UI. Needed to re-install Zaxxon. Not sure if this was the cause, but if you have a different experience I might try to do it again. 
 
I have done a bit of bug fix work recently to squash some memory leaks, so after I get the chance to work on your requests I'll throw up a new release.
There are some slow downs and also crashes (especially during setting up the UI) that might be related to that. Looking forward to the new release, I still think this is an amazing piece of software and any improvement is welcome. 
 
I wasn't very lucky using this... couldn't boot into the OS anymore when I tried to select Pandafe as default UI. Needed to re-install Zaxxon. Not sure if this was the cause, but if you have a different experience I might try to do it again.
It boots fine for me unless I remove the SD card that I installed it from, then it boots to a infinitely looping login screen.
 
Ok, good to know. Thx. Might try it again then. 
 
I finally remembered to install this and got around to trying it last night as a universal launcher for the various emulators out there and it's really good stuff, much better than dealing with different file selectors, etc., that all behave differently from one another.  Combined with the fact that it's perfectly capable of launching stand-alone PND's as well I'm definitely considering just making it my default launcher.  Great work! :)
 
Totally love this FE! Highly customizable, great stuff!

One thing though, maybe just a setting, I'd like Handy for Atari Lynx games, but I don't want the LCD effect.

It always defaults to LCD effect on, for every game, I have to turn it off every single time, is there an option not to have this turned on by default?

Also Mega CD games don't work because I only select a .cue sheet in PicoDrive normally, PandaFE somehow copies the cuesheet but not the rest of the folder, so PicoDrive can't do anything with it.

Any other option or just zip everything?
 
Back
Top