Linux - XBMC Live, Advanced Launcher issues

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #1
I've installed the Advanced Launcher plugin, and have set the plugin up correctly (or so I thought?). However, there are a couple of problems, and I'm hoping someone could help me on these.

First, the only way I've found to get a rom to load (zsnes) is to disable fullscreen, which gives me only the left top corner of the screen, until I start a ROM. Do we have a workaround to resolve this? I can always go back to the system settings and change it back to fullscreen afterwards, but thats kind of impractical.

Now here's the big one; I'm using a Logitech Dual Action Gamepad, and I have it set-up in zsnes. The problem is after I've hit a few buttons, somehow its also controlling XBMC in the backround, causing music to play, movies to start, starting the audio mixer, etc etc., and just now caused XBMC to restart!!! There is no way I can play a game with that happening!! I tried disabling LIRC to maybe shut my RC off, but that didnt make a difference. Any ideas anyone??
find quote
Angelscry Offline
Skilled Python Coder
Posts: 3,300
Joined: Sep 2010
Reputation: 53
Location: MTL, Canada
Post: #2
(2012-04-09 20:59)douglasdouglasj Wrote:  I've installed the Advanced Launcher plugin, and have set the plugin up correctly (or so I thought?). However, there are a couple of problems, and I'm hoping someone could help me on these.

First, the only way I've found to get a rom to load (zsnes) is to disable fullscreen, which gives me only the left top corner of the screen, until I start a ROM. Do we have a workaround to resolve this? I can always go back to the system settings and change it back to fullscreen afterwards, but thats kind of impractical.
You need to create a files launcher for ZSNES and not a stand alone launcher. So, you will not need to disable fullscreen to choose a rom. It will do it automatically. Here is a tutorail for files launcher creation : http://www.youtube.com/watch?v=9Pl-3yEDgUY and here is the WIKI page for ZSNES configuration under linux : http://www.gwenael.org/xbmc/index.php?title=ZSNES#Linux

(2012-04-09 20:59)douglasdouglasj Wrote:  Now here's the big one; I'm using a Logitech Dual Action Gamepad, and I have it set-up in zsnes. The problem is after I've hit a few buttons, somehow its also controlling XBMC in the backround, causing music to play, movies to start, starting the audio mixer, etc etc., and just now caused XBMC to restart!!! There is no way I can play a game with that happening!! I tried disabling LIRC to maybe shut my RC off, but that didnt make a difference. Any ideas anyone??
You need to suspend XBMC when playing your rom. You could do this by creating and using a .sh script : http://www.gwenael.org/forum/viewtopic.php?id=39


Here is the .sh script I use for ZSNES on my proper HTPC :

Code:
#!/bin/bash

# Hide and suspend XBMC
wmctrl -r "XBMC Media Center" -t 1
killall -STOP xbmc.bin

# start application
/usr/bin/zsnes -m -s -v 4 "$1"

# restore screen resolution
xrandr -s 640x480
xrandr -s 1360x768

# restore and show XBMC
killall -CONT xbmc.bin
wmctrl -r "XBMC Media Center" -t 0

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

(This post was last modified: 2012-04-09 21:40 by Angelscry.)
find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #3
OK, I'll try the script. When I installed zsnes I did install under file launcher, and again, xbmc needs to be in windowed mode. However, when I use mednafen, no resolution changes are necessary. I'll try the suspended method.

In regards to the controller issue, I ended up deleting the keymap I created in /.xbmc/userdata/keymap for my dual action controller, and that solved the issue of the gamepad controlling xbmc while in a game.

I also have another issue within gameplay, where around the 10 minute mark, the screen goes blank, and I reach over and hit a random button on my remote, and the screen comes back. I changed the screensaver setting to 60 minutes, but no change in results. Perhaps the script will address that issue as well.
find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #4
Tried the script, and instead of the emu loading, the screen flickers and goes right back to the emu listing. Perhaps I didn't write the script correctly? Here's what I have;

#!/bin/bash

# Hide and suspend XBMC
wmctrl -r "XBMC Media Center" -t 1
killall -STOP xbmc.bin

# start application
/usr/bin/zsnes -m -s -v 4 "$1"

# restore screen resolution
xrandr -s 640x480
xrandr -s 1360x768

# restore and show XBMC
killall -CONT xbmc.bin
wmctrl -r "XBMC Media Center" -t 0


I also modified my launcher.xml to this;

<id>ba4bdc6a4d25dd64c5aeee1a6ba9b807</id>
<name>zsnes</name>
<application>/home/upstairs/.xbmc/script/zsnes-launcher.sh</application>
<args>-s -v 22 "%rom%"</args>

Does this look correct?
find quote
Angelscry Offline
Skilled Python Coder
Posts: 3,300
Joined: Sep 2010
Reputation: 53
Location: MTL, Canada
Post: #5
(2012-04-11 20:42)douglasdouglasj Wrote:  Tried the script, and instead of the emu loading, the screen flickers and goes right back to the emu listing. Perhaps I didn't write the script correctly? Here's what I have;

#!/bin/bash

# Hide and suspend XBMC
wmctrl -r "XBMC Media Center" -t 1
killall -STOP xbmc.bin

# start application
/usr/bin/zsnes -m -s -v 4 "$1"

# restore screen resolution
xrandr -s 640x480
xrandr -s 1360x768

# restore and show XBMC
killall -CONT xbmc.bin
wmctrl -r "XBMC Media Center" -t 0


I also modified my launcher.xml to this;

<id>ba4bdc6a4d25dd64c5aeee1a6ba9b807</id>
<name>zsnes</name>
<application>/home/upstairs/.xbmc/script/zsnes-launcher.sh</application>
<args>-s -v 22 "%rom%"</args>

Does this look correct?
No... launcher arguments must be only
Quote:<args>"%rom%"</args>
as they are already indicated into the zsnes-launcher.sh file. Also modify this last one yo have the right patrameters correasponding to your system :
Quote:# start application
/usr/bin/zsnes -m -s -v 22 "$1"
...

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #6
Forgive my ignorance of code, I'm learning as I go... I changed the launcher arguements back to %rom%, and changed my zsnes launcher script to;

# start application
/usr/bin/zsnes -s -v 22 -ad sdl -r 6 "$1"

These were the arguements which I initally used, leaving the -m out to be able to configure my gamepad. At this point, after editing the script and launchers.xml file, instead of the flicker and back to menu, I get a blank screen, and I have to hard reboot. Ideas?
find quote
Angelscry Offline
Skilled Python Coder
Posts: 3,300
Joined: Sep 2010
Reputation: 53
Location: MTL, Canada
Post: #7
(2012-04-11 21:45)douglasdouglasj Wrote:  Forgive my ignorance of code, I'm learning as I go... I changed the launcher arguements back to %rom%, and changed my zsnes launcher script to;

# start application
/usr/bin/zsnes -s -v 22 -ad sdl -r 6 "$1"

These were the arguements which I initally used, leaving the -m out to be able to configure my gamepad. At this point, after editing the script and launchers.xml file, instead of the flicker and back to menu, I get a blank screen, and I have to hard reboot. Ideas?
Try to remove :
Quote:# restore screen resolution
xrandr -s 640x480
xrandr -s 1360x768
form of the script. Xrandr commands are optional, they are just here to restore the screen resolution to 1360x768 after you close the ZSNES emulator. But if your screen resolution is not 1360x768, it can effectively create some problems or freeze your system.

Also for the wmctrl command be sure that you have at least 2 virtual desktops on your system. BTW, you could try at first with this simplified script :

Quote:#!/bin/bash

# Suspend XBMC
killall -STOP xbmc.bin

# start application
/usr/bin/zsnes -s -v 22 -ad sdl -r 6 "$1"

# restore XBMC
killall -CONT xbmc.bin

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

(This post was last modified: 2012-04-11 22:13 by Angelscry.)
find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #8
OK, tried removing those lines, no change. I did however get the script for mednafen to load and play the game; however, I still have the sleep issue. Would it make a difference since I'm running XBMC live instead of XBMC Linux? I am running in 1360x768 btw.
(This post was last modified: 2012-04-11 22:28 by douglasdouglasj.)
find quote
Angelscry Offline
Skilled Python Coder
Posts: 3,300
Joined: Sep 2010
Reputation: 53
Location: MTL, Canada
Post: #9
(2012-04-11 22:26)douglasdouglasj Wrote:  OK, tried removing those lines, no change. I did however get the script for mednafen to load and play the game; however, I still have the sleep issue. Would it make a difference since I'm running XBMC live instead of XBMC Linux? I am running in 1360x768 btw.
If you are able to make the script works for mednafen, that's mean that there is something wrong into the command line of your ZSNES script.
Quote:...
/usr/bin/zsnes -s -v 22 -ad sdl -r 6 "$1"
...
. But it looks correct for me. I do not know why it is not working.

For the sleep issue, that not simple. Sleep mode is defined by XBMC, the windows manager and/or the X server. But the way it is managed is different depending which XBMC version you are using (XBMC Live, XBMC Linux ou XBMCbuntu). Also it depend of the emulator you are running. With some emulators, once they are running there is no problem. With other ones, they automatically shutdown after a certain time of inactivity. You can wake up using the gamepad. But for some emulators you need to close it to get focus back. And with other emulators, after a certain time, even if you are playing games, the system turn into sleep mode... Then, finally, into rare case, the sleep mode make crashing the emulator. So it's seems that there is no real rules how is managed the sleeping mode. But here is what you can try :

You can try to disable the XBMC sleeping mode (into settings).
You can also try to disable the sleeping mode under linux : http://www.cyberciti.biz/tips/linux-disa...blank.html
I you are under ubuntu you can try to disable the screensaver : http://home4film.com/questions/337/how-c...is-running

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #10
Yesterday I did some digging for sleep issues during emu gameplay, and found that there is a method to disable system sleep in the /etc/X11/xorg.conf - I added this to the config;

Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection

I restarted XBMC, and it works great!
find quote
Angelscry Offline
Skilled Python Coder
Posts: 3,300
Joined: Sep 2010
Reputation: 53
Location: MTL, Canada
Post: #11
Great. Thank you for the tips...

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #12
Seems I've spoke too soon... Not sure what happened, but zsnes was working great, up until yesterday, when the issue of buttons pushed during gameplay activated things in xbmc. I restarted xbmc, only to find two things; 1> xbmc was in windowed mode again and 2> zsnes and a few other emulators were missing from my advanced launcher menu, and I had to re-install all of those! very, very strange. I tried to re-install zsnes, and am back to the problem of zsnes not loading. parameters are exactly as they were before... xorg.conf however was not affected.
(This post was last modified: 2012-04-26 18:41 by douglasdouglasj.)
find quote
Angelscry Offline
Skilled Python Coder
Posts: 3,300
Joined: Sep 2010
Reputation: 53
Location: MTL, Canada
Post: #13
(2012-04-26 18:40)douglasdouglasj Wrote:  Seems I've spoke too soon... Not sure what happened, but zsnes was working great, up until yesterday, when the issue of buttons pushed during gameplay activated things in xbmc. I restarted xbmc, only to find two things; 1> xbmc was in windowed mode again and 2> zsnes and a few other emulators were missing from my advanced launcher menu, and I had to re-install all of those! very, very strange. I tried to re-install zsnes, and am back to the problem of zsnes not loading. parameters are exactly as they were before... xorg.conf however was not affected.
If you use exactly the same parameters for your ZSNES launcher and that is not working, that's mean that you have changed something into the ZSNES configuration. I think I will be a good idea to use the -m argument into your command line when you use ZSNES with Advanced Launcher. Once ZSNES will be started, it will disable the GUI and So ZSNES will take all the focus and you will not have issues. That's really, really, strange that something as happened into XBMC when this one was suspended. Frown

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #14
Well here we are again. I now have Frodo, and have Advanced Launcher instaled, and again trying to get mednafen and zsnes to work properly. this time, using scripts doesen't work, so im changing the config files. Here's how far I've gotten;

Mednafen;

Changed fullscreen to fs 1 in the mednafen.cfg file - this worked one time, changed the resolution from 1360x768 to 640x680/76Hz,rom working, no sound.

After rebooting tried this again, and resolution changed again, this time no picture. I'm controlling thru SSH, so i did a killall -9 mednafen to exit, and screen stayed in 640x480 mode, had to kilall-9 xbmc.bin to see what I was doing, lol

I havent tried to do anything with sound, I'm running thru HDMI, have no .asoundrc file in root, and have the cfg set to default on both driver and device. I'll work on that after I can get mednafen to keep a stable boot.

Im not using any arguements in the launchers file, as even using -fs 1 doesen't give me results. sidechaining into mednafen-launchers.sh has no effect either. The only thing that makes any changes is changing the mednafen.cfg file itself. Changing the resolution inside the config file to 1360x768 does nothing, no flicker, no screen change, nothing.

So the question is, what am I doing wrong here? I don't recall having any of these problems with Eden.
find quote
douglasdouglasj Offline
Junior Member
Posts: 19
Joined: Mar 2012
Reputation: 0
Post: #15
This might help, here are my stats on what i'm running;

upstairs@upstairs-MCP7A:~$ lspci
00:00.0 Host bridge: NVIDIA Corporation MCP79 Host Bridge (rev b1)
00:00.1 RAM memory: NVIDIA Corporation MCP79 Memory Controller (rev b1)
00:03.0 ISA bridge: NVIDIA Corporation MCP79 LPC Bridge (rev b2)
00:03.1 RAM memory: NVIDIA Corporation MCP79 Memory Controller (rev b1)
00:03.2 SMBus: NVIDIA Corporation MCP79 SMBus (rev b1)
00:03.3 RAM memory: NVIDIA Corporation MCP79 Memory Controller (rev b1)
00:03.4 RAM memory: NVIDIA Corporation Device 0a98 (rev b1)
00:03.5 Co-processor: NVIDIA Corporation MCP79 Co-processor (rev b1)
00:04.0 USB controller: NVIDIA Corporation MCP79 OHCI USB 1.1 Controller (rev b1)
00:04.1 USB controller: NVIDIA Corporation MCP79 EHCI USB 2.0 Controller (rev b1)
00:06.0 USB controller: NVIDIA Corporation MCP79 OHCI USB 1.1 Controller (rev b1)
00:06.1 USB controller: NVIDIA Corporation MCP79 EHCI USB 2.0 Controller (rev b1)
00:08.0 Audio device: NVIDIA Corporation MCP79 High Definition Audio (rev b1)
00:09.0 PCI bridge: NVIDIA Corporation MCP79 PCI Bridge (rev b1)
00:0a.0 Ethernet controller: NVIDIA Corporation MCP79 Ethernet (rev b1)
00:0b.0 IDE interface: NVIDIA Corporation MCP79 SATA Controller (rev b1)
00:0c.0 PCI bridge: NVIDIA Corporation MCP79 PCI Express Bridge (rev b1)
00:10.0 PCI bridge: NVIDIA Corporation MCP79 PCI Express Bridge (rev b1)
00:15.0 PCI bridge: NVIDIA Corporation MCP79 PCI Express Bridge (rev b1)
00:16.0 PCI bridge: NVIDIA Corporation MCP79 PCI Express Bridge (rev b1)
00:17.0 PCI bridge: NVIDIA Corporation MCP79 PCI Express Bridge (rev b1)
03:00.0 VGA compatible controller: NVIDIA Corporation C79 [GeForce 9400] (rev b1)
06:00.0 IDE interface: JMicron Technology Corp. JMB368 IDE controller


aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC889A Analog [ALC889A Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC889A Digital [ALC889A Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

<launcher>
<id>ee8832b57e05e7c3c49f23b28aaa9776</id>
<name>NES1</name>
<category>default</category>
<application>/usr/games/mednafen</application>
<args>"%ROM%"</args>
<rompath>/home/upstairs/roms/NES/</rompath>
<thumbpath>/home/upstairs/roms/NES/art/</thumbpath>
<fanartpath>/home/upstairs/roms/NES/art/</fanartpath>
<trailerpath></trailerpath>
<custompath></custompath>
<romext>zip|pce|gba|gb|gbc|lnx|ngc|ngp|wsc|ws|nes</romext>
<platform>Nintendo Entertainment System</platform>
<thumb></thumb>


mednafen.cfg (0.8.D.3)

;Full-screen horizontal resolution.
nes.xres 640

;Full-screen vertical resolution.
nes.yres 480


...And heres the debug log for the process;
:31:58 T:2846870336 NOTICE: [plugin.program.advanced.launcher] default category folder > Launcher list
15:31:58 T:2920282944 NOTICE: Thread Background Loader start, auto delete: false
15:31:59 T:2846870336 NOTICE: Thread XBPyThread start, auto delete: false
15:31:59 T:2846870336 NOTICE: -->Python Interpreter Initialized<--
15:31:59 T:2846870336 NOTICE: [plugin.program.advanced.launcher] Initialisation
15:31:59 T:2920282944 NOTICE: Thread Background Loader start, auto delete: false
15:32:00 T:2846870336 NOTICE: Previous line repeats 1 times.
15:32:00 T:2846870336 NOTICE: Thread XBPyThread start, auto delete: false
15:32:00 T:2846870336 NOTICE: -->Python Interpreter Initialized<--
15:32:00 T:2846870336 NOTICE: [plugin.program.advanced.launcher] Initialisation
15:32:00 T:2846870336 WARNING: Attempt to use invalid handle -1
15:32:00 T:2846870336 WARNING: Previous line repeats 4 times.
15:32:00 T:2846870336 NOTICE: [plugin.program.advanced.launcher] application : /usr/games/mednafen
15:32:00 T:2846870336 NOTICE: [plugin.program.advanced.launcher] arguments : "/home/upstairs/roms/NES/Legend of Zelda.nes"
15:32:12 T:2846870336 NOTICE: Thread XBPyThread start, auto delete: false
15:32:12 T:2846870336 NOTICE: -->Python Interpreter Initialized<--
15:32:13 T:2846870336 NOTICE: [plugin.program.advanced.launcher] Initialisation
15:32:13 T:2846870336 NOTICE: [plugin.program.advanced.launcher] default category folder > Launcher list
15:32:13 T:2717289280 NOTICE: Thread Background Loader start, auto delete: false
15:32:13 T:2846870336 NOTICE: Thread XBPyThread start, auto delete: false
15:32:13 T:2846870336 NOTICE: -->Python Interpreter Initialized<--
15:32:13 T:2846870336 NOTICE: [plugin.program.advanced.launcher] Initialisation
15:32:13 T:2846870336 NOTICE: [plugin.program.advanced.launcher] Advanced Launcher root folder > Categories list
15:32:13 T:2717289280 NOTICE: Thread Background Loader start, auto delete: false
15:32:15 T:2729372480 NOTICE: Previous line repeats 3 times.
find quote
Post Reply