...but placing the marquee in relation to the bezel is not as straight forward.
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
- 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
- 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
- Plus 30% of the height for the top
- 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)
- The width of the marquee is the same as the width of the bezel
- 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:
<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>
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:
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"
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.