linux games

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

Moderator: battlecat

linux games

Postby General_Faliure » Mon Nov 11, 2013 3:07 pm

Hello.

I want to add linux games to my cab.
How do i go about it in Wahcade?
I already have a layout
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core 2 duo 8400 @3600, 4 gig mem, Geforce 9500. Mame, Mess, Daphne, and some more.
Mah!cade
User avatar
General_Faliure
 
Posts: 154
Joined: Sat Mar 20, 2010 12:51 pm
Location: Drunen, Netherlands

Re: linux games

Postby Zombie » Mon Nov 11, 2013 5:29 pm

Use this script I affectionately titled run-shortcut.sh

Code: Select all
unset runapp workdir
while read -r line
do case $line in Exec*) runapp=${line#*=};; Path*) workdir=${line#*=};; esac

done < "$1"
# runapp=$(sed -n '/^Exec/s,^[^=]*=,,p' $1);
# workdir=$(sed -n '/^Path/s,^[^=]*=,,p' $1);
cd "$workdir";
$runapp;


What this does is execute KDE .desktop files at the command line.
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: linux games

Postby General_Faliure » Tue Nov 12, 2013 9:20 am

It doesn't seem to work on my system (Lxde).
I placed the script in my ~/emulators/linux directory, where i also placed some desktop shortcuts of games.
If i run the script from command line i get an error in line 5 (file doesn't exist):
mame@mamebox:~/emulators/linux$ ./run-shortcut.sh SuperTux 2
./run-shortcut.sh: regel 5: SuperTux: Bestand of map bestaat niet
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core 2 duo 8400 @3600, 4 gig mem, Geforce 9500. Mame, Mess, Daphne, and some more.
Mah!cade
User avatar
General_Faliure
 
Posts: 154
Joined: Sat Mar 20, 2010 12:51 pm
Location: Drunen, Netherlands

Re: linux games

Postby sairuk » Tue Nov 12, 2013 10:24 am

how are you planning on having Mah!Cade find the games?

I personally would build a directory or scripts/shortcuts and place all my games in there I want to use with Mah!Cade. Basically treating PC games as though they are roms.

Mah!Cade supports:
- Open Desktop shortcuts *.desktop
- Windows LNK shortcuts (Windows Only through the pythoncom module)
- URL shortcuts (Mostly due to the way steam executes)

During runtime if it matches a file extension of desktop, lnk or url it loads the appropriate plugin which is then used to do additional processing before execution of the game, perhaps change directory to the working dir etc.

I just treat PC game shortcuts like roms and let Mah!Cade run it through the plugins

My executable line in my pcgames.ini is blank btw, the plugins handle the execution (currently working in windows so cannot test my linux install)
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: linux games

Postby General_Faliure » Wed Nov 13, 2013 9:18 am

I did set up a linux directory and placed some .desktop links in it.
Then i set it up in mahcade; this is the ini:

Code: Select all
### new_emulator.ini (wahcade v0.12) ###

emulator_title                          Linux

### List Generation Settings ###
rom_path                                ~/emulators/linux
rom_extension                           
dat_file                               
nms_file                               
catver_ini_file                         
list_generation_method                  rom_folder

### Execution Settings ###
emulator_executable                     
commandline_format                      "[rompath]/[name]"
alt_commandline_format_1               
alt_commandline_format_2               
game_specific_config_path               

### Artwork Locations ###
artwork_1_image_path                   
artwork_2_image_path                   
artwork_3_image_path                   
artwork_4_image_path                   
artwork_5_image_path                   
artwork_6_image_path                   
artwork_7_image_path                   
artwork_8_image_path                   
artwork_9_image_path                   
artwork_10_image_path                   
movie_preview_path                     
movie_artwork_no                        1

### Screen-Saver Settings ###
enable_music_in_screensaver             0
saver_type                              slideshow
movie_path                             
movie_fullscreen                        1
quit_delay                              30
wrapper_executable                     
wrapper_commandline_format              [name]
scr_file                               

### External Application Settings ###
ipc_file_or_path                       
app_1_executable                       
app_1_commandline_format               
app_2_executable                       
app_2_commandline_format               
app_3_executable                       
app_3_commandline_format               
auto_launch_apps                       

### Additional Settings ###
music_path                             
lcd_display_file_path                   
lcd_fe_text                             

### Settings used by MAMEWAH ###
current_list                            0


But the games do not start, mahcade is looking for an emulator executable:

Code: Select all
[Wed Nov 13 08:59:29 2013]: [LAUNCH] No extension or wildcard passed trying to look up a rom extension for launch
[Wed Nov 13 08:59:29 2013]: [LAUNCH] Setting extension to: .desktop
[Wed Nov 13 08:59:29 2013]: Error: Emulator Executable [] does not exist
[Wed Nov 13 08:59:35 2013]: [LAUNCH] No extension or wildcard passed trying to look up a rom extension for launch
[Wed Nov 13 08:59:35 2013]: [LAUNCH] Setting extension to: .desktop
[Wed Nov 13 08:59:35 2013]: Error: Emulator Executable [] does not exist
[Wed Nov 13 08:59:37 2013]: Default, exit mode selected
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core 2 duo 8400 @3600, 4 gig mem, Geforce 9500. Mame, Mess, Daphne, and some more.
Mah!cade
User avatar
General_Faliure
 
Posts: 154
Joined: Sat Mar 20, 2010 12:51 pm
Location: Drunen, Netherlands

Re: linux games

Postby codefenix » Wed Nov 13, 2013 5:10 pm

Read post #7 in this thread:

Re: Application Termination problem
User avatar
codefenix
 
Posts: 219
Joined: Fri Sep 25, 2009 3:45 pm
Location: USA

Re: linux games

Postby sairuk » Thu Nov 14, 2013 2:57 am

I believe the plugins system, as it is requires a single extension be listed in the ini file, this is so the system can match the correct plugin. I will look into if this is the case tonight, i'll have to see if "[Wed Nov 13 08:59:35 2013]: [LAUNCH] Setting extension to: .desktop" is passed back to game_opts['options'] which is what triggers use of the plugin at launch.
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: linux games

Postby sairuk » Thu Nov 14, 2013 10:30 am

I took at look at the desktop plugin tonight

Commmit 146 should work with your setup (no extension, no executable). The plugin intercepts the launching and reads through the desktop file until it hits the Exec= line, it then returns the command from this line. So long as the plugins return True in position 5 it will bypass the emulator_executable checks, I have no idea why i had it returning False in that position in the commited version.

Changed a few other anomalies. Its working fine again here. Launched turtlearea and freecell direct from Mah!Cade to test
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: linux games

Postby General_Faliure » Sat Nov 16, 2013 9:29 am

It's getting better.
At first it didn't work, (i used the installer) but i found out i had to copy the plugins manually to the installation directory.
Now i have set up twelve games through desktop shortcuts, ten of them do work, two do not;
That's supertux 2 and supertuxcart.
They do start when i start them from the icon.
Supertux 2 gets a segfault (not a supertux level file)
Code: Select all
[Sat Nov 16 09:20:57 2013]: [LAUNCH] No extension or wildcard passed trying to look up a rom extension for launch
[Sat Nov 16 09:20:57 2013]: [LAUNCH] Setting extension to: desktop
[Sat Nov 16 09:20:57 2013]: [PLUGIN] Using plugin launcher_desktop
[Sat Nov 16 09:20:57 2013]: ******** Command from Wah!Cade is:  supertux2 "/home/mame/emulators/linux/supertux2.desktop"
[Sat Nov 16 09:20:57 2013]: ******** Begin command output
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:223 [/home/mame/.supertux2] is in the search path
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:223 [/usr//share/games/supertux2] is in the search path
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'controller' finished after 0.216 seconds
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'config' finished after 0.001 seconds
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'addons' finished after 0 seconds
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'tinygettext' finished after 0 seconds
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'commandline' finished after 0 seconds
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'audio' finished after 0.004 seconds
[INFO] /build/buildd/supertux-0.3.3/src/video/video_systems.cpp:44 new GL renderer
[INFO] /build/buildd/supertux-0.3.3/src/video/gl/gl_renderer.cpp:103 Using GLEW 1.8.0
[INFO] /build/buildd/supertux-0.3.3/src/video/gl/gl_renderer.cpp:104 GLEW_ARB_texture_non_power_of_two: 1
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:466 fullscreen  Window: Size(800, 600) Fullscreen: Size(1680, 1050) Area: Size(16, 10)
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/andale12.stf
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'video' finished after 0.135 seconds
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'scripting' finished after 0.001 seconds
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/cyr-white.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/white.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/zh-white.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/cyr-white.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/white.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/zh-white.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/cyr-white-small.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/white-small.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/zh-white-small.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/cyr-white-big.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/white-big.stf
[DEBUG] /build/buildd/supertux-0.3.3/src/video/font.cpp:87 Loading font: fonts/zh-white-big.stf
[INFO] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:539 Component 'resources' finished after 0.116 seconds
[DEBUG] /build/buildd/supertux-0.3.3/src/supertux/main.cpp:604 Adding dir: /home/mame/emulators/linux/
[FATAL] /build/buildd/supertux-0.3.3/src/supertux/game_session.cpp:125 Couldn't start level: Problem when reading level 'supertux2.desktop': file is not a supertux-level file.
Segmentation fault (core dumped)
[Sat Nov 16 09:20:58 2013]: Child Process Returned: 139
[Sat Nov 16 09:20:58 2013]: ******** End command output
[Sat Nov 16 09:20:58 2013]: Lock file found: Waiting 1
[Sat Nov 16 09:20:59 2013]: Lock time elapsed, removing file
[Sat Nov 16 09:20:59 2013]: Lock File removed successfully
[Sat Nov 16 09:20:59 2013]: Default, exit mode selected


Supertuxcart seems to have a problem with the soundcard, but only when i start it from mahcade.
This is the stderr.log file from supertuxcart;
Code: Select all
Invalid parameter: /home/mame/emulators/linux/supertuxkart.desktop.

AL lib: ReleaseALC: 1 device not closed
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core 2 duo 8400 @3600, 4 gig mem, Geforce 9500. Mame, Mess, Daphne, and some more.
Mah!cade
User avatar
General_Faliure
 
Posts: 154
Joined: Sat Mar 20, 2010 12:51 pm
Location: Drunen, Netherlands

Re: linux games

Postby Zombie » Sat Nov 16, 2013 4:43 pm

WahCade locks the sound card (when you use gstreamer.) I set all my games and emulators to use SDL sound. Quake 4 also has this issue.
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: linux games

Postby sairuk » Sun Nov 17, 2013 6:03 am

Zombie wrote:WahCade locks the sound card (when you use gstreamer.) I set all my games and emulators to use SDL sound. Quake 4 also has this issue.


Yeh Zombie has pointed this issue out in the past, I don't know enough about gstreamer to do anything about at the moment.

I'd have a look at shortcuts for those two apps, see if there is a working directory or something and if there is nothing obviously strange about it post there here. I don't have them installed atm but can do so later and try.

Did you make the shortcuts yourself or were the generated by the package installer?


I'll look at the install script for the next round of packages to see whats missing for these plugins to be packaged up/installed properly.
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: linux games

Postby General_Faliure » Sun Nov 17, 2013 9:11 am

I added the shortcuts from supertux 2 and supertuxcart to the desktop from the start menu, then i moved them into my ~/emulators/linux directory.
I also created some .desktop shortcuts myself and they do work from mahcade.
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core 2 duo 8400 @3600, 4 gig mem, Geforce 9500. Mame, Mess, Daphne, and some more.
Mah!cade
User avatar
General_Faliure
 
Posts: 154
Joined: Sat Mar 20, 2010 12:51 pm
Location: Drunen, Netherlands

Re: linux games

Postby sairuk » Sun Nov 17, 2013 11:23 am

General_Faliure wrote:I added the shortcuts from supertux 2 and supertuxcart to the desktop from the start menu, then i moved them into my ~/emulators/linux directory.
I also created some .desktop shortcuts myself and they do work from mahcade.


I've commited revision 147 which changes some of the behaviour for the launching of from plugins, if pass_check is true it won't assign the default set of arguments anymore (which in this instance was the desktop shortcut). I've tested it on what i have here and it works ok including supertuxkart & supertux2. I may have to revisit it again later if i find a reason to worry about the general commandline in mahcde (game specific desktop configs etc)

I still haven't hit this audio problem atm.
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: linux games

Postby General_Faliure » Sun Nov 17, 2013 1:57 pm

with this commit the problems seem to be gone for these games.
i will install some more games and do some further testing.
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core 2 duo 8400 @3600, 4 gig mem, Geforce 9500. Mame, Mess, Daphne, and some more.
Mah!cade
User avatar
General_Faliure
 
Posts: 154
Joined: Sat Mar 20, 2010 12:51 pm
Location: Drunen, Netherlands


Return to Wah!Cade

Who is online

Users browsing this forum: No registered users and 2 guests

cron