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: Forcing resolutions in MAME...  (Read 5681 times)

0 Members and 1 Guest are viewing this topic.

slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Forcing resolutions in MAME...
« on: July 13, 2004, 01:47:34 am »
  Hi all.

  My MAME machine monitor tops out at 800x600.  Is it possible to play games with higher native resolutions by forcing MAME into a lower resolution?  I've tried this some but had no success.  Has anyone done this?

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Forcing resolutions in MAME...
« Reply #1 on: July 13, 2004, 06:59:31 am »
Yes, just use game specific INI files, and specify a resolution you want.  You will probably need to use hwstretch or direct3d to make it fit. eg:

resolution 800x600
hwstretch 1

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:Forcing resolutions in MAME...
« Reply #2 on: July 13, 2004, 08:43:36 am »
I like making it so mame cant change the resolution or pbb, and setting hwstretching (or d3d stretching) on.  

Then setting my desktop to that resolution.  This speeds up loading and exiting mame by a bit.  Removes the monitor jumping also.  

Same thing as Minwah mentioned..  But where you do all your settings at the desktop layer instead of mame.  

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Forcing resolutions in MAME...
« Reply #3 on: July 13, 2004, 09:13:36 am »
I like making it so mame cant change the resolution or pbb, and setting hwstretching (or d3d stretching) on.  

Then setting my desktop to that resolution.  This speeds up loading and exiting mame by a bit.  Removes the monitor jumping also.  

Same thing as Minwah mentioned..  But where you do all your settings at the desktop layer instead of mame.  

Good idea if you can live with just 1 res, thing is with an arcade monitor in particular tho is you *need* to use many different resolutions, so not much point doing it that way imo - MAME has to change resolution for best results.

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:Forcing resolutions in MAME...
« Reply #4 on: July 13, 2004, 09:42:12 am »
 Hi all.

  My MAME machine monitor tops out at 800x600.  Is it possible to play games with higher native resolutions by forcing MAME into a lower resolution?  I've tried this some but had no success.  Has anyone done this?
Arcade monitor or PC monitor???

I use a PC monitor and run basically all (except Vector, which I like at -1024x768) games at -800x600 at 85 Hz.

Same settings as below and make sure -switchres is set to 1 and the bonus is all games are perfect full screen.
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.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:Forcing resolutions in MAME...
« Reply #5 on: July 13, 2004, 10:01:11 am »
My monitor has 640x480, 640x400, 320x240 and 320x200 only (EYGO monitor).

And I couldn't see ANY difference between running 320x240 native games at 320x240 and using hwstretching to 640x480.  I wrote a TON of code to have my frontend pick the closest resolution and stretch up to that resolution if needed....  And then I removed it all because I couldn't see any difference (and I wanted to get rid of the screen jumping)

Its pretty easy to test.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Forcing resolutions in MAME...
« Reply #6 on: July 13, 2004, 11:31:09 am »
My monitor has 640x480, 640x400, 320x240 and 320x200 only (EYGO monitor).

And I couldn't see ANY difference between running 320x240 native games at 320x240 and using hwstretching to 640x480.  I wrote a TON of code to have my frontend pick the closest resolution and stretch up to that resolution if needed....  And then I removed it all because I couldn't see any difference (and I wanted to get rid of the screen jumping)

Oh right...is your monitors' 640x480 interlaced?  I guess not from what you're saying...  I can see why you'd want to get rid of the screen jumping, it is a touch annoying.

I know on my 15khz screen 640x480 -hwstretch looks *entirely* different to 320x240.  As 640x480 is interlaced, it looks a bit flickery at times (depending on game), and hwstretch just makes it look blurry.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:Forcing resolutions in MAME...
« Reply #7 on: July 13, 2004, 11:54:21 am »
nope, non interlaced.

I think the best arcadevga -> arcademonitors is 640x288 for non-interlace.

try the difference between forcing that with hwstretching and 320x240 without... running a game that runs natively at 320x240.

If you can't, then you have an easy solution.

If you can... it might make for a good middleware piece.  finding the closest resolution and stretching to that... and if its exact, just use it.


slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Re:Forcing resolutions in MAME...
« Reply #8 on: July 13, 2004, 01:29:08 pm »
  This is a PC monitor, but it's ancient.  It's old enough to have composite out and some other format I don't even recognize.  They were going to throw it out at work, and I just couldn't pass it up.  To get an idea, check it out here:

(High bandwidth warning)
http://cloud.prohosting.com/slycrel/

  I have tried to fix the resolution with the standard mame.ini across all games, but I can't seem to get it to stay at 800x600 max.  I'll try game independent, but that's going to get annoying fast...  I'm using noname mame, I'll have to try the regular MAME as well.  (romset is v77, so until I find a reason to upgrade, I'll be using old MAME versions, but I don't think that matters a ton.)  I'll play around with it some tonight and post some of my results.

  Also, is there a way to limit the refresh rate of MAME?  I've looked some, but haven't seen a definitive setting for this.  I'm probably limited to 70 Hz at the most on this 'ole beast of a monitor I'm using.  =)

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:Forcing resolutions in MAME...
« Reply #9 on: July 13, 2004, 03:41:25 pm »
I have tried to fix the resolution with the standard mame.ini across all games, but I can't seem to get it to stay at 800x600 max.
I run everything at 800x600 @ 85 Hz with only these two settings in MAME.ini:

resolution              800x600
switchres               1
Quote
I'll try game independent, but that's going to get annoying fast...
You should be able to set it in the main mame.ini file, but if you changed it in a game.ini file those have priority (for that game).
Quote
I'm using noname mame, I'll have to try the regular MAME as well.  
Me too, works fine in NoName.
Quote
(romset is v77, so until I find a reason to upgrade, I'll be using old MAME versions, but I don't think that matters a ton.)  I'll play around with it some tonight and post some of my results.
Should be fine with an older version (not DOS MAME, though)
Quote
 Also, is there a way to limit the refresh rate of MAME?  I've looked some, but haven't seen a definitive setting for this.  I'm probably limited to 70 Hz at the most on this 'ole beast of a monitor I'm using.  =)
There's

refresh                 0
matchrefresh        0
syncrefresh          0

But I leave them set to 0 as above.

The best way to set this is to use Multires http://www.entechtaiwan.com/util/multires.shtm
which let's you specify a refresh rate for each resolution in Windows.  Have MAME pick a resolution that Mutires has defined, and then MAME will automatically output to that resolution.

The bigger question is how can you tell what refresh/rate you're outputting.  My newer monitor shows this on the On-Screen Display, but that probably doesn't.
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.

slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Re:Forcing resolutions in MAME...
« Reply #10 on: July 14, 2004, 02:30:23 am »

  After doing some playing, I found my problem.

  It seems that I was doing my mame.ini correctly, the problem has something to do with the way that I have MAMEWAH set up to run mame.  my executable is "mamepp.exe".  Under the command line, mamepp.exe will use (and expect?) "mamepp.ini".  MAMEWAH doesn't seem to do this.  However if I use "mame.ini" MAMEWAH will use these settings.

  Minwah, any info on why this is?  It was a bit frustrating to track down...

  Thanks for the help everyone.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Forcing resolutions in MAME...
« Reply #11 on: July 14, 2004, 08:36:12 am »

  After doing some playing, I found my problem.

  It seems that I was doing my mame.ini correctly, the problem has something to do with the way that I have MAMEWAH set up to run mame.  my executable is "mamepp.exe".  Under the command line, mamepp.exe will use (and expect?) "mamepp.ini".  MAMEWAH doesn't seem to do this.  However if I use "mame.ini" MAMEWAH will use these settings.

  Minwah, any info on why this is?  It was a bit frustrating to track down...

  Thanks for the help everyone.

That doesn't make sense to be honest...MAMEWAH doesn't read/do anything with mame.ini, all it does it launch mame (ie 'mame romname').  MAME itself parses the ini file, based AFAIK on it's exe name.

I decided to give this a try, from a commandline using 'mamex.exe' and found this:

With no ini file, as expected MAME default settings are used,
With mamex.ini present, as expected settings from mamex.ini are used,
With mame.ini present (no mamex.ini), settings from mame.ini are used.

So the last point confirms to some extent what you have found, and does not go with what I said above.  Wierd.

All I can think is that MAME has changed so that is uses mameexename.ini if it is present (although you say this doesn't work), or mame.ini if that is present.  I'm not sure which would have priority if they are both present*.  If this is the case, I'm not sure what version of MAME this happened in, or whether it is intended or a bug.  My tests were with MAME v0.84u2 btw.

I still confirm that MAMEWAH does nothing with regards to INI files, it lets MAME do it, so if your 'mamepp.ini' doesn't work, there must be another explanation (tho I don't know what).

Edit: * mameexename.ini has priority over mame.ini when both are present
« Last Edit: July 14, 2004, 08:38:11 am by Minwah »

slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Re:Forcing resolutions in MAME...
« Reply #12 on: July 14, 2004, 01:26:53 pm »

  Yeah, it IS strange.  And it's only when using the frontend that the otehr name does not work.  I'm wondering if the "new" code for using the mame application name as the .ini file is directory dependant.  When I launch mamepp.exe from the commandline, I'm in it's directory.  When MAMEWAH is launching my mamepp.exe, I'm guessing that the current directory is the MAMEWAH folder (or whatever mamewah uses underneath).  It's possible that there's some really old code in there that looks for "mame.ini" that's been left in, but the "new" way to do it now is to use the application name.   I dunno, that's kind of a shot in the dark.  Maybe I'll test that some more tonight when I get home.  Thanks for checking it out -- glad I'm not crazy.  =)  

Oh, and for reference, I'm using NoName mame 76 IIRC (From octoberish of last year), though I don't know if it's been in the standard MAME build for that long.

slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Re:Forcing resolutions in MAME...
« Reply #13 on: July 14, 2004, 01:28:05 pm »

  Yeah, it IS strange.  And it's only when using the frontend that the otehr name does not work.  I'm wondering if the "new" code for using the mame application name as the .ini file is directory dependant.  When I launch mamepp.exe from the commandline, I'm in it's directory.  When MAMEWAH is launching my mamepp.exe, I'm guessing that the current directory is the MAMEWAH folder (or whatever mamewah uses underneath).  It's possible that there's some really old code in there that looks for "mame.ini" that's been left in, but the "new" way to do it now is to use the application name.   I dunno, that's kind of a shot in the dark.  Maybe I'll test that some more tonight when I get home.  Thanks for checking it out -- glad I'm not crazy.  =)  

Oh, and for reference, I'm using NoName mame 76 IIRC (From octoberish of last year), though I don't know if it's been in the standard MAME build for that long.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Forcing resolutions in MAME...
« Reply #14 on: July 14, 2004, 02:39:40 pm »
When I launch mamepp.exe from the commandline, I'm in it's directory.  When MAMEWAH is launching my mamepp.exe, I'm guessing that the current directory is the MAMEWAH folder (or whatever mamewah uses underneath).

Your thinking is right...but MAMEWAH actually changes to the emulators path before launching, for this exact reason...

I really can't explain why your mamepp.ini isn't being used, but I guess if mame.ini does work then use that.  I'd be tempted to just rename your mamepp.exe to mame.exe  ::)

slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Re:Forcing resolutions in MAME...
« Reply #15 on: July 14, 2004, 06:51:36 pm »
  BLEH.

  I looked at the MAME source today on my break at work.  Barring some wierdness with NoName MAME as opposed to the standard MAME that's out there now, this is just wierd.

  (See cli_frontend_init() in src\windows\config.c of the MAME source for the code)

  It looks like the MAME code does the following:
- gets the application name that it's running from
- removes any dot extension that it has
- adds the .ini extension
- interestingly, at this point it will load all the settings from "mame.ini" if it exists.
- Loads the mameexename.ini as built above

  I've got to say I'm stumped on this one.  Unless the name parsing code has a bug in it that's not immediately obvious.

  The good news is that I'm very happy to see the MAME code as clean and readable as it is.  I suppose I've become jaded because of a few other open source codebases I've looked at that have been a mess.  Maybe I'll have to do some checking into Howard's problem/idea.  ;)

  I'll still play around with it a bit tonight and let you know if there are any other things I find.  Thanks again.

slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Re:Forcing resolutions in MAME...
« Reply #16 on: July 15, 2004, 01:47:12 am »
  Uh, nevermind, I'm a moron.

   ;D

  I was using "noname32.exe" in MAMEWAH.  renaming the .ini file to this name took care of the problem.

  At least I learned a bit about the source in the process.  Color me embarassed.   :)

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Forcing resolutions in MAME...
« Reply #17 on: July 15, 2004, 04:40:41 am »
 Uh, nevermind, I'm a moron.

   ;D

  I was using "noname32.exe" in MAMEWAH.  renaming the .ini file to this name took care of the problem.

  At least I learned a bit about the source in the process.  Color me embarassed.   :)

Oh well glad you found an explanation :)

Interesting to confirm also that mame.ini is read regardless of the exe name...