Kodi Community Forum
[LIVE] Complete EMUs/ROMs in Live (Acer Revo) - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
---- Thread: [LIVE] Complete EMUs/ROMs in Live (Acer Revo) (/showthread.php?tid=73428)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


- malte - 2010-11-04

It is not writing to a log file, it will output to the console. I thought that you are left with a blinking console after trying to launch the emu.

You can try this:
- close xbmc if it is running (you should get back to gnome now)
- in gnome start a terminal window and type "xbmc" (this will launch xbmc with the terminal window as parent)
- now try to launch your emu via the modified launcher.sh
- the command echo "$@" should output to the console window that you used to start xbmc


- htpc guy - 2010-11-05

malte Wrote:It is not writing to a log file, it will output to the console. I thought that you are left with a blinking console after trying to launch the emu.

You can try this:
- close xbmc if it is running (you should get back to gnome now)
- in gnome start a terminal window and type "xbmc" (this will launch xbmc with the terminal window as parent)
- now try to launch your emu via the modified launcher.sh
- the command echo "$@" should output to the console window that you used to start xbmc


I did exactly what you said. I launched xbmc from the terminal and this is the output from when the launcher failed to launch the game.

[email protected]:~$ xbmc
: no process found
usr/games/mupen64plus --nogui --fullscreen /home/htpc/Documents/N64_Roms/Zelda-Ocarina_of_Time.z64
/home/htpc/launcher.sh: 3: usr/games/mupen64plus: not found

*I believe this part is from when I choose the shutdown option to close xbmc

CRITSEC[0x8c46430]: Trying to enter destroyed section.
CRITSEC[0x8c46430]: Trying to leave destroyed section.
CRITSEC[0x8c45fa0]: Trying to enter destroyed section.
CRITSEC[0x8c45fa0]: Trying to leave destroyed section.
[email protected]:~$


As a refresher, here is the info from my launchers.xml file

<launcher>
<name>Nintendo 64 (N64)</name>
<application>/home/htpc/launcher.sh</application>
<args>usr/games/mupen64plus --nogui --fullscreen</args>
<rompath>/home/htpc/Documents/N64_Roms</rompath>
<thumbpath>/home/htpc/Documents/N64_Roms</thumbpath>
<fanartpath>/home/htpc/Documents/N64_Roms</fanartpath>
<romext>z64</romext>
<platform>Nintendo 64</platform>
<thumb>/home/htpc/Documents/N64.jpg</thumb>
<fanart>/home/htpc/Documents/mariogalaxy1080.bmp</fanart>
<genre>3D Console</genre>
<release>1997</release>
<publisher>Nintendo</publisher>
<launcherplot></launcherplot>
<wait>true</wait>
</launcher>

<rom>
<name>Super Smash Bros.</name>
<filename>/home/htpc/Documents/N64_Roms/Super_Smash_Bros.z64</filename>
<platform>Nintendo 64</platform>
<thumb>/home/htpc/Documents/N64_Roms/Super Smash Bros_thumb.jpg</thumb>
<fanart>/home/htpc/Documents/N64_Roms/Super Smash Bros_fanart.jpg</fanart>
<genre>Fighting</genre>
<release>1999</release>
<publisher>HAL Laboratory</publisher>
<gameplot></gameplot>
</rom>


So right off the bat I notice that It can't see or do anything from launcher.sh. I know its running as an executable because I can right click on it and see that it is in the properties (has a check in the box for execute)


- htpc guy - 2010-11-05

*Update

I keep going back to the launcher.sh. For some reason its not working. I deleted it and recreated it. This time I did one thing differently. Before I was saving it w/ the default ANSI Latin 1 encoding. This time I saved it with Unicode (UTF-16) encoding. I had the same result (xbmc blinks and resumes) but I had a different output in the terminal.


/home/htpc/launcher.sh: 1: ��/usr/bin/killall: not found
usr/games/mupen64plus --nogui --fullscreen /home/htpc/Documents/N64_Roms/Super_Smash_Bros.z64
/home/htpc/launcher.sh: 3: usr/games/mupen64plus: not found

I tried the various encodings and Unicode (UTF-8) yielded the best results.

/home/htpc/launcher.sh: 1: /usr/bin/killall: not found
usr/games/mupen64plus --nogui --fullscreen /home/htpc/Documents/N64_Roms/Zelda-Ocarina_of_Time.z64

I checked and I do have /usr/bin/killall
then I checked all the other paths and they are correct.


- htpc guy - 2010-11-05

I'm getting close!

I edited my <launcher> tags to this:
Code:
<launcher>
<name>Nintendo 64 (N64)</name>
<application>/home/htpc/launcher.sh</application>
<args>mupen64plus --nogui --fullscreen</args>***********CHANGED LINE
<rompath>/home/htpc/Documents/N64_Roms</rompath>
<thumbpath>/home/htpc/Documents/N64_Roms</thumbpath>
<fanartpath>/home/htpc/Documents/N64_Roms</fanartpath>
<romext>z64</romext>
<platform>Nintendo 64</platform>
<thumb>/home/htpc/Documents/N64.jpg</thumb>
<fanart>/home/htpc/Documents/mariogalaxy1080.bmp</fanart>
<genre>3D Console</genre>
<release>1997</release>
<publisher>Nintendo</publisher>
<launcherplot></launcherplot>
<wait>true</wait>
</launcher>

Now I get:

PHP Code:
htpc@htpc:~$ xbmc
/home/htpc/launcher.sh1: &#65279;/usr/bin/killall: not found
mupen64plus --nogui --fullscreen /home/htpc/Documents/N64_Roms/Zelda-Ocarina_of_Time.z64
 __  __                         __   _  _   ____  _             
|  \/  |_   _ _ __   ___ _ __  / /| || | |  \| |_   _ ___ 
| |\/| | | | | '_ \ / _ \ '\| '_ \| || |_| |_) | | | | / __|  
| |  | | |_| | |_) |  __/ | | | (_) |__   _|  __/| | |_| \__ \  
|_|  |_|\__,_| .__/ \___|_| |_|\___/   |_| |_|   |_|\__,_|___/  
             |_|         [url]http://code.google.com/p/mupen64plus/[/url]  
Version 1.5

Error: Couldn'
t load Rom
I copied the imput from the launcher program:

mupen64plus --nogui --fullscreen /home/htpc/Documents/N64_Roms/Zelda-Ocarina_of_Time.z64

and ran it.... It runs the emulator. Why will it work if I put it the terminal but not if the launcher plugin does?


- malte - 2010-11-07

There is an error in your output. You should try to get rid of this one:
PHP Code:
&#65279;/usr/bin/killall: not found 

Check your launcher.sh for special chars. Maybe something happened with copying the text of your launcher.sh to the editor?


If it helps, this is the bash file I am using in RCB. Never had any problems with it:
Code:
#!/bin/bash
# App Launch script - Temporarily quit XBMC to launch another program
# Tx to rodalpho @ # http://xbmc.org/forum/showthread.php?t=34635
# By Redsandro     2008-07-07
# By ryosaeba87    2010-08-24
# Updated:        2010-08-24
#     Added support for MacOSX


# Check for agruments
if [ -z "$*" ]; then
    echo "No arguments provided."
    echo "Usage:"
    echo "launcher.sh [/path/to/]executable [arguments]"
    exit
fi


case "$(uname -s)" in
    Darwin)
        XBMC_PID=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $1}')
        XBMC_BIN=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $5}')
        ;;
    Linux)
        XBMC_PID=$(pidof xbmc.bin)
        XBMC_BIN="xbmc"
        ;;    
    *)
        echo "I don't support this OS!"
        exit 1
        ;;
esac


# Is XBMC running?
if [ -n $XBMC_PID ]
then
    kill $XBMC_PID # Shutdown nice
    echo "Shutdown nice"
else
    echo "This script should only be run from within XBMC."
    exit
fi

# Wait for the kill
# sleep


# Is XBMC still running?
if [ -n $XBMC_PID ]
then
        kill -9 $XBMC_PID # Force immediate kill
    echo "Shutdown hard"    
fi

echo "$@"

# Launch app - escaped!
"$@"


# SOMETIMES xbmc starts too fast, and on some hardware if there is still a millisecond of sound being used, XBMC starts witout sound and some emulators say there is a problem with the sound hardware. If so, remove comment:
#sleep 1


# Done? Restart XBMC
$XBMC_BIN &



- htpc guy - 2010-11-07

@malte

How do you implement this bash script. Are you using this to replace launcher.sh?


- malte - 2010-11-07

Yes, should be enough.


- htrodscott - 2010-11-29

So I HAD my system working... XBMC Live (Dharma Beta 3) on a USB thumb drive running on an Acer Aspire Revo 3610. Everything WAS working... and then my thumb drive failed.

I've now installed Live (Dharma RC1) on the HDD of the PC. I've installed Launcher and Mupen64Plus. It launches fine, but XBMC is on in the background and Mupen could use some more cycles... So I installed xfwm4 Windows Manager and set it to run at startup by modding the runXBMC file as per these instructions. I've also created a launcher.sh file and modified my launchers.xml file as per post 66 in this thread and made it executable as per post 70. This is exactly what I did the first time when Dharma Beta 3 was installed on a thumb drive. It worked then... Now it doesn't. When I choose a rom to launch, it blinks back to the menu.

These are my files:

launch xfwm4 at startup
/usr/bin/runXBMC
Code:
echo "#!/bin/bash" >  /home/$xbmcUser/.xsession
[b]echo "/usr/bin/xfwm4&" >>  /home/$xbmcUser/.xsession[/b]
echo "/usr/bin/xbmc --standalone" >>  /home/$xbmcUser/.xsession

code to kill XBMC while emu runs
/home/xbmc/launcher.sh
Code:
usrbinkillall -STOP xbmc.bin
$@
usrbinkillall -CONT xbmc.bin
followed by a sudo chmod +x /home/xbmc/launcher.sh command to make it executable.

the launcher portion of my launchers.xml file
<long path>/launchers.xml
Code:
<launcher>
        <name>Nintendo 64</name>
        <application>/home/xbmc/launcher.sh</application>
        <args>/usr/games/mupen64plus --fullscreen --noask</args>
        <rompath>/home/xbmc/Roms/N64/</rompath>
        <romext>zip|ZIP|Zip</romext>
        <thumb>/home/xbmc/Roms/N64 png.png</thumb>
        <wait>true</wait>
        <roms> ...

        </roms>
    </launcher>

I think the problem is that either the windows manager xfwm4 isn't running, or the launcher.sh script isn't working. Is there a way I can check to see if the windows manager is running? Does any one else have a good idea as to why it wouldn't work this time around when it worked the last time?

Remember, If I point launchers.xml directly towards the emulator, it works... just too slowly. There is nothing wrong with any other part of the launchers.xml file.

Thanks in advance.

Edit 1:
Found error #1
in launcher.sh file
usrbinkillall should be /usr/bin/killall

Edit 2:
Found some errors in my xsessions log. I hope this helps. It seems as if the emus can't find the roms but I've triple checked the paths. I'm sure they're right.
_____________________________________________________________________________
Rebooted and tried to launch a rom with mednafen
_______________________________________________________________________________
Xsession: X session started for xbmc at Sun Nov 28 23:03:51 PST 2010

** (xfwm4:1313): WARNING **: The display does not support the XComposite extension.

** (xfwm4:1313): WARNING **: Compositing manager disabled.
xbmc.bin
: no process found
Starting Mednafen 0.8.C
Loading settings from "/home/xbmc/.mednafen/mednafen.cfg"...
Compiled against SDL 1.2.14, running with SDL 1.2.14

Initializing joysticks...
Joystick 0 - Logitech Logitech Cordless RumblePad 2 - Unique ID: 080e4a1ee1ed960b
Joystick 1 - Logitech Logitech Cordless RumblePad 2 - Unique ID: 080e4a1ee1ed960c
Loading /home/xbmc/Roms/NES/1942.nes
...

Error opening "/home/xbmc/Roms/NES/1942.nes
": No such file or directory
Xsession: X session started for xbmc at Sun Nov 28 23:14:06 PST 2010

** (xfwm4:1306): WARNING **: The display does not support the XComposite extension.

** (xfwm4:1306): WARNING **: Compositing manager disabled.
xbmc.bin
: no process found
Starting Mednafen 0.8.C
Loading settings from "/home/xbmc/.mednafen/mednafen.cfg"...
Compiled against SDL 1.2.14, running with SDL 1.2.14

Initializing joysticks...
Joystick 0 - Logitech Logitech Cordless RumblePad 2 - Unique ID: 080e4a1ee1ed960b
Joystick 1 - Logitech Logitech Cordless RumblePad 2 - Unique ID: 080e4a1ee1ed960c
Loading /home/xbmc/Roms/NES/Super...

Error opening "/home/xbmc/Roms/NES/Super": No such file or directory
xfwm4: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
________________________________________________________________________________
Rebooted and tried to launch rom with Mupen64Plus
________________________________________________________________________________
Xsession: X session started for xbmc at Sun Nov 28 23:15:19 PST 2010

** (xfwm4:1313): WARNING **: The display does not support the XComposite extension.

** (xfwm4:1313): WARNING **: Compositing manager disabled.
xbmc.bin
: no process found

(mupen64plus:1404): Pango-CRITICAL **: pango_layout_get_context: assertion `layout != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_context_get_language: assertion `context != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_context_get_metrics: assertion `PANGO_IS_CONTEXT (context)' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_font_metrics_get_approximate_char_width: assertion `metrics != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_font_metrics_get_approximate_digit_width: assertion `metrics != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_layout_get_context: assertion `layout != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_context_get_language: assertion `context != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_context_get_metrics: assertion `PANGO_IS_CONTEXT (context)' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_font_metrics_get_ascent: assertion `metrics != NULL' failed

(mupen64plus:1404): Pango-CRITICAL **: pango_font_metrics_get_descent: assertion `metrics != NULL' failed
__ __ __ _ _ ____ _
| \/ |_ _ _ __ ___ _ __ / /_ | || | | _ \| |_ _ ___
| |\/| | | | | '_ \ / _ \ '_ \| '_ \| || |_| |_) | | | | / __|
| | | | |_| | |_) | __/ | | | (_) |__ _| __/| | |_| \__ \
|_| |_|\__,_| .__/ \___|_| |_|\___/ |_| |_| |_|\__,_|___/
|_| http://code.google.com/p/mupen64plus/
Version 1.5

Config Dir: /home/xbmc/.config/mupen64plus/
Data Dir: /home/xbmc/.local/share/mupen64plus/
Cache Dir: /home/xbmc/.cache/mupen64plus/
Install Dir: /usr/share/mupen64plus/
Plugin Dir: /usr/lib/mupen64plus/

Rescanning rom cache.
Rom cache up to date. 0 ROMs.
Error: Couldn't load Rom!
Rom cache system terminated!
xfwm4: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
______________________________________________________________________________
Rebooted and tried to launch rom with zsnes
______________________________________________________________________________
Xsession: X session started for xbmc at Sun Nov 28 23:16:33 PST 2010

** (xfwm4:1325): WARNING **: The display does not support the XComposite extension.

** (xfwm4:1325): WARNING **: Compositing manager disabled.
xbmc.bin
: no process found
ZSNES v1.51, © 1997-2007, ZSNES Team
Be sure to check http://www.zsnes.com/ for the latest version.

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)
ZSNES comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions;
please read 'LICENSE.TXT' thoroughly before doing so.

Use ZSNES -? for command line definitions.

Starting Mouse detection.
Unable to poll /dev/input/event7. Make sure you have read permissions to it.
Unable to poll /dev/input/event6. Make sure you have read permissions to it.
Unable to poll /dev/input/event5. Make sure you have read permissions to it.
Unable to poll /dev/input/event2. Make sure you have read permissions to it.
Unable to poll /dev/input/event1. Make sure you have read permissions to it.
Unable to poll /dev/input/event0. Make sure you have read permissions to it.
ManyMouse: 0 mice detected.
Error opening file!
___________________________________________________________________


- htrodscott - 2010-11-30

I hate to do this...

Bump...

Anyone out there that can help?

Thanks.


- htpc guy - 2010-11-30

htrodscott Wrote:I hate to do this...

Bump...

Anyone out there that can help?

Thanks.

I would love to see a solution for this as well. I have the exact same problem. I can launch the roms directly but if I try using the launchers.sh file it can't find the roms.

I'm using RC1, so I'm wondering if the lauchers.sh script is targeted towards Camolot. Is anyone able to get this working on RC1 (or any of the Dharma Beta's since I had the same issue with those as well).


- htrodscott - 2010-11-30

htpc guy-

I had this exact setup working with Dharma Beta 3 running on a USB thumb drive. It worked great. When that drive failed, I reinstalled Dharma RC1 to the HDD of the PC, following all my steps from the first time, and now I can't get it to work. Go figure.


- htrodscott - 2010-12-01

Problem solved... but I'm not sure why.

I can now launch mednafen, mupen64plus and zsnes via the launcher.sh method (killing XBMC Live when emu launches) and it works great. Here's the weird part. Before when I set this up with Dharma Beta 3 on a USB thumb drive, I needed to install a windows manager (xfwm4) to make it work. This time, I didn't. I have no idea why.

Like I said in a post a few back, I installed Dharma RC1 to the HDD of my Revo 3610. I could launch the emus directly (calling the emu application from the <application> section of the launchers.xml file), but when I edited the launchers.xml file to call the launcher.sh file it would blink directly back to the menu. I installed a windows manager (xfwm4) and set it to run when XBMC starts. The emus still wouldn't start correctly.

Out of frustration, I tried installing Dharma RC1 again (on the same PC where it was on the HDD) on a USB thumb drive in the hope that it might work this time. It worked this time, and without the windows manager. I then reinstalled it to the HDD using the exact same steps, and it worked as well. I've got the install steps below.

1) Download Dharma RC1 Live iso and burned it to a disc, then booted to it.
2) Create a bootable USB thumb drive with BDW from the programs section of the Dharma RC1 Live Disc.
3) Boot to that USB thumb drive on Revo and do a guided full disc install to either the HDD or to another USB thumb drive. That art doesn't seem to matter other than a HUGE speed increase when running it off the HDD.
4) Reboot when done.
5) Install Launcher add-on in Programs
6) Press ctrl+alt+F2 to get to prompt and login as xbmc
7) Change root password...
sudo passwd root
8) update the system...
sudo apt-get update
9) Install the emu...
sudo apt-get install mupen64plus (or any other emu)
10) Make a roms folder...
sudo mkdir /home/xbmc/roms
11) make a system specific rom folder...
sudo mkdir /home/xbmc/roms/N64 (or any other system specific rom folder)
12) FTP rom files into recently created folder (/home/xbmc/roms/N64) as root
13) Start Launcher
14) choose file launcher option
15) point it towards the emu application and the roms, add the arguments and the file extensions and give it a name (N64). I used most of the info from the first post of this thread. (for mupen64plus, I used --fullscreen --nogui --no ask)
16) Exit to the menu where it lists your emulator (N64). Bring up the context menu (letter "c" on the keyboard when you're highlighting the correct emu) and choose scan directory for roms (not the exact wording). If you select the emu (N64) and it asks you to add roms, it tends to hang, so I do it this other way and it works.
17) Now, I choose a rom and launch the emu to make sure it works when it's set up like this. If your sound is working (another topic completely), you'll probably hear clicks from XBMC in the background when you're playing a game. Assuming it works, move on. If it doesn't, I found that the arguments are finnicky. Try playing around with them by editing them in nano.
18) Now, make the launcher.sh file...
sudo nano /home/xbmc/launcher.sh
19) enter the code below, then write it out (save it) by "ctrl + o", then "enter" to select the name, then "ctrl + x" to exit nano.
Code:
usr/bin/killall -STOP xbmc.bin
$@
usr/bin/killall -CONT xbmc.bin
20) make the launcher.sh file executable...
sudo chmod +x /home/xbmc/launcher.sh
It doesn't tell you it did anything... but it does.
21) edit the launchers.xml file. The <application> section should now point to the launcher.sh file and the path to the emu should be in the <args> section. I've shown the useful part of mine below.
Code:
<name>N64</name>
                <application>/home/xbmc/launcher.sh</application>
                <args>/usr/games/mupen64plus --fullscreen --nogui --noask </args>
                <rompath>/home/xbmc/roms/N64/</rompath>
                <romext>zip|Zip|ZIP</romext>
22) Reboot
23) Try launching the emu by choosing a rom. Hopefully it works. It did for me. I know XBMC is killed in the background, because I don't hear the background clicks from XBMC when I'm playing the games, and the emu runs more smoothly.

A few minor notes...
- I tried to do all editing changes in nano with the sudo command. In the past, I would FTP the file to my desktop, edit it and FTP it back, but this occasionally caused permissions issues. Editing the files in nano doesn't seem to cause these problems.
-To get the sound to work on the Revo, I modified my .asoundrc file in nano as per this post and changed all the audio settings to HDMI. I then rebooted and it fixed my menu sounds and the emu sounds.
-I'm NO Linux genius. I'm constantly learning. If there are some commands i used or steps I took that seem silly, it's because I didn't know any better.

I hope this helps someone.


- htpc guy - 2010-12-01

@htrodscott
I'm running a full lucid install. Are there any extra steps to take. I have created the launchers.sh file, made it excicutible and set up the launcher.xml file just like yours. When I run it xbmc blinks away and comes back. The readout in the terminal says Couldn't load Rom!. I wouldn't think that this is an issue with a windows manager because its a full lucid install.

Can anyone help me here?


- htrodscott - 2010-12-01

I forgot that you said that in an earlier post... Sorry.

Like I said, I'm learning this from a XBMC Live minimal install of Linux. I don't know how similar they are. I wish I could be of more help. It's a frustrating place to be.


- fryster - 2011-01-18

Hi,
Thanks for the great guide, using this and advanced launcher plugin I've got most emulators working.

I'm having problems getting MAME to work, I get the loading screen up and then right as it's about to load it kicks me out. Can someone give me an idiots guide to getting it up and running! Many Thanks!


This forum uses Lukasz Tkacz MyBB addons.