Jump to content
LaunchBox Community Forums

MAME Software Lists Import Tool - plugin


Recommended Posts

22 minutes ago, slagfart said:

Parsing the region from the end of the MAME title.

That could be done.  But when you scrape metadata from the LaunchBox meta-database, it fills it in for you.  Though (at just a quick look) there appears to be an exception with "Jpn".  Which brings up to....

27 minutes ago, DOS76 said:

after you run it through LB and scrape it doesn't it then add the regions?

 

26 minutes ago, DOS76 said:

didn't remove the USA from the name

When downloading metadata, choose "...download and replace all existing metadata and media".image.thumb.png.513cd7918d2d017799178e277c0df576.pngIf you already have media that you don't want to replace, click Select None on the previous 2 screens.

  • Like 1
Link to comment
Share on other sites

1 hour ago, JoeViking245 said:

When downloading metadata, choose "...download and replace all existing metadata and media".

Okay! It makes sense that this should work. Thanks!

Sadly I'm now getting a new weird error, where I right click an existing game to start the importer, but nothing happens at all. For perhaps the briefest second the cursor changes to loading, but then it changes back and no window appears.

I don't think it's related to the latest update - on the update prior it happened as I tried the last import I did. I also tried reinstalling LaunchBox with a fresh copy of the importer, but it still doesn't start. Disabled my antivirus too - no good. Any ideas?

Link to comment
Share on other sites

7 minutes ago, JoeViking245 said:

My 1st though was that it's opened (or already open) in a window behind LB.  But that shouldn't happen.

Next thought is that the dll(s) need to be unblocked again.  Nothing (should have) changed with how it starts.   Let me know if it's still acting weird.

Okay, it's a weird one. I checked and it wasn't either of these things. But, I then imported another game manually with an image that Launchbox was able to scan for and download. I also configured a new MAME emulator for this game. I then right clicked on that game, and it started working again.

I ~suspect?~ that by importing a new game, I forced LaunchBox to reinitialise some of its Data files that your importer depends on, maybe in particular the MAME emulator XML? Not really sure!

Edited by slagfart
Link to comment
Share on other sites

This really is great. It's been allowing me to get into those obscure systems I've been holding off on! My question has more to do with Launchbox than the importer itself, but in Launchbox you have to have a command line e.g "-cass" based on the rom file extension in the associated platforms tab of mame.

What should the command line look like in launchbox for sets that are the same system but require two or more command line arguments? Might be simple but I'm not sure how to do it.

For instance, Fujitsu FM 7

There's two xmls and two folders in the software list (cass and floppy) but obviously I'd want to display them in the same system in LB. A cursory glance at the roms reveals both .t77 and .d77, which would mean I'd need -cass and -flop1 in the command line for the system.

Any way to do this?

Thanks! This has been really fun to mess around with!

Example from the MESS Command list website for FM7:

  1. fm7       cassette    (cass)     .wav  .t77
  2.              floppydisk1 (flop1)    .d77  .d88  .1dd  .dfi  .imd  .ipf  .mfi  .mfm  .td0  .cqm  .cqi  .dsk
Edited by fromlostdays
Link to comment
Share on other sites

A good example of a console that takes two or more command line arguments is the Atari 2600 cassettes where you need to load scharger AND the cassette (rom).

a2600 -cart1 scharger -cass	

But that's not what you were really asking about. :) 

The emulators are set up based on the Platform(s) you want to use them for in regards to the command line needed.  So "Fujitsu FM 7" Platform (at least if used in MAME) is going to be -cart or -cass.  There really isn't an innate way for LaunchBox to tell MAME "if it's a t77, use -cass.  Otherwise use -flop1."

That being said, you can creatively make it work [to have both in one Platform].  There may be an easier or better way, but this is my shoot-from-the-hip thought.

Import fm7_cass as normal. (well, via this plugin)   Then install yet another plugin called Bulk Custom Command-Line Editor.  Select all games, run the plugin and enter 

-cass

and click Finish.

 

Now go back to the Software List Importer plugin and import fm7_disk into the same Platform you used above.  When that's done, [in LaunchBox] click "ARRANGE BY" and select "Date Added"image.png.d2788231f218367e505a82272f6a949f.pngSelect the "newest" added games, run the other plugin and this time use  

-flop1

These custom command lines will take precedence over MAME's Associated Platforms command line parameters that were automatically entered in when importing both console sets.  But to keep things clean, you can go into Manage Emulators, select MAME, Associated Platforms and delete the 2 for Fujitsu FM 7.

I haven't tried this, so if you could, please let us (the Forum) know if it works.  And if it doesn't, we'll find another way. ?

  • Like 1
Link to comment
Share on other sites

Wow thanks! Took me a while to get this working as I don't know much about command lines but I got there. Here are the steps:

1. Download Bulk Custom Command Line Editor (Also awesome program!) install in plugins folder, and restart launchbox. 

2. Import fm7_cass folder using importer plugin.

3. Open the system (I named it Fujitsu FM-7) in LB and test a game, just to be sure.  

4: Select all the games and right click, then select Bulk Command Line Editor

5: in the Editor type:

fm7 -cass1

(I don't know why but the importer put the command line as -cass1 not -cass and indeed -cass1 works, or it did for me. My software list is outdated though. Also, you have to type the WHOLE command line. Don't just type "-cass1" as no games will launch. Took me a while to figure that one out)

Now at this point, all of the games imported from the fm7_cass folder have the custom command line fm7 -cass1

6: IMPORTANT: Go into your mame emulator settings and delete the entire fm7 entry & command lines from associated platforms. Otherwise you will have two instances of FM7 under associated platforms when you follow the next step.

7:Use the importer to import the games from fm7_disk folder.

8: Step 8 is, you're done! You don't have to add custom command line parameters to the second batch of games, as the importer has refilled in fm7 -flop1 under associated platforms already, and all of the newly imported games will default to that, while the previous cass games have their own custom command line. Viola. It works.

 

In the hypothetical event you ever need to add 3 or more commands, you would have to do the extra step of arranging the second bunch by date added... but lets hope that doesn't happen because at least for me launchbox uses the date, not the time, so it won't sort if you add two in the same day. You'd have to wait a day or find some other way to separate them.

Hope it helps, and thanks! 

Edited by fromlostdays
  • Thanks 1
Link to comment
Share on other sites

I'm glad it's all working!  And thanks for getting back.  It definitely helps!

I totally spaced on the need for fm7 right before the media type (-cass, -flop1....  ).  Sorry about that.  The cass1 comes straight from the hash file.  Though now looking at the fm7 hash file, one spot shows 'cass1' and another shows 'cass'.  Though MAME hasn't tested multi-image games for FM-7, I know some consoles need 'cass1', 'cass2' to load the different images.  I'll take a closer look.  But for now since cass1 works, maybe best for me to leave well enough alone. lol

That tid bit about only needing to bulk edit the command lines for one of the sets is big forehead slap on my part.  Again, sorry about that. ?  Good call.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello again Joe!! Thanks for releasing the new version - I'm super keen on this new checkbox for using non-MAME emulators to play MAME games. However, it has crash landed for me :) (no surprises there - I seem to be great at breaking your toys)

My steps were:

  1. Start with a new install of LaunchBox 10.6
  2. Wait as it updated to LaunchBox 10.7
  3. Extracted your 1.30 files to the Plugins directory
  4. Imported a random game from Windows into the empty library
  5. Extract MAME 0.215 to the Launchbox folder under `LaunchBox/MAME`
  6. Set up MAME 0.215 as an emulator in LaunchBox
  7. Right click on a game, start your plugin
  8. Set my MAME Hash location to the new `LaunchBox/MAME/hash` folder
  9. Click to import Fujitsu FM Towns CD Games
  10. Point my import folder at my main `Games\MAME` folder containing my software CHDs (so `Games\MAME\fmtowns_cd\abel\abel.chd` would be one FM Towns game)
  11. Click 'Import Only'
  12. Get a message after 0.5 seconds that says 'Success! Games imported!'
  13. LaunchBox crashes when I click OK. I get the picture attached. FM Towns XML does not appear under `LaunchBox/Data/Platforms`

Observations:

  • I didn't see any new tickboxes for the new features
  • I didn't start MAME beforehand after extracting it fresh

Any ideas? Thanks again!

191121_LB MAME crash.PNG

Link to comment
Share on other sites

@slagfart Thanks for being my guinea pig.  lol  jk  Looks like you found one (of possibly many) anomalies to MAME, it's Software Lists and how they deal with CD-ROMs and their hash files.

In MAME's collection of "Fujitsu FM Towns CD-ROMs" (at least according to their hash file), the set contains both CD-ROMs and floppy disks.  That's why the popup, well... didn't popup.  It saw some floppies in there and took them all to be floppies. So it didn't ask you about CD-ROMs.  And to top that off (as I now look through it closer), the hash file doesn't have the full_name.ext like other hash files do for CD-ROM consoles.  So using your example, all it has is   disk name="abel"   instead of  something like   disk name="abel.chd".  I don't know if there's something special about FM Towns CD's or if that particular contributor decided since they're not all CD-ROMs, they'll just format the xml like non CD-ROM consoles.  I really don't know.

I ran the Import for fmtowns_cd, got no popup regarding CD-ROMs, and it did seem to go fast.  Though it didn't 'crash' when I clicked OK.  Did you have to do something like Ctrl+Alt+Del to shut down LB then? 

I did have a Windows Explorer window open looking at the Data\Platforms directory and indeed the xml was not there after import was [successfully] completed. Like you indicated.  It did however show up inside in LB ui as a [new] Platform with 488 games.  When I exited LB, the xml file then appeared in the Data\Platforms folder.  So I'm guessing that's just how it works and I'm good with that.

When you went back into LB, was the FM Towns platform there?  If not, go to Tools, Manage Platforms and see if it's in there and how many Associated Games are with it.  Also I see you were looking at "Platform Category".  Change that to "Platform". I think.

Don't think I can help too much with the anomaly as I can only work with what MAME gives me.  But I would like to figure out the issue with the 'crash'.

Link to comment
Share on other sites

16 hours ago, JoeViking245 said:

When you went back into LB, was the FM Towns platform there?  If not, go to Tools, Manage Platforms and see if it's in there and how many Associated Games are with it.  Also I see you were looking at "Platform Category".  Change that to "Platform". I think.

Sometimes if you're not seeing the system in your Platforms list, you also have to go into Manage Platforms and edit the imported platform, go to "Parents" and tell it to show in the root. I'm not sure why this works. 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

This tool looks pretty awesome, but I can't seem to get it to work with Launchbox 10.10.  The menu item simply doesn't appear under Tools. Any ideas how to work around this? The DLLs are unblocked.... actually I didn't even need to unblock them.

@JoeViking245, I'm not sure if this is related but I see some errors in my debug log. Looks like some paths are hardcoded that are specific to your machine.

2020-02-20 10:54:24 AM FIRST CHANCE EXCEPTION: C:\Users\Joe\source\repos\ImportMameSoftwareLists\Resources\mess.ico
   at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
2020-02-20 10:54:24 AM EXCEPTION IGNORED: C:\Users\Joe\source\repos\ImportMameSoftwareLists\Resources\mess.ico
   at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
   at ImportMameSoftwareLists.LBSoftwareListImporter.Unbroken.LaunchBox.Plugins.ISystemMenuItemPlugin.get_IconImage()
   at (SideBarViewModel , ItemsControl )
Edited by johnsanc
Link to comment
Share on other sites

@johnsanc Thank you so much for showing the debug log!  Saved me a heck of a lot of banging my head. :) 

I tried to get fancy and have an icon next to it in the Tools menu.  Guess I have some learning yet to do about embedding resources. ?  I uploaded v1.31.1 with the icon reference removed. 

Attached is the dll file that was fixed (just unzip and place it in the ../Plugins/ImportMameSoftwareLists folder  [and unblock?]).  Or you can download the full "ImportMameSoftwareLists 1.31.1.zip" file from the downloads section.

ImportMameSoftwareLists.zip

  • Like 1
Link to comment
Share on other sites

@JoeViking245 - So far so good, this tool is simple but works really well. I do have a couple of small suggestions:

  1. When importing unsupported games, set the "broken" flag
  2. When adding games to a platform that is already setup, only add the differences instead of adding everything again. This will be helpful if people periodically update with newer MAME versions and new games are added to the Software Lists. For example if a game goes from unsupported to supported, then remove the broken flag and if a new game is added, add it. 

Cheers!

 

Edited by johnsanc
Link to comment
Share on other sites

@johnsanc Glad it's working well for you.  Simple AND working well is what I was striving for. 

Good suggestions.  #1 is simple enough, and I can add that for the "Completionist's" sake. :) 

#2  For [just] Importing into LaunchBox (vs Copy and Import), I could add another button for "Check for Changes" or something like that.  Then it would cross check the "Broken" status of existing games and add any new ones.  But for the Copy process I'd want to have it do a hash check on all the existing rom files to see if any have been updated, replace those and add any missing (new).  Sounds simple enough. I think. lol

I've added these to my to-do list.  BTW, figured out how to "correctly" add an icon to the Tools menu. ;) 

Link to comment
Share on other sites

@JoeViking245 - that sounds perfect. Good idea on how to handle import vs copy! I was referring to import since I keep my software lists spread out and with all my other stuff for each system. I like to keep my roms in place.

Also if you do add in the Broken flag that should only go on parent sets if the “add clones as additional applications” setting is used. Wouldn’t want a broken clone marking a working parent set as broken. (Not sure if that’s even a scenario to worry about, but something I just thought of)

Edited by johnsanc
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...