MAMEWorld Central >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

Greg Maletic
MAME Fan
Reged: 03/27/16
Posts: 4
Send PM


Reposition MAME on an HD display?
#367597 - 07/07/17 09:05 PM


I am building a custom cabinet. I'm thinking of buying a 16:9 monitor, rotating it 90 degrees clockwise, and covering up the bottom so that what is viewable to the player looks like a 4:3 monitor.

In order for this to work, I'd need to have MAME rotate its game display—I know it can do that—but also, draw the upper left corner of the game display in the lower left corner of the monitor. In other words: both rotate and reposition MAME's game display.

Is this possible in any MAME builds out there?

Thanks!

Edited by Greg Maletic (07/07/17 09:09 PM)



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 1532
Send PM


Re: Reposition MAME on an HD display? new [Re: Greg Maletic]
#367601 - 07/08/17 12:19 AM


> I am building a custom cabinet. I'm thinking of buying a 16:9 monitor, rotating it 90
> degrees clockwise, and covering up the bottom so that what is viewable to the player
> looks like a 4:3 monitor.
>
> In order for this to work, I'd need to have MAME rotate its game display—I know it
> can do that—but also, draw the upper left corner of the game display in the lower
> left corner of the monitor. In other words: both rotate and reposition MAME's game
> display.
>
> Is this possible in any MAME builds out there?
>
> Thanks!

Sure, it should be relatively easy if you come up with a custom .lay file for it. However, I'm a bit light on the details at the moment. I would suggest looking at the existing .lay files supplied with the stock MAME build to glean ideas.

Can I ask, though, why you're intent on masking off part of the display? On this very forum you can find countless high-resolution scans and "digital remasters" of bezel artwork that was traditionally always surrounding the monitors of various arcade games. Why not look towards filling in the otherwise-blank areas of the monitor with that, rather than wasting a significant amount of your visible area by masking it off?



anikom15
Cleric
Reged: 04/11/16
Posts: 210
Send PM


Re: Reposition MAME on an HD display? new [Re: Greg Maletic]
#367603 - 07/08/17 12:45 AM


> I am building a custom cabinet. I'm thinking of buying a 16:9 monitor, rotating it 90
> degrees clockwise, and covering up the bottom so that what is viewable to the player
> looks like a 4:3 monitor.
>
> In order for this to work, I'd need to have MAME rotate its game display—I know it
> can do that—but also, draw the upper left corner of the game display in the lower
> left corner of the monitor. In other words: both rotate and reposition MAME's game
> display.
>
> Is this possible in any MAME builds out there?
>
> Thanks!

NEC manufacturers excellent 4:3 LCDs. We used them at my old job. Otherwise I think you might be able to accomplish this with layout files.



Heihachi_73
I am the Table!
Reged: 10/29/03
Posts: 934
Loc: Melbourne, Australia
Send PM


Re: Reposition MAME on an HD display? new [Re: anikom15]
#367620 - 07/08/17 12:01 PM


> NEC manufacturers excellent 4:3 LCDs. We used them at my old job. Otherwise I think
> you might be able to accomplish this with layout files.

Do they make big enough displays? I can't see a 19" LCD filling out the cabinet where an old 27" CRT used to sit.



uman
MAME Fan
Reged: 04/15/12
Posts: 351
Send PM


Re: Reposition MAME on an HD display? new [Re: Heihachi_73]
#367622 - 07/08/17 04:12 PM


there are plenty of 21" LCD (4:3) with a max. resolution of 1600x1200. They still doesnt cover what a 27" CRT did, but if you build with good planning, you can still have a nice result.



anikom15
Cleric
Reged: 04/11/16
Posts: 210
Send PM


Re: Reposition MAME on an HD display? new [Re: uman]
#367631 - 07/08/17 09:37 PM


You can mount the display closer and use a larger bezel.



Greg Maletic
MAME Fan
Reged: 03/27/16
Posts: 4
Send PM


Re: Reposition MAME on an HD display? new [Re: MooglyGuy]
#367664 - 07/09/17 08:47 PM


Sure, you can ask!

I play 4:3 games exclusively. And most of those are, technically, 3:4 (vertically-oriented) games.

3:4 games on a 16:9 screen leaves a -huge- amount of blank space on the left and right. Accurate bezel artwork wouldn't fill it properly, and I tend to find that stuff a distraction anyway. So I feel like a vertically mounted 43" HD screen will give me the size I want with the minimum amount of wasted (visible) display space.



Greg Maletic
MAME Fan
Reged: 03/27/16
Posts: 4
Send PM


Re: Reposition MAME on an HD display? new [Re: MooglyGuy]
#367665 - 07/09/17 08:48 PM


Oh, and I hadn't heard of .lay files, so thanks!



uman
MAME Fan
Reged: 04/15/12
Posts: 351
Send PM


Re: Reposition MAME on an HD display? new [Re: Greg Maletic]
#367667 - 07/09/17 09:45 PM


Sadly the site is written in spain, but IMHO it has one of the best approaches what you can do with a 16:9/16:10 monitor and artwork. He created really nice illusions of bezel and marquee artwork combined with the game screen.

http://www.vcabinet.es/artworks.html
http://www.vcabinet.es/hardware.html



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 1532
Send PM


Re: Reposition MAME on an HD display? new [Re: Greg Maletic]
#367718 - 07/11/17 11:28 AM


> Sure, you can ask!
>
> I play 4:3 games exclusively. And most of those are, technically, 3:4
> (vertically-oriented) games.
>
> 3:4 games on a 16:9 screen leaves a -huge- amount of blank space on the left and
> right. Accurate bezel artwork wouldn't fill it properly, and I tend to find that
> stuff a distraction anyway. So I feel like a vertically mounted 43" HD screen will
> give me the size I want with the minimum amount of wasted (visible) display space.

I think that's perfectly fair, and thank you for the explanation! I tend to agree, since when doing development I don't really have time to go tracking down all the various artwork and such. I just didn't want to miss a chance to plug the MAME Artwork subforum.

You can probably use the artwork/bgfx/border_blur/default.lay file as reference, as it's a layout I came up with for this one shader. Some background:

.lay files are essentially XML files which define the layout of MAME's output relative to the dimensions of the host screen, in units of your choosing.

In the most basic sense, they consist of one or more "view" tags, which then contain one or more "screen" tags, which then have a "bounds" tag which defines the borders of that emulated screen's output.

In the case of the specific .lay file that I mentioned, I use it to fill out the blank border space when showing a 4:3 game on an un-rotated 16:9 screen (the "Horizontal" view), or when showing a 3:4 game on an un-rotated 16:9 screen (the "Vertical" view), then at runtime, there's a shader which applies a desaturate/zoom/blur filter to the left and right strips on either side of the main screen. The idea is that combined with the shader, you get the sort of effect that you often see on YouTube or news broadcasts when they want to display a vertical video without having a bunch of blank space on either side of it.

As you can see based on the differences between the Horizontal and Vertical bounds tags, the units really are arbitrary, they just need to ultimately divide down to match the aspect ratio of the output screen. That's obvious in the Horizontal view, and in the Vertical view, the overall bounds of 64:36 divides by 4 to give 16:9 as well.

Supposing I wanted to simply left-justify the Vertical view on an un-rotated 16:9 screen and not duplicate it on either side, I would simply have one "screen" tag, and its bounds would be 0, 0, 27, 36 for left, top, right, and bottom. Or, if you wanted to divide out the common factor (9), you would go with 0, 0, 3, 4, which shows more clearly that the source screen has an aspect ratio of 3:4 (i.e. a vertical game).

Hopefully this should be enough information to help get you going in the right direction. Cheers!



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 3727
Loc: Melbourne, Australia
Send PM


Re: Reposition MAME on an HD display? new [Re: MooglyGuy]
#367719 - 07/11/17 12:41 PM


> > Sure, you can ask!
> >
> > I play 4:3 games exclusively. And most of those are, technically, 3:4
> > (vertically-oriented) games.
> >
> > 3:4 games on a 16:9 screen leaves a -huge- amount of blank space on the left and
> > right. Accurate bezel artwork wouldn't fill it properly, and I tend to find that
> > stuff a distraction anyway. So I feel like a vertically mounted 43" HD screen will
> > give me the size I want with the minimum amount of wasted (visible) display space.
>
> I think that's perfectly fair, and thank you for the explanation! I tend to agree,
> since when doing development I don't really have time to go tracking down all the
> various artwork and such. I just didn't want to miss a chance to plug the MAME
> Artwork subforum.
>
> You can probably use the artwork/bgfx/border_blur/default.lay file as reference, as
> it's a layout I came up with for this one shader. Some background:
>
> .lay files are essentially XML files which define the layout of MAME's output
> relative to the dimensions of the host screen, in units of your choosing.
>
> In the most basic sense, they consist of one or more "view" tags, which then contain
> one or more "screen" tags, which then have a "bounds" tag which defines the borders
> of that emulated screen's output.
>
> In the case of the specific .lay file that I mentioned, I use it to fill out the
> blank border space when showing a 4:3 game on an un-rotated 16:9 screen (the
> "Horizontal" view), or when showing a 3:4 game on an un-rotated 16:9 screen (the
> "Vertical" view), then at runtime, there's a shader which applies a
> desaturate/zoom/blur filter to the left and right strips on either side of the main
> screen. The idea is that combined with the shader, you get the sort of effect that
> you often see on YouTube or news broadcasts when they want to display a vertical
> video without having a bunch of blank space on either side of it.
>
> As you can see based on the differences between the Horizontal and Vertical bounds
> tags, the units really are arbitrary, they just need to ultimately divide down to
> match the aspect ratio of the output screen. That's obvious in the Horizontal view,
> and in the Vertical view, the overall bounds of 64:36 divides by 4 to give 16:9 as
> well.
>
> Supposing I wanted to simply left-justify the Vertical view on an un-rotated 16:9
> screen and not duplicate it on either side, I would simply have one "screen" tag, and
> its bounds would be 0, 0, 27, 36 for left, top, right, and bottom. Or, if you wanted
> to divide out the common factor (9), you would go with 0, 0, 3, 4, which shows more
> clearly that the source screen has an aspect ratio of 3:4 (i.e. a vertical game).
>
> Hopefully this should be enough information to help get you going in the right
> direction. Cheers!

Just to fill this out a bit, you'll need an explicit bounds tag for the view if you want to produce blank space, otherwise MAME will just centre the entire view on the screen. To get views left-justified on a 16:9 display you might do something like this:


Code:

<?xml version="1.0"?>
<mamelayout version="2">
<view name="Horizontal">
<bounds left="0" top="0" right="16" bottom="9" />
<screen index="0">
<bounds left="0" top="0" right="12" bottom="9" />
</screen>
</view>
<view name="Vertical">
<bounds left="0" top="0" right="65" bottom="36" />
<screen index="0">
<bounds left="0" top="0" right="27" bottom="36" />
</screen>
</view>
</mamelayout>




MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 1532
Send PM


Re: Reposition MAME on an HD display? new [Re: Vas Crabb]
#367720 - 07/11/17 12:43 PM


> Just to fill this out a bit, you'll need an explicit bounds tag for the view if you
> want to produce blank space, otherwise MAME will just centre the entire view on the
> screen.

Hey, thanks for that! I learn something new every day.


Pages: 1

MAMEWorld Central >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  redk9258, URherenow, Tafoid 
2 registered and 34 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 839