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)



- Enverex - 2011-04-16

Ok, manually copying my own compiled python2.6 lib fixed the other scripts, but not this one, error still remains:

19:14:05 T:140033868510976 M:3489304576 NOTICE: -->Python Interpreter Initialized<--
19:14:05 T:140033868510976 M:3489153024 ERROR: Error Type: <type 'exceptions.IOError'>
19:14:05 T:140033868510976 M:3489153024 ERROR: Error Contents: (10, 'No child processes')
19:14:05 T:140033868510976 M:3489153024 ERROR: Traceback (most recent call last):
File "/home/htpc/.xbmc/addons/script.games.rom.collection.browser/default.py", line 42, in <module>
env2 = platform.machine()
File "/usr/lib/python2.6/platform.py", line 1332, in machine
return uname()[4]
File "/usr/lib/python2.6/platform.py", line 1262, in uname
processor = _syscmd_uname('-p','')
File "/usr/lib/python2.6/platform.py", line 1019, in _syscmd_uname
rc = f.close()
IOError: (10, 'No child processes')


This is XBMC 10.1 btw.


- Fyzzle - 2011-04-16

I hope this is a quick question, but is the config.xml auto generated? Or do i have to create it myself? I have already imported a bunch of collections but need to manually add some emulator launch switches.

I'm using ubuntu 10.10 if that matters.

Edit: I did a search on the whole volume and can't find a config.xml, but everything is working.


- Ferdnand - 2011-04-16

Hello, I have set up my rom collection to tell the program where my mame.exe is and my roms folder, but when i go and look for them they are not listed.. any help would be appreciated....


Little Problem Using RCB in solo mode - DigiTech - 2011-04-17

Im having a little trouble making using a emulator in solo mode, RCB exits XBMC fine then i can play the emulated rom but when i decide to go back to RCB menu i have an XBMC error and cant continue selecting roms in RCB as normal.
Next is the error log from XBMC in the last part when it says launch emu is when XBMC gives the error doesnt letting me go back as normal. What could it be? Thanks!



Quote:16:22:58 T:3900 M:1866096640 NOTICE: RCB_INFO: End showGameInfo
16:22:58 T:3900 M:1866096640 NOTICE: RCB_INFO: End loadViewState
16:22:58 T:3900 M:1866096640 NOTICE: RCB_INFO: Begin checkAutoExec
16:22:58 T:3900 M:1866096640 NOTICE: RCB_INFO: Checking path: C:\Users\Siete\AppData\Roaming\XBMC\userdata\autoexec.py
16:22:58 T:3900 M:1865891840 NOTICE: RCB_ERROR: Cannot rename autoexec.py: [Errno 2] No such file or directory: u'C:\\Users\\Siete\\AppData\\Roaming\\XBMC\\userdata\\addon_data\\script.games.rom.collection.browser\\autoexec.py.bak'
16:22:58 T:3900 M:1865891840 NOTICE: RCB_INFO: End onInit
16:23:03 T:3900 M:1856516096 NOTICE: RCB_INFO: onActionCurrentRun: 11281 ms
16:23:03 T:3900 M:1856516096 NOTICE: RCB_INFO: onActionLastRun: 0 ms
16:23:03 T:3900 M:1856516096 NOTICE: RCB_INFO: diff: 11281 ms
16:23:03 T:3900 M:1856516096 NOTICE: RCB_INFO: Begin showGameInfo
16:23:04 T:3900 M:1865793536 NOTICE: RCB_INFO: End showGameInfo
16:23:04 T:3900 M:1865785344 NOTICE: RCB_INFO: onActionCurrentRun: 12405 ms
16:23:04 T:3900 M:1865785344 NOTICE: RCB_INFO: onActionLastRun: 12199 ms
16:23:04 T:3900 M:1865785344 NOTICE: RCB_INFO: diff: 205 ms
16:23:04 T:3900 M:1865785344 NOTICE: RCB_INFO: Begin showGameInfo
16:23:05 T:3900 M:1863286784 NOTICE: RCB_INFO: End showGameInfo
16:23:05 T:3900 M:1863286784 NOTICE: RCB_INFO: onActionCurrentRun: 13172 ms
16:23:05 T:3900 M:1863286784 NOTICE: RCB_INFO: onActionLastRun: 13172 ms
16:23:05 T:3900 M:1863286784 NOTICE: RCB_INFO: diff: 0 ms
16:23:05 T:3900 M:1863286784 NOTICE: RCB_INFO: Last run still active. Do nothing.
16:23:05 T:3900 M:1863221248 NOTICE: RCB_INFO: onActionCurrentRun: 13438 ms
16:23:05 T:3900 M:1863221248 NOTICE: RCB_INFO: onActionLastRun: 13173 ms
16:23:05 T:3900 M:1863221248 NOTICE: RCB_INFO: diff: 264 ms
16:23:05 T:3900 M:1863221248 NOTICE: RCB_INFO: Begin showGameInfo
16:23:06 T:3900 M:1862176768 NOTICE: RCB_INFO: End showGameInfo
16:23:06 T:3900 M:1862176768 NOTICE: RCB_INFO: onActionCurrentRun: 14416 ms
16:23:06 T:3900 M:1862176768 NOTICE: RCB_INFO: onActionLastRun: 14415 ms
16:23:06 T:3900 M:1862176768 NOTICE: RCB_INFO: diff: 0 ms
16:23:06 T:3900 M:1862176768 NOTICE: RCB_INFO: Last run still active. Do nothing.
16:23:06 T:3900 M:1862172672 NOTICE: RCB_INFO: onActionCurrentRun: 14522 ms
16:23:06 T:3900 M:1862172672 NOTICE: RCB_INFO: onActionLastRun: 14416 ms
16:23:06 T:3900 M:1862172672 NOTICE: RCB_INFO: diff: 105 ms
16:23:06 T:3900 M:1862172672 NOTICE: RCB_INFO: Begin showGameInfo
16:23:07 T:3900 M:1867948032 NOTICE: RCB_INFO: End showGameInfo
16:23:07 T:3900 M:1867948032 NOTICE: RCB_INFO: onActionCurrentRun: 15516 ms
16:23:07 T:3900 M:1867948032 NOTICE: RCB_INFO: onActionLastRun: 15515 ms
16:23:07 T:3900 M:1867948032 NOTICE: RCB_INFO: diff: 0 ms
16:23:07 T:3900 M:1867948032 NOTICE: RCB_INFO: Last run still active. Do nothing.
16:23:08 T:3900 M:1868206080 NOTICE: RCB_INFO: onActionCurrentRun: 16322 ms
16:23:08 T:3900 M:1868206080 NOTICE: RCB_INFO: onActionLastRun: 15516 ms
16:23:08 T:3900 M:1868206080 NOTICE: RCB_INFO: diff: 805 ms
16:23:08 T:3900 M:1868206080 NOTICE: RCB_INFO: Begin showGameInfo
16:23:09 T:3900 M:1866039296 NOTICE: RCB_INFO: End showGameInfo
16:23:09 T:3900 M:1866027008 NOTICE: RCB_INFO: Begin launchEmu
16:23:09 T:3900 M:1866027008 NOTICE: RCB_INFO: launching game with id: 668
16:23:09 T:3900 M:1866027008 NOTICE: RCB_INFO: Begin helper.launchEmu
16:23:09 T:3900 M:1866027008 NOTICE: RCB_INFO: Treating file as a compressed archive
16:23:09 T:3900 M:1866014720 NOTICE: RCB_INFO: Archive only has one file inside; picking that one
16:23:10 T:3900 M:1866014720 NOTICE: RCB_INFO: Putting extracted file in C:\Users\Siete\AppData\Roaming\XBMC\userdata\addon_data\script.games.rom.collection.browser\tmp\Zombies Ate My Neighbors (U) [!].smc
16:23:10 T:3900 M:1864634368 NOTICE: RCB_INFO: Begin helper.doBackup
16:23:10 T:3900 M:1864638464 NOTICE: RCB_INFO: End helper.doBackup
16:23:10 T:3900 M:1864638464 NOTICE: RCB_INFO: Begin saveViewState
16:23:10 T:3900 M:1864638464 NOTICE: RCB_INFO: Begin saveViewMode
16:23:10 T:3900 M:1866436608 NOTICE: RCB_INFO: End saveViewMode
16:23:10 T:3900 M:1866436608 NOTICE: RCB_INFO: Begin helper.saveViewState
16:23:10 T:3900 M:1866440704 NOTICE: RCB_INFO: End helper.saveViewState
16:23:10 T:3900 M:1866440704 NOTICE: RCB_INFO: End saveViewState
16:23:10 T:3900 M:1866424320 NOTICE: RCB_INFO: cmd: call "C:\Users\Siete\AppData\Roaming\XBMC\addons\script.games.rom.collection.browser\applaunch.bat" "C:\Users\Siete\Game Roms\Super Nintendo\SNES EMULATOR\zsnesw.exe" "C:\Users\Siete\AppData\Roaming\XBMC\userdata\addon_data\script.games.rom.collection.browser\tmp\Zombies Ate My Neighbors (U) [!].smc"
16:23:10 T:3900 M:1866424320 NOTICE: RCB_INFO: launchEmu on non-xbox
16:23:10 T:3900 M:1866424320 NOTICE: RCB_INFO: launch emu



- DigiTech - 2011-04-17

Ferdnand Wrote:Hello, I have set up my rom collection to tell the program where my mame.exe is and my roms folder, but when i go and look for them they are not listed.. any help would be appreciated....

Maybe this can help you?

Digitech Wrote:Like thecookieaddict said just add the first letter of the drive you want to use internal or external drive path (C:,E:,D;etc) in the files manager then in RCB you'll be able to see that letter and then specify your folders route.

TheCookieAddict Wrote:Originally Posted by TheCookieAddict View Post
You have to add the paths you want to choose for the emulator in the Files Manager, after that you'll be able to select them



- TheCookieAddict - 2011-04-17

malte Wrote:Did you check if there was a boxfont on the scraped site? Just to find out if it is an error in RCBs scraper or if it is just lacking content at mobygames.

I actually checked and they're not on the site, which is really why I don't wanna be dependent on these scrapers for the artwork of my ROMS, just use it for game matching but I'll get to that in a bit.


malte Wrote:Did you add a new file or changed an existing one? If you add new files you also have to do a game import to grab the new files. If you changed an existing file it may be that you have to delete XBMCs image cache to make the change happen.

I think your situation is not supported very well in RCB right now (mixing online and offline content, updating artwork, etc.). Atm I am doing some refactoring of the import pocess and I hope that I am able to add some improvements to this scenario, too.

I only changed existing artwork that's in the artwork folder you have to select during adding of a ROM collection, so for instance I used another image as boxfront but I kept the name of the image the same because I knew otherwise it wouldn't work. I haven't tried deleting XBMCs image cache, but somehow some ROMs have updated artwork, very weird.

malte Wrote:Again, I will improve this scenario in one of the next versions. I think there will be an option to skip scraping game info and just check for new images available on your local HD.

I think adding such an option would be fantastic for a lot of users messing around with the artwork, like me, because then you'd only have to do the adding of a ROM collection once, and make sure all the game matching is done correctly by RCB and change the artwork manually (which I was gonna do anyway).

The only thing I'd need then is the actual artwork, because I've been searching around for quite a while now, and I haven't found any complete SNES (or any other console for that matter) artwork sites or downloads (which I think is odd as more people then me must have wanted a complete artwork collection). Again, if someone DOES know any sites or complete downloads with SNES artwork be sure to let me know, I would appreciate all the help I can get. Smile


oxyris Wrote:Thanks to you both!

No problem man! Big Grin


Ferdnand Wrote:Hello, I have set up my rom collection to tell the program where my mame.exe is and my roms folder, but when i go and look for them they are not listed.. any help would be appreciated....

Sounds kinda like what I had, is your ROM folder on the same PC as XBMC? Because I had them on another PC which meant I had to some stuff that's explained in this post. Let me know if it works, I hated having that problem but luckily now it's solved, now I just need all the matching artwork :confused2:


- malte - 2011-04-17

@Enverex:
I will have to digg deeper into this. As a work around you can try to replace this code in default.py (line 39-44):
Code:
# Check to see if using a 64bit version of Linux
if re.match("Linux", env):
    import platform
    env2 = platform.machine()
    if(env2 == "x86_64"):
        env = "Linux64"
with this one (use "Linux" or "Linux64" depending on your system being 64bit or not):
Code:
env = "Linux"
If this works we can check if there are more problems with your system.


Fyzzle Wrote:I hope this is a quick question, but is the config.xml auto generated? Or do i have to create it myself? I have already imported a bunch of collections but need to manually add some emulator launch switches.

I'm using ubuntu 10.10 if that matters.

Edit: I did a search on the whole volume and can't find a config.xml, but everything is working.
1. You can edit Emulator launch switches with the UI since version 0.8.3 (check this wiki page)
2. You will find the config.xml in "~/.xbmc/userdata/addon_data/script.games.rom.collection.browser". Note that ".xbmc" is hidden by default and may not be shown in your file browser and found during a search.

Ferdnand Wrote:Hello, I have set up my rom collection to tell the program where my mame.exe is and my roms folder, but when i go and look for them they are not listed.. any help would be appreciated....
You already walked through the wizard and selected the paths or does the wizard not offer the paths that you needed? If it is the first option, please post your config.xml here. If it is the second option then you might follow DigiTechs suggestion.

DigiTech Wrote:Im having a little trouble making using a emulator in solo mode, RCB exits XBMC fine then i can play the emulated rom but when i decide to go back to RCB menu i have an XBMC error and cant continue selecting roms in RCB as normal.
Next is the error log from XBMC in the last part when it says launch emu is when XBMC gives the error doesnt letting me go back as normal. What could it be? Thanks!
It does not launch XBMC or it does not launch RCB? If the log that you attached is from xbmc.log then it seems that XBMC is not starting after you close the emulator.

Did you check the command at the end of "applaunch.bat"? You must be able to start XBMC with this command.

What you can try to debug this situation:
1. Open cmd.exe in Windows
2. Launch XBMC from the cmd window (with the command from applaunch.bat)
3. Start RCB and launch the emulator
4. Quit the emulator
--> If there is an error restarting XBMC, you should see the error message in the cmd window.

TheCookieAddict Wrote:Again, if someone DOES know any sites or complete downloads with SNES artwork be sure to let me know, I would appreciate all the help I can get
Not sure if the links in this post are still valid: link. And I don't know how complete/accurate the sets are.


- DigiTech - 2011-04-17

malte Wrote:It does not launch XBMC or it does not launch RCB? If the log that you attached is from xbmc.log then it seems that XBMC is not starting after you close the emulator.

Did you check the command at the end of "applaunch.bat"? You must be able to start XBMC with this command.

What you can try to debug this situation:
1. Open cmd.exe in Windows
2. Launch XBMC from the cmd window (with the command from applaunch.bat)
3. Start RCB and launch the emulator
4. Quit the emulator
--> If there is an error restarting XBMC, you should see the error message in the cmd window.

It seems it doesnt launch XBMC again, in cmd it dont send an error message just the one in the ScreenCap that i attached?

http://img688.imageshack.us/i/soloxbmc.png/


- malte - 2011-04-17

@DigiTech:
Seems to be the same problem that Schorsches had some time ago: link. Maybe his workaround helps you too?


- DigiTech - 2011-04-17

malte Wrote:@DigiTech:
Seems to be the same problem that Schorsches had some time ago: link. Maybe his workaround helps you too?

Thanks to Schorsches and you Malte, had to edit applaunch.bat and add -explorer- before the XBMC path,

explorer "C:\Program Files (x86)\XBMC\XBMC.exe"

Then everything is ok, XBMC launches then it goes to RCB.
Awesome!


- oxyris - 2011-04-17

DigiTech Wrote:Like thecookieaddict said just add the first letter of the drive you want to use internal or external drive path (C:,E:,D;etc) in the files manager then in RCB you'll be able to see that letter and then specify your folders route.

Still can't get it working. I added the paths C:\ and E:\ to the file manager (is this what you meant?) in the first screenshot. When it comes to selecting the emulator I'm not able to choose anything besides my DVD drive G:\ as in the second screenshot.

1st: http://img812.imageshack.us/i/scrn1y.png/
2nd: http://img849.imageshack.us/i/scrn2k.png/


- malte - 2011-04-17

@oxyris: Try to remove the disc from your dvd-drive and restart XBMC. This should work.


- malte - 2011-04-17

New test version available: 0.8.5

Note: This is an intermediate release. I am currently working on some refactoring of the game import and launching code and restructuring parts of the configuration. While doing this, I added lots of little improvements to the functionality and also some new features that I had in mind for a long time. Now I would like to release it in this early state to get some feedback before I start to polish everything. But if you want to test this version you have to make some changes to config.xml by hand (final version will do this automatically).

General:
  • using Dharma settings file as default (Camelot users now have to grab the old file manually)
Game Import:
  • refactoring of game import: code cleanup, little bug fixes, better error handling, ...
  • moved scraper related properties from Rom Collection to Scraper
  • support regular expressions in diskPrefix (allows handling of rom files like "MyGame (Disk 1).zip")
  • stop import when all games are imported with multigame scrapers (descfilepergame = false)
Launching Games:
  • support direct launching of savestates
  • new context menu option: Edit Game Command
  • moved useEmuSolo from Addon settings to Rom Collection properties (config.xml)
  • new placholders in launchEmu: %ROMFILE%, %ROMNAME%, %GAME%, %ASKNUM%, %ASKTEXT%
  • use regular expression in diskPrefix to check for multi rom games in zip files before launching


Changes in detail:


useEmuSolo per Rom Collection
On most small machines you will only need some of the more ressource intensive emulators to be launched in solo mode (like psX). All others can be launched side by side. Thats why I decided to move this option from global Addon settings to the RomCollection entry in config.xml. You have to add this line to every Rom Collection that should be launched in solo mode (default is False):
Code:
<useEmuSolo>True</useEmuSolo>

direct launching of savestates
Some emulators (I tested with zsnes(w) and (Win)uae) support launching savestates from command line. RCB is now able to detect the saved files and directly launch into the saved version of your game (try it out, its really coolBig Grin).

How it works:
There are two new parameters available in config.xml: "saveStatePath" and "saveStateParams". With "savestatePath" you specify where the emulator saves its statefiles. If RCB finds a statefile for the game that you want to launch, it will use the "saveStateParams" to launch the game.

Example zsnes:
Zsnes saves its statefiles at the path that you specify in zsnes configuration ("SRAMPath" in zsnes*.cfg or Config->Paths->Saves in the UI). While playing the game you can select a save slot in zsnes with "F3" (there are 10 slots available per game) and save to this slot with "F2". The statefiles are named like the romfile with an extension ".zs*" (zst, zs1, zs2, ...). You can launch a saved state with the command line option "-zs #" (where # is the number of the slot (0-9)).

The config in RCB looks like this:
Code:
<RomCollection id="1" name="SNES">            
    ...
        <saveStatePath>F:\SNES\Savestates\%ROMNAME%.zs*</saveStatePath>
        <saveStateParams>-m -zs %ASKNUM% "%ROM%"</saveStateParams>
    ...
</RomCollection>
"F:\SNES\Savestates" is the path that I told zsnes to save its statefiles. %ROMNAME% will be replaced with the name of the rom file you want to launch and ".zs*" is needed because the extension can vary from "zst" to "zs9". In saveStateParams %ASKNUM% will popup a selection of numbers from 0-9. This will select the save slot you want to launch. %ROM% will be replaced with the complete path to the rom file as usual. Note that the order of the params is important. The "%ROM%" parameter must be at the end of the command line.

Example (Win)uae:
In uae you can select the path and the name of the statefile every time you save the state. You can directly launch the file with the option -statefile=pathtofile.

In RCB this looks like this:
Code:
<RomCollection id="2" name="Amiga">            
    ...
        <saveStatePath>F:\Amiga\Savestates\%GAME%*.uss</saveStatePath>
        <saveStateParams>-statefile="%STATEFILE%"</saveStateParams>
    ...
</RomCollection>
%GAME% will be replaced with the gamename that you see while browsing your games in RCB. As you specify the statefile name every time you save a statefile, take care that you always choose the correct gamename. With the * in saveStatePath (%GAME%*) it is possible to find all files that start with the gamename and end with .uss. So it is possible to have more than one statefile per game and RCB lets you select one of them to launch. %STATEFILE% will be replaced with the complete path of the selected statefile.

Edit Game Command
"Edit Game Command" is a new option in context menu. It will launch the XBMC keyboard and the text that you enter will be saved with the selected game in db. This text will be used to replace the string %GAMECMD% in "emuParams" or "saveStateParams" before you launch the game. E.g. lots of Amiga games need special parameters for joyports etc.

My uae config looks like this:
Code:
<emulatorParams>{-%I% "%ROM%"} -s use_gui=no %GAMECMD%</emulatorParams>
My default uae config uses the mouse at joyport 0 and a joystick at joyport 1. Most two player games are better launched with two joysticks. So I use "-s joyport0=joy0 -s joyport1=joy1" as game specific command for these games.

This is not very handy atm and I only use it for games that I play quite frequently. But I think this is a start for having per game configurations. Later on I will think about import/export options for these commands etc.

new placholders in launchEmu
%ROMFILE% - will be replaced with the rom filename without path (MyGame.smc)
%ROMNAME% - will be replaced with the rom filename without path and extension (MyGame)
%GAME% - will be replaced with the name of the game that you see while browsing games in RCB
%ASKNUM% - select numbers from 0-9 (specially build for zsnes savestate handling but may be useful in other scenarios - who knows)
%ASKTEXT% - will launch the XBMC keyboard and then replaced with the text that you enter (useful for playing around with special settings like selecting graphic or sound drivers etc. - just edit the game command on every single game launch)

regular expressions in diskPrefix configuration
This is useful if you have rom names like "MyGame (Disk 1).zip", "MyGame (Disk 2).zip" and you want RCB to detect that it is a multi rom game (e.g. to pass all files to uae on command line). You can now use a regular expression to tell RCB which part of the rom filename should be detected as disk prefix. For the above example the disk prefix would look like this in config.xml:
Code:
<diskPrefix>\(Disk .*\)</diskPrefix>


Restructuring config.xml
Some scraper related properties have been moved from "RomCollection" entry in config.xml to "Scrapers/Site". If you need one of these properties in your scenario, you have to move them manually to the right place.

old config:
Code:
<config>
    <RomCollections>        
        <RomCollection id="1" name="SNES">            
            ...
            <descFilePerGame>True</descFilePerGame>
            <searchGameByCRC>True</searchGameByCRC>
            <searchGameByCRCIgnoreRomName>True</searchGameByCRCIgnoreRomName>
            <useFoldernameAsCRC>True</useFoldernameAsCRC>
            <useFilenameAsCRC>True</useFilenameAsCRC>
            ...
        </RomCollection>
        ...
    </RomCollections>
    ...
</config>

new config:
Code:
<config>
    ...
    <Scrapers>
        <Site name="SNES" descFilePerGame="true" searchGameByCRC="true" searchGameByCRCIgnoreRomName="true" useFoldernameAsCRC="true" useFilenameAsCRC="true">
            ...
        </Site>
    </Scrapers>
</config>

Ok, thanks for reading all this.Smile As you may have seen most of these features are quite special and not all users will benefit from it. But some of them really made my XBMC gaming experience a lot better. I hope some of you like to try it out and report any issues and suggestions here.

Have fun,
malte


- oxyris - 2011-04-17

malte Wrote:@oxyris: Try to remove the disc from your dvd-drive and restart XBMC. This should work.

Cool, that worked!

Also, what is the recommended N64 emulator to use with RCB? I've been using project64 on my laptop but it doesn't seem to have a commandline?

edit: Is there some option in RCB to purge the game data base and the RCB settings (i.e. remove a ROM collection)?


- benlen10 - 2011-04-18

I am enjoying RCB a lot but I just have a few questions about it.

1. Is there a way to view images like boxback, screenshot, cartridge in fullscreen in the info mode?

2. Is there a way to scrape extra info from sites like mobygames like reviews, rating, advertising, players, etc...?

3. Is RCB compatible with night purity?


Thanks for your time!