Beta [Beta] Attract mode


ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,306
Age
51
Location
France, near Lyon
Here is Attract mode, a Front end launcher for many emulators.

attract4.png


This PND also included M1 (music player), Mame and Mess.

Attract mode use SFML2 and OpenGL. This version use glshim, but it's unfortunatly non-compatible with newer driver, so you should not use 4.04 and newer.

The Mame and Mess (and M1) version are based on  recent code, so it may not be as fast as Mame4All for example. But everything is included.

Note also that you need to configure Roms paths in both Attract mode (using the GUI) and Mame/Mess/M1.

I have tried to put some default config, but not sure it's a good idea. especially, the M1 emulator that comes as an empty list, it may crash Attract mode until you create a list.

I think there is a texture leak or something, so changing layout may lead to "freeze" that only longpress on Pandora button (kill of attract mode) can "solve".

Appart from that, it should be functionnal (beware the attract mode is not always simple to configure, the concept of List is a bit strange).

FYI, I have put mame and mess in the root (so use /mnt/utmp/attract/mame or just ./mame), m1 is called using ./m1.sh (not plain m1).

Please report your experiences...

PND is here.

*2014-11-25*: initial build.
 
Last edited by a moderator:
Is it possible to incorporate c4a mame? Or even display the current standings in place of a game screenshot? That may be more work than it is worth, but a fun idea anyway.


I guess that was the idea behind the Tournament Hub. Seemed so cool. Hopefully we do see something like that one day.
 
Last edited by a moderator:
Oh, nice. Latest MAME and MESS included as well :D

Sounds like something I need to try out :D

EDIT: Just a quick note: It's v0.154, if anyone is looking for a romset.
 
Last edited by a moderator:
Is it possible to incorporate c4a mame? Or even display the current standings in place of a game screenshot? That may be more work than it is worth, but a fun idea anyway.


I guess that was the idea behind the Tournament Hub. Seemed so cool. Hopefully we do see something like that one day.
Not all games are C4A supported. 
 
Is it possible to incorporate c4a mame? Or even display the current standings in place of a game screenshot? That may be more work than it is worth, but a fun idea anyway.


I guess that was the idea behind the Tournament Hub. Seemed so cool. Hopefully we do see something like that one day.
Not all games are C4A supported.
Oh, does c4a mame not run games that lack c4a support?
 
Currently, the c4a-mame menu only provides you with the options to run games that support c4a. I don't know whether you're able to poke it into running the game you want via arguments to pnd_run, and I don't know what it would do if you gave it a game without c4a support to run, but using the interface, it doesn't support non-c4a games, no.
 
I can try to add a wrapper to automount and use c4amame. That should be doable.


But adding c4a hiscore reading support, I don't see were to add it.
 
Last edited by a moderator:
Quick test so far: MAME with snaps works fine.


Couldn't get MESS to work yet, since I don't know exactly how the thing with the different systems works with Attract Mode, so MESS doesn't know which system to use when I start a ROM.


Since my emulator ports (intv, o2em, colem) usually work with command lines as well, I'd like to upgrade them so it's possible to add them in attract.


Does anyone know how to run a PND and give the rom-filename as parameter?
 
I have a method that I use to automount PND, I'll will write a howto with bash code soon.

About MESS, well, it's a bit ... messy

You need a folder to hold the ROMS & Bios, than in this folder, you put the zipped BIOS files, and you create a folder of the name of the system where you but to ROMS for the system (with the name MESS is expecting). Not supper handy...

I will experiment to had the "hector" system and repport some how-to...
 
So, how to automount a PND.
 
Here is what I have done Chex Quest to automount ZDoom PND.
 
At the start of the runscript, I put these:

#!/bin/bash


pwd=$(pwd)

thatpnd="Chex  Quest 3"
 
# search and mount the pnd...

pnd_cb="zdoom-ptitseb"

pnd_folder="zdoom"

pnd_name="ZDoom"

pnd_min="11"
than, to mount (if needed) the PND, I have this

if [ -e /mnt/utmp/$pnd_folder/build ];then

 allready=1

else

#check if it exist

if [ ! -e /usr/share/applications/$pnd_cb*.desktop ];then

zenity --error --title "$thatpnd" --text="Error, cannot find $pnd_name PND.

You need to install the $pnd_name PND first!"

exit

fi

#grab where is the pnd

pnd_path=$(sed -n 's/.*X-Pandora-Object-Path *= *\([^ ]*.*\)/\1/p' < /usr/share/applications/$pnd_cb*.desktop)

pnd_name=$(sed -n 's/.*X-Pandora-Object-Filename *= *\([^ ]*.*\)/\1/p' < /usr/share/applications/$pnd_cb*.desktop)

path_to_pnd=$pnd_path/$pnd_name

 

#automount it

/usr/pandora/scripts/pnd_run.sh -p $path_to_pnd -b $pnd_folder -m

allready=0

fi



#check version of PND

if [ -e /mnt/utmp/$pnd_folder/build ];then

 pnd_build=`cat /mnt/utmp/$pnd_folder/build`

else

 pnd_build=0

fi



echo $pnd_name pnd build $pnd_build



if [ $pnd_build -lt $pnd_min ];then

 zenity --error --title "$thatpnd" --text="Error, your $pnd_name PND is too old.

Please update it!"

 if [ "$allready" = "0" ] ; then

 /usr/pandora/scripts/pnd_run.sh -p $path_to_pnd -b $pnd_folder -u &

 sleep 2

 fi

 exit

fi

The pnd_min version handling is optionnal. Just put "0" to not check. I have put a build version in the ZDoom PND, so I can easily check the version and print an error if it's too old.
 
Now, the PND is mounted, do whatever you want.
 
In the case of Chex, I setup LD_LIBRARY_PATH and all and call zandronum directly, without calling the runscript (to avoid enyo-doom), but if your runscript handle command line and all, it simpler

zdpwd=/mnt/utmp/zdoom

echo "--------------------------------------------------------------"

echo "Setting PATH to $zdpwd/bin:$PATH"

export PATH=$zdpwd/bin:$PATH



echo "--------------------------------------------------------------"

echo "Setting LD_LIBRARY_PATH to $zdpwd/lib:/lib:/usr/lib"

export LD_LIBRARY_PATH=$zdpwd/lib:/lib:/usr/lib



if [ ! -e /usr/lib/libpulse.so.0 ];then

 echo "no libpulse in firmware, using PND one"

 export LD_LIBRARY_PATH="$zdpwd/lib_old":$LD_LIBRARY_PATH

 if [ ! -e home/.warned ];then

     zenity --warning --title="$thatpnd" --text="You are using an old firmware, you may experience missing music or sound. You should upgrade"

     echo "8" >home/.warned

 fi

fi





export HOME=$pwd/home



cd $zdpwd

./zandronum -iwad $pwd/chex3.wad

cd $OLDPWD



unset LD_LIBRARY_PATH
Note: the unset at the end is to let the PND unmount itself (it wont if LD_LIBRARY_PATH still point to it from my testing).
 
To unmount everything, the last part is

echo unmout $pnd_name

if [ "$allready" = "0" ] ; then

/usr/pandora/scripts/pnd_run.sh -p $path_to_pnd -b $pnd_folder -u &

sleep 2

fi
 
Once you have script and template for Attract-mode, send them and I add everything in the PND so it can be use easily :)
 
Last edited by a moderator:
Okay, played around with it a bit.

MAME works fine with snaps, MESS is working now as well with snaps and various systems.

Category filters are working fine as well.

Different layouts WORK, but you need to quit after choosing a different one and restart (though not every layout works).

I'm currently creating configs and setups for all usable MESS systems, when I'm done with that, I can send all that stuff to you and you can include it as default.

Then all the user would need to do is drop the ROMs and snapshots into directories, generate the list in Attract mode and everything is categorized nicely.

With usable emulators I mean playable. MegaDuck, e.g. works nicely (with a bit broken sound, but playable), whereas GP32 and Game.com runs with 3fps ;)
 
Looks good! I'll integrate everything yeah.


I now some system are very very slow... but I got my first computer to run in mess, so I am happy :) !
 
Okay, you forgot to include the hash-files (can be grabbed from the MAME git), as they are needed to turn the MESS-Filenames into proper gaming names.

I can confirm that this works fine as well.

I'll upload a first part of my setup in a few minutes, I'll continue with more systems later on.
 
Here are the config files for some emulators.

emulators.zip

I got all my games in /media/GAMES/ROMS/MESS/<systemname>, but of course, for a release, that should be changed to /mnt/utmp/attract/MESS/games/<systemname> or similar.

Here are the hash-files.

These are for ALL systems - we should probably strip the nonplayable systems from them.

hash.zip

Here are cfg-files for MESS:

cfg.zip

Nothing special here, but controls are properly setup :)

Okay, some more information about the setup for MESS.

This is just some technical help, in the end, the final release should be as easy to setup for the user as possible :)

Included in the archive is MAME 0.154 and MESS 0.154.

You can find usable MAME and MESS roms on https://archive.org/

You can grab snapshots (for MAME and some MESS systems) here:

http://www.progettosnaps.net/mess/

These will show properly as long as you keep the MESS / MAME ROM names.

It's important that the MESS ROMs are in the correct directory!

For example, Atari 5200 ROMS need to go to MESS/games/a5200, Wonderswan ROMs to MESS/games/wswan

The BIOS files (can also be gotten from archive.org) go into the messroms directory.

I suggest to put the snapshots into MESS/snaps/a5200, MESS/snaps/wswan, etc.

Then, when attract mode is started, all you need to do is generate the lists.

If the roms, snaps and hashs are in the proper directories, they will appear with correct names and snapshots after the list has been generated.

Now, for MAME:

I suggest to get the current catver.ini (you can get it here: http://www.progettoemma.net/?catlist)

Enter the path to it as additional files when setting up MAME config.

Then you can add filters (i.e. genre Shooter) and change between these filters in the list and only show shooters, etc.

Let me know if you have any questions.
 

Attachments

  • emulators.zip
    4.8 KB · Views: 184
  • hash.zip
    3.4 MB · Views: 178
  • cfg.zip
    1.9 KB · Views: 201
Very nice! Plenty of info here.


I will probably not be abble to package before this weekend as I am not home for work until Friday.


But I will work on it as soon as I can.
 
Last edited by a moderator:
Sounds complicated. ^^""

So, this is basicly a frontend that launches various emulators from one surface, actualy pretty nice. But underneeth I first need the emulators itself and each one needs the matching roms. I remember I gave up mame & co years ago because it was literaly only a big mess, you always need the right roms, proper configs, bios files and for whatever reason they change the compatibility with every new emulator version, so you have to start from 0 almost every time (at least for the "interesting" roms like NeoGeo & Co, they always change NeoGeo, why!?!?).

Would be great to have some "clean" frontend to keep the overview at least. :)
 
Last edited by a moderator:
I'll try to automatize the install completely if I can, but in the end, you will still need to put the right roms at the right place...
 
Are there any news on this project or any newer versions than this beta?
I really want to try that :)
 
 
Well, I have an updated pnd that I have not put here yet. It feature only an update attract-mode binary. I haven't updated mame/mess or included the config files for EvilDragon yet (that's why I didn't pushed it). I'll see to update it soon.
 
Back
Top