Kodi Community Forum
[RELEASE] Rom Collection Browser - Browse and launch emulator game ROMs - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Game Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=291)
+---- Thread: [RELEASE] Rom Collection Browser - Browse and launch emulator game ROMs (/showthread.php?tid=70115)



- Paybac - 2010-05-19

I can launch games straight from within the xbox programs menu


- Paybac - 2010-05-19

I dont know of any other launcher scripts for xbox as we can launch everything fromt the programs menu.

Also another thing i founf is that the text for the games doesnt show up in PM3 skin only when they are highligted does the text appear under the highlighted selection


- malte - 2010-05-19

Ok. But I think launching from Programs Menu is done with native XBMC code and not Python. There will be a difference.

No idea atm. Maybe someone else has a hint?

I will search for the error messages I found in your log but I don't really think it will help...


- Paybac - 2010-05-19

This means nothing to me but Jezz_X suggested on IRC that perhaps it was" un initialized pointers or Varibables" though wasn't 100% does that mean something to you


- malte - 2010-05-19

Just tried to launch a standalone game on windows and it worked without any problem.

Ok, off to work now. Will try again later.


- Paybac - 2010-05-19

Ok kool, Malte have a good one, I'll be away for the next 2-3 days so i wont be able to test anything.

I think we are slowly getting there though, This is a great little project and i know the xbox world is keeping an eye on it. Hope you can get your hands on a box to do some testing.


- Bomb Bloke - 2010-05-19

If I were to guess, I'd say it's got something to do with that last "ERROR: CLocalizeStrings::ClearBlock" message. Something wants to communicate with the Python thread, but that got killed, so XBMC simply crashes. At any rate, it doesn't appear to get to the stage of actually attempting to launch the game - it fails as soon as Python attempts to shut down.

Running in debug mode slightly slows down XBMC (it has to spam the log and onscreen RAM display). I'm thinking that changes the timing enough for things to "work" (wouldn't be the first time debug mode has made error reproduction impossible, though other factors such as the HDD and skin might also affect matters).

The memory leaks are fairly standard. Good luck finding a debug log referencing Python which doesn't report the things. The amount of RAM available is barely dropping under 30mb (which is plenty by Xbox standards).


- malte - 2010-05-19

I will try to solve this error but I am not sure this will do the trick. This occurs every time I launch a game or I quit my script. It never freezes on Windows or Linux.

I have to play around with this and try some code changes. Hope to get a box to test in the next days.


- Paybac - 2010-05-19

I found this doing a search on the error, Is this the same problem? If so, there seems to be a workaround.

Have a look at the fifth and fourth to last post.

http://forums.xbox-scene.com/lofiversion/index.php/t669088.html

Heres the change
http://trac.xbmc.org/changeset/16682


- Paybac - 2010-05-20




- malte - 2010-05-20

Hey Paybac,

thanks for your research.

I think the first idea from xbox-forum is a similar problem but it is too old. There have been a lot of code changes in XBMC since this happened. And the mentioned work around in this post is a bit brute force;-)

Can you try time.sleep(10) below the xbe launch?

The last link is interesting because it points to the same error message that you got in your log (Loaded module gui not found in sys.modules). I will check if there is something wrong with my import hierarchy.

I still try to get rid of this "ERROR: CLocalizeStrings::ClearBlock" message but wasn't successful until now.


- Paybac - 2010-05-20

LOL Yay that did it put time.sleep(10) below the xbe Launch also you got to add import time to the top of helper.py for any1 else following this.

Dam BB was so close. I'll do some more testing but i just launched a xbox game 5x in a row no problem


- Bomb Bloke - 2010-05-20

I'm curious as to whether XBMC actually waits 10s with the timer delay in that location. I'm assuming it doesn't, and so XBMC ends up quitting before Python "stops" (hence avoiding the access violation when Python exits).

If, on the other hand, it does wait the timer out before shutting down, then I guess you might as well start experimenting with lower timer values. 10s is probably a lot more "extra time" then what debug mode provides, after all.


- Paybac - 2010-05-20

Nah it doesn't wait the full 10 secs the game starts to run after 2-3 secs. So i guess theres no point in lowering the timer.


- Paybac - 2010-05-20

XBOX SETUP

Current setup to get this script working on xbox, currently do not add videos as they play in fullscreen, look out for further updates on videos.

Do This:

Go to RCB/resources/lib and edit the file helper.py:

At the top of this page add

Code:
import  xbmc
import time

At the end of method launchEmu (line 216) replace this line:

Code:
os.system(cmd)

with these two:

Code:
xbmc.executebuiltin("XBMC.Runxbe(%s)" %cmd)
time.sleep(1000)

Then save helper.py

Now go to RCB/resources/database/config.xml and change these lines

Code:
<emulatorCmd>uae {-%I% "%ROM%"}</emulatorCmd>
<useEmuSolo>True</useEmuSolo>

<romPath>PathToTestData/Collection V1/roms/*.adf</romPath>

To these

Code:
<emulatorCmd>%ROM%</emulatorCmd>
<useEmuSolo>False</useEmuSolo>

<romPath>F:/Apps/Emulators/SNES/roms/*.cut</romPath>

And save.



How to Write Shortcut files for your ROMs and Xbox Games: Stolen from Bomb Blokes post



Write the following code into Notepad and save it as a .cut file.

For example something like Neogenesis (Mega Drive Emulator)

Code:
<shortcut>
<path>f:\emulators\NeoGenesis\default.xbe</path>
<custom>
<game>f:\emulators\NeoGenesis\sgenroms\Sonic the Hedgehog.zip</game>
</custom>
</shortcut>

But with FBA-XXX (Neogeo and other arcade systems) use this

Code:
<shortcut>
<path>f:\emulators\FBA-XXX\default.xbe</path>
<custom>
<game>mslug</game>
</custom>
</shortcut>

For Xbox Games use this

Code:
<shortcut>
<path>f:\games\burnout3\default.xbe</path>
</shortcut>

Now if you are thinking, Dam i got a million Roms i can't write shortcuts for them all, well don't worry there is pack coming out with RessurectionXtras, Possibly even this weekend. So get googling RessurectionXtras find out where to get the RessurectionXtras ROM packs and the .cut packs and all the other goodies from. And you will son have a sweet REtro Gaming setup. OUR CHECK OUT BOMB BLOKES AUTO SHORTCUT MAKER

Thanks to the RX team if they reading this

Thanks to BombBloke for the help on the latest fixes and Thanks to Malte for sticking with us Xboxers.

REMEMBER VIDEOS AREN'T WORKING PROPERLY ON THE XBOX YET. feel free to test it out tho and report back. Also some skins like confluence dont display text properly in RCB on the XBOX but PM3 Display's all text fine.

I hope to have some screen shots and possibly a video clip up in the next 3-4 days of this working on the XBOX.

@malte, ill be away the next couple of days so wont be able to do testing sorry. Hope you can get videos sorted in windows. Smile