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: Simple batch file help needed  (Read 10961 times)

0 Members and 1 Guest are viewing this topic.

Kevin Mullins

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4504
  • Last login:February 01, 2021, 01:29:34 pm
    • Me on Myspace
Simple batch file help needed
« on: December 09, 2008, 02:20:05 pm »
I played around with some of this awhile back on another project, but since then that harddrive crashed. So my examples got lost. Trying to write up a simple .bat file that will launch just one particular game automatically when executed.

Something like:

@echo off
cls
cd C:\MAME128
start /min mame.exe -tm.zip


But I'm not familiar with the command lines and such that MAME uses.
So I'm not sure how to make it call a particular game.

Can someone enlighten me before I rack my brain on such a daff little thing?


 
Not a technician . . . . just a DIY'er.

Congui

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • Last login:July 23, 2015, 12:54:53 pm
  • Newbie!
Re: Simple batch file help needed
« Reply #1 on: December 09, 2008, 02:48:45 pm »
Hi there.

This is as simple as it gets (no need to specify the zip extension):
@echo off
d:
cd mame
start mame.exe pacman

Hope it helps.
Cheers, :cheers:
Congui

daywane

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2533
  • Last login:Today at 06:41:45 pm
  • GRRRR!
Re: Simple batch file help needed
« Reply #2 on: December 09, 2008, 02:54:29 pm »

ChadTower

  • Chief Kicker - Nobody's perfect, including me. Fantastic body.
  • Trade Count: (+12)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38211
  • Last login:October 19, 2022, 12:01:54 pm
Re: Simple batch file help needed
« Reply #3 on: December 09, 2008, 02:58:24 pm »

He might want start /max to maximize the mame window.  /min would minimize it which sort of defeats the purpose.

Kevin Mullins

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4504
  • Last login:February 01, 2021, 01:29:34 pm
    • Me on Myspace
Re: Simple batch file help needed
« Reply #4 on: December 09, 2008, 03:44:50 pm »
Bingo !!
I knew I was doing something wrong. (stupid really)
It was simply a matter of putting tm instead of -tm.zip after the .exe

@echo off
cls
cd C:\MAME128
start /min mame.exe tm


Chad ... I was trying to use the /min to minimize the DOS prompt window.
It only blinks for a second, but still a bit noticable.
Once the .exe and rom are called it maximizes the game itself just fine.

daywane ... I'll make note of that thread. I didn't find it inmy searches.  :cheers:
Not a technician . . . . just a DIY'er.

dys

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:January 20, 2009, 11:47:54 am
Re: Simple batch file help needed
« Reply #5 on: December 10, 2008, 02:21:51 pm »
i experienced that if you call the batch file from inside a visual basic program, this minimize-window problem that we see in the screen will no longer appear. the command looks like this in vb6.


shell "sample.bat", vbhide


inside the sample.bat, you no longer need the command 'start /min'


assuming the start /min there was the DOS program and not part of the MAME program


so your bat file should look like this inside

@echo off
d:
cd mame
mame.exe pacman




Kevin Mullins

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4504
  • Last login:February 01, 2021, 01:29:34 pm
    • Me on Myspace
Re: Simple batch file help needed
« Reply #6 on: December 10, 2008, 03:31:26 pm »
I will definitely give that a shot also because I may be using this setup for other projects.

And I did notice that although my batch files worked perfectly from the desktop, they seemed to cause issues when trying to run them from within a frontend.
Not a technician . . . . just a DIY'er.

dys

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:January 20, 2009, 11:47:54 am
Re: Simple batch file help needed
« Reply #7 on: December 11, 2008, 12:56:30 am »
another term for frontend is emulator? like psexe for ps1?

Franco B

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3766
  • Last login:February 15, 2024, 09:14:06 am
Re: Simple batch file help needed
« Reply #8 on: December 11, 2008, 04:11:31 am »
another term for frontend is emulator? like psexe for ps1?

No they are not the same.

A frontend (Mala, Hyperspin, MAMEwah, MAME32 etc) is software which is configured to run emulators (psexe, MAME, ZSNES etc) and dispays the games/games lists etc which then run the emulators depending on the chosen game/system.

dys

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:January 20, 2009, 11:47:54 am
Re: Simple batch file help needed
« Reply #9 on: December 11, 2008, 08:09:59 am »
another term for frontend is emulator? like psexe for ps1?

No they are not the same.

A frontend (Mala, Hyperspin, MAMEwah, MAME32 etc) is software which is configured to run emulators (psexe, MAME, ZSNES etc) and dispays the games/games lists etc which then run the emulators depending on the chosen game/system.

so it is sort like a main menu for all your games, with different emus combined.

Back where I live, they called this software games handler, dashboard, and many other (depending on which shop you are in). And now frontend. Confusing  ;D

Franco B, thanks for the link earlier.

richyrich888

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:May 10, 2013, 12:14:19 pm
Re: Simple batch file help needed
« Reply #10 on: December 19, 2008, 08:35:43 pm »
i experienced that if you call the batch file from inside a visual basic program, this minimize-window problem that we see in the screen will no longer appear. the command looks like this in vb6.


shell "sample.bat", vbhide


inside the sample.bat, you no longer need the command 'start /min'


assuming the start /min there was the DOS program and not part of the MAME program


so your bat file should look like this inside

@echo off
d:
cd mame
mame.exe pacman






Hi just thought i'd add to this. have had the flashing black dos box  problem myself and one way around it is to create a windows shortcut to your .bat file (right click, drag, create shortcut) and set the short cut to open minimised ..right click on shortcut select properties and in the RUN drop down box select minimized  -done! just direct your frontend command to the shortcut.