Main > Software Forum
Can you give mame a specific portion of the screen, and a marquee on the top?
nexusmtz:
--- Quote from: nexusmtz on March 18, 2016, 06:17:22 pm ---...The height of the view is the height of the bezel divided by .7
--- End quote ---
Oops. I forgot to compensate for the bezel's width vs the monitor width on vertical widescreens (as to how it affects the scaling.) I'd still use the view's bounds to place things instead of modifying the bounds of the bezel and screen, but placing the marquee in relation to the bezel is not as straight forward.
nexusmtz:
--- Quote from: nexusmtz on March 18, 2016, 07:56:53 pm ---...but placing the marquee in relation to the bezel is not as straight forward.
--- End quote ---
This is the math for the case where the width is the limiting factor, e.g. a typical bezel displayed on a portrait monitor
Keeping with the 70% screen space, 5% blank space, and 25% marquee space from the previous example, and assuming you want the game vertically centered in your 70%:
* The width of the view is the same as the width of the bezel
* width="4000"
* The height of the view is the width of the bezel divided by the monitor aspect
* If the monitor is portrait, the aspect is going to be less than 1, e.g. 9/16 (.5625) instead of 16/9 (1.777...). Of course, if you want to think of this as multiplying by the landscape aspect, that's fine too.
* 4000/(9/16)=7111.1111...
* height="7111"
* The X of the view is 0
* x="0"
* The Y of the view (expressed as a negative) is the total of the vertical centering offset and the top section's height:
* 70% of the height of the view (height*.7), minus the height of the bezel, divided by 2
* (7111*.7-3524)/2=727
* Plus 30% of the height for the top
* 7111*.3=2133
* 727+2133=2860
* y="-2860"
* The X and Y of the marquee are the same as the X and Y of the view (you want the marquee's box to start at the top left)
* x="0" y="-2860"
* The width of the marquee is the same as the width of the bezel
* width="4000"
* The height of the marquee is the height of the view times .25
* 7111*.25=1777.75
* height="1778"So, for Qbert, the view would be:
--- Code: ---<view name="Upright with Marquee">
<bounds x="0" y="-2860" width="4000" height="7111" />
<marquee element="marquee">
<bounds x="0" y="-2860" width="4000" height="1778" />
</marquee>
<screen index="0">
<bounds x="836" y="278" width="2250" height="3000" />
</screen>
<bezel element="bezel">
<bounds x="0" y="0" width="4000" height="3524" />
</bezel>
</view>
--- End code ---
After checking my marquee directory, it looks like the average marquee is more like 3.4:1, so 20% or less might look better than 25, but it's just a number. Since the aspects vary so much, you should resize your marquees outside of MAME e.g. imagemagick, retaining aspect (adding black bars), to the absolute width and height of your marquee space. At 25% of a 1920x1080 monitor rotated portrait, that's 1080x480.
If you have Imagemagick installed in c:\program files\ImageMagick, try:
--- Code: ---pushd c:\games\mame\marquees
for %I in (*.png) do "c:\Program Files\ImageMagick\convert.exe" "%I" -antialias -resize 1080x480 -background black -gravity center -extent 1080x480 "%~nI_marquee%~xI"
--- End code ---
Also, I notice that a lot of the bezels are width=4000. If you're not scripting the creation of the lay files, it would be helpful to write down the view height, plus the percentage values, as the only thing that will change is vertical centering (based on the height of the bezel).
Figuring out the view might look like it's a lot of work, but on a game like space invaders, it's easier than moving around 5 layered elements. It also makes it easy to compensate for whatever offsets you need.
bionictoothpick:
I thought I found the solution for vertical cabs using mamelay plus, but the diff no longer works since rendlay went from .c to .cpp .
Googling hasn't revealed anyone working on the project anymore...
sealcouch:
Sorry to bump, but I'm working with the idea making a bartop inspired by the Mimic build and I was curious as to if there has been a better solution found since last April.
Going to use the top bit of the screen as a marquee instead of having another monitor and I would love to have a physical separation (ie a piece of t-modling with the spine trimmed) across the screen and always have the marquee on top of that divider for every game.
I'm going to do a little more work with the .lay files when I get home, but in the hour I tinkered with it I couldn't get the marquee to show.
PL1:
--- Quote from: sealcouch on January 23, 2017, 02:23:59 pm ---I'm going to do a little more work with the .lay files when I get home, but in the hour I tinkered with it I couldn't get the marquee to show.
--- End quote ---
Did you try changing the MAME "Video Options" menu settings, too?
Scott
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version