Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Can you give mame a specific portion of the screen, and a marquee on the top?  (Read 6678 times)

0 Members and 1 Guest are viewing this topic.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4946
  • Last login:July 31, 2022, 10:26:34 pm
I'm looking at building a smaller candy cab.  I'm having some issues with the marquee I had (betabrite).  It doesn't match the monitor I was going to use (too wide).

So the next idea.  Maybe I would buy a larger tv, and split the TV real estate with the majority at the bottom for the arcade.  But the top chunk for an active lcd marquee.

Is there any easy way to do this these days? 

Thanks
Drake

Nocturnaloner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
  • Last login:May 05, 2016, 12:39:53 pm
  • AARRRRcade!
I was thinking about this.  I did get Hypermarquee running pretty well with a secondary small but wide monitor that was made to go in car seat backs.  Looks ok mounted in the cabinet above my main monitor, but the quality of the monitor is pretty poor.  Anyway, in order to do what you're thinking of, I'm afraid it would just be two applications running in windowed mode.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
You should be able to do this using the MAME artwork system.

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
  • Last login:January 17, 2019, 07:03:11 pm
You should be able to do this using the MAME artwork system.
+1

That's what I've done on my system.

Nocturnaloner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
  • Last login:May 05, 2016, 12:39:53 pm
  • AARRRRcade!

You should be able to do this using the MAME artwork system.
+1

That's what I've done on my system.


That's right, it slipped my mind that you could do it with a .lay file.   Are you making custom layouts for each game(!!) or did you come up with one layout that works for everything?

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4946
  • Last login:July 31, 2022, 10:26:34 pm
I would also love to know.

But I think, in my case, they will always be the same... and I could programmatically create a layout file for every mame game...  use a default marquee if it's there... or use a the original if I have it.

Thanks for the ideas!


You should be able to do this using the MAME artwork system.
+1

That's what I've done on my system.


That's right, it slipped my mind that you could do it with a .lay file.   Are you making custom layouts for each game(!!) or did you come up with one layout that works for everything?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
mamehooker will do it as well.... you don't have to make a layout for each game.  A tutorial is on the site. 

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
mamehooker will do it as well....

I know that mamehooker is a good choice for secondary monitors, but how would it go about sharing a single screen with MAME? I'd think that would require changes in MAME itself.

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
  • Last login:January 17, 2019, 07:03:11 pm

You should be able to do this using the MAME artwork system.
+1

That's what I've done on my system.


That's right, it slipped my mind that you could do it with a .lay file.   Are you making custom layouts for each game(!!) or did you come up with one layout that works for everything?
Custom for all.

I have a basic layout that I copy so it isn't too big of a deal. The most time consuming is converting the screen position within bezel artwork.

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
...The most time consuming is converting the screen position within bezel artwork.

If you're modifying the values of the bezel and screen, you're probably making it harder than it has to be. Instead, just set the bounds of the view, and add the marquee.

[EDIT: OP wants to use a vertical screen. This math works OK on a horizontal screen, but not necessarily on a vertical, because the width of the bezel usually forces MAME to scale everything down on a vertical screen. When that happens, the marquee won't be at the top anymore.]

Let's say you want your bottom part (bezel and game screen) to be 70% of your screen, and the marquee to be 25% (with 5% in between), then, for a normal game where the bezel surrounds the game screen:
  • The width of the view is the same as the width of the bezel
  • The height of the view is the height of the bezel divided by .7
  • The X of the view is 0
  • The Y of the view is the height of the bezel minus the height of the view (you want a negative number)
  • 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
So, for Qbert, the view would be:
Code: [Select]
<view name="Upright with Marquee">
<bounds x="0" y="-1510" width="4000" height="5034" />
<marquee element="marquee">
<bounds x="0" y="-1510" width="4000" height="1259" />
</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>

Note that this does stretch the marquee. If you don't want that, you'll have to adjust the bounds of the marquee. Of course, that's just a little more math. If there's a way to force an element to keep aspect within given bounds, I haven't found it yet.
« Last Edit: March 18, 2016, 08:02:35 pm by nexusmtz »

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
...The height of the view is the height of the bezel divided by .7

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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
...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
    • 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: [Select]
<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:
Code: [Select]
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.

bionictoothpick

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:November 08, 2020, 06:45:09 pm
  • Yes, I still play Maze Craze.
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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 156
  • Last login:March 26, 2023, 09:28:56 pm
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

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9402
  • Last login:Today at 07:12:27 pm
  • Designated spam hunter
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.
Did you try changing the MAME "Video Options" menu settings, too?


Scott

sealcouch

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 156
  • Last login:March 26, 2023, 09:28:56 pm

Figured it out. It was a matter of double checking spelling. of all things.