Pxml-Based Launcher For Emulated Games


jake37

Still Fresh
Joined
May 17, 2008
Messages
18
Age
54
Location
Bielefeld, Germany
Website
www.jockusch.de
Hi Guys!

I've been a happy Pandora owner for some time now, and there's one thing I would really like to contribute: Helpers (= whatever tools are needed) to produce icons of emulated games directly in minimenu or on the XFCE desktop, so you don't have to launch Fuse, UAE4All, Vice or another emulator and then pick your game using the emulator's menu system.

Advantages I'm hoping for: 1) Launch directly into your favourite game. 2) Press Y in minimenu to view the instructions / hints for the game (very uncomfortable so far). 3) Interrupt your game anytime with the pandora key and return later at the exact same point (requires modification in the emulators: signal handler to perform a snapshot and exit).

I believe that this would strongly enhance the gaming experience for us retro-aficionados.

For this to work, I have several rather unrelated questions that I hope someone here will be able to answer.

1- Building a launcher doesn't look so simple. My favourite idea so far is to provide a PND which will emit several minimenu icons. The documentation says is is possible to develop an app by just not packing it into a PND but instead leaving it in the search path, e.g. /media/sd/pandora/apps/mylauncher/ with a PXML.xml file inside. This seems to work with one application, but I'm having problems with putting several in one app. Question: Is this at all possible? Or will I need one PND per game?

2- How do I declare the documentation to be used by the Y button in minimenu? I would love to have game instructions integrated in the standard way, but I don't know how...

EDIT: Found this: it's in the "info" tag of the PXML. That was easy... sorry for bothering you!

3- Where's the source code of Fuse? I can't seem to find anything. I dug up a pandora patch which eliminates paths pointing outside of "." but that's all. I have no idea how the integration of the D-Pad was made (other than by using cursor keys... could it be so simple?) I would like to use fuse as a testing scenario for adding the snapshot feature, but somehow I'm getting nowhere.

4- Is there a "best practice" guide to install a pandora toolchain? I've downloaded two variants but there seems to be no single, agreed-upon way of doing things. What's the status? (I'll try to search the forums for more on this, once my "flooding warning" goes away...)

EDIT: Decided to give DJWillis' pre-packed toolchain a go.

5- Am I right in believing the pandora key sends a TERM signal? I would like to propose a "standard" which would encourage app builders to snapshot their current state upon TERM, so people can interrupt a program and come back to it later at the same state.

6- Currently, I use /usr/pandora/scripts/pnd_run.sh, which I shouldn't. For Fuse, I need this, because I need to use another launching script (one which reads a parameter and loads a snapshot). Is there a better way?

EDIT: Using patched emulators which use a snapshot from appdata will make this unnecessary.

Wow, you're still reading this? That in itself deserves a "thank you"! If you can help me on any of the topics, I'll be even more thankful for a reply!

As a result of this, I'm hoping to release wrappers for some all-time favourites, so that every owner of a Pandora can launch Turrican2, Atic Atac, Knight Lore, Speedball2, Hacker and other classics directly from the "Classics" tab in minimenu!
 
1- It's a known bug : http://bugs.openpandora.org/index.php?do=details&task_id=150&string=PND&project=1&search_name=&type[0]=&sev[0]=&pri[0]=&due[0]=&reported[0]=&cat[0]=&status[0]=open&percent[0]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=

2 - http://pandorawiki.org/PXML_specification#The_info_element

4 - http://blogs.distant-earth.com/wp/?p=109
 
Why not use pnd_run.sh to run stuff? Thats what its for :) (pnd_run binary just invokes pnd_run.sh with the correct arguments, so it may be handier.)

the Pandora button .. see /etc/pandora/conf/eventmap for what it does; in effect, it runs a scriptm which checks which desktop environment you're using, and reacts accordingly; ie: in minimenu it kills top app to return to minimenu, but in xfce brings up the menu or kill-list, depending on timing.

You shoudl be able to do multi-apps in a pnd or pxml-dir-app no problem, but I've not heavily tested pxml-dir-apps in awhile (due to pnd focus); if you find a problem, where it differs from pnd to pxml-dir-app, its a bug and let me know :)

jeff
 
Thanks sebt3 for the superfast answer!

The PND bug will not be a show-stopper, because I come to think that one PND per game is the only sensible way to do this (especially if the HTML docs are a bit bigger, it would become messy putting it all in one app). I'm currently playing with the PND generator; the system is simple enough, so this chapter has been cleared, thank you!

The howto from DJWillis for 32bit systems doesn't work for me. The environment setup seems ok, but I get "cannot open shared object file libmpfr.so.1". Need to look into this.

Thanks for your help so far. My No.1 problem now is getting the toolchain for cross-compile to work. My toolchain for native compile is already up and running, but the z80 ops source in Fuse is simply too big for the Pandora...

- Ján
 
jake37 said:
The howto from DJWillis for 32bit systems doesn't work for me. The environment setup seems ok, but I get "cannot open shared object file libmpfr.so.1". Need to look into this.
This issue is already "fixed" see :
http://www.gp32x.de/board/index.php?/topic/57221-initial-dev-setup-issues/page__view__findpost__p__923676
 
Last edited by a moderator:
Thanks skeezix!

The pointer for the operation of the pandora button is very good and clear!

Just read the script and I'm shocked! (well, not really...) "kill -9" Wow! That's tough! In the current version, I fear the pandora button is a little too brutal to be used for exiting applications regularly...

Maybe something a little softer would be better? Like kill -TERM? It would enable apps to clean up before they have to go, maybe store some sort of snapshot, and pick up at that point when called later. There's already a provision for behaving differently if the button has been pressed for several seconds. That could map to "kill -9" as a last resort.

I'll look into the multi-apps thing if I get the time, promised. But the way things look now (with using Y to display game information), I'll probably want one PND per game.

Concerning using pnd_run.sh, I feel much better already. I remember reading somewhere that I shouldn't touch that script... ah, forget it!

The first and foremost task for me now is to get a snapshot-recover-cycle to work. God, I would love a working compile environment ... but ... mhh, wait ... my native compile environment seems ok, just not enough RAM, what if I get more memory by using a swap file on my SD card ..? That sounds weird enough to be worth trying ...

.. see you around ...
 
Hi again and thanks again!

@sebt3: Yeah, I thought that looked like a fix, but it was slightly off the mark.

It seems that this haunts all Debian and some Ubuntu users and is resolved by installing a native library:

Code:
aptitude install libmpfr1ldbl

This fixes things for me... other distributions may have slightly different names for essentially the same library.

So, resolved!! (or at least I think so) Will try to compile Fuse now!
 
Okay folks, here's my rundown so far.

I've been really struggling to get fuse compiled for my Pandora. God, how difficult can it be to set up a cross-compiling environment?

Very difficult, apparently, at least when you're not used to cross-compiling. To cut a long story short, I failed to get any farther than the example demo mini-program in DJWillis' Pandora development howto. SDL doesn't detect or link in correctly, plus a lot of other smaller problems. I used a freshly installed Ubuntu server 32bit Virtualbox, but still no success with fuse (which admittedly uses a lot of libraries not shipped with a plain vanilla Pandora).

So I ended up compiling on the Pandora natively, which is slow, but at least the error messages actually point to the problem, so I got the Pandora-patched version of fuse to compile.

My current problem with that version is that it refuses to go full-screen, don't know why. But that's minor, I guess.

Now for the good news: The patch I made to allow fuse to save a snapshot upon exit works well, so it's not a problem any more to interrupt a game and take it up later. I need to smooth out the rough edges and find a good way of packaging programs into PNDs now.

I'll keep information here; thanks again for the helpful comments!
 
Back
Top