[GUIDE] How to use XBMC as a game/emulation frontend.

Search This thread

IncognitoMan

Senior Member
Jul 2, 2013
132
209
This thread is a WIP and will be updated as I have time to include and write more info​
.
With this guide you will be able to launch games and emulated games much more "seemlessly".

Requirements:

ADVANCED LAUNCHER​

086mqyI.jpg


XR8GCfG.jpg


ajqVetS.jpg



1.) Install Advanced Launcher

Copy over the Advanced Launcher plugin to the OUYA and install it ( You can install it by going to Settings -> Add-Ons -> Install From Zip File )

2.) Create a new category

Load the addon and with a keyboard press "c", which will open a popup. Choose "Create New Category" and call it "Emulation".

3.) Create a "launcher"

Open the newly created category which should prompt you to create a new launcher. Select "Files Launcher" and go through the menus ( select the launcher application [ su or am... read 3rd post ], select files path [ where the games are stored ] and set file extensions [ look at the example it gives ] )

At "Application Arguments" leave it as default ( due to a scroll limit you can't see what to type... we will modify this later )

Continue with the setup ( Set title of launcher [ typically label of system ], select platform [ which system you are emulating ], set thumbnails path and set fanart path )

4.) Adding the correct arguments

Pull launchers.xml from:

Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/plugin.program.advanced.launcher/launchers.xml
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

Open launchers.xml and under "launchers" look for the emulator you added ( this would be the name you chose when you set the title of the launcher ) and you should see the following line:

Code:
			<args>"%rom%"</args>

Change it to represent one of the arguments found in the 3rd post. for example purposes here's what the line would look like if I were setting up the Reicast:

Code:
			<args>start -n com.reicast.emulator/.GL2JNIActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"</args>

Save it and push it back to the location it was pulled from.

5.) Reload XBMC ( or just the script )

Once you reload you should be able to add games... to add games hit the "c" key on your keyboard with the emulator highlighted and select "Add items". Select any game(s) you wish to add.

Afterwards you should be able to launch the games from Advanced Launcher
 
Last edited:

IncognitoMan

Senior Member
Jul 2, 2013
132
209
ROM COLLECTION BROWSER​

JxeCRvT.jpg


OKFn0qG.jpg


Install RCB like you would any addon.

In order to get RCB to work there's a few changes that have to be made... 2 files to be specific.

1.) applaunch.sh

located at:
Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/script.games.rom.collection.browser/scriptfiles/applaunch.sh
or
Code:
/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/addons/script.games.rom.collection.browser/resources/scriptfiles/applaunch.sh
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

You'll need to comment out the following lines:

Code:
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

Save it and push it back to the same location we pulled it from.

2.) launcher.py

located at:
Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/addons/script.games.rom.collection.browser/resources/lib/launcher.py
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

Comment out:

Code:
		if(isFullScreen):
			Logutil.log("Toggle to Windowed mode", util.LOG_LEVEL_INFO)
			#this minimizes xbmc some apps seems to need it
			try:
				xbmc.executehttpapi("Action(199)")
			except:
				xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"togglefullscreen"},"id":"1"}')
			
			toggledScreenMode = True

Code:
	pre launch command
	if(precmd.strip() != '' and precmd.strip() != 'call'):
		Logutil.log("Got to PRE", util.LOG_LEVEL_INFO)
		os.system(precmd.encode(sys.getfilesystemencoding()))
	
	preDelay = settings.getSetting(SETTING_RCB_PRELAUNCHDELAY)
	if(preDelay != ''):
		preDelay = int(float(preDelay))
		xbmc.sleep(preDelay)

Modify:

Code:
	if(romCollection.usePopen):
		import subprocess
		subprocess.Popen(cmd.encode(sys.getfilesystemencoding()), shell=True)
	else:
		os.system(cmd.encode(sys.getfilesystemencoding()))
to this:
Code:
	if(romCollection.usePopen):
		import subprocess
		subprocess.Popen(cmd.encode('utf-8'), shell=True)
	else:
		os.system(cmd.encode('utf-8'))

Comment out:

Code:
	postDelay = settings.getSetting(SETTING_RCB_POSTLAUNCHDELAY)
	if(postDelay != ''):
		postDelay = int(float(postDelay))
		xbmc.sleep(postDelay)
	
	post launch command
	if(postcmd.strip() != '' and postcmd.strip() != 'call'):
		Logutil.log("Got to POST: " + postcmd.strip(), util.LOG_LEVEL_INFO)
		os.system(postcmd.encode(sys.getfilesystemencoding()))

Save it and push it back to the same location we pulled it from.

3.) Create a "Rom Collection"

Hit the "U" button ( or "C" key on a keyboard ) on your OUYA controller, this will open a menu... select "Add Rom Collection".

Fill out all the info ( how you want to select info/artwork, what console, location of emulator ( su or am... read 3rd post )

On the "Emulator params" just select the default for now... we will modify this afterward.

Continue on in the setup... ( path to the roms, what file mask [ in otherwords which extensions to look for... look at the example it gives ] and lastly select a location for the artwork )

4.) Adding the correct emulator arguments

Pull config.xml from:

Code:
/sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/script.games.rom.collection.browser/config.xml
( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

Open config.xml and under the rom collection you created... look for the following line:

Code:
      <emulatorParams>"%ROM%"</emulatorParams>

Change it to represent one of the arguments found in the 3rd post. for example purposes here's what the line would look like if I were setting up the SNES:

Code:
      <emulatorParams>start -n com.explusalpha.Snes9xPlus/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%ROM%"</emulatorParams>

Save it and push it back to the same location we pulled it from.

5.) Reload XBMC ( or just the script )

After you reload you should be able to launch the games without a problem.
 
Last edited:

IncognitoMan

Senior Member
Jul 2, 2013
132
209
There are some arguments that will require root and others that do NOT require root... If theres a root/nonroot option I will list both.

If the argument is non-root required, for the "application" use /system/bin/am

If the argument is root required, use /system/xbin/su for the "application"

-=Emulator Arguments=-​

2600.EMU:

non-root:
start -n com.explusalpha.A2600Emu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

Ataroid:

non-root:
start -n com.androidemu.atari/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

C64.EMU:

non-root:
start -n com.explusalpha.C64Emu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

DraStic:

non-root:
start -n com.dsemu.drastic/.DraSticActivity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e GAMEPATH "%rom%"

ePSXe:

non-root:
start -n com.epsxe.ePSXe/.ePSXe -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e com.epsxe.ePSXe.isoName "%rom%"

FPSE: ( NOTE: can be rather....buggy... also will only work in nobios mode )

non-root:
start -n com.emulator.fpse/.Main -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e path "%rom%"

GameBoid:

non-root:
start -n com.androidemu.gba/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

GBA.EMU:

non-root:
start -n com.explusalpha.GbaEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

GBC.EMU:

non-root:
start -n com.explusalpha.GbcEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

GBCoid:

non-root:
start -n com.androidemu.gbc/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

Gearoid:

non-root:
start -n com.androidemu.gg/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

Gensoid:

non-root:
start -n com.androidemu.gens/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

MD.EMU:

non-root:
start -n com.explusalpha.MdEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

MSX.EMU:

non-root:
start -n com.explusalpha.MsxEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

Mupen64Plus AE Free 2.4.4: ( playstore )

non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.PlayMenuActivity'

Mupen64Plus AE 2.4.4: ( playstore )

non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.PlayMenuActivity'

Mupen64Plus AE: ( ouya discovery )

non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plusae/.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plusae/.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plusae/.PlayMenuActivity'

N64oid:

non-root:
start -n com.androidemu.n64/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

NEO.EMU:

non-root:
start -n com.explusalpha.NeoEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

NES.EMU:

non-root:
start -n com.explusalpha.NesEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

NESoid:

non-root:
start -n com.androidemu.nes/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

NGP.EMU:

non-root:
start -n com.explusalpha.NgpEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

PCE.EMU:

non-root:
start -n com.PceEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

PPSSPP:

non-root:
start -n org.ppsspp.ppsspp/.PpssppActivity -e org.ppsspp.ppsspp.Shortcuts "%rom%"

Reicast:

non-root:
start -n com.reicast.emulator/.GL2JNIActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

RetroArch: ( example using PS1 )

non-root:
start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e ROM "%rom%" -e LIBRETRO /data/data/com.retroarch/cores/pcsx_rearmed_libretro_neon_android.so -e CONFIGFILE /data/data/com.retroarch/retroarch.cfg -e IME tv.ouya.console.ime.keyboard/.OUYAKeyboard -n com.retroarch/.browser.retroactivity.RetroActivityFuture

( for the other emulator cores just point to the appropriate libretro*.so )

Snes9x EX+:

non-root:
start -n com.explusalpha.Snes9xPlus/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

SNesoid:

non-root:
start -n com.androidemu.snes/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

SuperGNES lite:

non-root:
start -n com.bubblezapgames.supergnes_lite/.SuperGNES -a android.intent.action.VIEW -eu Uri "file://%rom%"

SuperGNES:

non-root:
start -n com.bubblezapgames.supergnes/.SuperGNES -a android.intent.action.VIEW -eu Uri "file://%rom%"


-=Game Arguments=-

coming soon...
 
Last edited:

IncognitoMan

Senior Member
Jul 2, 2013
132
209
Just curious since I don't know what all the currently most used ( or user preferred ) emulators these days are.... but if people here could start listing emulators they use or would like to see the args and setup for please do post here and I'll get to adding it into the second post.
 
  • Like
Reactions: topnomi

1995mkw

New member
Jan 14, 2014
4
0
Speechless

I cant believe I never found this thread until today. This is amazing, I cant thank you enough. This makes the Ouya a 1000x better. :good::good::good:
This needs to be put in more places. Is it okay if I post a link to this thread on a couple of forums(gwenael, xbmc.org, freaktab, xbmchub, xunitytalk, and so on)? Many people are curios about launching games through xbmc on android.

This is just.........I can't even put it into words.
You just made my month.

Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you.

---------- Post added at 07:47 AM ---------- Previous post was at 07:38 AM ----------

Just curious since I don't know what all the currently most used ( or user preferred ) emulators these days are.... but if people here could start listing emulators they use or would like to see the args and setup for please do post here and I'll get to adding it into the second post.

ppsspp(side-loaded) is the only one I dont see that id like to know for the ouya(Retroarch/libretro along with Mupen64plus pretty much handle everything else for me)

So how do you figure these arguments out in the first place?
 

IncognitoMan

Senior Member
Jul 2, 2013
132
209
I cant believe I never found this thread until today. This is amazing, I cant thank you enough. This makes the Ouya a 1000x better. :good::good::good:
This needs to be put in more places. Is it okay if I post a link to this thread on a couple of forums(gwenael, xbmc.org, freaktab, xbmchub, xunitytalk, and so on)? Many people are curios about launching games through xbmc on android.

This is just.........I can't even put it into words.
You just made my month.

Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you. Thank you.Thank you.

---------- Post added at 07:47 AM ---------- Previous post was at 07:38 AM ----------



ppsspp(side-loaded) is the only one I dont see that id like to know for the ouya(Retroarch/libretro along with Mupen64plus pretty much handle everything else for me)

So how do you figure these arguments out in the first place?

I was meaning to right a bit more in the guide in regards to how to figure out the args ( or in this case what intents are being called upon ) but to basically sum it up you can logcat and see how the apps intents are being passed and whats being called for ( you can also do the same thing by decompiling and looking at the source but for 90% of it you *should* be able to get away with using just logcat )

So far I haven't been able to get ppsspp to work due to it missing intents we need... so until the author adds intents that we can use to call for we cant use ppsspp with this other than to load the emulator.

Also I'll be massively updating ( and cleaning ) this thread *soon* to include RCB support ( Rom Collection Browser )

Yesterday between me and EldonMcGuinness we figured out what was causing the issues with it not wanting to work on android... lucky for us the changes were small and very little had to be done to make it work ( and it basically works the same way as Advanced Launcher )... The benefit of being able to use RCB is quite nice since not only is RCB included in the main repo of plugins ( thus this works not only on frodo but gotham too! ) but also because some skins actually have RCB support as a widget... so for instance my last 10 played games are shown on the home screen...

As for posting this at other forums I'm fine with that as long as it links back here so I can answer questions or maybe take requests on which games/apps they'd like to see added to the list.

--edit:

In fact you should start seeing the changes today ( I'll probably be moving posts around and refining more throughout the day )
 
Last edited:

1995mkw

New member
Jan 14, 2014
4
0
I was meaning to right a bit more in the guide in regards to how to figure out the args ( or in this case what intents are being called upon ) but to basically sum it up you can logcat and see how the apps intents are being passed and whats being called for ( you can also do the same thing by decompiling and looking at the source but for 90% of it you *should* be able to get away with using just logcat )

So far I haven't been able to get ppsspp to work due to it missing intents we need... so until the author adds intents that we can use to call for we cant use ppsspp with this other than to load the emulator.

Also I'll be massively updating ( and cleaning ) this thread *soon* to include RCB support ( Rom Collection Browser )

Yesterday between me and EldonMcGuinness we figured out what was causing the issues with it not wanting to work on android... lucky for us the changes were small and very little had to be done to make it work ( and it basically works the same way as Advanced Launcher )... The benefit of being able to use RCB is quite nice since not only is RCB included in the main repo of plugins ( thus this works not only on frodo but gotham too! ) but also because some skins actually have RCB support as a widget... so for instance my last 10 played games are shown on the home screen...

As for posting this at other forums I'm fine with that as long as it links back here so I can answer questions or maybe take requests on which games/apps they'd like to see added to the list.
Its a shame ppsspp wont work. However the fact that RCB is on the verge of working is quite nice(RCB is what Im using on my HTPC).
I'll try fiddling around with logcat later(Its all always good to know how to do things yourself.)

One of the things I noticed about this thread is the lack of activity(posts/veiws) despite its significance(I believe this is due to the lack of traffic in the Ouya section of xda). Im sure a lot of people are interested in this but just haven't had the opportunity to see the thread(Ive been looking for something like this since just after Christmas and only found it just now). This is is useful to more than just people with an Ouya. Anyone running an android device attached to their TV can benefit from this guide(Though the Ouya makes the most sense since it is operated with a gamepad).

So I figured posting links to this thread on the places I was originally looking(Mainly xbmc and advanced launcher related resouses/fourums. I just never thought about looking in a device specific forum despite it being the device I wanted this for in the first place) would help people find this easier.
 

IncognitoMan

Senior Member
Jul 2, 2013
132
209
Its a shame ppsspp wont work. However the fact that RCB is on the verge of working is quite nice(RCB is what Im using on my HTPC).
I'll try fiddling around with logcat later(Its all always good to know how to do things yourself.)

One of the things I noticed about this thread is the lack of activity(posts/veiws) despite its significance(I believe this is due to the lack of traffic in the Ouya section of xda). Im sure a lot of people are interested in this but just haven't had the opportunity to see the thread(Ive been looking for something like this since just after Christmas and only found it just now). This is is useful to more than just people with an Ouya. Anyone running an android device attached to their TV can benefit from this guide(Though the Ouya makes the most sense since it is operated with a gamepad).

So I figured posting links to this thread on the places I was originally looking(Mainly xbmc and advanced launcher related resouses/fourums. I just never thought about looking in a device specific forum despite it being the device I wanted this for in the first place) would help people find this easier.

I've been thinking about posting this into a more generic section once the guide is a little more... finished. As yes you are correct, the guide applies to all devices that are plugged into a tv and use xbmc ( very little of the guide has to be changed... only retroarch's IME selection and location of su is about it )

As for RCB I updated the second post so far to include what has to be changed to get it to work on android... the rest of it works similar to Advanced Launcher but I need to fill the rest out for that.
 

daeymon

Senior Member
May 15, 2008
193
55
This is an amazing thread and its opened up a whole new world for me and my JXD S7800. I just figured out how to get RCB to launch Android games. It requires using nfo files as ROM files, and the %GAMECMD% param to parse the right info to the command line. GAMECMD can be entered manually within RCB but its easier to put it in the nfo file your going to use as a ROM file and then set one of your scrapers as LocalNFO.

For the file located
Code:
/addons/script.games.rom.collection.browser/resources/lib/dbupdate.py

Replace:
Code:
region = self.resolveParseResult(gamedescription, 'Region')
With:
Code:
gameCmd = self.resolveParseResult(gamedescription, 'GameCmd')
region = self.resolveParseResult(gamedescription, 'Region')

and Replace:
Code:
gameId = self.insertGame(gamename, plot, romCollection.id, publisherId, developerId, reviewerId, yearId,
With:
Code:
gameId = self.insertGame(gamename, plot, gameCmd, romCollection.id, publisherId, developerId, reviewerId, yearId,

and Replace:
Code:
def insertGame(self, gameName, description, romCollectionId, publisherId, developerId, reviewerId, yearId,
With:
Code:
def insertGame(self, gameName, description, gameCmd, romCollectionId, publisherId, developerId, reviewerId, yearId,

and Replace:
Code:
Game(self.gdb).insert((gameName, description, None, None, romCollectionId, publisherId, developerId, reviewerId, yearId,
With:
Code:
Game(self.gdb).insert((gameName, description, gameCmd, None, romCollectionId, publisherId, developerId, reviewerId, yearId,

and Replace:
Code:
Game(self.gdb).update(('name', 'description', 'romCollectionId', 'publisherId', 'developerId', 'reviewerId', 'yearId', 'maxPlayers', 'rating', 'numVotes',
	'url', 'region', 'media', 'perspective', 'controllerType', 'originalTitle', 'alternateTitle', 'translatedBy', 'version', 'isFavorite', 'launchCount'),
	(gameName, description, romCollectionId, publisherId, developerId, reviewerId, yearId, players, rating, votes, url, region, media, perspective, controller,
	originalTitle, alternateTitle, translatedBy, version, int(isFavorite), int(launchCount)),
	gameId, allowOverwriteWithNullvalues)
With:
Code:
Game(self.gdb).update(('name', 'description', 'gameCmd', 'romCollectionId', 'publisherId', 'developerId', 'reviewerId', 'yearId', 'maxPlayers', 'rating', 'numVotes',
	'url', 'region', 'media', 'perspective', 'controllerType', 'originalTitle', 'alternateTitle', 'translatedBy', 'version', 'isFavorite', 'launchCount'),
	(gameName, description, gameCmd, romCollectionId, publisherId, developerId, reviewerId, yearId, players, rating, votes, url, region, media, perspective, controller,
	originalTitle, alternateTitle, translatedBy, version, int(isFavorite), int(launchCount)),
	gameId, allowOverwriteWithNullvalues)

Then for the file located
Code:
/addons/script.games.rom.collection.browser/resources/scraper/00 - local nfo.xml

Replace:
Code:
<Game>title</Game>
With:
Code:
<Game>title</Game>
<GameCmd>gameCmd</GameCmd>

Now set your "Emulator Cmd" to:
Code:
/system/xbin/su

and your "Emulator Params" to
Code:
-c 'am start -n %GAMECMD%'

and your "Rom Fie Mask" to
Code:
*.nfo

and one of your scrapers need to be set to "local nfo"

Now set the "Rom Path" to any empty folder on your SD card. Then create text files in this folder and change their extensions to nfo. The name of the nfo is not important but inside it you need:
Code:
<game>
	<gameCmd>PackageName/ActivityName</gameCmd>
<game>

An example is the following to run Punch Quest
Code:
<game>
	<gameCmd>com.noodlecake.punchquest.humble/com.noodlecake.punchquest.punchquest</gameCmd>
<game>

And that's it. This setup has it working for me.
 
Last edited:
  • Like
Reactions: IncognitoMan

sindrefyrn

Senior Member
Nov 19, 2009
294
78
Oslo
I'm having some problems with Mupen64Plus AE. I've used the root command, haven't tried the one with am. I think there's some problems with the parameters, because I've tried running the command in terminal it says that the MainActivity doesn't exist.

I checked Mupen64Plus AE on Github, and it seems like they don't use the MainActivity any longer, but I don't know what command to use instead. Oh, and I'm using an Android stick, not an Ouya, but that shouldn't matter in this case - should it? I'm still using SPMC.

Any help, please?


Cheers
 
Last edited:

IncognitoMan

Senior Member
Jul 2, 2013
132
209
I'm having some problems with Mupen64Plus AE. I've used the root command, haven't tried the one with am. I think there's some problems with the parameters, because I've tried running the command in terminal it says that the MainActivity doesn't exist.

I checked Mupen64Plus AE on Github, and it seems like they don't use the MainActivity any longer, but I don't know what command to use instead. Oh, and I'm using an Android stick, not an Ouya, but that shouldn't matter in this case - should it? I'm still using SPMC.

Any help, please?


Cheers

I'll check it out sometime today... ATM I'm using my ouya for test flashing cm10.2/cm11 builds so I haven't had much time to see if they've changed ( I did find out that retroarch changed and have fixed the args accordingly ).
 
  • Like
Reactions: sindrefyrn

IncognitoMan

Senior Member
Jul 2, 2013
132
209
That's awesome - thanks.

I'm guessing you are using the free version from the google play store...

If so then there's a *slight* change to the command... heres the command set for people wanting to use the one on the playstore. ( as of 2.4.4 )


Mupen64Plus AE Free 2.4.4:

non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.PlayMenuActivity'

-----

*sigh* this is why I wish I would have a more vanilla android device to test this with...

Anyway thanks for the heads up sindrefyrn... if you run across any others that have problems let me know and I'll see about checking it out.
 
  • Like
Reactions: sindrefyrn

sindrefyrn

Senior Member
Nov 19, 2009
294
78
Oslo
I'm guessing you are using the free version from the google play store...
If so then there's a *slight* change to the command... heres the command set for people wanting to use the one on the playstore. ( as of 2.4.4 )


Mupen64Plus AE Free 2.4.4:

non-root: ( will load the emulator menu with the correct rom selected )
start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
-c 'am start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.PlayMenuActivity'

-----

*sigh* this is why I wish I would have a more vanilla android device to test this with...

Anyway thanks for the heads up sindrefyrn... if you run across any others that have problems let me know and I'll see about checking it out.

THANK YOU!!! :laugh:

This is amazing. I'm actually using the paid version, but even I could figure out what to do with the command.
 

Techhead33

New member
Jan 24, 2014
3
0
Roms on NFS mount

First I would like to thank you for all of the work that has been put to get things working!!!!

My question is around XMBC and NFS mounts. In XMBC / Rom Collection Browser I am able to map an nfs share to my roms. When I click on a rom to play it comes up to the menu for Snes9x EX+. Is this the expected behavior? I know when I launch Snes9x that it only sees the local file system so I am guessing that is the reason that it does not play the game but wanted to check because of going through XBMC. If that is the case is there a way to mount an nfs mount to the system when the system is rooted ?

Thank you
 

IncognitoMan

Senior Member
Jul 2, 2013
132
209
First I would like to thank you for all of the work that has been put to get things working!!!!

My question is around XMBC and NFS mounts. In XMBC / Rom Collection Browser I am able to map an nfs share to my roms. When I click on a rom to play it comes up to the menu for Snes9x EX+. Is this the expected behavior? I know when I launch Snes9x that it only sees the local file system so I am guessing that is the reason that it does not play the game but wanted to check because of going through XBMC. If that is the case is there a way to mount an nfs mount to the system when the system is rooted ?

Thank you

Should work as long as the command is passed correctly... sounds like its not finding the rom...

could you tell me where you are pointing your the roms folder? ( maybe paste the config for snes? )
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    This thread is a WIP and will be updated as I have time to include and write more info​
    .
    With this guide you will be able to launch games and emulated games much more "seemlessly".

    Requirements:

    ADVANCED LAUNCHER​

    086mqyI.jpg


    XR8GCfG.jpg


    ajqVetS.jpg



    1.) Install Advanced Launcher

    Copy over the Advanced Launcher plugin to the OUYA and install it ( You can install it by going to Settings -> Add-Ons -> Install From Zip File )

    2.) Create a new category

    Load the addon and with a keyboard press "c", which will open a popup. Choose "Create New Category" and call it "Emulation".

    3.) Create a "launcher"

    Open the newly created category which should prompt you to create a new launcher. Select "Files Launcher" and go through the menus ( select the launcher application [ su or am... read 3rd post ], select files path [ where the games are stored ] and set file extensions [ look at the example it gives ] )

    At "Application Arguments" leave it as default ( due to a scroll limit you can't see what to type... we will modify this later )

    Continue with the setup ( Set title of launcher [ typically label of system ], select platform [ which system you are emulating ], set thumbnails path and set fanart path )

    4.) Adding the correct arguments

    Pull launchers.xml from:

    Code:
    /sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/plugin.program.advanced.launcher/launchers.xml
    ( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

    Open launchers.xml and under "launchers" look for the emulator you added ( this would be the name you chose when you set the title of the launcher ) and you should see the following line:

    Code:
    			<args>"%rom%"</args>

    Change it to represent one of the arguments found in the 3rd post. for example purposes here's what the line would look like if I were setting up the Reicast:

    Code:
    			<args>start -n com.reicast.emulator/.GL2JNIActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"</args>

    Save it and push it back to the location it was pulled from.

    5.) Reload XBMC ( or just the script )

    Once you reload you should be able to add games... to add games hit the "c" key on your keyboard with the emulator highlighted and select "Add items". Select any game(s) you wish to add.

    Afterwards you should be able to launch the games from Advanced Launcher
    4
    ROM COLLECTION BROWSER​

    JxeCRvT.jpg


    OKFn0qG.jpg


    Install RCB like you would any addon.

    In order to get RCB to work there's a few changes that have to be made... 2 files to be specific.

    1.) applaunch.sh

    located at:
    Code:
    /sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/script.games.rom.collection.browser/scriptfiles/applaunch.sh
    or
    Code:
    /sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/addons/script.games.rom.collection.browser/resources/scriptfiles/applaunch.sh
    ( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

    You'll need to comment out the following lines:

    Code:
    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

    Save it and push it back to the same location we pulled it from.

    2.) launcher.py

    located at:
    Code:
    /sdcard/Android/data/com.semperpax.spmc/files/.xbmc/addons/script.games.rom.collection.browser/resources/lib/launcher.py
    ( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

    Comment out:

    Code:
    		if(isFullScreen):
    			Logutil.log("Toggle to Windowed mode", util.LOG_LEVEL_INFO)
    			#this minimizes xbmc some apps seems to need it
    			try:
    				xbmc.executehttpapi("Action(199)")
    			except:
    				xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"togglefullscreen"},"id":"1"}')
    			
    			toggledScreenMode = True

    Code:
    	pre launch command
    	if(precmd.strip() != '' and precmd.strip() != 'call'):
    		Logutil.log("Got to PRE", util.LOG_LEVEL_INFO)
    		os.system(precmd.encode(sys.getfilesystemencoding()))
    	
    	preDelay = settings.getSetting(SETTING_RCB_PRELAUNCHDELAY)
    	if(preDelay != ''):
    		preDelay = int(float(preDelay))
    		xbmc.sleep(preDelay)

    Modify:

    Code:
    	if(romCollection.usePopen):
    		import subprocess
    		subprocess.Popen(cmd.encode(sys.getfilesystemencoding()), shell=True)
    	else:
    		os.system(cmd.encode(sys.getfilesystemencoding()))
    to this:
    Code:
    	if(romCollection.usePopen):
    		import subprocess
    		subprocess.Popen(cmd.encode('utf-8'), shell=True)
    	else:
    		os.system(cmd.encode('utf-8'))

    Comment out:

    Code:
    	postDelay = settings.getSetting(SETTING_RCB_POSTLAUNCHDELAY)
    	if(postDelay != ''):
    		postDelay = int(float(postDelay))
    		xbmc.sleep(postDelay)
    	
    	post launch command
    	if(postcmd.strip() != '' and postcmd.strip() != 'call'):
    		Logutil.log("Got to POST: " + postcmd.strip(), util.LOG_LEVEL_INFO)
    		os.system(postcmd.encode(sys.getfilesystemencoding()))

    Save it and push it back to the same location we pulled it from.

    3.) Create a "Rom Collection"

    Hit the "U" button ( or "C" key on a keyboard ) on your OUYA controller, this will open a menu... select "Add Rom Collection".

    Fill out all the info ( how you want to select info/artwork, what console, location of emulator ( su or am... read 3rd post )

    On the "Emulator params" just select the default for now... we will modify this afterward.

    Continue on in the setup... ( path to the roms, what file mask [ in otherwords which extensions to look for... look at the example it gives ] and lastly select a location for the artwork )

    4.) Adding the correct emulator arguments

    Pull config.xml from:

    Code:
    /sdcard/Android/data/com.semperpax.spmc/files/.xbmc/userdata/addon_data/script.games.rom.collection.browser/config.xml
    ( change the "com.semperpax.spmc" to whatever version of xbmc you have installed )

    Open config.xml and under the rom collection you created... look for the following line:

    Code:
          <emulatorParams>"%ROM%"</emulatorParams>

    Change it to represent one of the arguments found in the 3rd post. for example purposes here's what the line would look like if I were setting up the SNES:

    Code:
          <emulatorParams>start -n com.explusalpha.Snes9xPlus/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%ROM%"</emulatorParams>

    Save it and push it back to the same location we pulled it from.

    5.) Reload XBMC ( or just the script )

    After you reload you should be able to launch the games without a problem.
    2
    There are some arguments that will require root and others that do NOT require root... If theres a root/nonroot option I will list both.

    If the argument is non-root required, for the "application" use /system/bin/am

    If the argument is root required, use /system/xbin/su for the "application"

    -=Emulator Arguments=-​

    2600.EMU:

    non-root:
    start -n com.explusalpha.A2600Emu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    Ataroid:

    non-root:
    start -n com.androidemu.atari/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    C64.EMU:

    non-root:
    start -n com.explusalpha.C64Emu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    DraStic:

    non-root:
    start -n com.dsemu.drastic/.DraSticActivity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e GAMEPATH "%rom%"

    ePSXe:

    non-root:
    start -n com.epsxe.ePSXe/.ePSXe -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e com.epsxe.ePSXe.isoName "%rom%"

    FPSE: ( NOTE: can be rather....buggy... also will only work in nobios mode )

    non-root:
    start -n com.emulator.fpse/.Main -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e path "%rom%"

    GameBoid:

    non-root:
    start -n com.androidemu.gba/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    GBA.EMU:

    non-root:
    start -n com.explusalpha.GbaEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    GBC.EMU:

    non-root:
    start -n com.explusalpha.GbcEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    GBCoid:

    non-root:
    start -n com.androidemu.gbc/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    Gearoid:

    non-root:
    start -n com.androidemu.gg/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    Gensoid:

    non-root:
    start -n com.androidemu.gens/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    MD.EMU:

    non-root:
    start -n com.explusalpha.MdEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    MSX.EMU:

    non-root:
    start -n com.explusalpha.MsxEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    Mupen64Plus AE Free 2.4.4: ( playstore )

    non-root: ( will load the emulator menu with the correct rom selected )
    start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
    -c 'am start -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus.free/paulscode.android.mupen64plusae.PlayMenuActivity'

    Mupen64Plus AE 2.4.4: ( playstore )

    non-root: ( will load the emulator menu with the correct rom selected )
    start -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
    -c 'am start -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plus/paulscode.android.mupen64plusae.PlayMenuActivity'

    Mupen64Plus AE: ( ouya discovery )

    non-root: ( will load the emulator menu with the correct rom selected )
    start -n paulscode.android.mupen64plusae/.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    root: ( will first load the emulator with the correct rom and then reload to the play menu to either resume where you last left off on your game or restart the emu so the game is at first boot )
    -c 'am start -n paulscode.android.mupen64plusae/.MainActivity -a android.intent.action.VIEW -eu Uri "file://%rom%" && am start -S -n paulscode.android.mupen64plusae/.PlayMenuActivity'

    N64oid:

    non-root:
    start -n com.androidemu.n64/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    NEO.EMU:

    non-root:
    start -n com.explusalpha.NeoEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    NES.EMU:

    non-root:
    start -n com.explusalpha.NesEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    NESoid:

    non-root:
    start -n com.androidemu.nes/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    NGP.EMU:

    non-root:
    start -n com.explusalpha.NgpEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    PCE.EMU:

    non-root:
    start -n com.PceEmu/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    PPSSPP:

    non-root:
    start -n org.ppsspp.ppsspp/.PpssppActivity -e org.ppsspp.ppsspp.Shortcuts "%rom%"

    Reicast:

    non-root:
    start -n com.reicast.emulator/.GL2JNIActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    RetroArch: ( example using PS1 )

    non-root:
    start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e ROM "%rom%" -e LIBRETRO /data/data/com.retroarch/cores/pcsx_rearmed_libretro_neon_android.so -e CONFIGFILE /data/data/com.retroarch/retroarch.cfg -e IME tv.ouya.console.ime.keyboard/.OUYAKeyboard -n com.retroarch/.browser.retroactivity.RetroActivityFuture

    ( for the other emulator cores just point to the appropriate libretro*.so )

    Snes9x EX+:

    non-root:
    start -n com.explusalpha.Snes9xPlus/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    SNesoid:

    non-root:
    start -n com.androidemu.snes/.EmulatorActivity -a android.intent.action.VIEW -eu Uri "file://%rom%"

    SuperGNES lite:

    non-root:
    start -n com.bubblezapgames.supergnes_lite/.SuperGNES -a android.intent.action.VIEW -eu Uri "file://%rom%"

    SuperGNES:

    non-root:
    start -n com.bubblezapgames.supergnes/.SuperGNES -a android.intent.action.VIEW -eu Uri "file://%rom%"


    -=Game Arguments=-

    coming soon...
    1
    Just curious since I don't know what all the currently most used ( or user preferred ) emulators these days are.... but if people here could start listing emulators they use or would like to see the args and setup for please do post here and I'll get to adding it into the second post.
    1
    This is an amazing thread and its opened up a whole new world for me and my JXD S7800. I just figured out how to get RCB to launch Android games. It requires using nfo files as ROM files, and the %GAMECMD% param to parse the right info to the command line. GAMECMD can be entered manually within RCB but its easier to put it in the nfo file your going to use as a ROM file and then set one of your scrapers as LocalNFO.

    For the file located
    Code:
    /addons/script.games.rom.collection.browser/resources/lib/dbupdate.py

    Replace:
    Code:
    region = self.resolveParseResult(gamedescription, 'Region')
    With:
    Code:
    gameCmd = self.resolveParseResult(gamedescription, 'GameCmd')
    region = self.resolveParseResult(gamedescription, 'Region')

    and Replace:
    Code:
    gameId = self.insertGame(gamename, plot, romCollection.id, publisherId, developerId, reviewerId, yearId,
    With:
    Code:
    gameId = self.insertGame(gamename, plot, gameCmd, romCollection.id, publisherId, developerId, reviewerId, yearId,

    and Replace:
    Code:
    def insertGame(self, gameName, description, romCollectionId, publisherId, developerId, reviewerId, yearId,
    With:
    Code:
    def insertGame(self, gameName, description, gameCmd, romCollectionId, publisherId, developerId, reviewerId, yearId,

    and Replace:
    Code:
    Game(self.gdb).insert((gameName, description, None, None, romCollectionId, publisherId, developerId, reviewerId, yearId,
    With:
    Code:
    Game(self.gdb).insert((gameName, description, gameCmd, None, romCollectionId, publisherId, developerId, reviewerId, yearId,

    and Replace:
    Code:
    Game(self.gdb).update(('name', 'description', 'romCollectionId', 'publisherId', 'developerId', 'reviewerId', 'yearId', 'maxPlayers', 'rating', 'numVotes',
    	'url', 'region', 'media', 'perspective', 'controllerType', 'originalTitle', 'alternateTitle', 'translatedBy', 'version', 'isFavorite', 'launchCount'),
    	(gameName, description, romCollectionId, publisherId, developerId, reviewerId, yearId, players, rating, votes, url, region, media, perspective, controller,
    	originalTitle, alternateTitle, translatedBy, version, int(isFavorite), int(launchCount)),
    	gameId, allowOverwriteWithNullvalues)
    With:
    Code:
    Game(self.gdb).update(('name', 'description', 'gameCmd', 'romCollectionId', 'publisherId', 'developerId', 'reviewerId', 'yearId', 'maxPlayers', 'rating', 'numVotes',
    	'url', 'region', 'media', 'perspective', 'controllerType', 'originalTitle', 'alternateTitle', 'translatedBy', 'version', 'isFavorite', 'launchCount'),
    	(gameName, description, gameCmd, romCollectionId, publisherId, developerId, reviewerId, yearId, players, rating, votes, url, region, media, perspective, controller,
    	originalTitle, alternateTitle, translatedBy, version, int(isFavorite), int(launchCount)),
    	gameId, allowOverwriteWithNullvalues)

    Then for the file located
    Code:
    /addons/script.games.rom.collection.browser/resources/scraper/00 - local nfo.xml

    Replace:
    Code:
    <Game>title</Game>
    With:
    Code:
    <Game>title</Game>
    <GameCmd>gameCmd</GameCmd>

    Now set your "Emulator Cmd" to:
    Code:
    /system/xbin/su

    and your "Emulator Params" to
    Code:
    -c 'am start -n %GAMECMD%'

    and your "Rom Fie Mask" to
    Code:
    *.nfo

    and one of your scrapers need to be set to "local nfo"

    Now set the "Rom Path" to any empty folder on your SD card. Then create text files in this folder and change their extensions to nfo. The name of the nfo is not important but inside it you need:
    Code:
    <game>
    	<gameCmd>PackageName/ActivityName</gameCmd>
    <game>

    An example is the following to run Punch Quest
    Code:
    <game>
    	<gameCmd>com.noodlecake.punchquest.humble/com.noodlecake.punchquest.punchquest</gameCmd>
    <game>

    And that's it. This setup has it working for me.