Main > Monitor/Video Forum

Powerstrip writeup

<< < (5/22) > >>

dabone:
I've run into a dead end with my testing.

Apparently mame DOES NOT support stretching in just one direction.

Take for example defender.

294x239

this would take a 588x239 screen to avoid any stretching artifacts.

The closest we have here is 592x240. Now mame will try to fill that entire screen, INCLUDING THE ONE MORE SCANLINE... so vertical is screwy and the horz is scaled wrong also.

It's basically like this with any game that is not exactly 2x1.

Anyone want to modify mame to allow 2:1 horz stretching while leaving the vertical alone?


Later,
dabone

Silver:

--- Quote from: dabone on October 11, 2005, 12:07:41 pm ---this would take a 588x239 screen to avoid any stretching artifacts.

The closest we have here is 592x240. Now mame will try to fill that entire screen, INCLUDING THE ONE MORE SCANLINE... so vertical is screwy and the horz is scaled wrong also.

--- End quote ---

Surely we would not want any stretching here. A unstretched 588x239 on a 592x240 would look fine (virtually unnoticable borders...).

Of course, when I say turn off streching, I'm going on what was mentioned above that 588 horizontal produces the same output as 244. But I have a feeling you are going to tell me that if you turn the streching off it only feels half the screen horizontally?

wpcmame:

--- Quote from: dabone on October 11, 2005, 12:07:41 pm ---Anyone want to modify mame to allow 2:1 horz stretching while leaving the vertical alone?

--- End quote ---
I have made such a modification.

The intention was to correct the the obviously broken aspect calculations in mame but that turned out to be more or less impossible.

The problems are:
1. MAME core is carrying around a load of old wrong data. (Thats the only explanation I can find for the "VIDEO_PIXEL_ASPECT_RATIO_1_2" flag. Almost every resolution in mame got a unique pixel aspect ratio, why does 1:2 and 2:1 need special care)

2. Misunderstandings. E.g. the windows.txt file contains the following description:
-screen_aspect

   Give a screen aspect ration in the form X:Y where X is the horizontal
   and Y the vertical part. Examples are 4:3 for most resolution settings
   on computer monitors, 5:4 for the 1280x1024 resolution or 3:4 for
   turnable LCD's in the turned position. The default is 4:3.

I wonder if the mamedevs think that your monitor magicly changes shape when you select the 1280x1024 resolution. As it is written, you should use differnt screen_aspects for every AVGA resolution.

3. The games aspect ratio is calculated differently depending on if hardware stretch is used or not. I have no idea why. It is done in several places so I assume it is intentional. (For hardware stretch the aspectx & aspecty values in the driver is used but for software stretch the aspect ratio is sizeX/SizeY)

4. Artwork uses a fixed 1:1 pixel aspect ratio so it will not display correctly on a properly setup monitor. (The "hole" in the artwork for the game display got correct proportions only if 1:1 pixels are used. You can easily see this if you look at the space invaders backdrop on an arcade monitor. The moon is shaped like an egg.)
I have been thinking of ways to convert the artwork code but my head starts spinning from all coordinate systems involved :-)

5. Automatic resolution selection only looks at the distance from the native resolution when picking. This means that doublesized resolutions are not considered since they are 100% off.

Anyway,

What I have done so far is:
- Corrected code in mame so that the game is scaled to display with the correct aspect ratio regardless of resolution. Using "-cleanstretch full" will use integer scaling to get as close to correct aspect ratio as possible.

There is a sideeffect to this which is kind of tricky to explain.
Lets take pacman as an example. Pacman uses resolution 224x288 on a 3:4 monitor. What resolution should pacman use in a window on a 640x480 desktop? 224x288 seem natural and that is what mame uses today if you have "keepaspectratio" enabled. But if you look at the aspect ratio, 224/288=7:9 which is wrong. For correct aspect ratio the resolution 216x288 should be used and this is what my code does. (using "-cleanstretch full" will revert to the old mame way)

- Corrected code so that hardware and software stretch works the same.

Problem here is that the default behaviour of mame will change unless a new parameter is added (really_keep_aspectratio ?) so I don't have much hope that the change will be included in mame. I will post a diff file here later.

(And a strange thing. When I write "aspect ratio" I often get an extra "n" at the end. Thought it was just me but now I have seen it in other places as well, e.g. windows.txt file)

Silver:
Blimey.


Right - did not realise that much modifcations to mame would be required. If things are broken in mame, I hope your submissions will fix them.

Does that mean all those doubled horizontal resolutions you posted earlier (640x240 etc...) are useless with vanilla mame as it can not stretch the horizontal without the vertical? Or am I missing something again...

wpcmame:

--- Quote from: Silver on October 12, 2005, 07:02:17 am ---Does that mean all those doubled horizontal resolutions you posted earlier (640x240 etc...) are useless with vanilla mame as it can not stretch the horizontal without the vertical? Or am I missing something again...

--- End quote ---
No, they work fine. The problem only appears when you want to play a game where the resolution isn't a multiple of the game resolution.
320x240 work fine with 640x240 but 320x224 doesn't.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version