Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06863 Graphics Minor Always 17 days ago 7 days ago
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.
Flags
Regression Version
Affected Sets / Systems vr
Attached Files
png file icon mamedar.png (24,950 bytes) 17 days ago Uploaded by wuemura
4:3 > 16:9
wuemura
jpg file icon VR-arcade.jpg (169,576 bytes) 15 days ago Uploaded by wuemura
wuemura
png file icon vr-flier-wide.png (55,849 bytes) 15 days ago Uploaded by wuemura
Correct DAR flyer source
wuemura
png file icon vr-flier-wide2.png (52,301 bytes) 15 days ago Uploaded by wuemura
Correct DAR flyer source
wuemura
Relationships
There are no relationsihp linked to this issue.
Notes
9
User avatar
No.14705
EoceneMiacid
Tester
17 days ago
Are you sure this is a 'major' issue?
User avatar
No.14707
Haze
Senior Tester
17 days ago
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
No.14711
wuemura
Tester
17 days ago
edited on: 16 days ago
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)
}

ImageSource("J:\0005.png")

# if you want 16:9 change these values to 16 and 9
AR_WIDTH = 16
AR_HEIGHT = 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
No.14722
wuemura
Tester
15 days ago
Adding the VR arcade flyer from
https://www.giantbomb.com/virtua-racing/3030-11009/images/
User avatar
No.14723
wuemura
Tester
15 days ago
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
No.14724
Duke
Developer
15 days ago
You can't calculate the aspect ratio from the resolution, pixels aren't always square.
User avatar
No.14725
wuemura
Tester
15 days ago
edited on: 14 days ago
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
https://math.stackexchange.com/questions/180804/how-to-get-the-aspect-ratio-of-an-image

There's online calculator that does this also:
https://andrew.hedges.name/experiments/aspect_ratio/

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
http://www.mediafire.com/file/mmp6j59ou9dmcak/Virtua_Racing.mp4

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.
http://www.mediafire.com/file/kobfsg83550pn8h/Virtua_Racing-480.mp4

More calculations:
https://forum.doom9.org/showthread.php?t=163218

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
No.14729
B2K24
Moderator
13 days ago
Acknowledging for now while this is researched and figured out.
User avatar
No.14733
Haze
Senior Tester
12 days ago
edited on: 12 days ago
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.