Author Topic: 2 instances of MAME?  (Read 13276 times)

night5hade

  • Newbie
  • *
  • Posts: 2
    • View Profile
2 instances of MAME?
« on: February 04, 2015, 06:51:56 AM »
Is it possible to have to instances of the mame emulator?

I am having a hard time with rotation and cocktail mode,
(when setting video mode to cocktail in mame.ini non cocktail roms work fine, but cocktail specific roms look duplicated)
So i was thinking of having 2 mame emultaors,
one with video mode in cocktail and the other in auto,
is it possible to have 2 instances of mame with unique ini files?

setup:
iMac 2009,
Xarcade - USB joystick and buttons,
mounted in cocktail cabinet

P.S. frontend works fine and is rotated as I wish

thanks

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: 2 instances of MAME?
« Reply #1 on: February 04, 2015, 07:18:43 AM »
I've got multiple versions of mame on my linux dev pc.
One folder for each binary I've compiled, each one a separate instance.
You can do the same on windows also.


raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: 2 instances of MAME?
« Reply #2 on: February 09, 2015, 07:38:12 AM »
Hi there,

You could create a second mame emulator configuration in attract-mode.  Make a copy of the mame.cfg file in the emulators directory and name it mame-rotated.cfg or something.

Edit the mame-rotated emulator settings to whatever you want.  I think there is a way with mame to get it to use a different mame.ini file from the command line, so you could change the command line options to reflect that.  Once you have it set up, generate a romlist and then whatver games you launch from that list will use your rotated mame settings instead of your normal mame settings

I hope that helps

jimmer

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: 2 instances of MAME?
« Reply #3 on: March 22, 2015, 03:54:13 PM »

So, does anyone know what the command is to run mame with a different cfg/default.cfg file ?

I want to change the default keymap for one of my games lists. (for 1 player at a time games I want the player to use the player 2 buttons on a Streetfighter layout with extra 4way in the middle.

It would be quite easy for me to copy the mame binary and some key folders, but not very elegant!

jimmer

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: 2 instances of MAME?
« Reply #4 on: March 23, 2015, 11:48:25 AM »

I've set up the two MAMEs. 
Here are the config files.

I found they could share snaps but not roms, unless I'm just doing it wrong?


# Generated by Attract-Mode 1.5.1
#
executable           C:/mame_1player/mame.exe
args                 -video d3d -nofilter [name]
rompath              C:/mame_1player/roms/
romext               .zip;.7z;<DIR>
info_source          mame
import_extras        C:/mame_1player/Catver.ini;C:/mame_1player/nplayers.ini
artwork    flyer           
artwork    marquee         
artwork    snap            C:/mame_2player/snap
artwork    wheel           



# Generated by Attract-Mode 1.5.1
#
executable           C:/mame_2player/mame.exe
args                 -video d3d -nofilter [name]
rompath              C:/mame_2player/roms/
romext               .zip;.7z;<DIR>
info_source          mame
import_extras        C:/mame_2player/Catver.ini;C:/mame_2player/nplayers.ini
artwork    flyer           
artwork    marquee         
artwork    snap            C:/mame_2player/snap
artwork    wheel           


cools

  • Full Member
  • ***
  • Posts: 83
  • Arcade Otaku Sysadmin
    • View Profile
    • Arcade Otaku
Re: 2 instances of MAME?
« Reply #5 on: March 24, 2015, 02:14:32 AM »
Why are all your slashes the wrong way? :)

Putting all the ROMs in C:\MAME\ROMS would be fine.


jimmer

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: 2 instances of MAME?
« Reply #6 on: March 25, 2015, 02:46:18 PM »

I corrected the slashes.
Then I pointed both emulators to a third location: mame\roms

That doesn't work.

(The snaps still work.)


# Generated by Attract-Mode 1.5.1
#
executable           C:\mame_1player\mame.exe
args                 -video d3d -nofilter [name]
rompath              C:\mame\roms
romext               .zip;.7z;<DIR>
info_source          mame
import_extras        C:\mame_1player\Catver.ini;C:\mame_1player\nplayers.ini
artwork    flyer           
artwork    marquee         
artwork    snap            C:\mame\snap
artwork    wheel           

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: 2 instances of MAME?
« Reply #7 on: March 25, 2015, 10:02:10 PM »
Actually there is an easier way..you only need one default.cfg file when you set up other games you set up "input (this game)" and mame will set the keys for that game and read it's cfg file (i.e.sf2ua.cfg) that way it loads the setting for whatever game however you want the buttons for each game. you can also set up and ini file for each game as well and it will load the settings for that game and ignore the mame.ini ini file (I have all my neogeo load the unibios in usa arcade mode) mame looks in this order game.ini/game.cfg -> system.ini/system.cfg -> vector.ini/mame.ini the defult mame.ini/cfg is the LAST one it reads. So....

Go back to a clean configuration with no extra cfg or ini files (mame -cc to make a new mame.ini) then set your buttons for default (how you want most games to run) then after that then take and copy your "default.cfg file to the ctrl folder then in your mame.ini where it says ctrl put the path to the default that you just made. Now every time mame loads it will use that default set up....unless if finds a cfg file for the game you started instead by using the "input (this game)" (.ie. sfiii) if it finds a cfg file for that game it will use it instead and not the default setup. Also make a copy of the mame.ini after you have it tweaked..and rename it vector.ini then open it and tweak it for your vector games. If mame finds it when it loads a vector game it will use those settings instead. If you want a game to run a way different then "normal" then you can make a "game.ini" (i.e. joust.ini) mame will use that instead of the mame.ini to play your game.

Also for your video...that can be set in the mame.ini as well (if windows "d3d" or "ddraw" are your choices..i used d3d for vetor games and ddraw for raster games) look under video options then where is says video..might have a d3d or ddraw next to it)

remember use google-fu and http://mameworld.info/ are good places (this is really the fourm for attract mode not mame..but i know I had to look a while to learn that stuff! hope the mediator will let me slide  ::) )

PM me if you need help I don't mind :)
People want life easy..then complain about it

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: 2 instances of MAME?
« Reply #8 on: March 25, 2015, 11:08:27 PM »
Is it possible to have to instances of the mame emulator?

I am having a hard time with rotation and cocktail mode,
(when setting video mode to cocktail in mame.ini non cocktail roms work fine, but cocktail specific roms look duplicated)

Can you give me some more information. What do you mean duplicated? If it's listed twice in the list a text editor will fix that problem...but I don't think that is what you mean. Can you give me a game example? or a pic? (I don't use mac..but being a mame problem it should be that same in any OS..I think)

One thing to keep in mind just because the game has a table option in the dip switch does not mean mame can emulate the flipping of the game (moon patrol for example). When mame starts it will tell you that it can not emulate cocktail flip screen (see attached list) unless you have it custom compiled to remove it (in which case you need to do that AFTER you have tested, set-up, deleted, and tweaked each game..learned that the hard way I did ;)

Anyway post that info or any questions and I'll see if I can help you.
People want life easy..then complain about it

cools

  • Full Member
  • ***
  • Posts: 83
  • Arcade Otaku Sysadmin
    • View Profile
    • Arcade Otaku
Re: 2 instances of MAME?
« Reply #9 on: March 26, 2015, 05:42:48 AM »
He means that cocktail specific games have a doubled display (the same image side by side, with each flipped vertically from the other). It's just how MAMEs "cocktail" mode works.

Your explanation for different cfgs and ini files will help him solve this :)

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: 2 instances of MAME?
« Reply #10 on: March 26, 2015, 07:40:13 PM »
Ahh ok I get it now. I forgot that mame can do that. My cocktail cab is set up with mame 108 and and old version of mala (win ME 400mhz 128mb ram) so I thought he meant a real one. Actually I was going to set one up with mame cocktail mode one day. You can use the different configs to make them come up like that for every game. (Making that actually taught me a lot about mame configurations  :P ) You just need a screen big enough to split it and still be able to see it I'd say at least a 40 wide screen (16:9). But honestly I'd say pick up two CRTs at a thrift store a couple of 20's for what 30 bucks and mount one "upside down" that's what i decided to do. Make it one joystick, six buttons, no trackball and make sure you have enough room for hands on each side. You could mount the screens almost touching if you brace them right.
People want life easy..then complain about it

jimmer

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: 2 instances of MAME?
« Reply #11 on: March 27, 2015, 06:14:42 AM »
Thanks akafox, but unless I'm missing something you are just saying create an ini or cfg for every game that I want different keys than standard.  That's how I was going to do it originally but writing 500 odd cfg files I don't find very elegant.

It's also slightly difficult because I don't know how to get the result of an attract mode filter into a list that I can use to generate my cfg files from. Anyone know how ????  I'm not ruling out the cfg files  solution.  ( I could use romlister but I don't like that indirect route, I'd probably get a different result going by my previous romlister attempts) 

What I've got at the moment works fine it's just slightly inelegant, and I suppose it could be a problem if you have gigabytes of ROMS. 

Anyway, if you can solve it with 2 config files, let me know.
« Last Edit: March 27, 2015, 06:29:32 AM by jimmer »

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: 2 instances of MAME?
« Reply #12 on: March 27, 2015, 10:27:11 PM »
Well honestly you are not going to be able to get away with making just two cfg files. However I did just that so I could test each game and made sure it ran on my system deleted clones and doubles (Took me awhile! :P ). The cfg files will be written regardless if you change anything or not. (The ini files you have to tell mame to write them if you want them.) However there is a way..I'd forgotten about this. Its called a ctrl file. You set up your buttons and then point the mame.ini to it it will use that file to ctrl everything no matter what happens to the cfg files. It will be some work (i.e. it won't be "one or two confg files" but it will be MUCH faster as you can copy and paste. http://wiki.arcadecontrols.com/wiki/Ctrlr_file just so you or others can read it. But "simply" put..here is what i did:

First I made a "default" config. This means I set up all my buttons to most of my games in one go. (I use a controller (and an old one at that) not a keyboard encoder.)) So I made my lower left my main button (fire/jump/ect) then my lower right my second..upper left my third..upper right my fourth..so that was my "neo-geo" set up. (it' is set up like a neo geo CD rom system) It also sets up almost all my games. That set up 90% of my set right there in 1.5 minutes. Then I copied it to the ctrlr folder (you have to make sure your path is set right in the mame.ini like this:

Code: [Select]
#
# CORE SEARCH PATH OPTIONS
#
rompath     .....
ctrlrpath                 $HOME/.mame/ctrlr (C:\mame\ctrlr for windows) <-- set your path here (the folder should already be in the main mame folder with some controller cfgs in it)
inipath  ....

now rename your file to what ever you want (name.cfg)

then back in your mame.ini set this
Code: [Select]
#
# CORE INPUT OPTIONS
#
coin_lockout              1
ctrlr                     example <-- put the name here. [b]Leave the  .cfg off![/b]
mouse.....

Now I set up my cps2 and cps3 roms (that is the "driver" that runs most sfa and sfiii roms. So I deleted my new configs from the cfg folder, not the new ctrl file! I started street fighter alpha then set up all the buttons the way I wanted using the DEFAULT button set up (not the "input this game") then I opened the default copied everything the tags from <system> to </system> Then I pasted that under the default settings making sure that the </mameconfig> tag was always the last thing on the page. Then I renamed the <system name="default"> to <system name=cps2.c">. Then I pasted it again under that one and renamed it to "cps3.c" that knocked out all the street fighter games from street fighter alpha to street fighter III: 3rd strike (and other capcom fighting games) in 5 minutes. Now problem is/was that Street Fighter II (and others) use the cps1 driver. I had to do those games individually. But all I had to do was copy the code for the number of games I had renaming the <system mame> tag to the rom name. Took me 15 minutes from start to finish and I had 98% of my games set like I want. :D

This was a lot easier honestly then setting up each game! I'll post my files so that you can see them. I don't know if it will do any good to try it..but it can't hurt anything i know. If you (or anybody) needs help just ask.
People want life easy..then complain about it