Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06863 Graphics Minor Always Feb 2, 2018, 11:21 Feb 12, 2018, 21:40
Tester wuemura View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows 10 (64-bit)
Status [?] Acknowledged Driver model1.cpp
Version 0.194 Fixed in Version Build 64-bit
Summary 06863: vr: Video mode don't work
Description Changing video mode from 16:9 to 4:3 does nothing.
Steps To Reproduce Start emulation, press F2, change the setting
Additional Information Can't test with other clones or model1 machines.
Regression Version
Affected Sets / Systems vr
Attached Files
png file icon mamedar.png (24,950 bytes) Feb 2, 2018, 21:52 Uploaded by wuemura
4:3 > 16:9
jpg file icon VR-arcade.jpg (169,576 bytes) Feb 4, 2018, 15:39 Uploaded by wuemura
png file icon vr-flier-wide.png (55,849 bytes) Feb 4, 2018, 16:23 Uploaded by wuemura
Correct DAR flyer source
png file icon vr-flier-wide2.png (52,301 bytes) Feb 4, 2018, 16:24 Uploaded by wuemura
Correct DAR flyer source
There are no relationship linked to this issue.
User avatar
Feb 2, 2018, 13:29
Are you sure this is a 'major' issue?
User avatar
Senior Tester
Feb 2, 2018, 15:19
where is the option in vf?

it definitely works in vr, although you need to change the layout MAME uses to a 4:3 one to match the test mode setting if you select 4:3 (otherwise everything looks stretched with the default 16:9 layout)
User avatar
Feb 2, 2018, 21:51
edited on: Feb 3, 2018, 12:47
The options is located at:
F2 > Game System > Monitor

Still, the reverse also doesn't work, if you set mame DAR to 4:3 and vr to 16:9 the screen are not adjusted properly.
If we set vr DAR to 4:3 and MAME to 16:9 keeping the screen proportions, you should see something like the screenshot, black bars on the side or cropped, none of this happens.

This are the calculations used with avisynth to generate that image:
function PadHeight(clip image, int width, int height, int AR_WIDTH, int AR_HEIGHT)
# the frame is wider than we want, pad the top and bottom

# calculate what final height we need
nh = width * AR_HEIGHT / AR_WIDTH

# calculate the top and bottom borders
tb = (nh - height) / 2
bb = nh - height - tb
AddBorders(image, 0, tb, 0, bb)

function PadWidth(clip image, int width, int height, int AR_WIDTH, int AR_HEIGHT)
# the frame is taller than we want, pad the left and right

# calculate the final width we need
nw = height * AR_WIDTH / AR_HEIGHT

# calculate the left and right borders
lb = (nw - width) / 2
rb = nw - width - lb
AddBorders(image, lb, 0, rb, 0)


# if you want 16:9 change these values to 16 and 9

width = last.width
height = last.height

((width * AR_HEIGHT) > (height * AR_WIDTH)) \
   ? PadHeight(last, width, height, AR_WIDTH, AR_HEIGHT)\
   : PadWidth(last, width, height, AR_WIDTH, AR_HEIGHT)

### Set new target
tw = 704
th = 480
PointResize(tw, th)
User avatar
Feb 4, 2018, 15:39
Adding the VR arcade flyer from
User avatar
Feb 4, 2018, 16:48
Using the arcade flyer as a reference, i've made a few samples using the same script above to create the same fake "wide" but keeping everything else in the correct proportion and aspect ratio. Note the red sign proportion is the same in the flyer, the same for the car. At the car doing a curve shot, the windmill, the car chassis, the tires, everything match proportion like the arcade flyer.

Looks like the machine can't do a real 16:9 aspect ratio because the video output has square pixels, so setting the "AR_WIDTH" and "AR_HEIGHT" to the correct ratio that is 4:3 DAR, we can use any wide resolution to create the exact same look the arcade does, that is moving from 640x480 to 720x480, I set the image to 1280x720 to extract a bigger image for illustration.

Mame show that this machine has a video of 496x384 @ 57.524160, 496x384 return a SAR of 1,25380710659898, PAR of 8,31744545659019
 and a DAR of 247:197, it should be 4:3 unless the technical details of the hardware say otherwise.
User avatar
Feb 4, 2018, 20:07
You can't calculate the aspect ratio from the resolution, pixels aren't always square.
User avatar
Feb 4, 2018, 21:34
edited on: Feb 5, 2018, 00:20
Aspect Ratio = Width / Height
640 / 480 = 1,333333333333333
Max Common Divisor of 640 and 480 is 160.
640 / 160 = 4
480 / 160 = 3
Or a fraction of 1,333333333333333 is 4/3 or 4:3.
There are 8 pixels added to each side for padding so we can keep a 4:3 DAR portion inside our 720x480 video, 720 - 16 = 704
So 4:3 = (10*704)/(11*480) = 1,333333333333333
To check if our aspect ration is correct with the original DAR
704 * (10/11) = 640

There's online calculator that does this also:

Also we have calculations to deal with square and non-square pixel and adjust the screen accordingly, here are two examples:
640 x 480 DAR 4:3

720 x 480 DAR 4:3 stretched to 16:9 resolution, this is what the machine does to fake wide 16:9 image using the flyer as a reference, maybe it send a signal to the monitor to do this.

More calculations:

The point is, the machine pixels are square, changing the settings for aspect ratio does nothing to the pixels it self. If the video board sends a signal telling the display to stretch, mame screen is not reacting. Changing the aspect ratio on mame settings makes the image out of proportions.
User avatar
Feb 6, 2018, 07:08
Acknowledging for now while this is researched and figured out.
User avatar
Senior Tester
Feb 7, 2018, 10:46
edited on: Feb 7, 2018, 10:47
the video board doesn't send a signal telling the display to stretch or anything like that, it just renders the graphics in a different way if 16:9 is selected or 4:3 is selected, it is up to you, as the operator / user to pick the correct monitor to match the configuration you've picked.

in MAME 'picking the correct' monitor means going into the display options and selecting normal/wide to match the option in service mode.

best I can tell this works fine, and as intended.. obviously if you run 16:9 in the game and have MAME set to think it has a 4:3 monitor it will look wrong (as it would on hardware) and likewise, if you set it in game to 4:3 and set MAME to 16:9 then it will look wrong, as it would on real hardware..

also, as I said in my first post, this seems to be very much a 'vr' report, not a 'vf' report.