[LIVE] Complete EMUs/ROMs in Live (Acer Revo)

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Izod517 Offline
Member
Posts: 97
Joined: Apr 2010
Reputation: 0
Post: #1
Cowriter: TheDuffMan
Might as well be Cowriter: phearless-d


Some great work from various users on the board made this possible. I ran into a ton of issues when trying to set my Acer 1600 up with EMUs in a Live enviornment so I thought I would compile everything into a Acer specfic thread. This should work for most Live installs, but there were certain issues on the Revo that Duffman and I solved. I'm going to cover SNES, NES / GBA / GB, and Genesis / Sega CD. This should be enough to get any Linux emu running though. There are other emulators than the ones I used, but I found them all to be problematic with in the Live/Acer enviornment (Kega, FCEU, etc.). The writers are seeing NO slow down in boot times, or any problems within XBMC using this method.

BIG thanks to phearless-d, Zosky, Leo2, fuz1on, grassmunk and TheDuffman. Also to http://lifehacker.com/5523672/turn-your-...me-console that gave Duff and I the initial inspiration to being on the quest for an Acer Revo XBMC EMU enabled box.

The big starting point for me was this thread:

http://forum.xbmc.org/showthread.php?p=5...post533162

I'll be repeating some of the information there.

ZSNES:
All below is paraphrased from phearless:
Follow the first post in the thread above to the letter.
Terminal: sudo apt-get update then sudo apt-get install zsnes.
Install Launcher to XBMC if you haven't already:
Download Launcher from http://code.google.com/p/xbmc-launcher/downloads/list
---> Addendum: JustSomeUser has a patch for Launcher, DuffMan and I are using it - http://forum.xbmc.org/showpost.php?p=464...tcount=582 - highly recommended.
unzip and sftp it over to /home/xbmc/.xbmc/plugins/programs
Create a directory tree /.xbmc/userdate/plugin_data/Launcher if it does not exsists, and a create/edit a launchers.xml file to phearless's directions.
Edit the Launcher script according to phearless.
End paraphrase.

Now as an Acer user you'll have ZSNES running, but without sound.

Here's how to fix that (credit TheDuffMan):
.asoundrc has only the following line, nothing else:

Code:
defaults.pcm.device 3

XBMC Audio settings:

Audio Output Device: DEFAULT
Passthrough Output Device: CUSTOM
Custom Passthrough Device: plughw:0,3

--> A note on hardware devices for non revo users when setting up plughw. If you're trying this guide on something other than a Revo, your HDMI audio device may be different. Run "aplay -l" in the terminal and check the HDMI results for card X, device Y, and fill in plughw:X,Y accordingly.

With that we solved a whole world of issues, and we don't lose any sound options in XBMC (even menu nav sounds).

Suggested args for ZSNES:
Code:
<args>-m -s -v 18 -ad sdl -r 6</args>

Complete args here: http://zsnes-docs.sourceforge.net/html/advanced.htm

I personally use -v 22, which is the custom resolution. By editting /.zsnes/zsnesl.cfg:

Code:
; Custom Resolution X and Y for Custom Video Modes [256x224..2048x1536]
CustomResX=1440
CustomResY=1080
This gave me the proper aspect ratio etc. You may have to play with that for your TV, but that should work fine for most 1080p TVs.

On a 720p TV try:
Code:
; Custom Resolution X and Y for Custom Video Modes [256x224..2048x1536]
CustomResX=1360
CustomResY=768
As suggested by grassmunk. This may or may not work for you - and may cut off some pixels. This is going to be a bit of trial and error if you want the perfect resolution.

When you need to exit a game on ZSNES and return to XBMC hit ESC.

Genesis / Sega CD:

Gens is fairly simple once you've setup ZSNES and followed the phearless instructions.

Open up terminal or Putty in:
Code:
sudo apt-get install gens

You may need to add the -f argument to the above to get additonal packages that are needed for Gens to run/install properly.
sudo apt-get install -f gens
Terminal will tell you if this is needed.

Edit launchers.xml and add:
Code:
<launcher>
        <name>SEGA Genesis</name>
        <application>/usr/bin/gens</application>
        <args>--quickexit</args>
        <rompath>/home/xbmc/ROMS/GENESIS/</rompath>  
***YOUR PATH TO YOUR ROMS***
        <romext>gen|zip|GEN|ZIP|Zip|Gen</romext>
        <thumb></thumb>
        <wait>true</wait>
</launcher>

Launch it and see if it is working. It probably is but not in true fullscreen and possibly without audio. To fix that hit ALT+ENTER while a ROM is running, and click through the menus in Gens to change your backend to OpenGL+SDL. While you are here you can also set a custom fullscreen resolution through the menu that best fits your TV. This can all be done by editting the .cfg file in your /.gens folder as well. When done hit ALT+ENTER again to get back to full screen. When you need to exit a game and return to XBMC hit CTRL+Q. DuffMan added --quickexit so Gens would have the same functionality as other EMUs and exit upon hitting ESC. I required no args but I did make some personal changes to the cfg file based on preferences. Complete args available are here:
http://ubuntuforums.org/showthread.php?t=447293
*If someone has a better list of gens args please let me know.*

NES / GBA / GB:
Mednafen's setup follows the same route as the Genesis set up.

Terminal:
Code:
sudo apt-get install mednafen

Add this to launchers.xml (for NES)
Code:
<launcher>
        <name>NES</name>
        <application>/usr/games/mednafen</application>
        <args>-nes.xres 960 -nes.yres 700 -fs 1 -sounddriver sdl</args>
        <rompath>/home/xbmc/ROMS/NES/</rompath>
        <romext>nes|zip|ZIP|NES|Nes|Zip</romext>
        <thumb></thumb>
        <wait>true</wait>
</launcher>

-nes.xres and -nes.yres are optional, they are what fits my TV. The other args are not optional.
Complete mednafen args here:
http://mednafen.sourceforge.net/documentation/

GAMEPAD SETUP!

This one gave me some headaches, but in the end, it's actually VERY simple. If you are using a HID USB gamepad, this is going to be a cinch, otherwise you are in for some trouble that I cannot cover here... It would be it's own thread most likely. MOST gamepads in from the past 5 years or so are HID. Xbox gamepad setup is a little different, but if you have it working in general it should be the same (NOTE: As grassmunk pointed out some of the buttons on X360 controllers are considered sliders, this is true of some Logitech controllers as well, in that case you're going to need to use sudo apt-get install joystick, then run jscal -c /dev/input/js0 to set them up again that is an incomplete tutorial but there are plenty on the web for that). After you read this you'll wonder why it took me so long to figure out, but honestly there is little to no documentation for this and a lot of conflicting data out there.

ZSNES: Remove -m from your arguments in launchers.xml, this way you can get to the gui (with esc). From the gui enter the control setup.

Gens: ALT+ENTER to get to the gui, set up through gui.

Mednafen: ALT+SHIFT+x (which x is the number controller you want to set up, ALT+SHIFT+1 sets up controller 1) and follow on screen instructions.

Other possibilities: You can use a program like joy2keys to mimic specific keystrokes, including ESC and CTRL+Q to have remote exit. This is a bit messy so I opted for a $15 wireless keyboard (logitech "Wii" keyboard).


Common Issues:
I cannot import ROMs when scanning for them through XBMC!
Solution: sudo nano on launchers.xml may have jacked up your permissions, depending on how you editted the file:
NOTE: Make sure you properly set the permissions for this file so XBMC can write to it - if you created with sudo nano it may be set to root/root. Here's how to fix it from Terminal:

Code:
cd /home/xbmc/.xbmc/userdata/plugin_data/programs/Launcher/

write ls -l in the command line.

It should spit out something like this:

-rw-r--r-- 1 root root 570 2010-04-25 17:12 launchers.xml

See the "root root" there, well if that's the case XBMC cannot write to the file because it's owned by root and the group root.

sudo chown xbmc:xbmc luanchers.xml
sudo chmod 666 launchers.xml (optional)

Make sure it's correct:
ls -l
-rw-r--r-- 1 xbmc xbmc 570 2010-04-25 17:12 launchers.xml


I've still got sound issues!
You may be using a different sound driver package. This setup works for me with sudo apt-get install libsdl1.2-alsa. This seems to vary from user to user, some do better with -all some with -sdl some with -esd. I can tell you -alsa works perfectly for me on the Acer Revo 1600.

I need to see error logs!
grassmunk Wrote:To trouble shoot the other issues:
1) I created a script /home/xbmc/launcher.sh

Code:
echo "Launching... " > log.txt
echo $@ >> log.txt
echo "Program Log" >> log.txt
$@ >> log.txt

and made it executable (chmod +x /home/xbmc/launcher.sh)

2) I changed the launcher line to /home/xbmc/launcher.sh and the args line to /usr/bin/zsnes -m -v 20 -s

3) When I ran the script it would exit but only because of spaces when running games with no spaces in the name it would load (this is because of the script, not because of launcher just be aware). Now I was finally able to see zsnes logs and errors



My setup: Acer Revo 1600, 2GB ram, HDMI out to Sony Receiver, video passthrough to LG 1080p TV. Logitech Wireless Rumble 2. "Wii" Logitech Wireless keyboard (for remote exit of games and Terminal commands).

Again a BIG credit to everyone who worked hard on compiling this data, especially phearless and Duffman.

The final product in Alaska:
[Image: cover.jpg]

[Image: launcher.jpg]

[Image: snes.jpg]

[Image: nes.jpg]
Screen caps provided by TheDuffMan.

For approval for How-Tos.
(This post was last modified: 2010-05-07 07:26 by Izod517.)
find quote
grassmunk Offline
Senior Member
Posts: 122
Joined: Aug 2004
Reputation: 0
Post: #2
This thread is awesome and I must help! There is a way to make it so you can exit, save states etc.

ZSNES While you're setting up the keys just click on "MISC" and see the "Exit" line with the three green ---. Click there and press an unused button on your gamepad. From now on you'll exit with that button! I'm still playing around but I'm sure there's a way to enable save/load states with a button press.

MEDNAFEN This one I found was tricky. I had to "setup" my gamepad once and just kept pressing the same button over and over (the one you'd like to use to exit the game). Then once thats done open up the mednafen config:

nano /home/xbmc/.mednafen/mednafen.cfg

and look for this line: nes.input.port1.gamepad.a

Take everything following that line. Then find these lines

;Exit
command.exit keyboard 293~joystick 1c848bd15bdf6fa7 00000002

See that "joystick" line. Thats the line I added in there. Now whenever I hit the black button on my Xbox controller mednafen will exit. Just paste the item you copied in there and it should now let you exit the game. You can also do this for most settings in mednafen (setup a key to save/load states etc).

Finally I just found out the coolest thing about mednafen: It also supports Sega Master System and Game Gear games (undocumented). But the setup is the exact same. I have multiple Launchers now and its great.


Edit: How'd you get it to go in cover view? I can only get the names/boxes on the left Sad
(This post was last modified: 2010-05-07 21:04 by grassmunk.)
find quote
TheDuffMan Offline
ShareThe.TV admin
Posts: 272
Joined: Nov 2008
Reputation: 13
Post: #3
Great, great work Izod! This guide came out really well.

Thanks for the tips grassmunk, I think I'll setup SMS and game gear now just for fun with mednafen.

I forgot to add that to get the Panel view to work in Alaska for games, you need to make a small modification to Alaska's source code. By default, Panel view doesn't exist in the programs section.

Go to Alaska/720p/MyPrograms.xml, and look for this on line 9:

Code:
<include>Viewtype_List</include>

After that line, add this line:

Code:
<include>Viewtype_Panel</include>

Then, open Viewtype_Panel.xml. Look for line 23 which should look like this:

Code:
<visible>[Window.IsActive(501) | Window.IsActive(502) | Window.IsActive(25) | Window.IsActive(24)] + !Container.Content(episodes)</visible>

You need to add the condition for window 1. Change the line to read:

Code:
<visible>[Window.IsActive(501) | Window.IsActive(502) | Window.IsActive(25) | Window.IsActive(24) | Window.IsActive(1)] + !Container.Content(episodes)</visible>

Then, you need to make a choice whether you'd like to see the square panel view or tall panel view in programs. I find tall panel view looks best for games like NES, but square panel view has worked better as an all around view for both boxed size games (i.e. gameboy) and nes games with not too much stretching. Change line 24 from:

Code:
<include condition="Window.IsActive(501) | Window.IsActive(502)">SquarePanel</include>

to

Code:
<include condition="Window.IsActive(501) | Window.IsActive(502) | Window.IsActive(1)">SquarePanel</include>

Or change line 25 with a similar change.

Finally, we need to make the same change to include that beautiful wide panel view that works great for SNES, N64 boxes, etc. Look for line 46:

Code:
<visible>Container.Content(tvshows) | Container.Content(seasons) | Container.Content(episodes) | Window.IsActive(2)</visible>

Change to:

Code:
<visible>Container.Content(tvshows) | Container.Content(seasons) | Container.Content(episodes) | Window.IsActive(2) | Window.IsActive(1)</visible>

If you're like me and don't use the programs section for anything other than games, you can change the shortcut on Includes_Home_1.xml to bring you directly to launcher. On line 21, make the shortcut XBMC.ActivateWindow(1,plugin://programs/Launcher/).

That's it! Good luck.
find quote
cdanderson04 Offline
Junior Member
Posts: 19
Joined: May 2010
Reputation: 0
Post: #4
Holy cow! I am so thankful for this. I am so excited to go home and try and set this up. Thanks to everyone who worked on it! Just one thing. I have a usb device that has two playstation controllers connectors on it. should I have any troubles with setting that up?
find quote
Izod517 Offline
Member
Posts: 97
Joined: Apr 2010
Reputation: 0
Post: #5
In my experience... Most likely you will. Do you mean two controllers on one USB port? If so that will almost assuredly cause you problems depending on how the device sets it up. Just try it first with following the original instructions but if that doesn't work... my best guess is that you'll need to install joystick
sudo apt-get install joystick
then run the calibrator to try and figure out what exactly it's seeing:
jscal -c /dev/input/js0

You may also need to use joy2keys or a similiar program to translate the button presses into keyboard presses. I'd see how everything goes WITHOUT doing all that first.
(This post was last modified: 2010-05-07 18:19 by Izod517.)
find quote
Izod517 Offline
Member
Posts: 97
Joined: Apr 2010
Reputation: 0
Post: #6
TheDuffMan Wrote:Finally, we need to make the same change to include that beautiful wide panel view that works great for SNES, N64 boxes, etc.

Duff if you get a chance can you take a look in Aeon to let us know where or if it is possible to change SNES and N64 boxes to the proper view?
find quote
grassmunk Offline
Senior Member
Posts: 122
Joined: Aug 2004
Reputation: 0
Post: #7
I just wanted to post my extreme success with Mupen64plus.

1) apt-get install mupen64plus

Code:
<launcher>
                <name>Nintendo 64</name>
                <application>/usr/games/mupen64plus</application>
                <args>--fullscreen --nogui --noask </args>
                <rompath>/home/xbmc/roms/n64/</rompath>
                <romext>zip</romext>
                <thumb>/home/xbmc/roms/n64.png</thumb>
                <wait>true</wait>
                <roms></roms>
</launcher>

Honestly, this was the best one, used my gamepad without any prompts. I wish they were all this easy.

So now all thats left is Gens. Gens is working 100% now. The only problem: I can't figure out how to map a button to exit the system. This is the last hurdle. All my other systems (Mupen64plus, ZSNES, Mednafen (SEGA, Game Gear, Gameboy/Color/Advance and NES)) work like this Sad
(This post was last modified: 2010-05-09 12:10 by grassmunk.)
find quote
TheDuffMan Offline
ShareThe.TV admin
Posts: 272
Joined: Nov 2008
Reputation: 13
Post: #8
Does Aeon have a wide view used elsewhere, for like TV show episodes? It was easy to do in Alaska since the view is already created and I simply included it.

grassmunk are you also running this on a Revo? I tried with your setup and I get sluggish audio. I may have to play around with more args.
find quote
Izod517 Offline
Member
Posts: 97
Joined: Apr 2010
Reputation: 0
Post: #9
Not that I'm aware of. =(
find quote
Izod517 Offline
Member
Posts: 97
Joined: Apr 2010
Reputation: 0
Post: #10
grassmunk Wrote:So now all thats left is Gens. Gens is working 100% now. The only problem: I can't figure out how to map a button to exit the system.(

I haven't got around to looking at this, but theorectically you could point launcher to a script that launches joy2keys (or something similar) and sets the button in question to esc, then launches Gens with the --quickexit argument... Although that's serious pain in the rear for something that should really be built in.
find quote
grassmunk Offline
Senior Member
Posts: 122
Joined: Aug 2004
Reputation: 0
Post: #11
TheDuffMan Wrote:grassmunk are you also running this on a Revo? I tried with your setup and I get sluggish audio. I may have to play around with more args.

Yeah, I've been playing with this way too much I was just happy it worked. Let me know if you find a better sound driver.

Izod517 Wrote:I haven't got around to looking at this, but theorectically you could point launcher to a script that launches joy2keys (or something similar) and sets the button in question to esc, then launches Gens with the --quickexit argument... Although that's serious pain in the rear for something that should really be built in.

Agree, that sounds like a lot of work. Almost easier to make a irexec script.

Also, a problem I encountered was super small fonts in the emulators. to fix this i made a .gtkrc-2.0 file:

Code:
style "user-font"
{
        font_name="Sans Serif 20"
}
gtk-font-name = "Sans Serif 20"

This will make the fonts readable for you!

One last one: in mupen64plus if you're trying to set buttons for savestate, loastate, quit etc using an Xbox controller it tries to set every button to the left or right trigger. Just hold down the button you wish to set before you click and it will set the right button.




Last step: Using my game controller in XBMC. Any hints?
find quote
TheDuffMan Offline
ShareThe.TV admin
Posts: 272
Joined: Nov 2008
Reputation: 13
Post: #12
Izod517 Wrote:Not that I'm aware of. =(

Yea, unfortunately I can't help then short of modding a whole view, which I haven't learned to do.

I'm thinking the Revo can't handle mupen64plus, unless the secret is in using the audio plugins. But, I can't figure out how to setup and use the plugins. I think I also need a controller one because I don't get any keyboard response. Does anyone have a working n64 setup?
find quote
cdanderson04 Offline
Junior Member
Posts: 19
Joined: May 2010
Reputation: 0
Post: #13
How'd you guys get all the box art. I know you can do a Yahoo search for games but all I get is screenshots of the game itself. The Alaska one looks so fantastic, was there a way to get them all at once so oyu don't have to do each game individually?

Thanks....and again....awesome post!
find quote
TheDuffMan Offline
ShareThe.TV admin
Posts: 272
Joined: Nov 2008
Reputation: 13
Post: #14
Unfortunately I grabbed those covers manually. I edit the launchers xml file and add games and their covers one by one. It's a bit more work but as you've found it looks better than whatever the yahoo search pulls up.
find quote
grassmunk Offline
Senior Member
Posts: 122
Joined: Aug 2004
Reputation: 0
Post: #15
cdanderson04 Wrote:How'd you guys get all the box art. I know you can do a Yahoo search for games but all I get is screenshots of the game itself. The Alaska one looks so fantastic, was there a way to get them all at once so oyu don't have to do each game individually?

Thanks....and again....awesome post!

http://www.ressurectionxtras.net/

and

http://forums.xbox-scene.com/index.php?showtopic=660135

If you get the resurrection package from UG its really easy to make the covers show up. Just copy all the individual rom folders (or just the roms you want, I took US Licensed and Translated) and then copy over ALL the images to the same folder. Launcher will pick them all up no problem!
find quote
Post Reply