Mame and Mednafen as screen savers?

A nice (keyboard based) front end for Arcade / Console game emulators.

Moderator: battlecat

Mame and Mednafen as screen savers?

Postby Zombie » Sun May 15, 2011 8:08 am

Is there a way that Wah/MahCade can use Mednafen or Mame with random roms to setup an attract mode the way Gamex does?
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Mame and Mednafen as screen savers?

Postby sairuk » Sun May 15, 2011 8:37 am

nope
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Mame and Mednafen as screen savers?

Postby Zombie » Sun May 15, 2011 9:50 am

May I ask why not?
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Mame and Mednafen as screen savers?

Postby sairuk » Sun May 15, 2011 10:26 am

no one has added it yet :mrgreen:
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Mame and Mednafen as screen savers?

Postby Zombie » Sun May 15, 2011 4:53 pm

@.@ let me ask another way. If we were to implement said function, how would we bypass the sdlmame "Nag screens" or tell mednafen to terminate after so long of use?
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Mame and Mednafen as screen savers?

Postby stealth » Sun May 15, 2011 6:12 pm

Hi
I added this in livemamecab, for the messages you must change the c code ( in french -> http://numsys.eu/0sys_ajout-com.php?com=18 ) or get /usr/games/xmamescreensaver in livemamecab

The screensaver work with a shell script in a loop like this

while [ 1 != 2 ];
sleep 300
do $HOME/mamelive/scripts/screensaver.sh &
done

Play randomly only when mame is out

#! /bin/sh
# screensaver.sh
set -evx
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/games/:/usr/X11R6/bin/:/usr/bin/X11/

line0=$(grep rom_path $HOME/.wahcade/ini/sdlmame.ini | cut -c9- | sed -e "s/^ *//g")
number=$( head -c4 /dev/urandom | od -N1 -tu4 | sed -ne '1s/.* //p')

if pidof mame; then
exit 0
fi

if pidof xmamescreensaver; then
killall xmamescreensaver
fi

# la liste de fichiers où choisir
cd $line0
ls *.zip > /tmp/tmp.txt
FILE=/tmp/tmp.txt
# prend une ligne au hasard
line=$(($number%`wc -l $FILE | cut -d' ' -f1`))
nl $FILE | while read a b
do
# joue le jeu
[ "$a" = "$line" ] && { /usr/games/xmamescreensaver -joytype '1' -analogstick -joydevname '/dev/input/js' -usbpspad -norapidfire -nougcicoin -artwork -use_backdrops -use_overlays -use_bezels -noartwork_crop -volume -32 -fullscreen -arbheight '0' -heightscale '1' -widthscale '1' -effect '1' -autodouble $line0/$b 2>&1; break; }
done
xrandr -s 1024x768 &
A little mamecab OS - Mah!Cade, mame , retroarch - Livemamecab
The live CD can be used for a quick demo or test, Download ISO
stealth
 
Posts: 70
Joined: Tue Jan 01, 2008 6:26 pm

Re: Mame and Mednafen as screen savers?

Postby sairuk » Sun May 15, 2011 10:56 pm

stealth wrote:Hi I added this in livemamecab


Nice one, does it work well?
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Mame and Mednafen as screen savers?

Postby stealth » Mon May 16, 2011 9:09 am

Yes, every 300 seconds the script will randomly play with the wahcade roms
Maybe i should upgrade the version (xmame) because some roms doesn't works, but for a screensaver it's good

You can easily try with livemamecab, in three different modes

1) Usb key, two keys or one key with two partitions (easy with gparted and usb creator in ubuntu)
2) Live CD and usb key for roms
3) HDD install
A little mamecab OS - Mah!Cade, mame , retroarch - Livemamecab
The live CD can be used for a quick demo or test, Download ISO
stealth
 
Posts: 70
Joined: Tue Jan 01, 2008 6:26 pm

Re: Mame and Mednafen as screen savers?

Postby Zombie » Mon May 16, 2011 9:49 am

What about Mame's "nag screens" and can this be done with Mednafen?
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Mame and Mednafen as screen savers?

Postby stealth » Mon May 16, 2011 10:10 am

What do you mean exactly about mame's "nag screens", i think i removed all messages

I don't know for Mednafen, but with time and some knowledges, certainly yes
A little mamecab OS - Mah!Cade, mame , retroarch - Livemamecab
The live CD can be used for a quick demo or test, Download ISO
stealth
 
Posts: 70
Joined: Tue Jan 01, 2008 6:26 pm

Re: Mame and Mednafen as screen savers?

Postby sairuk » Mon May 16, 2011 12:07 pm

i suppose in wahcade you could modify it to run
1] the random game function
2] launch the emulator with the wahcade command line
3] kill the emulator process after a period of time or user input
4] return to wahcade
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Mame and Mednafen as screen savers?

Postby Zombie » Mon May 16, 2011 1:22 pm

Thats about right.
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Mame and Mednafen as screen savers?

Postby stealth » Mon May 16, 2011 1:26 pm

Yes i guess , the shell code is already wrote above

The point 4 is not necessary because xmamescrensaver run with wahcade behind
A little mamecab OS - Mah!Cade, mame , retroarch - Livemamecab
The live CD can be used for a quick demo or test, Download ISO
stealth
 
Posts: 70
Joined: Tue Jan 01, 2008 6:26 pm

Re: Mame and Mednafen as screen savers?

Postby Zombie » Tue May 17, 2011 6:08 pm

I tell you what I am going to do: I'm going to try my best at RPM Packaging xmame screen saver, after that, I'm going to see what happens when I plug in this thing directly. Because I want to try and simplify this as much as Mala and Gamex does. In some cases, over complexity and too many moving parts can detract from usability. This is especially the case with attempting to use Wine for unsupported platforms, especially complex computer systems like the X68000 and Amiga.
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Mame and Mednafen as screen savers?

Postby stealth » Wed May 18, 2011 10:46 am

If I get time I'll look to upgrade with sdlname
Ask me if you need help for adapt shell code
A little mamecab OS - Mah!Cade, mame , retroarch - Livemamecab
The live CD can be used for a quick demo or test, Download ISO
stealth
 
Posts: 70
Joined: Tue Jan 01, 2008 6:26 pm

Next

Return to Wah!Cade

Who is online

Users browsing this forum: No registered users and 1 guest

cron