Jump to content
LaunchBox Community Forums

Lightspeed: Ultra-Fast Mame Importer Tool


Jason Carr

Recommended Posts

So I just tested the new version and I just love it! But I also noticed a few things: 1. When I try to start a CHD game with a companion ROM that was created through Lightspeed I get this error message: error.jpg It doesn’t matter if I try to start the game through LaunchBox or within MAMEUIFX itself. I always get the same error. Well, the game starts anyway but before I can play I have to confirm 4 times the same error message. 2. Like you said is the fix for export releases not perfectly working. So I did go through every game of the “All Killer, No Filler” filter and created a list of all games which only refer to another game version in the notes, because I think that the games which are considered as the best what MAME offers should have proper notes :) Note: Some games were imported multiple times in different versions, so I’ve ignored them if one version had the notes of the parent. If a game had detailed notes for its export release or updated version I ignored it as well.
aerofgts altbeast bayroute congo cotton dkongjr dkong3 esprade eswat fantjour gunfront kicker kidniki liquidk liquidku mappy metmqstr mysticri nemesis plsmaswd plotting rvschool rungun invaders spf2t ssi vendetta vendetta2p drmario excitebk wizdfire xsleena
Link to comment
Share on other sites

Thanks for testing it! I cannot reproduce the problem with the dummy file, but I wonder if it's due to the fact that those are regular .txt files only named .zip. Works for me though! :) Since I'm using 7zip for other things, I decided to create dummy files that will be actual zip files from now on, so I hope that fixes it for you. It will be available in the next version! About the metadata from History... that's very tricky. Look at this example for Altered Beast: History.dat lists:
$info=altbeast, $bio Altered Beast (c) 1988 SEGA Enterprises, Ltd. Re-Edition. See the original version; "Altered Beast [Model 317-0066]".
When I search for "317-0066" then I get to this entry:
$info=altbeast2,altbeast4, $bio Altered Beast (c) 1988 Sega. Export release. Game developed in Japan. For more information about the game itself, please see the original Japanese release entry; "Juuouki". - TECHNICAL - Runs on the Sega "System 16B" hardware. Game ID: 317-0066
Now look at what Lightspeed is doing with "altbeast4": historyproblem-1.png That means that it's indeed working and looking for the source entry, unless it's sent into a 3rd loop. So at this point I was already sent to 2 loops. Searching for "Juuouki", now I finally get to this entry:
$info=altbeastj3,altbeastj2,altbeastj,altbeastj1,altbeastj3d, $bio Juuouki (c) 1988 Sega. The goddess Athena has been abducted by the Lord of the Underworld. Her father, the great god Zeus, searched for a brave warrior strong enough to save her. He chose a brave warrior who died with honour & courage on the battlefield. Zeus raised the warrior from the grave and granted him the power to morph into a powerful, holy beast in order to do battle against the unspeakable horrors of the Underworld. Juuouki is a 1-player sideways scrolling beat-em-up. The game begins with the player controlling the human form of the resurrected warrior. During the levels the warrior will be attacked by a number of flashing animals. Destroying these creatures will result in an orb being dropped. If the player picks up an orb, he will begin his transformation from human into 'Beast'. Once 3 orbs have been collected, the transformation is complete. In beast form the player's character is much faster and stronger than in the human form, and also has the ability to throw fireballs at the enemy. At the end of each stage, after the boss fight, the player's special powers are taken from him and he once again reverts to human form. The action in Juuouki veers from being untypically slow-paced and sedate for a game of this nature, but the game's premise and graphical flair helped to separate it from other rivals of the genre. - TECHNICAL - Game ID : 317-0065
To be able to capture the information for the export entries I had to add a second loop to the program, which slowed things down quite a bit in relation to the first version of Lightspeed. If I add a third loop just to *chase* that information, then things will get very slow. It's doable, but then I will need to rename the program "TurtleSpeed"! :P I think the only two options to make sure things are kept fast and the info is correct are: 1) We see if Alexis can fix this on his own History.dat or... 2) I create a parser that reorganizes History.dat and runs all those loops to get the maximum amount of info possible and then instead of packaging history.dat, I will need to package my own modified version of it. This would take the burden from the user, to have to wait for this to run, but then the user will be dependent of my updates to get the latest History, instead of simply downloading and updating it themselves! -Kris
Link to comment
Share on other sites

I guess that you are very proud that your tool works literally with lightspeed and I must admit that it impresses me every time. But what prevents you to just make this optional? A checkbox with a little note that it will slow down the import would completely work for me. Of course there are some people who don’t really care about the notes and love the speed of the program but on the other hand there exists people like me who want proper and accurate metadata and don’t mind to wait a little bit longer. To be honest I don’ really care if the import takes a few seconds or a few minutes as long as the result is good. Your tool could probably take an hour I would still love it :)
Link to comment
Share on other sites

I totally understand and trust me, I'm VERY anal about getting things right as much as possible! It's just so hard with this because what history.dat refers as the original game, sometimes this game is just one of the many clones available! If both matched, like MAME and history.dat called the original game the main game, then things would be much easier and a lot of code would be unnecessary, but as it stands it's a constant chasing and each regex needs to contemplate 10+ scenarios (!!!!!) because of the variations in the way the entries are written. I'm thinking of another route, but not sure if it will work: - Capture both main and all clones, grouped into arrays, adding the history info to each one of them, then check one by one to see which one has the biggest number of characters, assuming that this just means more complete notes and assume this is the correct source to extract the info from. I might try that and see what kind of results I can get. About the checkbox to make a 3rd loop optional, that's a possibility! -Kris
Link to comment
Share on other sites

I spent some time this weekend writing a parser to help Alexis with History.dat He wanted to get a list of all entries present in MAME but not present in History.dat, so he can complete History.dat by adding all the missing MAME games AND SoftwareList games. The parser finds everything missing and spits lists based on Software list name, separated into Clones Missing and Main Missing. It will make his life much easier and we should see some nice progress on that front in the near future (although, it's still a lot of manual work on his side!) :) Hopefully he will able to return the favor and maybe we will be able to find a way to get those notes for Export games parsed from the main game instead, at some point :) -Kris
Link to comment
Share on other sites

I'm thinking of another route, but not sure if it will work: - Capture both main and all clones, grouped into arrays, adding the history info to each one of them, then check one by one to see which one has the biggest number of characters, assuming that this just means more complete notes and assume this is the correct source to extract the info from. I might try that and see what kind of results I can get.
@CriticalCid, the solution above worked much better than expected. All the games you mentioned in that list got the correct metadata now! :) It's a proof of concept at this point, so I'm writing things to disk, which is pretty slow compared to arrays, but I needed to see if this would work first. I'm doing this: 1) First loop reads history.dat and spits thousands of .txt files to a folder, each one is named after the rom and with extension .txt. Each one of those files carries the Notes gathered as is. 2) Second loop: a) reads and parses MAME's xml b) creates folders for the parent roms and moves the related parent .txt files into them c) verifies if the other files are recognized as clones, moving those files into the parent folder as well At this point we've got plenty of parent folders which include both the parent and all related clones, as txt files containing all notes for each one 3) Third loop parses each of those parent folders individually, then: a) captures the file size of each file in the folder and creates a list sorted by file size, from larger to smaller b) captures the first line (the larger file) c) parses all other files in the folder and copies the larger file, overwriting all other files in the folder with the very same content present in the larger file At the end, both clones and parent receive the exact same notes, but always from the larger file, independent of being a clone or a parent, because as you remember, what history.dat considers the original game is not necessarily the parent ROM in MAME, so as brute force as this solution might look, it yelled WAAAAAAAY better results than all the crazy coding I had done before, trying to chase information through loops. Since this is reading and writing info to disk at this point, obviously it's not super fast, but it works and it's very promising! It takes about 1 minute to do the whole process for about 34000 entries as it stands, but once I convert the logic to arrays, this might take just a few seconds. It might take some time, but I will get this sucker working :) -Kris
Link to comment
Share on other sites

After the tests yesterday, I managed to port everything into arrays tonight, so instead of 1 minute to parse all the information, now the correct notes are being imported with no noticeable increase in processing time! :) You will not notice anything different in terms of speed, but under the hood there are many things happening now to assure that the notes will get as good as possible. I added extra measures to make sure that if the words "Export version." are found in the array, even if this is the entry with the biggest number of characters, it will still be skipped and the next biggest one will be considered, by elimination. I noticed only one game still containing "Export version." in it, but it's simply because the info is not available. It points to the Japanese entry, but that entry is not present in history.dat, at least not available for arcade (there's one listed under "nes"). This is very rare though. Here are some new shots showing the new info for some of the games you listed:NewNotes1.jpgNewNotes2.jpgNewNotes3.jpgNewNotes4.jpgNewNotes5.jpg A new version coming out tomorrow, quite possibly :) -Kris
Link to comment
Share on other sites

Latest Version: Beta v0.7h Updated on: 6/9/2016 Self-extract:https://drive.google.com/open?id=0B23vaxsfSk1ydzhZb0NSOHNHMGM Zip: https://drive.google.com/open?id=0B23vaxsfSk1yNHZ4VzFXN2tBTkk
  • Introducing History Reparser, a much better way to extract notes from History.dat. Games marked as “Export version” will now have a much better chance to have their notes extracted from the original games, so, much more complete notes from now on.
  • Updated all support files to the latest versions available.
  • Improved controllers metadata. Most games now have a controller associated to them.
  • Renamed the default platform from “Mame Arcade” to simply “Arcade”
  • TTL and CHD “dummy” files generated are now true .zip files instead of text files named .zip.
  • Improved auto-fill when selecting MAME.exe
  • Improved “reset” functions.
  • FiltersA, 3rd toggle now ignores “All Killer” filter, since this is a very specific filter that ends up overwriting all others
  • Removed the game descriptions in the status bar when parsing lists. This sped up the process by a few seconds. The progress bar is still present.
  • Removed some splash screens. All info related should now be presented at the status bar, which is way faster than splash screens (it's all about speed after all).
  • Improved attract-mode generated lists.
  • Enjoy and please report anything funky. Thanks. -Kris
    Link to comment
    Share on other sites

    Latest Version: Beta v0.7i Updated on: 6/10/2016 Self-extract: https://drive.google.com/open?id=0B23vaxsfSk1yaV9sZU1CMWFldFk Zip: https://drive.google.com/open?id=0B23vaxsfSk1yNlNXT0lhRHVtRUk
  • Fixed a bug that was causing the number of players to be parsed incorrectly (thanks Milky @ Arcade Controls for discovering and reporting!).
  • -Kris
    Link to comment
    Share on other sites

    Ok... Let's do this! Gonna test the latest version... sorry for the delay. :) My plan is to run this and set up a new MAME list in Maximus, which I have barely even touched... maybe opened it once or twice. So this will be a great test of how easy it makes it for me to set up a new install with a frontend with which I am not familiar. Round one! FIGHT!!!
    Link to comment
    Share on other sites

    So, my plan was to start with the "all killer" list and add to it... when I get to the "export" tab at the end of the wizard and hit "filter" my list is blank. Have I done something wrong, or is it possibly a problem with the "bypass filters" feature on the "all killer" filter? Wizard is looking amazing... can't believe how many more options there are than at first. I'm guessing at the export page I just select Maximus Arcade, or whatever frontend I want, generate a list, then open that list in the frontend? Looking great so far... just stuck on the export tab.
    Link to comment
    Share on other sites

    Sorry it didn't work for you just yet. It will! Your problem is very similar to what someone posted over Arcade Controls. This was my answer to him and he managed to make it work by extracting the files again, as seem like he forgot to extract the All Killer folder and all necessary files:
    As for the All Killer list, it's working on my side. Make sure you have a folder called: .\SupportFiles\All Killer Lists
    This folder contains many files named after their list gender. Make sure you got this folder and all files in it! -Kris
    Link to comment
    Share on other sites

    Btw, the latest LaunchBox Beta will mess up all the images, thanks to the recent changes in that area. I would wait until Jason settles on the amount of folders and the naming convention of those, before updating to any new Beta! Once things are settled, I will then update Lightspeed to reflect those (although, I think all those new folders are quite overkill and have the potential to slow things down even more). -Kris
    Link to comment
    Share on other sites

    I went ahead and added the new folders structure. It only took me a few minutes anyway and it should be backwards compatible. It will be in the next release. I removed everything related to consoles at this point (Cart, Disk, Boxes etc) and Kept everything else. In the next release you should be able to create your lists and have all images showing up, independently of using the stable release or the latest betas. -Kris
    Link to comment
    Share on other sites

    Could you do this: 1) Go to every tab and press "Reset" 2) Under options, uncheck "Prevent Duplicates" 3) Turn on the All Killer filter (only the top one for now) 4) Press "Filter" Let me know if you still don't get any results. I just did this over here and the list is being parsed, containing 602 games. -Kris
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...