HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Installing ARpiCADE for the first time? Having issues? Check here first for solutions and tips on installing.

Moderator: dee2eR

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by wboy » Tue Feb 20, 2018 11:58 am

If you enjoy playing vertical games on your horizontal monitor and find the original aspect ratio borders a bit too FAT for your liking... then keep reading...

At the bottom of ARpICADE's /boot/launchers/mame172.sh emulator script, you'll notice dee2eR has logic to assess if the game selected is designed to run vertically by assessing the rotate value where 0 implies horizontal and 90 or 270 implies vertical.

Code: Select all

if [ $rot == 90 ] || [ $rot == 270 ]; then
    ./mamearcade $1 -keepaspect -unevenstretch
else
When a game meets that condition the script launches the MAME 0.172 executable mamearcade with the additional command line-parameters effectively ignoring any configured mame.ini value for the passed parameters.

To reduce the default keepaspect ratio border you can simply add the parameter for an aspect of 1:1. Leave keepaspect & unevenstretch as is as they are important!

Code: Select all

if [ $rot == 90 ] || [ $rot == 270 ]; then
    ./mamearcade $1 -keepaspect -unevenstretch -aspect 1:1
else
Once enabled you'll notice the default border has effectively halved, and it may well be to your visual preference (or maybe not!). It's technically as wide as it would be if I had the monitor vertically mounted, just not as high... aka short bombjack syndrome!

If you adjust the aspect ratio values, you can reduce the borders even more until you find what is to your own personal liking.

I did some quick tests on my Nanao monitor. The table below shows the ratio used and the approximate horizontal width in centimetres of the left vertical black bar (repeated on the right) and also the width of the game area. Also included is a simple percentage of the horizontal game area versus the entire 4:3 screen.

Code: Select all

Monitor Ratio = 4:3, Orientation = Horizontal & Size = 29" (41cm H x 55cm W, corner to corner is 69cm which is closer to 27" - WTF a 2" edge!?)

        Vertical   Game     Screen
Ratio    Borders   Width    Percent
-----   --------   ------   -------
None     14.5cm    27.0cm   48.2%
 1:1      7.0cm    41.0cm   74.5%
 4:5      2.0cm    52.0cm   92.9%
 8:9      4.5cm    47.0cm   83.9%
11:12     5.5cm    46.0cm   80.7%
15:16     6.0cm    45.0cm   78.9%
19:20     6.5cm    44.0cm   77.2%
To achieve a full stretch effect (if that's what you want/prefer) simply pass the parameter aspect value of 3:4

wboy.
Last edited by wboy on Tue Feb 20, 2018 1:04 pm, edited 1 time in total.

dee2eR
Inventor
Inventor
Posts: 2114
Joined: Tue Aug 22, 2017 2:07 pm

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by dee2eR » Tue Feb 20, 2018 12:46 pm

Awesome. I've started running rotated games in Retroarch just to stretch them a little more, this is a much better solution. The same trick should work for horizontal games on vertical monitors too.

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by wboy » Tue Feb 20, 2018 1:03 pm

1:1 a good/the best starting point IMO and yes should work well too for horz games on verts... not that I'm planning to physically rotate either to mine just yet! :P

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by wboy » Wed Feb 21, 2018 10:58 am

A slight word of warning... I was doing some performance testing of the vertical gorf rom on a horizontal monitor for cool_factor who PM'd me and interestingly it doesn't like the -aspect 1:1 adjustments like other roms I briefly tested (1943, bombjack, galaga etc).

Not the most common of resolutions that said...

Code: Select all

pi@arpicade3:~/mame172 $ ./mamearcade -listxml gorf | grep height=
		<display tag="screen" type="raster" rotate="270" width="352" height="240" refresh="60.054442" pixclock="7159090" htotal="455" hbend="0" hbstart="352" vtotal="262" vbend="0" vbstart="240" />
 
If you are considering implementing forced aspect support in the next release of ARpiCADE may be worth considering having a aspect-vert-on-horz.txt like file that dynamically pulls it only if you want it... e.g.

Code: Select all

--aspect-vert-on-horz.txt--
1943 1:1
bombjack 3:4
galaga 1:1
and a bit of extra bash action in the launchers scripts to check for it...

Code: Select all

$(cat aspect-vert-on-horz.txt | grep '1943' | cut -d' ' -f2)
1:1
Guessing there are plenty other vert games that won't like it either! :|

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 409
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by cool_factor » Wed Feb 21, 2018 11:38 am

Did you experience the game plays slow down issues? It's very apparent.

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by wboy » Wed Feb 21, 2018 8:23 pm

Using a RPi 3 it seems fine to me after a brief test. The current boot launcher for mame 0172 uses the best settings as is... only difference is waitvsync is 1 and throttle is 0 in the mame.ini

Only played it a very little bit and it seemed ok. When I benchmarked it it ran for 180 seconds at 200%.... it got as low as 150% at the bouncing gorf logo bit. Runs 200%+ in game.

Runs beautifully in vertical mode too as the res is a good fit for the 720x480i... basically double gorf's original res.

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 409
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by cool_factor » Thu Feb 22, 2018 1:07 am

Any issues with sample file after the errors you found? Changing of .ini file work?

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by wboy » Thu Feb 22, 2018 9:40 am

Yeah just change the mame.ini to /boot/sample

I definately started hearing the samples.

Remember you can either use the gorf.zip or extract it's contents to /boot/sample/gorf (& remove the zip) if you want to go about replacing the 8 or so 0 byte sized files. Check the other thread we also rambled on in about the same topic. I posted more there.

dee2eR
Inventor
Inventor
Posts: 2114
Joined: Tue Aug 22, 2017 2:07 pm

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by dee2eR » Sat Feb 24, 2018 1:05 pm

wboy wrote:
Wed Feb 21, 2018 10:58 am
A slight word of warning... I was doing some performance testing of the vertical gorf rom on a horizontal monitor for cool_factor who PM'd me and interestingly it doesn't like the -aspect 1:1 adjustments like other roms I briefly tested (1943, bombjack, galaga etc).

Not the most common of resolutions that said...

Code: Select all

pi@arpicade3:~/mame172 $ ./mamearcade -listxml gorf | grep height=
		<display tag="screen" type="raster" rotate="270" width="352" height="240" refresh="60.054442" pixclock="7159090" htotal="455" hbend="0" hbstart="352" vtotal="262" vbend="0" vbstart="240" />
 
If you are considering implementing forced aspect support in the next release of ARpiCADE may be worth considering having a aspect-vert-on-horz.txt like file that dynamically pulls it only if you want it... e.g.

Code: Select all

--aspect-vert-on-horz.txt--
1943 1:1
bombjack 3:4
galaga 1:1
and a bit of extra bash action in the launchers scripts to check for it...

Code: Select all

$(cat aspect-vert-on-horz.txt | grep '1943' | cut -d' ' -f2)
1:1
Guessing there are plenty other vert games that won't like it either! :|
Interesting, sounds like more investigation is needed before I try and add it but I will keep this in mind for the future.

Gorf also has the problem with SDL1.2/dispmanx rendering through AdvMAME. Haven't been able to figure out why some games have that issue but I wonder if the 2 issues are related (and if so how?).

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: HOWTO: Reduce the black borders on Vertical games running on your Horizontally mounted monitor (MAME 0.172).

Post by wboy » Sun Feb 25, 2018 12:02 pm

dee2eR wrote:
Sat Feb 24, 2018 1:05 pm
Interesting, sounds like more investigation is needed before I try and add it but I will keep this in mind for the future.

Gorf also has the problem with SDL1.2/dispmanx rendering through AdvMAME. Haven't been able to figure out why some games have that issue but I wonder if the 2 issues are related (and if so how?).
You'll have better knowledge on this, but are the htotal and vtotal a factor?

Stiletto's post in the link below has some great reading about additional attributes...

http://www.mameworld.info/ubbthreads/sh ... =7&o=&vc=1

Post Reply