|
How to set the degree of stretching?
#303843 - 02/05/13 05:29 PM
|
|
|
Hi, I've got a little problem with my MAME configuration and I thought that maybe you could help me.
I have an LCD monitor with a resolution of 1360x768 pixels. I play "Street Fighter II" which has a native resolution of 384x224 pixels.
This is my command line call: mame sf2ua -video ddraw -nohws -view native
With this configuration, MAME will strech the game image as much as it can with interger ratios. So, on my screen, the game will be stretched three times which results in an image of 1152x672 pixels (with the rest being put in black bars). Because that's the largest size possible. If I just had a screen of 800x600 pixels, the game would be stretched to 768x448 (i.e. two times).
Alright, so far, so good. Now my question:
What do I have to do to get a smaller image? In the moment, MAME stretches the game three times because that's what the screen is capable of. But what can I do if I just want it to be stretched two times?
The reason is: My screen is widescreen, but I always sit right in front of it. For computer work it's alright, but if I play a game, the image is too big for me. So, I'd like MAME to use not the maximum possible stretching, but the one that I set manually. (Like: Use the original resolution and stretch it 2x2 times, even though you could use 3x3.)
Is that possible? How can I do this? How can I tell MAME that, despite the screen's resolution of 1360x768, it shall only stretch the game twice and not three times?
|
|
|
|
Re: How to set the degree of stretching?
[Re: DaRayu]
#303848 - 02/05/13 07:12 PM
|
|
|
Your first mistake is to use "native" resolution, actually. Using that leaves out one of the most important respects of the actual arcade machine's process.
While the SF2 arcade board is putting out 384x224, the monitor is stretching it to a 4:3 ratio. The artwork is actually designed around a 4:3 aspect ratio as a result, and looking at it in its original resolution actually shows a deliberately distorted image.
The next question is why you're using directdraw without hardware scaling. What is your video card, and why aren't you using Direct3D?
|
---
Try checking the MAME manual at http://docs.mamedev.org
|
|
|
Re: How to set the degree of stretching?
[Re: Firehawke]
#303858 - 02/05/13 09:27 PM
|
|
|
I use the native resolution and DirectDraw without hardware stretch because I'd like to see the image in its "pure" form. The same way the screenshots come out. Yes, I know that an actual arcade CRT screen looks different. So, there are only really two alternatives for me: Either I attempt to use a special filter to simulate the CRT screen look. Or I use the native, pixel-by-pixel look, the way the game would look like if there was an arcade emulation handheld system. But the blurriness that a modern PC graphic card produces looks like neither. I neither have an authentic CRT look, nor a pure pixel look, but some washed-up mess. That's why I disabled the hardware stretching. (In Direct3D I'd use -nofilter in this case.) I don't use Direct3D because I didn't find a way for it to just stretch at integer values. To my knowledge, Direct3D in MAME always stretches to the full screen size, either horizontally or vertically. And since I disable the blurriness, I would see some pixels repeated more than others. In MAME, DirectDraw seems to be the only way to stretch exactly at 2x2, 3x3 etc.
So, is it possible to output the game image in a smaller resolution while the screen resolution remains 1360x768?
|
|
|
|
Re: How to set the degree of stretching?
[Re: DaRayu]
#303859 - 02/05/13 09:30 PM
|
|
|
What you're looking for is fullscreen Direct3D combined with HLSL. No "washed out mess", CRT-like appearance, and you're not mangling the image.
|
---
Try checking the MAME manual at http://docs.mamedev.org
|
|
|
Re: How to set the degree of stretching?
[Re: Firehawke]
#303860 - 02/05/13 09:43 PM
|
|
|
What I'm looking for is simply a way to use fullscreen in MAME but with the ability to make the image smaller. I was not intending to go into a debate on principles about the question if pixel-exact output is authentic or how to get an image like a CRT monitor. Sorry, if that sounds rude, but all I'd like to know is: Is there a way to decrease the scaling in fullscreen? In the moment, my "game display resolution" is three times the original pixel size with black borders on all four sides of the screen to fill the remaining pixels. How can I get only two times the original pixel size (still with black borders on all four sides of the screen to fill the remaining pixels)?
|
|
|
|
Re: How to set the degree of stretching?
[Re: DaRayu]
#303861 - 02/05/13 09:54 PM
|
|
|
|
R. Belmont |
Cuckoo for IGAvania
|
|
|
Reged: 09/21/03
|
Posts: 9717
|
Loc: ECV-197 The Orville
|
|
Send PM
|
|
|
Re: How to set the degree of stretching?
[Re: Firehawke]
#303863 - 02/05/13 10:06 PM
|
|
|
> It's not possible anymore on baseline MAME; hasn't been since the major video rewrite > some 40 versions back. That's why the workaround discussion. > > I've heard it could be done in the past using SDLMAME ( > http://www.mameworld.info/ubbthreads/showflat.php?Number=291204) but I haven't > tested it so you're entirely on your own therein.
Correct. Baseline Windows MAME does not have a force integer scaling option; you can use an SDL Windows build to gain access to that feature (-nounevenstretch, for the record), and I think some of the "alternate" builds also have that option. "native aspect" in the video menu simply disables aspect correction and leads to Fat-Thighs Chun Li. Nobody wants to see that.
Alternatively you can run D3D with -nofilter to turn off the blurring and get all the pixels you can handle.
|
|
|
DMala |
Sleep is overrated
|
|
|
Reged: 05/09/05
|
Posts: 3989
|
Loc: Waltham, MA
|
|
Send PM
|
|
|
Re: How to set the degree of stretching?
[Re: DaRayu]
#303867 - 02/05/13 11:02 PM
|
|
|
> Hi, > I've got a little problem with my MAME configuration and I thought that maybe you > could help me. > > I have an LCD monitor with a resolution of 1360x768 pixels. > I play "Street Fighter II" which has a native resolution of 384x224 pixels. > > This is my command line call: > mame sf2ua -video ddraw -nohws -view native > > With this configuration, MAME will strech the game image as much as it can with > interger ratios. So, on my screen, the game will be stretched three times which > results in an image of 1152x672 pixels (with the rest being put in black bars). > Because that's the largest size possible. If I just had a screen of 800x600 pixels, > the game would be stretched to 768x448 (i.e. two times). > > Alright, so far, so good. > Now my question: > > What do I have to do to get a smaller image? In the moment, MAME stretches the game > three times because that's what the screen is capable of. But what can I do if I just > want it to be stretched two times? > > The reason is: My screen is widescreen, but I always sit right in front of it. For > computer work it's alright, but if I play a game, the image is too big for me. So, > I'd like MAME to use not the maximum possible stretching, but the one that I set > manually. (Like: Use the original resolution and stretch it 2x2 times, even though > you could use 3x3.) > > Is that possible? How can I do this? How can I tell MAME that, despite the screen's > resolution of 1360x768, it shall only stretch the game twice and not three times?
If I understand what you're asking, I *think* you could use a LAY file to do what you want. Basically you would just specify a screen of the size and location you want. Check out http://mamedev.org/devwiki/index.php/LAY_File_Basics_-_Part_I
|
|
|
|
Re: How to set the degree of stretching?
[Re: R. Belmont]
#303876 - 02/06/13 12:26 AM
|
|
|
> Correct. Baseline Windows MAME does not have a force integer scaling option; you can > use an SDL Windows build to gain access to that feature (-nounevenstretch, for the > record), and I think some of the "alternate" builds also have that option.
GroovyMAME and CabMAME both have an integer scaling option called "cleanstretch".
The latest build of GroovyMAME also has a special option for people with LCD monitors and if your LCD supports a range of input frequencies (not all of them do) you can use it with Powerstrip to get better results. More info on GroovyMAME here... http://forum.arcadecontrols.com/index.php/topic,128879.0.html
CabMAME info here... http://community.arcadeinfo.de/showthread.php?9555-ENGLISH-Overview
If you're adept at compiling your own MAME, you can grab the cleantstretch diff from the CabMAME site and add it to a standard MAME build.
|
GroovyMAME support forum on BYOAC
|
|
Sune |
Connected
|
|
|
Reged: 09/21/03
|
Posts: 5648
|
Loc: Lagoa Santa, Brasil
|
|
Send PM
|
|
|
Re: How to set the degree of stretching?
[Re: DaRayu]
#303883 - 02/06/13 04:16 AM
|
|
|
> To my knowledge, Direct3D in MAME always stretches to the full screen size, > either horizontally or vertically.
Yes that's correct. When using the D3D renderer, MAME takes into account the aspect ratio of your monitor and displays the game in its original 4:3/3:4 aspect ratio on as much screen space as it can.
I have a 5:4 monitor so I get little black bars at the top and the bottom of the screen on horizontal games. It's not bad, some games have bezel artwork that will show in that space. This looks great especially on vertically oriented games. Configuring MAME to display the games in any other way completely screws up the beautiful artwork.
To get rid of the blur, set filtering to 0 and to get rid of the occasional doubled pixel, set prescale to 2 or 3. There you go, crisp as fresh potato chips.
Note that the prescale setting does not have any effect if you have HLSL enabled, then you must use the HLSL prescale setting.
Yes i know that's not what you're asking for but you said that one of the reasons that you don't like for MAME to run the games the way they're supposed to look like is because the image is blurry. And that's because you're using the wrong settings.
S
|
|
|
|
Re: How to set the degree of stretching?
[Re: krick]
#303888 - 02/06/13 09:06 AM
|
|
|
Thanks for your answers, but you partly seem to misunderstand me: The cleanstretch is not the problem. If I use DirectDraw with no hardware stretch, it already does the clean integer stretching. My question was if I can force it just to stretch to a certain factor? As I said, at a screen with a resolution of 1360x768, an image of 384x224 pixels would stretch three times. This would be 1152x672, the maximum integer stretching that still fits on the screen. But I wanted to know if I can force it to stretch only two times (768x448) even on the bigger screen. But as far as I understand it, that's not possible.
|
|
|
|
Re: How to set the degree of stretching?
[Re: DaRayu]
#303897 - 02/06/13 05:04 PM
|
|
|
there is another method look if you can force your graphic driver to not strecth the screen what i'm i saying is this let's say you have an LCD with 1280x800 native resolution you can start mame let's say in 640x480, and you force your graphic card to not stretch, then you'll have a small box centered i can do this on my integrated intel card, probably nvidia and ati have a similar option
|
|
|
R. Belmont |
Cuckoo for IGAvania
|
|
|
Reged: 09/21/03
|
Posts: 9717
|
Loc: ECV-197 The Orville
|
|
Send PM
|
|
|
Re: How to set the degree of stretching?
[Re: DaRayu]
#303899 - 02/06/13 05:43 PM
|
|
|
> Thanks for your answers, but you partly seem to misunderstand me: The cleanstretch is > not the problem. If I use DirectDraw with no hardware stretch, it already does the > clean integer stretching.
No, it doesn't. It may look like it does, and in some cases it may do it by accident, but it's not guaranteed like what -nounevenstretch/-cleanstretch does.
Have you tried using -res to force a specific output size of 2x or 3x the size? On SDL at least it'll pick the next largest mode and put black borders on all 4 sides as necessary, I'm not sure how baseline will behave.
|
|
|
Stiletto![Administrator Administrator](//www.mameworld.info/ubbthreads/images/adm.gif) |
They're always after me Lucky ROMS!
|
|
|
Reged: 03/07/04
|
Posts: 6472
|
|
|
Send PM
|
|
|
Re: How to set the degree of stretching?
[Re: R. Belmont]
#303901 - 02/06/13 06:07 PM
|
|
|
> > Thanks for your answers, but you partly seem to misunderstand me: The cleanstretch > is > > not the problem. If I use DirectDraw with no hardware stretch, it already does the > > clean integer stretching. > > No, it doesn't. It may look like it does, and in some cases it may do it by accident, > but it's not guaranteed like what -nounevenstretch/-cleanstretch does. > > Have you tried using -res to force a specific output size of 2x or 3x the size? On > SDL at least it'll pick the next largest mode and put black borders on all 4 sides as > necessary, I'm not sure how baseline will behave.
I'm looking forward to the day when SDL and baseline are at feature parity, and vice-versa... (not that it's your responsibility...)
- Stiletto
|
|
|
|
Re: How to set the degree of stretching?
[Re: Stiletto]
#303902 - 02/06/13 07:17 PM
|
|
|
does mame have the option of displaying a game at its native res, no stretching of any kind (so black borders surrounding the centered image), and then a simple integer/even zoom factor.
this would satisfy the op and a million purists/real arcade monitor users who dont like uneven stretching, but instead would rather settle for a few lost lines/parts of the screen
|
|
|
R. Belmont |
Cuckoo for IGAvania
|
|
|
Reged: 09/21/03
|
Posts: 9717
|
Loc: ECV-197 The Orville
|
|
Send PM
|
|
|
Re: How to set the degree of stretching?
[Re: grog]
#303909 - 02/06/13 11:43 PM
|
|
|
> does mame have the option of displaying a game at its native res, no stretching of > any kind (so black borders surrounding the centered image), and then a simple > integer/even zoom factor.
Like I said, you should be able to achieve this right now in SDL builds with the combination of -nounevenstretch and -res. (Or CabMAME or similar with the -cleanstretch patch, but I'm unclear how baseline behaves in situations where the resolution doesn't match a "well known" one).
|
|
|
|
Re: How to set the degree of stretching?
[Re: R. Belmont]
#303941 - 02/07/13 05:29 PM
|
|
|
Well, I'm quite sure that baseline MAME can do integer scaling on the DX side too, but only with the DirectDraw interface. In ddraw.c, compute_blit_surface_size function, you can see how xscale and yscale are defined as integers.
This is definitely not the case with Direct3D, which on this regard behaves much like DirectDraw does when the -hwstretch option is enabled.
So for instance, for a 320x224 game, when rendered on a 320x240 resolution, DirectDraw will leave the proper black borders up and down, while Direct3D will stretch the height to 240 lines.
Anyway, the scale factors are calculated internally, so there's no way to force specific factors as suggested some posts above.
|
|
|
R. Belmont |
Cuckoo for IGAvania
|
|
|
Reged: 09/21/03
|
Posts: 9717
|
Loc: ECV-197 The Orville
|
|
Send PM
|
|
|
Re: How to set the degree of stretching?
[Re: Calamity]
#303944 - 02/07/13 09:08 PM
|
|
|
> So for instance, for a 320x224 game, when rendered on a 320x240 resolution, > DirectDraw will leave the proper black borders up and down, while Direct3D will > stretch the height to 240 lines. > > Anyway, the scale factors are calculated internally, so there's no way to force > specific factors as suggested some posts above.
You're skipping right over the actually important part of what I have now said several times. If you want a 320x224 game at 2x, run ddraw (or d3d -nofilter -cleanstretch or opengl -nofilter -nounevenstretch) with -res 640x448. With 3x, -res 960x672.
On SDL builds, it'll automatically round up to the next PC mode and put black bars on whichever sides as appropriate. If Windows doesn't do that, round up manually and use -res 640x480 for 2x and 1024x768 for 3x.
Edited by R. Belmont (02/07/13 09:09 PM)
|
|
|
|
Re: How to set the degree of stretching?
[Re: R. Belmont]
#304545 - 02/19/13 01:50 AM
|
|
|
Hi again,
sorry for not answering for some time, but I didn't have the time to.
At first thanks for your input. Thanks to you, I read some more about the topic and the aspect ratio of actual arcade screens. So, yeah, I learned now that the native view is indeed not the correct way to display the screen. (Unless of course you want to analyze pixel by pixel.)
But in general, the suggestion with the LAY file, mentioned by DMala, is a good solution for my original question. This way, you don't need any MAME derivate and can use the original one. With LAY files, you can force the game screen into any size you want. So, even with Direct3D, you can get the pixel-exact look if you want to (with black borders on all four sides) or you can get a smaller image on a screen where MAME would stretch to the whole width or the whole height. You just need to set the right screen bounds and you can bring the screen into any size or form you want.
|
|
|