Jump to content
LaunchBox Community Forums

Is there a way to tell Launchbox to use a different .ini file for MAME?


St_Eddie

Recommended Posts

Presently, I  have multiple installations of MAME, with separate .ini files in accordance with the games which look best with various shaders.  For example, I have a separate mame.ini file within a separate MAME installation folder, which is setup to look nice for Vector graphics arcade games (with the glow filter).  However, I am now looking at adding bezels and it would be very difficult to manage all of these separate folders in terms of adding said bezels (without taking up an absurd amount of hard drive space, at least).

Therefore, I am curious as to whether there is a way that I could simply create separate .ini files and store them all within a single installation folder of MAME; for example, I could have my main mame.ini file for the majority of games, but a separate file named vector.ini for the games which use vector graphics... is there a way to tell MAME/Launchbox to use a different .ini file on an individual per game basis?

Thank you.

 

Edited by St_Eddie
Link to comment
Share on other sites

You'll want to set this up with MAME itself.

In 'mame.ini', the "inipath" should be pointing to "ini;ini/presets".  Vector.ini should be located in the \ini\presets\ folder.   MAME should then load Vector.ini for all vector games that get launched.  (A lot of "should" in there.  But that's how it 'should' work.) 

 

6 hours ago, St_Eddie said:

is there a way to tell MAME/Launchbox to use a different .ini file on an individual per game basis?

Check out MAME's Order of Precedence for which order config files are loaded in.

Like Vector.ini mentioned above, loading of the config files in MAME is fairly automatic based on the game being loaded.

 

For individual games that you want further customizing of the configs they load, you can create an ini file for that game and place it in the \ini\ folder. 

Example: the game "1942".  The ROMs name is 1942.zip.  In the \ini\ subfolder, create a copy of mame.ini and save it as "1942.ini" (the_games_ROM_name.ini).  Edit 1942.ini and change it to your liking, and save.  Now when you launch 1942, it will load the settings/configs in mame.ini, then read 1942.ini and override any settings/configs you changed in 1942.ini.

Note:  In '1942.ini', you can delete ANY line that is the same as mame.ini.  aka, it only needs to contain the lines that you changed.

 

I don't think there's a way to [force] load a specific ini file via command line options.

But if you want a little less automation, pretty much all (if not, all) settings you have in the ini file(s) can be set via the command line parameters.  i.e. If you want to play Pac-Man and add scanlines, the full command line would be "mame.exe pacman -effect scanlines".  You can read more about those here.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

That's a superbly thorough and enlightening response to my query.  Thank you greatly!  You are a star :)

One small question, would you happen to possess a list of all of the possible ini filenames, in regards to arcade systems?

Edited by St_Eddie
  • Like 1
Link to comment
Share on other sites

1 hour ago, St_Eddie said:

That's a superbly thorough and enlightening response to my query.  Thank you greatly!  You are a star :)

One small question, would you happen to possess a list of all of the possible ini filenames, in regards to arcade systems?

Glad I could enlighten you. 

 

"all of the possible ini filenames" 

That's a pretty open-ended request.  There are 6490 games that are considered to be "definitely working" (many, many more that 'sorta work', 'kinda work' and don't work).  So there's 6490 ini files for you right there. ;) 

The link above re: Order of precedence does a pretty good job showing the ones you'll want to work with.  It also shows some examples of the order they're loaded.

 

  • Like 1
Link to comment
Share on other sites

Oops, sorry, I ought to have clarified more clearly. What I meant to say was a list of systems, as opposed to individual games.  For example, vector.ini (a setting for all vector based games), or all such ini file names based upon the listings within the categories of LaunchBox itself.  For example, Namco System 32; Cave Classics; Sega St-V etc.)?  Basically, do the recognised ini files align with the sub-category listings within LaunchBox, in terms of titles?

Edited by St_Eddie
Link to comment
Share on other sites

Ya. Sort of.  You'd be looking for something under item 5 or 6.  If your 'sub-category' games all have the same Driver Source or are within the same BIOS set, then yes.

Are you wanting something like this so you set a specific bezel for each sub-category?  You can use the command line parameter "-override_artwork" for that.

 

Link to comment
Share on other sites

Also, sorry just add; was looking at another guide and it says something different...

https://easyemu.mameworld.info/mameguide/config_files/customini.html

If your method is indeed correct, then do I simply remove the . (period) from ".;ini;ini/presets" (so that that code line reads ";ini;ini/presets")?

If the second method is correct, then how to I number the order?  Do I rename the ini files as "window 0.ini"; "window 1.ini" etc.?

Thanks again.  I would just rather have a definitive answer before I start fiddling around with the ini files.

Edited by St_Eddie
Link to comment
Share on other sites

2 hours ago, St_Eddie said:

If your method is indeed correct, then do I simply remove the . (period) from ".;ini;ini/presets" (so that that code line reads ";ini;ini/presets")?

The period represents MAME's root folder (i.e. the folder that mame.exe is in). So with the period, MAME will look for ini files in:

  • D:\Emulators\MAME\
  • D:\Emulators\MAME\ini\
  • D:\Emulators\MAME\ini\presets\

Personally, I remove the period.  This way, if MAME auto creates an ini file for me, it'll get saved into the \ini\ folder, and not the root folder.

 

2 hours ago, St_Eddie said:

If the second method is correct, then how to I number the order?  Do I rename the ini files as "window 0.ini"; "window 1.ini" etc.?

Not sure what you mean here.  I think you may be confusing what the author was talking about.  When they mentioned "setting window  1", they were talking about a setting in the ini file. 

image.png.75af5db3d06e3f58d495f8363ff77b0b.png

There is no order "numbering" of the ini files.  The only 'order' is the order that MAME loads the files.   

Link to comment
Share on other sites

9 minutes ago, JoeViking245 said:

The period represents MAME's root folder (i.e. the folder that mame.exe is in). So with the period, MAME will look for ini files in:

  • D:\Emulators\MAME\
  • D:\Emulators\MAME\ini\
  • D:\Emulators\MAME\ini\presets\

Personally, I remove the period.  This way, if MAME auto creates an ini file for me, it'll get saved into the \ini\ folder, and not the root folder.

 

---------------------------------------------------------------------

I'm really sorry, but I'm still sure what to do.  It's a big ask, but you be possibly be open to the idea of TeamViewing together?  You'd have access to my computer and it's a one way street, so you'll retain your privacy and anonymity.  Sorry... it's a big ask, I know.  It would just be so much simpler than going back and forth via text, especially given that I'm a dummy.  If you're on Discord, then we could communicate via that channel, whilst you sorted things out for me.  Just a thought.

 

Otherwise, if I could ask you to explain the process, in layman terms... as though I were a dummy (which I am).  Either way, it will be much appreciated.

 

Thank you.

---------------------------------------------------------------------

There is no order "numbering" of the ini files.  The only 'order' is the order that MAME loads the files.   

 

---------------------------------------------------------------------

 

Oh! That makes sense, thank you.  It's binary then... just ones and zeros ('yes' and 'no').

 

 

Edited by St_Eddie
Link to comment
Share on other sites

  • 4 weeks later...

Hello.  Firstly, I am very new to this stuff (along with this forum) but think I understand how the .ini files work.  I'm having some trouble with Bigbox\Launchbox not using the video options settings in my .ini file.  When I run mame by itself, it uses them and all is good.  Anything I may be missing or doing wrong?  Any insight is very much appreciated.

Thanks!

Link to comment
Share on other sites

Edit your MAME emulator (in LaunchBox).  Tools - Manage - Emulators

For the Default Command-Line Parameters, remove the parameters -artwork_crop and -nofilter (if either of those 2 exist).  Leave anything/everything else on that line.  Possibly [now] looking like this:

-skip_gameinfo -keyboardprovider dinput -rompath %romlocation%

 

  • Like 1
Link to comment
Share on other sites

Thanks very much, Joe!  I did this, and it definitely has changed to my preferred video settings.  Which I have been very much looking forward to since I got this cabinet.  But for some reason, now when I run mame through bigbox it opens a separate version of mame, which is causing stability issues.  Maybe I messed something else up somewhere?  

Link to comment
Share on other sites

3 minutes ago, Wormburner_bogey said:

Thanks very much, Joe!  I did this, and it definitely has changed to my preferred video settings.  Which I have been very much looking forward to since I got this cabinet.  But for some reason, now when I run mame through bigbox it opens a separate version of mame, which is causing stability issues.  Maybe I messed something else up somewhere?  

You're welcome. 

BigBox will use the same emulator you setup (tell it to use) in LaunchBox.  Are you testing the same game between the 2?

Link to comment
Share on other sites

I was, which is why I was originally confused as to why the settings worked in mame by itself but not LB/BB.  But once I made your recommended changes, I closed everything, rebooted and started up Bigbox fresh.  Launchbox actually has mame grabbing the roms from a different folder than mame itself.  I even removed the couple of roms I had moved for testing purposes thinking that might have been part of the issue.  It seemed to be working as expected, but once I changed games issues popped up.  I checked windows, and there was actually bigbox and 2 separate mame's running....I am utterly confused.  Which according to my wife is commonplace.  haha

Link to comment
Share on other sites

34 minutes ago, Wormburner_bogey said:

I checked windows, and there was actually bigbox and 2 separate mame's running

Ya, that could be a problem. ;)  It may be that whatever you're doing to launch a game (going into game details then launching from there. Or you mapped a key/button to directly launch the selected game) might be getting double pressed/clicked, however you're doing it.  Maybe launch a game, then once it's fully loaded, Alt+Tab to see if another instance of the same game is running.  From here on out, I'm just guessing and grasping at straws.  My commonplace. 🙃

Link to comment
Share on other sites

I don't think I mapped any buttons that shouldn't have been.  I did the alt+tab, and all that is runnig is bigbox, and mame.    Anywho, I removed all .ini files I made.  Put the command line back to the way it was, and it's still having problems.  I'm back to the original video settings though lol.  It seems to be leaving BB as the visible image on the screen, but isn't the "active" window if that makes sense.  It's like I minimized it without minimizing it.  So the controls aren't working.  I just have to move the mouse on the computer running it all, and I have control again.  But it keeps happening when I exit a game.  Think I've really done something goofy.  The guy who made this is a friend, and has an image of the hard drive to put on if needed.  But I really want this to look like it can (not so jaggy).  The settings I found online are such a HUGE improvement.  Any ideas?  Also, let me say thanks for taking the time to help out someone who obviously is in over his head.  It really didn't seem all that difficult when I first started trying this all out.

Link to comment
Share on other sites

10 hours ago, Wormburner_bogey said:

And TBH, I've never noticed before if when launching a game in BB/LB, a separate window opens for mame.  Is that normal?

Ummm. a separate window other than the MAME emulator?  As in 2 MAME windows?  

Since your friend set this up, you may want to ask them what they did.  And not to be presumptuous, but if you bought a 'preconfigured' drive, I really can't help you.

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...