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: General config question with today's front ends  (Read 1760 times)

0 Members and 1 Guest are viewing this topic.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
General config question with today's front ends
« on: September 13, 2004, 11:29:43 pm »
I haven't experimented with front ends in a LONG time so I have been trying some out...specifically I've tried MameWah and Ultrastyle, both work fine but I have this one question.

I had been using the arcade at home front end since I discovered MAME, which is  a long time now, and one feature I used was the individual configuration of mame options per game as well as the overall defaults.

I can't seem to figure out (did I not try enough?) if I can set individual game parameters in today's front ends.. I can't find any options, maybe there's something I don't know about automatically being able to do this by creating ini/config files in mame and the front ends find it?? who knows, but I thought I'd ask here rather than chase ghosts  for days trying to sift documents.

Specifically I had found that out of the box with a clean install of mame defaults and then a front end, I couldn't get Ikari to work until I turned on some direct 3D options and things in the mame ini file, so that worked finally, but then Tron wasn't working until I went to the command prompt and ran mame tron -norc  to not read the config file (I figured there was some video setting it didn't like in my config)..then it worked.

So I need to individually configure some games...how??

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:General config question with today's front ends
« Reply #1 on: September 14, 2004, 04:37:15 am »
So I need to individually configure some games...how??

You hit on it earlier...you can make game-specific ini files.  Just make your mame.ini file OK overall, and make any other game-specific changes in their own ini file(s), eg:

puckman.ini:

hwstretch 0
resolution 352x288


...or whatever.  You can bung these ini files in \mame\ini, and point to that (inipath) in mame.ini.  Hope that helps...

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:General config question with today's front ends
« Reply #2 on: September 14, 2004, 04:44:14 am »
Yeah that is what I was looking for, thanks.
 I figured it was something I could do in mame itself since the modern front ends weren't supporting it within.  I just didn't know where to begin looking for info, it's such a big system and I thought I could find out easier by asking in this case.

Now there's just one other feature I "miss" from the older front ends....maybe new ones have it....I wish I could run a custom command per game, like a specific batch file...that would be something good for mame to implement, if I run tron then it would execute tron.bat if it exists, or such...

Because if I ever get around to building a cabinet, I'm planning to have the rotating LCD monitor for vertical games and if I were using the front end that allows me to do a batch file, I'd have vertical games run a custom little utility to access either serial or parallel port and cause the monitor to rotate, then launch mame.exe, then rotate it back after exiting mame...

But if I have to sacrifice this automation for having a better front end, I'll just have to do it with switches (sigh)

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:General config question with today's front ends
« Reply #3 on: September 14, 2004, 04:56:21 am »
Now there's just one other feature I "miss" from the older front ends....maybe new ones have it....I wish I could run a custom command per game, like a specific batch file...that would be something good for mame to implement, if I run tron then it would execute tron.bat if it exists, or such...

Because if I ever get around to building a cabinet, I'm planning to have the rotating LCD monitor for vertical games and if I were using the front end that allows me to do a batch file, I'd have vertical games run a custom little utility to access either serial or parallel port and cause the monitor to rotate, then launch mame.exe, then rotate it back after exiting mame...

But if I have to sacrifice this automation for having a better front end, I'll just have to do it with switches (sigh)

I think Dragon King supports per game config, and using batch files you could probably achieve what you want from any FE...you might need a separate app. (this would read mame -listxml) which could be called by the batch file to figure out whether the game launched is vertical or horizontal, and then rotate the screen if neccessary.

I'm sure we could add something to do this into FE's (most already know the orientation of the games).  The problem is that up to now there has been no hardware standard for doing this...everyone has their own way of doing it which makes it difficult for use to add support.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:General config question with today's front ends
« Reply #4 on: September 14, 2004, 07:46:06 am »
So if I wanted to use batch files in any FE to do what I want, the only way I can think to do that is to point to mame.bat instead of mame.exe as the executable and then intercept control, is that what you were thinking?  I'm assuming FEs don't care if I point to something like a batch file instead of the exe, I feared they may want to see the exe to use it for generating lists etc as well as the same target for launching with possibly...but I would have to experiment now that my mind is running.

I think with all of the possible ideas for having software interfacing with hardware and the lack of commonality, maybe someone should try to start a structure and see where it goes, think of all the possible ways someone may currently want to interface to hardware in this context and then think of a way to do it, and if things change, revise the spec to suit...I think if there was at least some basic foundation, people would conform their hardware to match it...especially if example projects existed to demonstrate.

For instance if there were a simple parallel port based output control, with 8 bits someone could have 256 combinations of output signals that could flag a bunch of things, lots of room for people to decode the data and take what they need for their project...and serial port, even better.  Microcontrollers with on-chip UART are the easiest thing to use, once you initialize the chip, turn on the ports etc, it's basically one line of code to send and one line of code to receive a byte automatically, check flags to see if there's new bytes to be read in, etc.
If a front end would send some characters to the serial port while launching, a chip could read ANYthing out of that and work with it.  If there were a common structure supported, front ends could be configured to transmit this data while launching or loading etc...and hardware could control the front end even...to pop up some image or something when the hardware says (like if I rotate a monitor, then when I'm at the end of travel, send feedback to the FE and it shows a Success/Failure indication...

Way too much info to try to organize right now, have to go to work unfortunately.

But if something as big as mame can be organized, so could a software/hardware interface spec, I think...

Parallel port hard-signals would be easiest for most hobbyests to use, but serial port....if someone could program a chip....that is the ultimate interface for something like this.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:General config question with today's front ends
« Reply #5 on: September 14, 2004, 09:01:53 am »
So if I wanted to use batch files in any FE to do what I want, the only way I can think to do that is to point to mame.bat instead of mame.exe as the executable and then intercept control, is that what you were thinking?  I'm assuming FEs don't care if I point to something like a batch file instead of the exe, I feared they may want to see the exe to use it for generating lists etc as well as the same target for launching with possibly...but I would have to experiment now that my mind is running.

That would be fine.  In my FE you would have to use a list generation method which does not use mame.exe tho, or you could generate the list using mame.exe, and then substitute for mame.bat or whatever.  I think Dragon King uses an external list generator anyway, so it shouldn't be a problem.

MW already has some serial port comms stuff (for small lcd screens), so it would be easy for me to add something serial based...I have no idea how to do parallel comms atm tho...

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:General config question with today's front ends
« Reply #6 on: September 14, 2004, 03:12:59 pm »
I've been working on both myself.... the only stumbling block I've found is the fact that xp locks the ports.  I can do it with external dlls but I woudl prefer an internal option.  

Yeah, per- game options are supported.  You add em right in the emulator cfg.

romname=add any game specific options here

But it wasn't added for mame since as you said you should be doing that with ini files.  It's added more for zinc and other non mame emulators.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:General config question with today's front ends
« Reply #7 on: September 14, 2004, 05:07:16 pm »
Yeah that is what I was looking for, thanks.
 I figured it was something I could do in mame itself since the modern front ends weren't supporting it within.  I just didn't know where to begin looking for info, it's such a big system and I thought I could find out easier by asking in this case.

Now there's just one other feature I "miss" from the older front ends....maybe new ones have it....I wish I could run a custom command per game, like a specific batch file...that would be something good for mame to implement, if I run tron then it would execute tron.bat if it exists, or such...

Because if I ever get around to building a cabinet, I'm planning to have the rotating LCD monitor for vertical games and if I were using the front end that allows me to do a batch file, I'd have vertical games run a custom little utility to access either serial or parallel port and cause the monitor to rotate, then launch mame.exe, then rotate it back after exiting mame...

But if I have to sacrifice this automation for having a better front end, I'll just have to do it with switches (sigh)
Druin,

If you liked Arcade@Home, www.mameworld.net/emuloader is similar with more images and support for modern MAME variants.

Using Emuloader, you can set options for MAME for all games under Emulator Setup, then right-click on a game and click custom-options-selected game, set custom options.

You need to set your folder structure (ini files folder) up first, but you don't have to remember the commands for each change, EL does that for you.

And if you want to run a batch file, right click on the game and select Custom Settings-Command Line-Set custom command line.

You can then set EL to launch from a different emulator, or to run a batch file.

EL is looking for a parameters line here, but you can insert a blank space and it will work with standard batch files.

Example -

Create a folder C:\bat

Create a file Tron.bat

"move monitor"
"C:\Mame\mame.exe tron "
"exit"

In EL on the Executable line, type:

"C:\bat\tron.bat"

On the parameter line, type:
" "

Post back if you need more help, or there's a forum at MameWorld.

Drawbacks:  Looks Windowsy, doesn't support arcade monitors very well.  Doesn't support other emu's besides MAME (not directly, at least), but neither did Arcade@Home.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:General config question with today's front ends
« Reply #8 on: September 14, 2004, 08:08:50 pm »
I'll check out all the front ends at mameworld now that I'm getting more back into things.  A while ago I tried downloading a few but couldn't get them working properly (maybe didn't feel like reading the faqs) but lately I have more motivation for it and have had better luck after reading the guides.  One problem was I had mame on D:\ so a lot of the default programs that wanted C:\mame or else to configure it, that's why I couldn't run it out of the box, but now I'm in c:\mame and having much more luck.

It's hard to think I still don't have a cab or control panel even...I can't play Ikari - isn't that awful???

So I want to hook up some sort of scrap wood temp panel (I do have an Ipac/Optipac and a DOT spinner and happ rotary, LS30, and a Xenophobe yellow joystick...and even a 4player over/under coin door, a trackball...a marquee holder, and many buttons to get started...I've had all this stuff for up to 2 years (LS30 for longer) and never really used it all this time, moving, renovation, etc.  

So now that I'm on this train of thought, I think I'll dig to see what kinds of custom projects people have done, or dreamed about (like the LCD interfaces) and then see if I can make a suggestion/wish list, maybe serial based at least for now, and see if anyone would like to expand upon it and consider implementing anything on the PC side.  If serial were implemented, hardware can then very easily create a parallel system from it.  It would be complete power.

I'd be willing to support the hardware efforts, posting circuits and any source code for programmable chips, circuit theory.  I think it's very worthwhile with the way things are going, almost 1000 projects listed in the examples here alone, the amount of time this hobby has lasted and the increasing knowledge base of technical innovation and resources.  I don't think we should discredit the idea of the 1 or 2 way communication between FE and cab hardware.  Even "stupid" ideas like...think of how flashy a pinball machine is with all those lights and solenoid kickers, what if someone wanted to put a few fancy lights on their cab, give it glowing robot eyes, or a light chaser around the frame/cp/monitor....for a few seconds while loading something or in attract mode...they could implement that if they could interact with the FE.

Or even something very basic at least to get started - a patchy job, if a FE could at least cooperate by creating a temp file to flag what game it just loaded....then instead of worrying about a FE loading mame from batch file where custom small programs could access hardware, or having the FE send out serial info to show what it just launched...the FE could "for now" just create a file called "running.now" which would be a text file where line 1 says <romname>, and after exiting the game and returning to FE, it would detele running.now.  So then a 3rd party program (even better, ANYONE can write their own interface to suit themselves AND it makes it easier for an FE author to implement support, and ALL authors could do it), the 3rd party program could just keep running in the background and when it detects "running.now" exists, it reads it, checks the game name, and scans for what to do in its own configuration up to the individual's imagination. Like rotate monitor.  THen when it sees running.now is deleted, it cleans up, rotate the monitor back if necessary, etc.

I think that's a good idea.


Otherwise for an integrated serial link, above all specific ideas that one could implement, I think the most important feature to add would be the generic sort of options that would allow people to fully have their own control over things, not just support for sending specific  data back and forth and doing exact actions set by the FE, but if it was sort of scriptable, where you would have a possibility to configure what the FE should be sending out, and when, and configuring what the FE should do when it receives a response from hardware..like show an image, run a batch file, launch something else.  

I may be getting ahead of myself, I should just try to think and write things until it shapes up and then present some ideas.


Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:General config question with today's front ends
« Reply #9 on: September 14, 2004, 11:14:50 pm »
Here's some thoughts I put together about the serial port hardware/front end interactions, and the note about batch files at the end of it was born, maybe I had the answer all along:





Front End and Hardware Interface Activities
Assuming the FE would handle all COM interactions with hardware and/or create flags for 3rd party com software


Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:General config question with today's front ends
« Reply #10 on: September 14, 2004, 11:28:51 pm »
What am I saying....if I do it with batch files I don't need to create running.now anymore, I can do this:

mame.bat

serialcom.exe %1 -launch
mame.exe %1 %1 ...%n
serialcom.exe %1 -exit


Then I don't have to waste time with polling for existence of files and I can perform startup or shutdown actions on the rom in use...

In this example, the serial program is used in transmit mode from PC to Hardware, but how would I handle things if I wanted hardware to be able to send to PC - if I only launch this during command-send time?  If I try to keep a second app running for the purpose of receiving on the same com port, windows wont' like the port-in-use....but I won't be concerned on that for now. Just the concept.

It would be nice to have hardware feedback so that for instance the PC can know when a monitor interlock has been made in vertical or horizontal mode, and provide some form of on screen status of all hardware at a given time.  

Of course the status can be also shown in hardware with LEDs for sensor states...
« Last Edit: September 14, 2004, 11:34:26 pm by Druin »

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:General config question with today's front ends
« Reply #11 on: September 15, 2004, 07:03:50 am »
There is a LAME project dealing with using multiple LED's on a cab.

Only familiar with EL at a level that I can address this.

EL will NOT accept MAME.bat as an emulator executable, b/c it will try to run -listinfo on mame.bat to generate the games list.

What you might do, but I don't know for sure if it will work . . .

Besides individual command lines - EL also supports driver specific command lines (all games in a driver use a custom command line).   This is good if say you knew you wanted to use System16 to play all the System16 games rather than MAME.

What you could try:

Configure EL normally.
Pick a game and add a custom driver command line to point to mame.bat (probably with %1 as a parameter, but EL might do that automatically).
Test and see if it works.
If successful, sort games on the driver column and then copy the above info to each new driver.

Or . . .

What am I saying....if I do it with batch files I don't need to create running.now anymore, I can do this:

mame.bat

serialcom.exe %1 -launch
mame.exe %1 %1 ...%n
serialcom.exe %1 -exit

I think you can do this:
exidy.bat
serialcom.exe %1 -launch
mame.exe %1
serialcom.exe %1 -exit

You could also post on the EL forum or E-mail the EL author.   However, I doubt he would be able to follow all of this, so you might want to ask simpler questions such as:

When I run EL, is there any way that I could pass the currently running romname to an external program?

It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:General config question with today's front ends
« Reply #12 on: September 16, 2004, 02:18:52 am »
Today  I decided it's time to learn to program for windows, since I haven't done any PC programming since Turbo Pascal 6 for DOS  (for what?) and Quick Basic 4.5  (I still remember the joy I felt when I found this on a BBS back in the day and I could finally make an EXE out of a Qbasic file).

So I did searching for how to use the serial port in VB6 and most of what I found uses MSComm1 so I tried out a sample free project, set up a hardware RS232 to logic-level converter (max232 chip) and looped com1 TX to RX...entered some characters and saw them return to the VB program text box...

What does this mean?  I am going to officially begin testing out some things with this batch file launching concept and the serial port hardware interface concept.
I'll see if I can get a FE to launch mame.bat, which will log the rom name being loaded, and have a VB6 application intercept, decide if there's anything to do in hardware, do it, (LEDs for test purposes).

If I can get a primitive test to be successful I will start an official web page for the ideas and all the hardware/software postings and see what happens with it.

This means I can control things from the desktop via software such as cooling fans, entire cabinet AC power up/down, monitor cabinet temperature, control marquee light,  enable or disable (lock out unauthorized users) certain critical control switches/buttons on the cabinet like mame function keys, or things that are really overkill such as....if I wanted to run the cab 24/7 but I wanted to mute the attract sound overnight, simply cut the amp/speakers off during certain PC clock time periods...and control any solenoid based electromechanical interlocks (clamp down control panel or access doors).  Hmm...what about a custom coin bin where the coins you drop in, are collected in an organized chute of some sort and upon command you can open the release hatch and get your money back so you can have the arcade feel of inserting coins but you don't have to keep going back inside to get the money to recycle...I know, you can just open the coin door...but if you're bored and feeling inventive....it's something to do.

A lot of this is not worth doing but it gets ideas flowing and eventually something (like rotating monitor) useful will make it inspiring to pursue.

Since a mame cab is most likely connected to a home network for upgrade access convenience, and thus the cab has internet access...have an interface set up to send you an email at work when someone at home is messing with your damn cab when you're away and they think you're not watching...

Ok I have to wake up for work in 4 hours. I think I could use the sleep.  Now I remember what it felt like to be a programmer...drink coke, coffee, eat chocolate, feel like a zombie, and not think about anything else...
« Last Edit: September 16, 2004, 02:24:00 am by Druin »

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:General config question with today's front ends
« Reply #13 on: September 16, 2004, 05:20:51 am »
Ok I have to wake up for work in 4 hours. I think I could use the sleep.  Now I remember what it felt like to be a programmer...drink coke, coffee, eat chocolate, feel like a zombie, and not think about anything else...

Heh, it's a wonder anyone does it isn't it!  I find it strangely rewarding coding 'til the early hours, sleep is almost impossible at times...  :)

Seriously tho you have some good ideas...MAMEWAH uses the very same MSCOMM control for it's LCD screen support (very simple code, anyone testing it yet??).  MW also logs the game launched in \mamewah\mamewah.log - maybe you could just use this...would your prog. be loaded all time time, just monitoring what goes on?  Or would it have to be launched with a .bat file?

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:General config question with today's front ends
« Reply #14 on: September 16, 2004, 07:02:00 am »
I think at any given point in thought, I'd need to have the program running all the time (in case hardware wants to talk back) AND command line run option for immediate transmit needs without having to sit there polling a text log inefficiently...but it's all rough thoughts.  Nothing says I can't make a program do both possibilities.

Wow...time for work...I feel like I'm ready to go to bed now.  This is awful.  All this week I've been sleeping on 2 shifts per day hoping to add up to a whole night, all that's happening is twice a day I wake up startled and exhausted.   Is it Friday yet?