Jump to content


Photo

Xbmc Shortcut Creator


  • Please log in to reply
181 replies to this topic

#1 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderator
  • PipPipPipPipPipPipPipPipPipPip
  • 6,567 posts
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 11 March 2009 - 12:46 PM

IPB Image


One of the handier features of XBMC is it's ability to boot an emulator and have it load a given ROM right away. This is done via shortcut files, tiny text documents that detail with where the emulator is, where the ROM is, and so on and so forth.

The catch is that creating these shortcut files for each of your ROMs can potentially be... "somewhat tedious". The purpose of this program is to automate the process as much as is possible.

More shortcuts with less work. smile.gif

Anyway, here ya go.

You'll need the Sun Java VM, assuming you don't already have it (you might need to reboot after installing).

v1.0 - 11/03/2009
Initial release.

v2.0 - 16/03/2009
Including thumb paths in shortcuts is now optional.

v3.0 - 19/03/2009
Bug fix, would incorrectly identify extensions on occasion.

v4.0 - 20/04/2009
Support for the Xtras icon directory layout.

v5.0 - 30/04/2009
The use of the "&" symbol is now acceptable in ROM names.

v6.0 - 06/05/2009
Added INI file support.

v7.0 - 29/11/2009
Thumbnail paths no longer embedded in shortcuts by default. Additional ROM extensions added to the watch list.

v8.0 - 22/01/2010
Support for sub-folders included in "listing.txt".

v9.0 - 24/01/2010
Bug fix, possible crash when dealing with multiple sub-directories of ROMs.

v10.0 - 19/04/2010
Detected ROM file extensions are now handled by "CutCreator.ini", so the list can be altered by users.

v11.0 - 20/04/2010
"GenerateDirectoryListing.bat" now accepts optional parameters.
First is the target search directory, second is where the ROMs are located on the console.
Do not include trailing slashes when entering paths as parameters!!

"CutCreator.bat" also now accepts optional parameters.
If you use the "/defaults" arguement, it won't ask you any questions when it runs.
(It'll assume everything in the listing/INI files is correct).
You may also specify an alternate INI file to use by simply throwing in its name as an arguement.

Refer here for more information on using these parameters.

v12.0 - 24/04/2010
"GenerateDirectoryListing.bat" now accepts a third optional parameter.
This is the path to the folder containing art you wish to use with your CUTs. This will generate an
extra listing file, called "Thumbs.lst", which "CutCreator.bat" will use to copy any identically
titled images alongside your CUT files.

JPG/PNG files will be detected, if both are present, PNG will be used. Files will be renamed to use
a TBN extension.

v13.0 - 17/05/2010
If FBL's "favorites.ini" file is present in the CutCreator directory, you may opt to have shortcuts display
according to the game titles detailed in that file. Useful for MAME-style games (eg, "mslug" will automatically
display as "Metal Slug: Super Vehicle-001" within XBMC).

v14.0 - 18/05/2010
When using FBL's "favorites.ini", CutCreator now attempts to "guess" the parent titles of child sets not
explicitly covered by the INI file (eg, "mslug3nd" will automatically display as
"Metal Slug 3 (mslug3nd, child of mslug3)" if the INI offers no specific title for that child ROM).

v15.0 - 30/05/2010
No longer uses FBL's "favorites.ini" - now instead uses the included file "Game Titles.txt", based on the MAME source, v0.138 (you'd think they'd be up to at least v0.8 or something by now...).
When using this file to determine titles, including regional + child set info is optional.
Deprecated Xtras-icon directory layout support re-documented as for use with XPort screenshot folders.

v16.0 - 31/05/2010
Fixed crash when dealing with short filenames.

v17.0 - 03/06/2010
Screenshot paths can now be incorporated into "Game Titles.txt", and can optionally be incorporated into CUTs.
Included "Game Titles (C64).txt" for Commodore 64. Replace the default version ("Game Titles.txt")
with this if you wish to use it. It's based on the GB64 v07 Database.

Edited by Bomb Bloke, 16 September 2010 - 11:21 AM.


#2 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 11 March 2009 - 04:39 PM

Sounds awesome. Mind posting the instructions here so I can see what it does BB?

You know anything about XBox programming? I'd like to make a program similar to the launcher program that could do in-depth searches and filters on all of the games for all the emulators included in the Xtras. Between that and the cut files, we could make it so you could find and load any version of any game you desired playing.

I got the ideas, I just don't have the skills. But I'm willing to bet 95% of the work or more is already done with the fixed romnames in the Xtras and the synopsis stuff.

Later,
~Rx

#3 Tweakster

Tweakster

    X-S Young Member

  • Members
  • Pip
  • 47 posts

Posted 11 March 2009 - 08:40 PM

QUOTE(Bomb Bloke @ Mar 11 2009, 06:22 AM) View Post

Here ya go.

You'll need the Sun Java VM, assuming you don't already have it (you might need to reboot after installing).


Oh my god, Oh my god.........I cannot believe it!!!
I was just thinking of asking you if it is possible to make a shorcut Creator/Application thats why i logged on here HA it like you read my mind Bomb Bloke Thank you sooooooo much
Cheers Mate

Could someone Please upload it to another filesharing site I have been trying for the last 20 min to get this file from mediafire. when I do either the page will not load or i get a
There was an error connecting to a relevant database. Please try your request again in a few moments.
If someone could I would really be thankful

Edited by Tweakster, 11 March 2009 - 08:56 PM.


#4 Tweakster

Tweakster

    X-S Young Member

  • Members
  • Pip
  • 47 posts

Posted 11 March 2009 - 10:47 PM

Thanks Again Bomb Bloke biggrin.gif
Very Simple Application and instructions are included for those scared they would not know how to work it laugh.gif

#5 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderator
  • PipPipPipPipPipPipPipPipPipPip
  • 6,567 posts
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 12 March 2009 - 02:54 AM

Glad you like it. smile.gif

QUOTE(ressurectionx @ Mar 12 2009, 12:15 AM) View Post
Sounds awesome. Mind posting the instructions here so I can see what it does BB?

I tend to get rather long winded when writing instructions. Hence I included them in the archive. Long story short, you point it at a folder of ROMs, and it gives you a folder of shortcuts. Also probably worth pointing out that it expects the ROMs to already be on your console; you don't need to mirror your collection on a PC.

QUOTE(ressurectionx @ Mar 12 2009, 12:15 AM) View Post
You know anything about XBox programming? I'd like to make a program similar to the launcher program that could do in-depth searches and filters on all of the games for all the emulators included in the Xtras. Between that and the cut files, we could make it so you could find and load any version of any game you desired playing.

I got the ideas, I just don't have the skills. But I'm willing to bet 95% of the work or more is already done with the fixed romnames in the Xtras and the synopsis stuff.

"Launcher program"? Do you mean that XBMC script?

(Programs that run within XBMC are in Python, simple uncompiled text files. Actual X-Box programs are in some sort of C variant, compiled into XBE files. Neither of these are my "native language" but I can muddle along in them).

#6 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 12 March 2009 - 02:37 PM

Good question BB. I didn't know the answer until you told me all that. It's a python script then, since it doesn't load up another program like an emulator and works right in the XBMC program.

I think Python would be the best way then, since this would be designed to work exclusively with all of the relevant synopsis information from within XBMC before launching the emu for the rom of your choice.

I figure it would be a simple interface that would allow the end user to...

1) Bring up a search prompt and virtual keyboard so the user could type in the name or a partial of the name of the game and it would search through all of the synopsis files and bring all the results back to the user in a scroll box. This would then show the user any game that had the word(s) entered in the query, as well as any possible sequels you may have not even known about. (The synopsis files may need to be merged and stripped of any unrelevant information to save time and make the programming easier, but we'd cross that bridge when we got there).

2) Bring up a box (that may have tabs to flip through options) that would easily allow the user to select and de-select genres, # of players, Console, etc. to narrow a search to their specifications.

3) Be able to use both of these abilities in tandem with each other.


Once a game was chosen, the script would load the games via a cut-file just like loading games made from cuts made by your cut program would do. In order to do this though, it would have to be able to find the rom on your hard drive before it loaded up the emulator (since I believe doing this step in the emulator itself would require also coding in C and probably adding countless hours of unneeded work). I figure it could search for any rom you chose by CRC headers associated with that romname in the search results list, and then plug that final piece into the cut file for the game. It would probably be best to make it only search for the rom in the relevant console rom-folder too since this search would probably take a long time for someone who had 10,000 roms on their Box... theoretically speaking, of course.

These cut files that you make when choosing a game would then be saved to a "CUT" folder and would be easily accessed by the user in the future without having to use the search by loading their previously searched and played titles in the CUT folder.

Currently madmab is working out in his head how to do this search/filter stuff within the emulators themselves. Unfortunately, I'm useless when it comes to coding so I can't do anything. Maybe you guys could put your heads together on this.

Thanks for the interest, and what do you think?

~Rx

#7 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderator
  • PipPipPipPipPipPipPipPipPipPip
  • 6,567 posts
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 13 March 2009 - 04:02 AM

QUOTE(ressurectionx @ Mar 12 2009, 10:13 PM) View Post
1) Bring up a search prompt and virtual keyboard so the user could type in the name or a partial of the name of the game and it would search through all of the synopsis files and bring all the results back to the user in a scroll box. This would then show the user any game that had the word(s) entered in the query, as well as any possible sequels you may have not even known about. (The synopsis files may need to be merged and stripped of any unrelevant information to save time and make the programming easier, but we'd cross that bridge when we got there).

2) Bring up a box (that may have tabs to flip through options) that would easily allow the user to select and de-select genres, # of players, Console, etc. to narrow a search to their specifications.

Hopefully this sort of code can be stolen from the YouTube script. If you've never used that, give it a go, see what it's like.

(Note that XBMC scripts can sometimes take a while to start, and there isn't always a sign that they're doing that. If you start a script, wait at least half a minute before assuming it didn't work).

QUOTE(ressurectionx @ Mar 12 2009, 10:13 PM) View Post
Once a game was chosen, the script would load the games via a cut-file just like loading games made from cuts made by your cut program would do.

Not sure on this. I'd need to check how the current launcher scripts do it.

QUOTE(ressurectionx @ Mar 12 2009, 10:13 PM) View Post
I figure it could search for any rom you chose by CRC headers associated with that romname in the search results list, and then plug that final piece into the cut file for the game. It would probably be best to make it only search for the rom in the relevant console rom-folder too since this search would probably take a long time for someone who had 10,000 roms on their Box... theoretically speaking, of course.

"Long time" is an understatement. To check the CRC on a given ROM it'd need to unzip it then calculate the hash. Then it'd need to do that over and over until it found the correct file. Unzipping stuff takes enough time as it is, but when you consider that some ROMs can be pushing 64mb in size (and may even be ROM sets made of multiple files)... ugh.

Far easier to just assume the user has already named all their ROMs according to a DAT, then simply check to see if a file with the correct name exists. Way less work both in terms of coding and in terms of CPU processing time.

#8 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 13 March 2009 - 02:31 PM

I'm just the idea man. Thanks for setting me straight there. cool.gif

Whatever way you think it would work best and would be the easiest to code. I'm pretty flexable on most of the major stuff, as long as it doesn't require me to add 500 hours re-arranging synopsis stuff to get it done (and possibly conflicting with madmab's work inside the emus with the synopsis stuff)

I agree that it should assume that the user is using the Xtras. If they aren't yet, they shouldn't be jumping to one of the last pieces of the puzzle.

Another alternative would be to create all of the cut files for all of your roms as a one-shot thing before ever using the synopsis and have the Box search for your matching CRCs then (or the names like you suggested) and making all the cut files at once. This way when you were searching it should be really quick, comparatively speaking, right BB?

I'll check out that youtube thing when I get a chance this weekend... probably Sunday. I know I tried one before, but it didn't work right. Hopefully I can get it set up pretty easy and the newer program is more user friendly. The last time I tried it was maybe 2 years ago. I'm not really familiar with doing anything within XBMC except for setting up my folders with the wide icons, playing music and videos, and jamming to some Karaoke at this point.

~Rx

#9 Ez0n3

Ez0n3

    X-S Member

  • Dev/Contributor
  • Pip
  • 74 posts
  • Xbox Version:unk
  • 360 version:unknown

Posted 14 March 2009 - 08:56 AM

Nice!

Just figured out how to cache thumbs for cuts, but it uses a tbn files instead of the embedded thumb tag.
Xbe Style Thumbnails (.tbn) For Shortcut (.cut) Files

You might want to incorporate it -hint -hint wink.gif


#10 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderator
  • PipPipPipPipPipPipPipPipPipPip
  • 6,567 posts
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 16 March 2009 - 02:30 PM

Done.

#11 nate1579

nate1579

    X-S Senior Member

  • Members
  • PipPip
  • 242 posts
  • Location:Look Behind you then a little to the left.
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 19 March 2009 - 02:17 AM

bb

on some of my roms the script cuts out some names for snes games
example

QUOTE
<shortcut>
<path>G:\Emulators\znes\default.xbe</path>
<label>Adventures of Batman & R</label>
<thumb>G:\Emulators\znes\artwork\Shots 1\Adventures of Batman & R.png</thumb>
<custom>
<game>G:\Emulators\znes\roms\Adventures of Batman & R.bin</game>
</custom>
</shortcut>




i guess the name is to long or somthign can you imcorparate fix to allow longer names or if they aint the problem what is

thanks i been wanting something like this


just about 20 games do it

#12 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderator
  • PipPipPipPipPipPipPipPipPipPip
  • 6,567 posts
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 19 March 2009 - 02:34 AM

That's odd.

I assume you've checked that the actual FILENAMES aren't cut down? If the game loads when you select the shortcut, then that means they are, and there's nothing I can do about that... You'd need to rename the ROMs.

If the shortcuts do NOT match the ROM names, please stick a copy of your "listing.txt" file on PasteBin for me to take a look at.

#13 nate1579

nate1579

    X-S Senior Member

  • Members
  • PipPip
  • 242 posts
  • Location:Look Behind you then a little to the left.
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 19 March 2009 - 02:39 AM

listing
QUOTE







checked everything freezes xbox


example of what happens
QUOTE



i even tried remaking it

so i guess it has to do somthign with the creating process of the cut files

sorry if im a bother bb

Edited by nate1579, 19 March 2009 - 02:44 AM.


#14 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderator
  • PipPipPipPipPipPipPipPipPipPip
  • 6,567 posts
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 19 March 2009 - 04:22 AM

Well, I worked out what was happening... and how to fix it... But I still have no idea why it was happening. blink.gif

(Changed the upload link in the first post again).

Edit:

Ah, I've worked it out.

"Adventures of Batman & Robin.zip"

First it noticed the "zip" extension, so it trimmed off four characters.

"Adventures of Batman & Robin"

Then it kept checking... Soon it decided there was a "bin" extension, so it trimmed off ANOTHER four characters...

"Adventures of Batman & R"

Once it finished going through the "known ROM extensions" list, it then copy'n'pasted that around the CUT file.

Whoops.

Edited by Bomb Bloke, 19 March 2009 - 04:33 AM.


#15 nate1579

nate1579

    X-S Senior Member

  • Members
  • PipPip
  • 242 posts
  • Location:Look Behind you then a little to the left.
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 19 March 2009 - 06:25 PM

k ill give it a try here in a sec





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users