Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: 3 versions of MAME sharing same ROM folder in one list??  (Read 10025 times)

0 Members and 1 Guest are viewing this topic.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
3 versions of MAME sharing same ROM folder in one list??
« on: November 30, 2011, 04:10:24 pm »
Is it possible to have 3 versions of mame all sharing the same rom folder and have just 1 list?

Im using ZeroPoints new view point for vertical games in MAME (http://forum.arcadecontrols.com/index.php?topic=113151.0), basically you have 2 different version of MAME as ZeroPoints mod uses a different 'Post.fx' file in the HLSL folder and thus buggers up normal horizontal games. In mala i have created a game list for each of the 3 versions of MAME, at the moment i have 3 instances of Mala on my system, and 3 MAME folders. So at the moment if i want to play a vertical game id have to load up either 1 of the modded vertical mame folders with the modded 'Post.fx' file in, if i wanted then to play a horizontal game i would have to quit out of that instance of Mala and load the horizontal version of MAME/Mala


is it possible to have MALA to add these 3 game list together making just 1 list and it load the correct version of mame for depending on what rom loaded???
« Last Edit: November 30, 2011, 04:15:51 pm by lettuce »

Celsius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 81
  • Last login:May 10, 2015, 11:40:41 am
    • Rcade project
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #1 on: December 01, 2011, 11:51:33 am »
there's a post somewhere on this forum on how to use several arcade emulators in one list...same procedure for 3 mame versions...put roms for each of the 3 versions in a seperate folder (for example you want pacman to play in mame version 0.88, mortal kombat in 1.25 and house o/t dead in 1.44...put pacman in romfolder 0.88 AND ONLY THERE, mortal kombat in romfolder 1.25 AND ONLY THERE and hotd in romfolder 1.44 AND ONLY THERE)
Make a .bat file with the necessary lines provided in that post and ofc in mala point to that bat file instead of mame.exe

quick forum search and voila
http://forum.arcadecontrols.com/index.php?topic=68419.0

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #2 on: December 01, 2011, 01:20:23 pm »
Thanks, yeah i saw that post but dont have a clue on making bat files :(. So its not possible to have all the roms in just one folder then

Celsius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 81
  • Last login:May 10, 2015, 11:40:41 am
    • Rcade project
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #3 on: December 01, 2011, 11:31:14 pm »
Use notepad and manually change the txt extension of the created file into bat  ;)

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #4 on: December 02, 2011, 09:44:32 am »
So its not possible to have all the roms in just one folder then
I see no reason why you couldn't, but I honestly don't see WHY having all your MAME versions sharing the same ROMs folder is a requirement though.  It's way easier to just treat each MAME as its own version, having its own roms in its own isolated world. 

Each MAME.exe has to be in its own folder, because each MAME is going to want to read in its own set of ini files, cfg files, etc.  But as long as you point each version of MAME to the same roms folder, you should be able to share that folder for any version of MAME.  The only trouble there would be ROM upgrade/downgrade issues between the various versions of MAME you're trying to run.  (for example a really old version of MAME expects galaga.zip to contain certain roms, where a newer version of MAME is expecting different ones) 


I think this is a perfect crash course for you in learning how batch files work.  What you're trying to do is really no different than the above mentioned topic post.  You're running 3 different emulators from the same list.  You get mala to launch a batch file instead of mame.exe and in that batch file your branch off to run the appropriate mame.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #5 on: December 05, 2011, 05:23:49 pm »
So its not possible to have all the roms in just one folder then
I see no reason why you couldn't, but I honestly don't see WHY having all your MAME versions sharing the same ROMs folder is a requirement though.  It's way easier to just treat each MAME as its own version, having its own roms in its own isolated world.  

Each MAME.exe has to be in its own folder, because each MAME is going to want to read in its own set of ini files, cfg files, etc.  But as long as you point each version of MAME to the same roms folder, you should be able to share that folder for any version of MAME.  The only trouble there would be ROM upgrade/downgrade issues between the various versions of MAME you're trying to run.  (for example a really old version of MAME expects galaga.zip to contain certain roms, where a newer version of MAME is expecting different ones)  


I think this is a perfect crash course for you in learning how batch files work.  What you're trying to do is really no different than the above mentioned topic post.  You're running 3 different emulators from the same list.  You get mala to launch a batch file instead of mame.exe and in that batch file your branch off to run the appropriate mame.

Thanks for the reply, well of all 3 versions of MAME i want in i list are in truth all the same version of mame...GroovyMAME 0.144, now the difference between each of these versions of MAME is just 1 file in the HLSL folder the post.fx file, this post.fx file alter the prospective of how mame is displayed, if you look at this thread you'll see the result...http://forum.arcadecontrols.com/index.php?topic=113151.0 . Basically it make vertical games look better on a normal display setup, now if was to use this altered post.fx file for a horizontal mame rom then it would look all messed up, hence why i want 3 versions of mame (2 for vertical roms & 1 for horizontal roms) As these 3 version are all the same MAME version (0.144) for easy of use and not having to go through all the roms and split up horizontal and vertical games they can all use the same rom folder. So if i had my mame directorys setup as....

C:\Mame
C:\Mame Ver +
C:\Mame Ver -

how would i create a BAT file for this, as look over at SGT's guide this adding dump roms for non mame emulators in a MAME list, but i dont want to add any non mame emulators or roms?

Would i start at step 7 in SGT's guide..creating a .cmd file
Code: [Select]
if "%2" == "C:\Mame\" goto Mame
if "%2" == "C:\Mame Ver +" goto Mame Ver +
if "%2" == "C:\Mame Ver -" goto Mame Ver -

mame.exe %1
exit

:Mame
cd ..\Mame
closemul.exe Mame.exe
exit

:Mame Ver +
cd ..\Mame Ver +
closemul.exe Mame Ver +.exe zip %1 rar
exit

:Mame Ver -
cd \Mame Ver -
%1.cmd
exit
« Last Edit: December 05, 2011, 05:30:57 pm by lettuce »

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #6 on: December 06, 2011, 10:08:13 am »
yes.  step #3 and step 7 are crucial to this working.

The only thing I'd also be concerned with in your example is having spaces in your paths, and using +.  Both could cause unexpected behavior in a batch file.   Maybe just rename them to:

mame
mame_ver_p
mame_ver_m

instead.  It may work with the spaces, but better safe than sorry.

I would also temporarily add the following for debugging until you get it all working

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if "%2" == "C:\Mame\" goto Mame
if "%2" == "C:\Mame Ver +" goto Mame Ver +
if "%2" == "C:\Mame Ver -" goto Mame Ver -

that echo will print out all the variables that were passed FROM mala to your batch file, which can be very handy to see.
remove those 2 lines once you get it all working properly of course!

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #7 on: December 06, 2011, 02:48:01 pm »
Ok thanks for the info. I have another question though, say i have mala loaded up and have my mame rom list with all the roms listed, i want to play 1942 which is a vertical game so i want the version of mame that has the modded post.fx file for better display of vertical games which in my case is in the folder named 'mame ver +' but how do i tell the batch file/mala to use this version of mame and not the bog standard version of mame??

As ive added your suggested line...

echo %1 %2 %3 %4%5
pause

When i load 1942 i get a dos box pop up which says...

C:\Mame>echo 1942
1942

C:\Mame>pause
Press any key tp cpmtiune...

Now i guess thats loaded 1942 from my bog standard mame folder, but i want it to load from my Mame Ver Plus folder

EDIT: ok i guess im going to have to have each of the 3 versions of mame to have their own rom folders in with the correct roms in and follow steps 4 and 5 from SGT's guide...

4. Set a second rom path
Mame Config>Basics>Rom path
Choose Rom path =
Quote
2
Enter the path to the parent folder created in the 1st step:
Quote
c:\emulators\other_emus

Important! Click: Search in subfolders

5. Place the actual rom (or create a dummy file with a zip extension if a ROM isn't used) into one of the appropriate folders.  For example, move daytona.zip from the normal Mame roms folder to:
Quote
c:\emulators\other_emus\m2
You must not leave a copy of Daytona.zip in the Mame roms folder or Mame will run it instead of the Model 2 emulator.


Is that right??
« Last Edit: December 06, 2011, 03:07:53 pm by lettuce »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #8 on: December 06, 2011, 03:46:36 pm »
Ok i have done the above and have moved all 1942 roms from the normal mame rom folder (C:\Mame) and placed them in the rom folder in "C:\Mame Ver Plus". When i load mala and select 1942, i still get the dos box pop up with...

C:\Mame>echo 1942
1942

C:\Mame>pause
Press any key to continue...


and then another dos box appears saying it cant find the rom files needed, so im guessing its still loading 1942 from the normal mame folder (C:\Mame)?

These are the 3 mame folders...

C:\Mame\Mame.exe
C:\Mame Ver Plus\Mame.exe
C:\Mame Ver Neg\Mame.exe

And this is the mame.cmd file....

echo %1 %2 %3 %4 %5
pause
if "%2" == "C:\Mame Ver Plus" goto Mame Ver Plus
if "%2" == "C:\Mame Ver Neg" goto Mame Ver Neg

mame.exe %1
exit

:Mame Ver Plus
cd ..\Mame Ver Plus
closemul.exe mame.exe
exit

:Mame Ver Neg
cd ..\Mame Ver Neg
closemul.exe mame.exe
exit

%1.cmd
exit



Does everything look correct there??
« Last Edit: December 06, 2011, 04:15:20 pm by lettuce »

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #9 on: December 07, 2011, 09:50:01 am »
at a minimum,  it looks like you missed a vital step from SGT's guide:

Quote
3. In Mala, add the path parameter to the command line making sure there is a space between the 2 parameters:
Mame Config>Additional>Command line:

%rom% %path%

I can tell this because in your batch file, you are only getting the ROM passed to you, not the path, so variable "%2" is always blank.
Quote
C:\Mame>echo 1942
1942

C:\Mame>pause
Press any key to continue...

Because %2 is blank, this next chunk of your batch file fails:
Code: [Select]
if "%2" == "C:\Mame Ver Plus" goto Mame Ver Plus
if "%2" == "C:\Mame Ver Neg" goto Mame Ver Neg


lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #10 on: December 07, 2011, 01:06:03 pm »
Im sure i did step 3, ill have a look to double check

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #11 on: December 07, 2011, 02:34:46 pm »
Ok i have looked the Mala settings and i did indeed set the %rom% %path% in the command line with a space inbetween! Any other reason why this isnt finding the path?

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #12 on: December 07, 2011, 03:16:28 pm »
that's outside my world.  If you're telling mala to pass that variable and it's not being passed, something is broken higher up.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #13 on: December 07, 2011, 04:02:32 pm »
Damn, well thanks for the help you've already given me. Ill send SGT a PM and see if he has any ideas

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #14 on: December 07, 2011, 04:48:55 pm »
Try folder names without spaces in them.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #15 on: December 07, 2011, 05:11:17 pm »
Thanks for the suggestion, but it still didnt work, seems to still be loading from the mame directory and not mameverplus. There has to be something a miss with my bat file.........

echo %1 %2 %3 %4 %5
pause
if "%2" == "C:\MameVerPlus" goto MameVerPlus
if "%2" == "C:\MameVerNeg" goto MameVerNeg

mame.exe %1
exit

:MameVerPlus
cd ..\MameVerPlus
closemul.exe mameplus.exe
exit

:MameVerNeg
cd ..\MameVerNeg
closemul.exe mameneg.exe
exit

%1.cmd
exit

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #16 on: December 07, 2011, 11:12:39 pm »
You haven't specified which rom you want mameplus.exe or mameneg.exe to run.

should be

closemul.exe mameplus.exe 1%

I'd also specify full paths (C:\) just to be sure.

.....closemul usually isn't needed for mame.
« Last Edit: December 08, 2011, 10:32:50 am by BadMouth »

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #17 on: December 08, 2011, 09:31:54 am »
Or if this fails too, since you are obviously getting the ROM name passed into your batch file, you can do what I did and just branch based off that.

http://forum.arcadecontrols.com/index.php?topic=81059.msg845599#msg845599

Same idea, slightly more PITA since you could end up with a giant batch file if you have hundreds of roms you want to check.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #18 on: December 08, 2011, 02:24:10 pm »
This is really hacking me off now, have tried both above suggestions, and it still refuses to load anything other than from c:\mame. I tried just via adding the rom, so my mame.cmd looks like......

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==1942 goto MameVerPlus
if %1==1941 goto MameverPlus

rem default MAME launch
c:\mame
mame %1 %2 %3 %4 %5 %6
cd ..
goto end

:MameVerPlus
c:\MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
goto end

:end

I have only placed the 1942 and 1941 roms in c:\MameVerPlus\Roms folder, and still im greeted with....

C:\Mame>echo 1942
1942

C:\Mame>pause
Press any key to contiune...


Im guessing if it works correctly is should read...

C:\MameVerPlus>echo 1942
1942

C:\MameVerPlus>pause
Press any key tp cpmtiune...


??

 
« Last Edit: December 08, 2011, 02:26:36 pm by lettuce »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #19 on: December 08, 2011, 03:19:43 pm »
Quote
:MameVerPlus
c:\MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
goto end

really?  That resembles our suggestions?
I'm not sure if you're refusing to learn/think or just screwing with us.

sigh.....

I'll give you this and be on my way.

Code: [Select]
if "%2" == "C:\MameVerPlus" goto MameVerPlus
if "%2" == "C:\MameVerNeg" goto MameVerNeg

mame.exe %1
exit

:MameVerPlus
cd C:\MameVerPlus
mameplus.exe %1
exit

:MameVerNeg
cd C:\MameVerNeg
mameneg.exe %1
exit

(assuming your MameVerPlus and MameVerNeg folders are just on the C drive and not inside another folder)

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #20 on: December 08, 2011, 04:22:37 pm »
Have tried the above and still decides to try and load from c:\Mame  :banghead:

Maybe it just doesnt work if using the same emulator and version?

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #21 on: December 09, 2011, 09:27:31 am »
ooh!  you were both so close!
lettuce forgot the CD, badmouth is checking %2 and not %1.  %2 isn't (for unexplained reasons) getting passed to us.

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==1942 goto MameVerPlus
if %1==1941 goto MameverPlus

rem default MAME launch
cd mame
mame %1 %2 %3 %4 %5 %6
cd ..
goto end

:MameVerPlus
cd MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
goto end

:end

This assumes you have mame and mameVerPlus in their own folders.
With the above, you will be running exactly as I proposed in here:

http://forum.arcadecontrols.com/index.php?topic=81059.msg845599#msg845599

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #22 on: December 09, 2011, 10:40:57 am »
ooh!  you were both so close!
lettuce forgot the CD, badmouth is checking %2 and not %1.  %2 isn't (for unexplained reasons) getting passed to us.

Isn't %1 the rom name?
Wouldn't that result in having to repeat that line for every game?!

%2 is the path, so it covers every game in a folder.

Path parameter probably isn't set right in MALA.
%rom% %path%
(make sure there is a space in the middle)

Works on mine.  :dunno

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #23 on: December 09, 2011, 03:20:57 pm »
>Isn't %1 the rom name?
yep.

>Wouldn't that result in having to repeat that line for every game?!
Not if you have a default case.  Ie, my set of 130 roms has a version of mame where all but about 10 games run just fine.  Those 10 special games I branch based on the rom name to execute it using a different version of MAME, so if the rom name isn't in the list, it just runs the normal version of MAME.

>%2 is the path, so it covers every game in a folder.
It would be, but it's not coming into our batch file here.  See post #9.

>Works on mine.
Yeah, lettuce has somehow been able to break something that works fine for everyone else.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #24 on: December 09, 2011, 03:55:11 pm »
Thanks for the explanation.  I have only a basic understanding when it comes to these batch files.
(everything I know, I learned in SGT's thread)

Yeah, lettuce has somehow been able to break something that works fine for everyone else.

Sometimes I wonder if the people who can't seem to get anything working aren't just screwing with us.  :'(


lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #25 on: December 10, 2011, 01:33:06 pm »
still no go im afraid :(. Heres a pic of the option screen for mala showing i do indeed have the %rom% %path% line............


Celsius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 81
  • Last login:May 10, 2015, 11:40:41 am
    • Rcade project
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #26 on: December 11, 2011, 12:07:42 pm »
Ok, I took my working batch file and changed it to what you would need. Requirements:
 3 mame folders with the programs (c:\mame\mame.exe, c:\MameVerPlus\mameplus.exe and c:\MameVerNeg\mameneg.exe)
 Make a mameother folder in c with 2 romfolders...c:\mameother\MameVerPlus and c:\mameother\MameVerNeg (also change the rompaths in mameplus.exe and mameneg.exe to the ones made)
 Make sure there's only 1 copy of a rom in the 3 folders, meaning...you want 1945 to play in mameplus, so remove 1945.zip in c:\mame\roms and c:\mameother\MameVerNeg
 In Mala, first rompath is c:\mame\roms and second rompath would be C:\mameother with "search subfolders" activated
 Put the mame.cmd (the batch file) in c:\mame
 In Mala the mame executable would be: c:\mame\mame.cmd
 update your mala romlist


Quote
@echo off

if "%2" == "C:\mameother\MameVerPlus" goto MameVerPlus
if "%2" == "C:\mameother\MameVerNeg" goto MameVerNeg

mame.exe %1
exit

:MameVerPlus
cd ..\MameVerPlus
mameplus.exe %1
exit

:MameVerNeg
cd ..\MameVerNeg
mameneg.exe %1
exit

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #27 on: December 11, 2011, 06:12:18 pm »
Thanks for the help Celsius....but it is STILL loading c:\mame!!! A you can see from the attach pics, i have everything set as you have suggested. i really dont know why it insists in loading c:\mame\mame.exe when select 1942!!

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #28 on: December 13, 2011, 11:30:02 am »
well, go with what you've got.
You are getting %1 passed to you, so change your batch file to just look at the ROM and branch that way. 

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #29 on: December 13, 2011, 11:56:00 am »
We've tired that a few post back though didnt we with no luck

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #30 on: December 13, 2011, 03:15:26 pm »
You've tried this?  It doesn't look like you had a few posts back, since you were still referring to %2 (aka %path%) not being available.
Notice that this version doesn't look for %2 at all, thus there is no reason it shouldn't work.

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==1942 goto MameVerPlus
if %1==1941 goto MameverPlus

rem default MAME launch
cd mame
mame %1 %2 %3 %4 %5 %6
cd ..
goto end

:MameVerPlus
cd MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
goto end

:end

To make debugging this easier, add another pause after the :end
That way you can stop to see if there are any error message that are printed out that you don't end up seeing because the window is closed.
Heck, put pauses after each statement just so you can step through and watch how the batch file runs.


I'm guessing you may see something like:
cd MameVerPlus
the system cannot find the path specified

and that's where your other problem is.



« Last Edit: December 13, 2011, 03:29:46 pm by NOP »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #31 on: December 14, 2011, 02:26:53 pm »
Still no joy man. I have tried to add a 'pause' at the end of the batch file but the dos window still closes down automatically :(. This shouldnt be this hard for crying out loud  :cry:
« Last Edit: December 14, 2011, 02:29:40 pm by lettuce »

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #32 on: December 14, 2011, 02:43:54 pm »
No, this should most certainly not be that hard.

if the window closed on you, it never executed the pause.  try this one:

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==1942 goto MameVerPlus
if %1==1941 goto MameverPlus

rem default MAME launch
echo I'm going to run the default mame!
pause
cd mame
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:MameVerPlus
echo I made it to MAmeVerPlus!
pause
cd MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:end
pause

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #33 on: December 14, 2011, 03:09:41 pm »
Ok, the dos window stay open this time! and indeed it cant not find the mameverplus path!, see attached pic........

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #34 on: December 14, 2011, 04:29:32 pm »
It's only looking for the MameVerPlus folder inside the mame folder (which isn't where it's at).

Specify the full path...

cd C:\MameVerPlus

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #35 on: December 14, 2011, 04:37:21 pm »
It's only looking for the MameVerPlus folder inside the mame folder (which isn't where it's at).

Specify the full path...

cd C:\MameVerPlus

Ah ok, could be on to something here. I done what you suggested and now it does indeed find mameverplus folder but give the following messge in dos....

C:\MameVerPlus>mame 1942
'mame' is not recongnised as an interal or external command, operable program or batch files


atm the exe file in my MameVerPlus folder is MamePlus.exe


EDIT: Ok, have change the exe file in the MameVerPlus folder from 'MamePlus.exe' to 'Mame.exe' and it only bloody works!!!!  :laugh2:. So it was a combination of next having the full path in the batch file and it not looking for mameplus.exe but instead was looking for mame.exe.

So do i need to list each rom i wanted loaded in the batch file, or can i just use a general batch file?
« Last Edit: December 14, 2011, 04:51:59 pm by lettuce »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #36 on: December 14, 2011, 06:23:29 pm »
make a copy of your current working batch file and put it in a safe place......

I'd go back to trying to get the %2 thing working so you only need a line for each folder.

if "%2" == "C:\MameVerPlus" goto MameVerPlus
if "%2" == "C:\MameVerNeg" goto MameVerNeg


lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #37 on: December 15, 2011, 01:39:19 pm »
So would this be a good starting point........

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if "%2" == "C:\MameVerPlus" goto MameVerPlus
if "%2" == "C:\MameVerNeg" goto MameVerNeg

rem default MAME launch
echo I'm going to run the default mame!
pause
cd mame
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:MameVerPlus
echo I made it to MAmeVerPlus!
pause
cd MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:end
pause

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #38 on: December 15, 2011, 03:01:09 pm »
So would this be a good starting point........

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if "%2" == "C:\MameVerPlus" goto MameVerPlus
if "%2" == "C:\MameVerNeg" goto MameVerNeg

rem default MAME launch
echo I'm going to run the default mame!
pause
cd mame
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:MameVerPlus
echo I made it to MAmeVerPlus!
pause
cd MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:end
pause

Only the first four lines of it.  ::)

Why would you want to change the rest of it when it is working right?

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #39 on: December 15, 2011, 04:24:58 pm »
Ok, have used just.....

echo %1 %2 %3 %4 %5
pause
if "%2" == "C:\MameVerPlus" goto MameVerPlus
if "%2" == "C:\MameVerNeg" goto MameVerNeg


And get a dos window saying...

C:\Mame>echo 1942
1942

C:\Mame>pause

C:\Mame>if *** == "C:\MaverVerPlus" goto MaveVerPlus

C:\Mame>if *** == "C:\MaverVerNeg" goto MaveVerNeg

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #40 on: December 15, 2011, 06:10:41 pm »
ok, i see what's happening now (hopefully).  The answer to the if statements is false because that's not actually the path to your roms.
It should be........

if "%2" == "C:\MameOther\MameVerPlus" goto MameVerPlus
if "%2" == "C:\MameOther\MameVerNeg" goto MameVerNeg


lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #41 on: December 15, 2011, 06:16:35 pm »
Im not sure, as i placed the roms back in the roms directory within c:\mameverplus folder and also change the rom path in mala back to c:\mameverplus

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #42 on: December 15, 2011, 08:39:37 pm »
Im not sure, as i placed the roms back in the roms directory within c:\mameverplus folder and also change the rom path in mala back to c:\mameverplus

to c:\mameverplus
or c:\mameverplus\roms

?

You should be able to figure this out by now.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #43 on: December 16, 2011, 01:19:32 pm »
Yeah the roms are in c:\MameVerPlus\Rom and ive pointed mala to this directory aswell

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #44 on: December 20, 2011, 04:02:58 pm »
I still cannot get this to work as i want. this is my current bat file........

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if "%2" == "C:\MameVerPlus" goto MameVerPlus
if "%3" == "C:\MameVerNeg" goto MameVerNeg

mame.exe %1
exit

:MameVerPlus
cd c:\MameVerPlus
mame.exe %1
exit

:MameVerNeg
cd c:\MameVerNeg
mame.exe %1
exit

I have added the full path for each folder, and added 3 rom paths to Mala (C:\Mame (%1), C:\MameVerPlus (%2), and C:\MameVerNeg (%3)). And when loading 1942 (MameVerPlus) dos reports......



so what the hell is wrong with the above bat file as its stilllooking in c:\mame.

I got this bat file to work if i told it look for the rom.........

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==1942 goto MameVerPlus
if %1==1941 goto MameverPlus

rem default MAME launch
echo I'm going to run the default mame!
pause
cd c:\mame
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:MameVerPlus
echo I made it to MAmeVerPlus!
pause
cd c:\MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:end
pause

so why doesnt the other bat file work????  :banghead:
« Last Edit: December 20, 2011, 04:12:21 pm by lettuce »

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #45 on: December 20, 2011, 04:10:34 pm »
First thing I would do is simplify the arguments:

instead of "C:\MameVerPlus" use plus
instead of "C:\MameVerNeg" use neg

Without the quotes, just like in your second example that seems to work fine.

Are you sure you want to be testing "%2" and "%3" on lines 3 and 4, seems a strange way to pass arguments.



lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #46 on: December 20, 2011, 04:17:04 pm »
First thing I would do is simplify the arguments:

instead of "C:\MameVerPlus" use plus
instead of "C:\MameVerNeg" use neg

Without the quotes, just like in your second example that seems to work fine.

Are you sure you want to be testing "%2" and "%3" on lines 3 and 4, seems a strange way to pass arguments.

so change the directories from c:\MameVerPlus to c:\Plus and c:\MameVerNeg to c:\Neg ?, but what would that achieve?

This is just confusing the hell out of me, i hate batch files!!

So the revised bat file should be......

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==C:\Plus goto Plus
if %1==C:\Neg goto Neg

mame.exe %1
exit

:Plus
cd c:\Plus
mame.exe %1
exit

:Neg
cd c:\Neg
mame.exe %1
exit
« Last Edit: December 20, 2011, 04:20:03 pm by lettuce »

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #47 on: December 20, 2011, 04:21:34 pm »
Well if would remove two things that might be causing the problem

1) the quotes, your working example does not have them

2) the non alpha numeric characters that might also be causing the issue (:\), again your working example does not have those characters




What is the output after running the first file?

echo %1 %2 %3 %4 %5
pause

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #48 on: December 20, 2011, 04:24:22 pm »
Almost, I was thinking of something like this:

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %2==plus goto mplus
if %2==neg goto mneg

echo Normal mame
pause
mame.exe %1
exit

:mplus
echo Plus mame
pause
cd c:\Plus
mame.exe %1
exit

:mneg
echo Negative mame
pause
cd c:\Neg
mame.exe %1
exit

%1 will be your romname
%2 will be your version (nothing = normal, plus = plus, neg = negative)

Try that and post the output

« Last Edit: December 20, 2011, 04:27:06 pm by jimmy2x2x »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #49 on: December 20, 2011, 04:39:42 pm »
Ok, tried that bat file and dos gave me this mesage...




jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #50 on: December 20, 2011, 04:48:36 pm »
You are not passing %2 to the batch file, looks like you need to check for this first:

Code: [Select]
echo %1 %2
pause
if "%2"=="" goto mnormal
if "%2"=="plus" goto mplus
if "%2"=="neg" goto mneg

:mnormal
echo Normal mame
pause
mame.exe %1
exit

:mplus
echo Plus mame
pause
cd c:\Plus
mame.exe %1
exit

:mneg
echo Negative mame
pause
cd c:\Neg
mame.exe %1
exit


you should be able to enter these 3 command lines and get 3 different results.

Open a command prompt
Navigate to where the batch file is
substitute the actual name of the batch below
try this:

<batch filename> 1942
<batch filename> 1942 plus
<batch filename> 1942 neg

EDIT: apparenty strings have to be in quotes in batch files (its been a while for me! sorry) updated code.


« Last Edit: December 20, 2011, 04:53:52 pm by jimmy2x2x »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #51 on: December 20, 2011, 04:57:19 pm »
I added 3 rom paths to Mala (C:\Mame (%1), C:\MameVerPlus (%2), and C:\MameVerNeg (%3)).

Wha.... ???

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #52 on: December 20, 2011, 05:01:36 pm »
I have tried out my batch file, it works fine.

Now the only thing you need to do is make sure c:\neg and c:\plus contain your required versions of mame.

In those 2 folders, edit both mame.ini files to point to where your roms are located and that should be that (I think!)
I will assume the roms are pathed in you "normal" mame.ini configuration.

you will call the batch file with 2 arguments

1) rom name
2) mame version (plus, neg or anything else for normal version of mame)

The batch file should be in your "normal" mame folder

Is this what you wanted?

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #53 on: December 20, 2011, 05:04:11 pm »
Change the bat as suggested and ran, c:\mame\mame.cmd 1942 Plus and it loaded fine.........



But when trying to load it through mala it said it couldnt find the rom files.

using just 1942 as an example here,

I have pointed Mala to c:\Plus\Roms
The 1942 rom is in the rom folder in c:\Plus
the roms line in the mame.ini file (within c:\plus) is left as the default setting  'rompath      roms'
and the mame.cmd file is in my main mame folder (c:\mame)
« Last Edit: December 20, 2011, 05:09:54 pm by lettuce »

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #54 on: December 20, 2011, 05:09:49 pm »
ok

so what does the screen tell you when you run it in mala?

are you passing the correct arguments to mame.cmd (I would have called it runmame.bat to avoid confusion)


you might have to get mala to show the command window so see this



lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #55 on: December 20, 2011, 05:17:38 pm »
This is what a get from dos when trying to load through Mala.......



Using just 1942 as an example here,

I have pointed Mala to c:\Plus\Roms
The 1942 rom is in the rom folder in c:\Plus
the roms line in the mame.ini file (within c:\plus) is left as the default setting  'rompath      roms'
and the mame.cmd file is in my main mame folder (c:\mame)

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #56 on: December 20, 2011, 05:20:51 pm »
OK

so the switching within the batch file is working

and your current problem is the location of the roms.

in all 3 mame.ini files (c:\mame\mame.ini  c:\plus\mame.ini  c:\neg\mame.ini) you need to set the rom paths to where the roms are (c:\plus or c:\plus\rom or c:\plus\roms) where  1942.zip is actually located.


« Last Edit: December 20, 2011, 05:24:59 pm by jimmy2x2x »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #57 on: December 20, 2011, 05:35:25 pm »
Well you cannot have the same rom files in more than 1 rom folder, so for instance i couldnt have the 1942 rom in c:\mame\roms and also c:\plus\roms. So all the roms that i want to run with plus mame have been moved from the main mame rom folder (c:\mame\roms) to c:\plus\roms.

So in each of the 3 mame.ini files i should change the rom line from 'roms' to 'c:\plus\roms' as so on??

On a side note i dont have a .bat file im using a .cmd file, mame.cmd which contains...

Code: [Select]
echo %1 %2
pause
if "%2"=="" goto mnormal
if "%2"=="plus" goto mplus
if "%2"=="neg" goto mneg

:mnormal
echo Normal mame
pause
mame.exe %1
exit

:mplus
echo Plus mame
pause
cd c:\Plus
mame.exe %1
exit

:mneg
echo Negative mame
pause
cd c:\Neg
mame.exe %1
exit

and then im point Mala to 'c:\mame.cmd' rather than the usual 'c:\mame.exe' file
« Last Edit: December 20, 2011, 05:38:04 pm by lettuce »

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #58 on: December 20, 2011, 05:37:49 pm »
Maybe I am confused here, I thought you wanted to run 3 different versions of mame sharing 1 rom folder.

is this correct?

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #59 on: December 20, 2011, 05:42:15 pm »
Well i was informed that i couldnt do this, i would need to move the rom files from the main mame directory (c:\mame\roms) to which ever mame folder i wanted to run that rom on, so for 1942 i want to use MameVerPlus (c:\plus in this case) so i had to take the 1942 rom from c:\mame\roms and place it into c:\plus\roms. As i was told you could not have 2 lots of 1942 in different mame directorys, are you saying this isnt so??

If i can use just 1 rom folder across the 3 different version of mame that would be idea
« Last Edit: December 20, 2011, 05:44:15 pm by lettuce »

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #60 on: December 20, 2011, 05:51:28 pm »
You can share 1 set of roms across many versions of mame as long as the rom will actually work with the versions of mame you are using.

For example, sometimes roms get updated or changed for different versions of mame, this may or may not affect you depending on the roms you have and the versions of mame you are running.

you have 2 options here.

Option 1)

have the roms for each version in each sub folder:
like this.
c:\mame\roms  <- contains the roms for c:\mame\mame.exe
c:\plus\roms  <- contains the roms for c:\plus\mame.exe
c:\neg\roms  <- contains the roms for c:\neg\mame.exe

if you do it this way, you will need to make sure all 3 mame.ini files have the "rompath                   roms" line set.

Option 2)

have the roms in one cental location (c:\mame\roms for example)

and set all 3 mame.ini files to "rompath   c:\mame\roms"

do you follow?

we are using relative paths for Option 1 (roms subfolder from current location), and absolute rom paths for Option 2 (the roms are in a fixed location, not relative to current location)

« Last Edit: December 20, 2011, 05:53:19 pm by jimmy2x2x »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #61 on: December 20, 2011, 06:04:01 pm »
Yeah, not all roms will work with the 3 version of mame i have so they will have to have there own rom folders im afraid. So i can leave the rom line in the mame.in files as 'rompath               roms' for all 3 mame.ini files right?

And in Mala i need to select 3 different paths for the roms...

1. c:\mame\roms\
2. c:\plus\roms\
3. c:\neg\roms\

is this correct?

So my question is why when i loaded 1942 through mala does it insist in trying to load c:\mame and not c:\plus, and that is why is cannot find the roms files it need for 1942??
« Last Edit: December 20, 2011, 06:08:27 pm by lettuce »

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #62 on: December 20, 2011, 06:09:45 pm »
OK thats fine, leave the roms where they are.

How is mala setting the %2 argument ("neg" or "pos") is this generated from a specific gamelist or something?


lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #63 on: December 20, 2011, 06:17:53 pm »
As ive said im clueless when it comes to batch files and the like, what do you mean by 'argument'?

In Mala the command line paramater is set as

%rom% %path%

and for the rom path, rom path 1 is c:\mame\roms, rom path 2 c:\plus\roms and rom path 3 is c:\neg\roms

is this what you were asking?? lol

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #64 on: December 20, 2011, 06:26:18 pm »
Right!

I severely underestimated this situation ;)

I have started to read the topic from the start, brb !

« Last Edit: December 20, 2011, 06:30:45 pm by jimmy2x2x »

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #65 on: December 20, 2011, 06:36:32 pm »
My advice is to run different game lists for horizontal and vertical games, each list using a different version of mame sharing one rom folder.

Forget about batch files for this type of operation, as far as I can see there is no easy way to determine if a game is horizontal or vertical from within a batch file.

Sorry for misunderstanding your issue.




lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #66 on: December 20, 2011, 06:43:42 pm »
I thought the way it worked though was the batch file would look in each mame rom folder for said rom and when it found it it would load that version of mame?? So for example 1942, if i selected that in mala, the batch file would first look in c:\mame\roms so it doesnt find it in there so it looks in c:\plus\roms and finds 1942 so load mame from c:\plus??

Is this how it works??

As ive had it work when telling it to look for a certain rom using the below batch file....

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==1942 goto MameVerPlus
if %1==1941 goto MameverPlus

rem default MAME launch
echo I'm going to run the default mame!
pause
cd c:\mame
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:MameVerPlus
echo I made it to MAmeVerPlus!
pause
cd c:\MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:end
pause

I just cant get it to work when generally looking for a rom in say c:\plus, it always appears to load from c:\mame
 

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #67 on: December 20, 2011, 06:49:41 pm »
All your batch file will do is:

check if the rom selected in mala is 1942, if it is then goto the MameVerPlus label
check if the rom selected in mala is 1941, if it is then goto the MameVerPlus label
if the game is not 1942 or 1941 then it will go to the default option.

It will not check if the rom is in the folder, it doesnt know anything about it, it will just always go there if you select one of those games from within mala.

you *might* be able to get this to work, but you will need some way of checking if the rom exists within a certain path
and make sure that you have an intelligent way of sorting the roms, verticals and horizontals etc...

Not worth it imo



lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #68 on: December 20, 2011, 06:59:18 pm »
Or could i list all roms that i want to be loaded with mameverplus or mameverneg and do it that way, for example.......

Code: [Select]
echo %1 %2 %3 %4 %5
pause
if %1==1942 goto MameVerPlus
if %1==1941 goto MameverPlus
if %1==1943 goto MameverPlus
if %1==dkong goto MameverPlus
if %1==bjack goto MameverNeg
if %1==Mercs goto MameverNeg

rem default MAME launch
echo I'm going to run the default mame!
pause
cd c:\mame
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:MameVerPlus
echo I made it to MAmeVerPlus!
pause
cd c:\MameVerPlus
mame %1 %2 %3 %4 %5 %6
cd ..
pause
goto end

:end
pause

Would that work?

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #69 on: December 20, 2011, 07:02:43 pm »
That idea would work, it might be a bit of a long way round if you have lots of games!

there might be another way using some logic, im just experimenting with it atm

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #70 on: December 20, 2011, 07:09:53 pm »
OK I might have a quick solution, it depends on 1 thing.

Are your roms already sorted, so that any given rom only appears once with NO DUPLICATES

ie 1942.zip only appears one time in either c:\mame\roms, c:\neg\roms or c:\plus\roms ?


jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #71 on: December 20, 2011, 07:23:25 pm »
Im pretty sure the following instructions will solve your problem.

It will switch to the version of mame where the rom exists, so you can have your different HLSL effects for vertical and horizontal games.

You will need to have 2 mame folders:

c:\mame  (this one will be for horizontal games)
c:\vertmame  (this one will be for vertical games)

c:\mame\roms  (contains all your horizontal games)
c:\vertmame\roms (contains all your vertical games)

both mame.ini files (c:\mame\mame.ini and c:\vertmame\mame.ini) have the "rompath     roms" line

put this code into a batch file, save the batch file as c:\mame\runme.cmd

Code: [Select]
@echo off
if exist c:\mame\roms\%1.zip goto horizontal
cd \vertmame
:horizontal
mame %1
exit

point mala to this batch file (c:\mame\runme.cmd) and just pass %1 as the rom

You will need to add both rom paths to mala (c:\mame\roms and c:\vertmame\roms)

Let me know how you get on.


« Last Edit: December 21, 2011, 05:30:06 am by jimmy2x2x »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #72 on: December 21, 2011, 08:18:14 am »
I shall try what u suggested when I get home. Will this method only work with a max of 2 folders?, as ideally I need it to work for 3 set of folders, 1 for standard Mame, and 2 for vertical games. The reason I need 2 vertical Mame folders is some roms don't display properly and need a different value set in the 'post.fx' file within the HLSL folder, hence 2 vertical Mame folders need.

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #73 on: December 21, 2011, 01:46:02 pm »
I think this should work 3 different versions of mame, let me know

You will need to have 3 mame folders:

c:\mame  (this one will be for normal games)
c:\vertmame  (this one will be for vertical games)
c:\horimame  (this one will be for horizontal games)

c:\mame\roms  (contains all your normal games)
c:\vertmame\roms (contains all your vertical games)
c:\horimame\roms (contains all your horizontal games)

all 3 mame.ini files (c:\mame\mame.ini  c:\vertmame\mame.ini  c:\horimame\mame.ini) have the "rompath     roms" line

put this code into a batch file, save the batch file as c:\mame\runme.cmd


Code: [Select]
@echo off
if exist c:\mame\roms\%1.zip goto normal
if exist c:\horimame\roms\%1.zip goto horizontal
cd \vertmame
goto normal
:horizontal
cd \horimame
:normal
mame %1
exit

point mala to this batch file (c:\mame\runme.cmd) and just pass %1 as the rom

You will need all 3 rom paths to mala (c:\mame\roms  c:\vertmame\roms c:\horimame\roms)


lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1900
  • Last login:December 31, 2021, 01:46:10 pm
  • Make It So!
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #74 on: December 22, 2011, 03:10:47 pm »
Bingo my man, works a treat. Thanks for going out your way to help with this!, its very much appreciated!  :cheers:

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1216
  • Last login:December 19, 2018, 01:29:48 am
Re: 3 versions of MAME sharing same ROM folder in one list??
« Reply #75 on: December 22, 2011, 03:18:00 pm »
np, glad its working for you ;)