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)



- shortync - 2010-08-24

Flomaster Wrote:from home screen go into settings > addons

-=jason=-

And if that doesn't exist? =)


- ryosaeba87 - 2010-08-24

Quote:He wrote something that worked in one place. Maybe someone else will work on an applaunch.sh for os-x.

Quote:Did not know about that. If anyone comes along with a MAC/Linux compatible bash script I will be happy to include it.

Ok guys,
this is a my version of applaunch.sh bash script compatible to MacOS X, but on Linux I can't test it.

Code:
#!/bin/bash
# App Launch script - Temporarily quit XBMC to launch another program
# Tx to rodalpho @ # http://xbmc.org/forum/showthread.php?t=34635
# By Redsandro     2008-07-07
# By ryosaeba87    2010-08-24
# Updated:        2010-08-24
#     Added support for MacOSX


# Check for agruments
if [ -z "$*" ]; then
    echo "No arguments provided."
    echo "Usage:"
    echo "launcher.sh [/path/to/]executable [arguments]"
    exit
fi


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


# Is XBMC running?
if [ -n $XBMC_PID ]
then
    kill $XBMC_PID # Shutdown nice
    echo "Shutdown nice"
else
    echo "This script should only be run from within XBMC."
    exit
fi

# Wait for the kill
# sleep


# Is XBMC still running?
if [ -n $XBMC_PID ]
then
        kill -9 $XBMC_PID # Force immediate kill
    echo "Shutdown hard"    
fi

echo "$@"

# Launch app - escaped!
"$@"


# SOMETIMES xbmc starts too fast, and on some hardware if there is still a millisecond of sound being used, XBMC starts witout sound and some emulators say there is a problem with the sound hardware. If so, remove comment:
#sleep 1


# Done? Restart XBMC
$XBMC_BIN &

. . . waiting for your news Big Grin


- carabalb - 2010-08-24

Hey Malte,

First of all I want to thank you for your work on this project. I feel like a lot of people were waiting for a more complete emulator plug-in and this is definitely on the right path so thanks for that.

I've used a few different htpc programs for emulators (one of them being Game Ex) and I noticed that it comes with the databases built in. Most emulators don't need scrapers since only the newest systems are get new games, everything else has a static list.

Would it be possible to include a db file or list of some sort that automatically adds a description for the games based on the closet matching game name? I included a sample mdb file that comes built into GameEx as an example: Nintendo NES.zip]http://www.easy-share.com/1911990386/[Console] Nintendo NES.zip


- Flomaster - 2010-08-24

shortync Wrote:And if that doesn't exist? =)

then you are probably running a 9.11 version and NOT the dharma version of xbmc

-=Jason=-


- shortync - 2010-08-24

Flomaster Wrote:then you are probably running a 9.11 version and NOT the dharma version of xbmc

-=Jason=-

This is all starting to make so much more sense =)

Thanks brother.


- bmfrosty - 2010-08-24

ryosaeba87 Wrote:Ok guys,
this is a my version of applaunch.sh bash script compatible to MacOS X, but on Linux I can't test it.

Code:
#!/bin/bash
# App Launch script - Temporarily quit XBMC to launch another program
# Tx to rodalpho @ # http://xbmc.org/forum/showthread.php?t=34635
# By Redsandro     2008-07-07
# By ryosaeba87    2010-08-24
# Updated:        2010-08-24
#     Added support for MacOSX


# Check for agruments
if [ -z "$*" ]; then
    echo "No arguments provided."
    echo "Usage:"
    echo "launcher.sh [/path/to/]executable [arguments]"
    exit
fi


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


# Is XBMC running?
if [ -n $XBMC_PID ]
then
    kill $XBMC_PID # Shutdown nice
    echo "Shutdown nice"
else
    echo "This script should only be run from within XBMC."
    exit
fi

# Wait for the kill
# sleep


# Is XBMC still running?
if [ -n $XBMC_PID ]
then
        kill -9 $XBMC_PID # Force immediate kill
    echo "Shutdown hard"    
fi

echo "$@"

# Launch app - escaped!
"$@"


# SOMETIMES xbmc starts too fast, and on some hardware if there is still a millisecond of sound being used, XBMC starts witout sound and some emulators say there is a problem with the sound hardware. If so, remove comment:
#sleep 1


# Done? Restart XBMC
$XBMC_BIN &

. . . waiting for your news Big Grin

I will try and find some time to test it.


- bmfrosty - 2010-08-24

malte Wrote:Not really. Maybe I have to add some more debug logging around this to find out what happens. I remember that I had a similar problem one time but I did not manage to reproduce it. So you still have this issue on every start?

Yes. Every time. It's a strange one.


- Tomkun - 2010-08-24

malte Wrote:Can you show me your complete config.xml? Did you see that fileTypeForMainViewGameInfo2 and fileTypeForGameInfoView2 are referenced on two different pages?

config.xml is here.

I can't see the image on any of the main views, but if I open up the info view for a game, there it is.

malte Wrote:Actually no scraping but I compiled a set of game descs with a working parser config: http://romcollectionbrowser.googlecode.com/files/gamedesc.zip (descriptions coming from RX project). The files are quite large so RCB will need some time to parse them. Check the wiki how to find your games inside the desc files: http://code.google.com/p/romcollectionbrowser/wiki/Preview#Add_game_description

Thank you, thank you, thank you! I have visited the site and taken a look at their synopsis editor, but couldn't find a way to download any info...


- TutAmongUs - 2010-08-24

I have a question. It mentions copying your ROMs. That is bad when several tens of GB of ROMs are involved. Can it not index your existing archive in place? Also, without digging through hundreds of posts, is there a start-up script for SDLMame?

Thanks, and I spotted it and installed it immediately before I ever saw this thread. :-)


- Tomkun - 2010-08-24

TutAmongUs Wrote:I have a question. It mentions copying your ROMs. That is bad when several tens of GB of ROMs are involved. Can it not index your existing archive in place? Also, without digging through hundreds of posts, is there a start-up script for SDLMame?

Thanks, and I spotted it and installed it immediately before I ever saw this thread. :-)

I think it does index them... It certainly hasn't copied mine anywhere.


- Metal Madness - 2010-08-24

Code:
20:20:00 T:140637197555776 M:1495654400    INFO: initializing python engine.
20:20:00 T:140637197555776 M:1495654400   DEBUG: new python thread created. id=2
20:20:00 T:140636605417232 M:1495654400   DEBUG: thread start, auto delete: 0
20:20:00 T:140636605417232 M:1495654400   DEBUG: Python thread: start processing
20:20:00 T:140636605417232 M:1495519232  NOTICE: -->Python Interpreter Initialized<--
20:20:00 T:140636605417232 M:1495519232   DEBUG: Process - The source file to load is /home/metal_madness/.xbmc/addons/script.games.rom.collection.browser/default.py
20:20:00 T:140636605417232 M:1495519232   DEBUG: Process - Setting the Python path to /home/metal_madness/.xbmc/addons/script.games.rom.collection.browser:/usr/lib/xbmc/addons/script.module.pil/lib:/home/metal_madness/.xbmc/addons/script.module.elementtree/lib:/usr/lib/xbmc/addons/script.module.pysqlite/lib:/usr/lib/xbmc/system/python/python24.zip:/usr/share/xbmc/system/python/lib/python24.zip:/usr/share/xbmc/system/python/lib/python2.4/:/usr/share/xbmc/system/python/lib/python2.4/plat-linux2:/usr/share/xbmc/system/python/lib/python2.4/lib-tk:/usr/share/xbmc/system/python/lib/python2.4/lib-dynload
20:20:00 T:140636605417232 M:1495519232   DEBUG: Process - Entering source directory /home/metal_madness/.xbmc/addons/script.games.rom.collection.browser
20:20:00 T:140636605417232 M:1495519232   DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/termios.so. flags: 2
20:20:00 T:140636605417232 M:1495519232   DEBUG: Loading: /home/metal_madness/.xbmc/temp/termios.so
20:20:00 T:140636605417232 M:1495519232   DEBUG: RegisterExtensionLib, adding termios.so (0x292ace0)
20:20:00 T:140636605417232 M:1495519232   DEBUG: xbp_dlsym - load symbol inittermios
20:20:00 T:140636605417232 M:1494884352    INFO: -->Python script returned the following error<--
20:20:00 T:140636605417232 M:1494884352   ERROR: Error Type: exceptions.ImportError
20:20:00 T:140636605417232 M:1494884352   ERROR: Error Contents: No module named pysqlite2
20:20:00 T:140636605417232 M:1494884352   ERROR: Traceback (most recent call last):
                                              File "/home/metal_madness/.xbmc/addons/script.games.rom.collection.browser/default.py", line 30, in ?
                                                import gui
                                              File "/home/metal_madness/.xbmc/addons/script.games.rom.collection.browser/resources/lib/gui.py", line 7, in ?
                                                from pysqlite2 import dbapi2 as sqlite
                                            ImportError: No module named pysqlite2
20:20:00 T:140636605417232 M:1494884352    INFO: -->End of Python script error report<--
20:20:00 T:140637197555776 M:1494884352   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
20:20:00 T:140637197555776 M:1494884352   DEBUG: Alloc resources: 0.00ms (0.00 ms skin load)
20:20:00 T:140636605417232 M:1494884352    INFO: Python script stopped
20:20:00 T:140636605417232 M:1494884352   DEBUG: Thread 140636605417232 terminating
20:20:00 T:140637197555776 M:1494884352   DEBUG: python thread 2 destructed
20:20:02 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 39, sym: 115, unicode: 115, modifier: 0
20:20:02 T:140637197555776 M:1494941696   DEBUG: OnKey: 61523 pressed, action is ActivateWindow(shutdownmenu)
20:20:02 T:140637197555776 M:1494941696   DEBUG: Activating window ID: 10111
20:20:02 T:140637197555776 M:1494941696   DEBUG: Checking if window ID 10111 is locked.
20:20:02 T:140637197555776 M:1494941696   DEBUG: ------ Window Init (DialogButtonMenu.xml) ------
20:20:02 T:140637197555776 M:1494941696    INFO: Loading skin file: DialogButtonMenu.xml
20:20:02 T:140637197555776 M:1494941696   DEBUG: Load DialogButtonMenu.xml: 4.47ms
20:20:02 T:140637197555776 M:1494941696   DEBUG: Alloc resources: 6.50ms (4.63 ms skin load)
20:20:03 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 111, sym: 273, unicode: 0, modifier: 0
20:20:03 T:140637197555776 M:1494941696   DEBUG: OnKey: 61478 pressed, action is Up
20:20:03 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 111, sym: 273, unicode: 0, modifier: 0
20:20:03 T:140637197555776 M:1494941696   DEBUG: OnKey: 61478 pressed, action is Up
20:20:03 T:140637197555776 M:1494941696    INFO: LIRC Initialize: using: /dev/lircd
20:20:03 T:140637197555776 M:1494941696   DEBUG: Failed to connect to LIRC. Retry in 20s.
20:20:04 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 111, sym: 273, unicode: 0, modifier: 0
20:20:04 T:140637197555776 M:1494941696   DEBUG: OnKey: 61478 pressed, action is Up
20:20:04 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 111, sym: 273, unicode: 0, modifier: 0
20:20:04 T:140637197555776 M:1494941696   DEBUG: OnKey: 61478 pressed, action is Up
20:20:04 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 111, sym: 273, unicode: 0, modifier: 0
20:20:04 T:140637197555776 M:1494941696   DEBUG: OnKey: 61478 pressed, action is Up
20:20:04 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 111, sym: 273, unicode: 0, modifier: 0
20:20:04 T:140637197555776 M:1494941696   DEBUG: OnKey: 61478 pressed, action is Up
20:20:04 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 116, sym: 274, unicode: 0, modifier: 0
20:20:04 T:140637197555776 M:1494941696   DEBUG: OnKey: 61480 pressed, action is Down
20:20:05 T:140637197555776 M:1494941696   DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
20:20:05 T:140637197555776 M:1494941696   DEBUG: OnKey: 61453 pressed, action is Select
20:20:05 T:140637197555776 M:1494941696   DEBUG: ExecuteXBMCAction : Translating XBMC.Quit()
20:20:05 T:140637197555776 M:1494941696   DEBUG: ExecuteXBMCAction : To XBMC.Quit()
20:20:05 T:140636871501584 M:1494941696   DEBUG: Thread 140636871501584 terminating (autodelete)
20:20:05 T:140636654671632 M:1494941696   DEBUG: Thread 140636654671632 terminating (autodelete)
20:20:05 T:140636674049808 M:1494941696   DEBUG: Thread 140636674049808 terminating (autodelete)
20:20:05 T:140637197555776 M:1494941696   DEBUG: CAnnouncementManager - Announcement: ApplicationStop from xbmc
20:20:05 T:140637197555776 M:1494941696  NOTICE: Storing total System Uptime
20:20:05 T:140637197555776 M:1494941696  NOTICE: Saving settings
20:20:05 T:140637197555776 M:1494941696  NOTICE: stop all
20:20:05 T:140637197555776 M:1494941696   DEBUG: NetworkMessage - Signaling network services to stop
20:20:05 T:140637197555776 M:1494941696  NOTICE: ES: Stopping event server
20:20:05 T:140637197555776 M:1494941696   DEBUG: CZeroconfAvahi::doRemoveService named: servers.jsonrpc
20:20:05 T:140637197555776 M:1494941696   DEBUG: NetworkMessage - Waiting for network services to stop
20:20:05 T:140637197555776 M:1494941696  NOTICE: stopping zeroconf publishing
20:20:06 T:140636690835216 M:1494958080   DEBUG: Thread 140636690835216 terminating
20:20:06 T:140636860917520 M:1494958080  NOTICE: ES: UDP Event server stopped
20:20:06 T:140636860917520 M:1494958080   DEBUG: Thread 140636860917520 terminating
20:20:06 T:140636852524816 M:1494958080  NOTICE: DS: DBUS server stopped
20:20:06 T:140636852524816 M:1494958080   DEBUG: Thread 140636852524816 terminating
20:20:06 T:140637197555776 M:1494958080  NOTICE: stop dvd detect media
20:20:06 T:140636894635792 M:1494958080   DEBUG: Thread 140636894635792 terminating
20:20:06 T:140637197555776 M:1494958080  NOTICE: stop sap announcement listener
20:20:06 T:140637197555776 M:1494958080  NOTICE: clean cached files!
20:20:06 T:140637197555776 M:1494958080  NOTICE: unload skin
20:20:06 T:140637197555776 M:1494958080   DEBUG: CGUIAudioManager::DeInitialize
20:20:08 T:140637197555776 M:1495011328   DEBUG: ------ Window Deinit (MyPrograms.xml) ------
20:20:08 T:140637197555776 M:1495113728   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
20:20:08 T:140637197555776 M:1495113728   DEBUG: ------ Window Deinit (Pointer.xml) ------
20:20:08 T:140637197555776 M:1495113728   DEBUG: ------ Window Deinit (DialogMuteBug.xml) ------
20:20:08 T:140637197555776 M:1501351936  NOTICE: stop python
20:20:08 T:140637197555776 M:1501351936  NOTICE: stopped
20:20:08 T:140637197555776 M:1501351936  NOTICE: destroy
Confused


- malte - 2010-08-24

@bmfrosty:

I have uploaded a new version with some more logging around the time checking code. Would be great if you could test it and post your xbmc.log here. I want to see what time is read by RCB and what it saved to database.

You find it here: http://romcollectionbrowser.googlecode.com/files/script.games.rom.collection.browser-0.6.1g.zip


@Tomkun:
Sorry. You found a bug in documentation. It must be "fileTypeForMainView1" instead of "fileTypeForMainViewGameInfo1". I will fix this in the wiki.


@metal Madness:
see here: http://code.google.com/p/romcollectionbrowser/wiki/Main#Known_issues_%280.5.4_on_some_linux_distributions%29


- Metal Madness - 2010-08-25

malte Wrote:@metal Madness:
see here: http://code.google.com/p/romcollectionbrowser/wiki/Main#Known_issues_%280.5.4_on_some_linux_distributions%29
Thanks ^^
I copied it by accident in the user addon folder instead of the usr addon folder ^^"


- malte - 2010-08-25

@ryosaeba87:

I tested your applaunch on Linux and it works fine. Thanks a lot, will add this to the next release.


- Tomkun - 2010-08-26

@malte,

Is it possible for the images to not be distorted when they are displayed? For example portrait images get squished into landscape format and vice versa. If they could just be resized so that they fit within the bounds of the imagebox, that would be better.