[RELEASE] Emulatopia - Addon for handling, browsing, and launching 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: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: [RELEASE] Emulatopia - Addon for handling, browsing, and launching emulator game ROMs (/showthread.php?tid=87758) |
[RELEASE] Emulatopia - Addon for handling, browsing, and launching emulator game ROMs - quakes - 2010-12-16 This is yet another addon for handling, browsing, and launching emulated games. There are a few similar addons, such as RCB and ALA (though I didn't realize ALA existed until after I had started building this), but none worked quite the way I wanted them to. So I wrote my own! As such, this was not a humongous and ambitious project, but the goal was rather simply to make something that fit my needs. I figured that others might make use of this as well, and I am thus releasing it here. Since I have not been involved at all in XBMC before (as a side note, XBMC is the single worst documented platform I've ever coded for), and do not have an excessive knowledge of Python, I have made some beginner mistakes that I would rather have avoided. But the end result works for my uses at least. Since I am a sucker for consistency, and use Confluence myself, the addon tries to mimic the look and behavior of Confluence as closely as possible. Anyway, I worked a solid two-three weeks or so to make this add-on (mostly wrestling with XBMC to make it do what I want), and I hope you guys find some use in it as well. Download link Version 0.2.4 (latest) Latest changes 0.2.4
Feature overview
How to use First of all, the add-on has been made exclusively for Windows! I do not have an xbox, nor a front-end mac/linux machine to run XBMC on. Therefore, though platform independent alternatives have been chosen where applicable, the add-on is likely not to work very well on non-Windows platforms. It could likely be modified to work on other platforms relatively easily, but I am not currently in a position to do this. So, assuming you run Windows, the second requirement is that you run XBMC Dharma, preferably RC1 or later. Most of the testing has been done on Dharma RC2. The first time you run the add-on, a dialog will pop up notifying you that you have not defined any collections. The settings dialog will then be opened. Once here, navigate to the Collections category. You should define one collection per platform (that is, one NES collection, one SNES collection, etc). Defining your collections To define a collection, first enable one. Some additional settings should then pop up, namely Console, ROM folder, ROM file extension, Emulator executable and Emulator arguments. The console setting defines what platform the ROMs belong to. This roughly corresponds to the list of platforms on GiantBomb.com for simplicity. The ROM folder should be set to the folder containing your ROMs. The ROM file extension is a comma separated list of your ROM file extensions. If all your ROMs have the same file extension, simply enter that. My NES collection consists entirely of .7z files, so I enter "7z" as the ROM file extension. My PSX collection, however, contains both .bin files and .img files, so I enter "bin,img" as the ROM file extension. The emulator executable should point to the .exe file of your emulator of choice. The emulator arguments are the command line arguments that are passed to the emulator at run-time. %ROM% is replaced by the ROM path, within quotes (to properly handle spaces in paths). Congratulations! You have now defined a collection. Now repeat this for all your platforms. Because XBMC currently only supports 100 settings per category, there is currently a hard coded limit of 15 collections. Importing your collections Now that you have defined your collections, you can launch the add-on again. This time, it will notify you that there are currently no games in the database, and ask you if you want to import them. Importing the games simply means reading the defined ROM folders, and saving them in the database. This can also be done manually via the add-on settings, by selecting "Import collections" in the General settings category. Optional: Scraping your collections Once you have imported your collections, the add-on will ask you if you want to automatically scrape these for data. This means fetching stuff like images, genres, description, etc from the GiantBomb.com wiki. Note that this will take a VERY long time if you have many games! In general, it takes somewhere between 2 and 10 seconds per game. That amounts to quite a bit if you have many games. Done! You should now, barring any unforeseen catastrophe, be able to browse, launch, and play your games. Enjoy! What do the settings do? The general settings window currently contains 6 entries.
Thanks to Props to malte for his Rom Collection Browser. Because of XBMCs aforementioned lack of documentation, I have more than once consulted his source code for working examples of things. Also thanks to henks for letting me use his awesome photograph as a background (sorry for massacring it to fit). Known bugs
Possible future features
Screenshots An image showing the browse view Another image of the browse view, this time showing a game that has been marked as "played". An example of how the collections settings might be entered. Here you see an example of the "trickery" required to get PC games to work properly - the "ROMS" are simple windows shortcuts (.lnk files) to the game executables. When the emulator executable field is left blank, the shortcut will be launched, which in turn will launch the game. - msderganc - 2010-12-16 Looks good! I'm going to try it tonight. - nate1579 - 2010-12-16 Hey can you add different views for the box art also when i set up it wont let me use box art i already have - quakes - 2010-12-16 nate1579 Wrote:Hey can you add different views for the box art I assume you mean different media views, such as poster wrap, media info, etc? I might add these in the future. It shouldn't be too hard. nate1579 Wrote:also when i set up it wont let me use box art i already have There is currently no (easy) way to use your own cover art. Sorry. Easiest fix is to upload it to the GiantBomb wiki - that way everyone can benefit! - rausch101 - 2010-12-17 Can you give an idea of how accurate your GiantBomb scraper is? I have the full rom packs for each system so i'm wondering how many games you think will be misread (this seems to be an insurmountable problem for any of the rom scrapers) - quakes - 2010-12-17 rausch101 Wrote:Can you give an idea of how accurate your GiantBomb scraper is? I have the full rom packs for each system so i'm wondering how many games you think will be misread (this seems to be an insurmountable problem for any of the rom scrapers) I have spent a good deal of time making the scraper as accurate as possible, without getting false positives. A basic overview of how the matching works:
This still fails for some games, though. If it fails, it is mostly because the game does not exist on GiantBomb, is named differently (this is what the matching rules try to alleviate), or is not marked to be for the particular platform. If you or any one else find games that don't get any matches, but you think should (i.e. the game exists on GiantBomb), then please provide the (full) file name of the ROM, a link to the game on GiantBomb, and what platform the ROM is supposed to be for. The scraper can undoubtedly be improved further, but at this point it mostly requires examples of failed scrapes to do that. - malte - 2010-12-17 This looks quite similar to what I do but with a different approach. I hope it is ok for you that I post this here. I just thought it would be interesting to hold these two approaches against each other and give both of us the option to cherry-pick the missing parts. Here is the logic that I wrote down for my scraper (in current RCB release it is implemented a bit different and leads to some mismatches, so this is the already improved version): Code: - create friendly gamename (remove extension, remove disk indicator (e.g. _Disk1), remove (...) and [...], replace "game, The" with "The game") Looks like we are checking nearly the same things with the difference that I don't replace characters like "&" etc. because they will not lead to a ratio below 0.7 (or whatever is configured). The con on my side is that there might be slightly different names of games that will lead to a ratio above the configured one and with that to mismatches. Things that you might miss in your logic (maybe just not written down): - remove sequels numbers "1" or "I" to match "Breath of Fire I" -> "Breath of Fire" - check if sequel numbers are equal (but if I read this correct you always check equality of the complete name without ratio/fuzzy) - replace digits or romes when searching for alternate titles Things that I could steal from your approach: - Removing and replacing some characters to check if there is a perfect match before I start guessing names with the fuzzy factor BTW: I hope there will be a nearly complete game db one day that can easily searched by crc values. This will ease up a lot (at least for the old systems). - quakes - 2010-12-17 malte Wrote:This looks quite similar to what I do but with a different approach.Of course it's okay! I promote collaboration to the fullest extent. malte Wrote:Things that you might miss in your logic (maybe just not written down):This is true, I had not encountered this situation amongst my own collection, but it should be easily fixable. malte Wrote:- check if sequel numbers are equal (but if I read this correct you always check equality of the complete name without ratio/fuzzy)As you said, I always check equality. The only "fuzzy" aspect to my implementation are the transforming rules. malte Wrote:- replace digits or romes when searching for alternate titlesNot sure what you mean by this. For clarification, what you refer to as "alternate titles", I refer to as "subtitles" (though I'm not entirely pleased with this choice of words; is there an "official" word?). malte Wrote:BTW: I hope there will be a nearly complete game db one day that can easily searched by crc values. This will ease up a lot (at least for the old systems).While this is a cool idea, one should remember that there is not a one-to-one mapping between ROMs and games; it is rather a many-to-one mapping (for example, I have 46 unique Contra ROMs for the NES, but they're still all Contra). In the case of packed ROMs, one would also have to unpack them before being able to calculate the CRC. Any bit rot or imperfect ROM rips would also lead to checksum mismatches. Not that I'm saying it would be impossible.. just saying that there are a lot of considerations that must be made and impracticalities that must be resolved before it could be made reality. Is anyone working on such a database at the moment? - malte - 2010-12-17 Test quakes Wrote:I think yours (subtitles) is better, but I don't think there is an official wording.malte Wrote:- replace digits or romes when searching for alternate titles What I mean is this: - Lets say you have a rom file "Alien Breed 2" - On giantbomb this one is called "Alien Breed II: The Horror Continues" --> You dont't find this game with your step 3 because it has an additional subtitle and you won't find it with step 12 because without subtitle it is "Alien Breed 2" and not "Alien Breed II". I run into this with RCB atm thats why it came to my mind quakes Wrote:Yes, I know, but tbh I thought it would not be more than a hand full of different rom files. In RCB I already look into the zip file and check the crc value of the first entry, so this works fine.malte Wrote:BTW: I hope there will be a nearly complete game db one day that can easily searched by crc values. This will ease up a lot (at least for the old systems).While this is a cool idea, one should remember that there is not a one-to-one mapping between ROMs and games; it is rather a many-to-one mapping (for example, I have 46 unique Contra ROMs for the NES, but they're still all Contra). In the case of packed ROMs, one would also have to unpack them before being able to calculate the CRC. Any bit rot or imperfect ROM rips would also lead to checksum mismatches. But of course there are a lot of situations where all this won't work. All "newer" systems with large files for example (like PS1 etc.) would take too long to compute the crc values. quakes Wrote:Not that I'm saying it would be impossible.. just saying that there are a lot of considerations that must be made and impracticalities that must be resolved before it could be made reality. Is anyone working on such a database at the moment?Jas provides crc values for thevideogamedb, but there does not seem to be much progress in this project (he killed his PC). I am not sure if ghostelement is planning to add this to thegamesdb.net. There is also an interesting discussion at macscene.net. They also plan to provide an API with crc values and it looks quite promising. - quakes - 2010-12-17 malte Wrote:What I mean is this:Ah, I see what you mean. I fix this by performing the transforming rules on both the filename and the search result. Let us say my file is named "Alien Breed 2.7z". I will then first perform a search on giantbomb for "Alien Breed 2". Assume I get two results - "Alien Breed II: The Horror Continues" and "Alien Breed 3D II: The Killing Grounds". First I will attempt to match "Alien Breed 2" to "Alien Breed II: The Horror Continues", which will fail. I will then try to match against the alias, which will probably also fail. Once I get to the third rule, I will convert roman numerals to regular integers in both the filename and the results. Thus, my new file name will be "Alien Breed 2" (unchanged, since it had no roman numerals), and my two search results will be "Alien Breed 2: The Horror Continues", and "Alien Breed 3D 2: The Killing Grounds". You see my point? This will continue until it reaches step 12, where it will remove the subtitle, thus making both the file name and the search result "Alien Breed 2", which will generate a match. However, searching for "Alien Breed 2" on giantbomb only seems to give one result, "Alien Breed 2: Assault", which is an altogether different game. So it still wouldn't have scraped that properly, sadly. One weakness is that it currently does not do any transforming of the file name before searching on giantbomb. Fixing this is on my to-do list... malte Wrote:Yes, I know, but tbh I thought it would not be more than a hand full of different rom files. In RCB I already look into the zip file and check the crc value of the first entry, so this works fine.Interesting. I will definitely keep an eye on it. The currently available and scrapable databases kind of suck, either interface-wise, structure-wise, or content-wise. EDIT: Took a closer look at the macscene thread, and that looks awesome. Will definitely be following that closely. - msderganc - 2010-12-17 quakes - Started using this last night and I love it! Much more intuitive than the other addons I've tried. A couple of questions: 1. For homebrew games, where would I add custom artwork / writeup? 2. Games like Final Fantasy II for SNES aren't scraping properly. I had to change the name to Final Fantasy IV (the Japanese release) to get it to work. Would it be possible to have it pop up close matches if nothing perfect is found? Thanks for a great addon! - paendorz - 2010-12-17 Very nice addon. Suggestion: The script should minimize xbmc when launching ROMs and maximize it afterwards. Otherwise some emulators will crash. Another thing: Obviously the addon is based on Confluence and won't work properly on other skins. Any chance to fix that? - Eldorado - 2010-12-17 Hmm.. so 3 different emu launcher apps, and all 3 using their own scrapers Is it time to hopefully merge scapers to become one standalone addon that all can use? - quakes - 2010-12-18 msderganc Wrote:Started using this last night and I love it! Much more intuitive than the other addons I've tried.Glad you liked it! msderganc Wrote:A couple of questions:Currently, there is no easy way to use art or info besides scraping. Sorry about that. If you know SQL you can enter it manually into the sqlite database, but I realize this is incredibly cumbersome and not something one can expect an end-user to do. Do you have a preferred way or format to manually enter this information? Creating .xml or plaintext files manually, entering it from within XBMC using the context menu, something else...? msderganc Wrote:2. Games like Final Fantasy II for SNES aren't scraping properly. I had to change the name to Final Fantasy IV (the Japanese release) to get it to work. Would it be possible to have it pop up close matches if nothing perfect is found? Yes, I had this issue as well. The problem lies with the incredibly silly naming scheme that Final Fantasy has. I simply renamed my final fantasy games to avoid ambiguity (I prefer this over having two Final Fantasy II anyway). The one saving grace is that they're on different platforms, preventing accidental mismatches at least. Other than attempting to hard code "Final Fantasy II for SNES == Final Fantasy IV" (something I am loathe to do, but will consider...), there is little I can do. The problem could also possibly be fixed if you managed to add "Final Fantasy II" as an alias to the "Final Fantasy IV" entry on giantbomb. However, aliases can apparently only be changed by moderators, so you'd have to take it up with one of them. I have thought about the pop-up thing as well, which is basically part of one of my listed "possible future features" - the ability to manually influence the scraping process. I don't think that including the pop-up during an automatic scrape of all games is a good idea, since you'd likely get hundreds of them if you had many games. However, a context menu entry to "manually scrape game" could be made to work this way. paendorz Wrote:Suggestion: The script should minimize xbmc when launching ROMs and maximize it afterwards. Otherwise some emulators will crash.I saw some code to do this in maltes RCB, but didn't include it since none of my emulators exhibited this behavior. Do you have an example of an emulator (or several) that does this so I can check it out? paendorz Wrote:Another thing: Obviously the addon is based on Confluence and won't work properly on other skins. Any chance to fix that?I haven't actually attempted to use the add-on together with another skin. Does it look horrible? I don't actually use any resources from the installed skin; I have merely copy-pasted relevant images and (edited) XML files from confluence to the add-on, so technically I see no reason why it couldn't be used without confluence. I haven't tried though, so anything could happen... Eldorado Wrote:Hmm.. so 3 different emu launcher apps, and all 3 using their own scrapers Perhaps so. It is an interesting proposition, at least. I think it will be somewhat hard, however. I assume not all of our add-ons have the same internal data structures, or are even interested in exactly the same data. As such, the standalone scraper would have to
This amounts to a lot of work in the end, on all our parts. Does the benefit outweigh the time spent? What if the standalone scraper actually performs worse than ones individual scraper? - wimpy - 2010-12-18 3. <- this is a "major concern" if it's not being dealt with. this is by no means meant as critisism as i have huge admiration for all 3 addons being created. they are being created due to the love of emu/retro games so i'm all for it. right now there are 3 addons using their own structure and scraper/database solutions and there are in addition 2 sites (thegamesdb.com and thevideogamesdb.com) which is trying to start a scraper service. these scripts rise up due to the fact that xbmc doesn't have a games database yet. i havn't checked the trac about this so i might be wrong as it might be in the pipeline already(?). even so what i think needs to be done is to first work together creating a scraper site covering all aspects of a games database. (read: a thetvdb.com kinda site, but for games). once that has been established the xbmc emulator "scene" have a firm platform and base to build from. i'm afraid until the first step of gathering and creating a scraper has been done we won't see a systematic games setup. so i guess this is my "two cents"-speech about the "situation" (from my point of view) + a big "thank you" for the work being done in all aspects of the emulator-related stuff going on! |