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 10115 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:May 05, 2024, 08:59:50 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:May 05, 2024, 08:59:50 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:May 05, 2024, 08:59:50 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:May 05, 2024, 08:59:50 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:May 05, 2024, 08:59:50 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:May 05, 2024, 08:59:50 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:May 05, 2024, 08:59:50 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:May 05, 2024, 08:59:50 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