Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

I really like that Pinball X lets you have video media for attract mode and automatically uses static images during gameplay.  What am I talking about?  For MAME, if I provide a video file for backglass, DMD, and playfield, it will use those for attract mode.  If I provide nothing else, it will re-use them during gameplay also (unless you turn it off in Game Manager).  But, if you also provide static images for the same game, Pinball X will automatically display them INSTEAD of the attract mode video.  I love this, since I don't like distractions during gameplay, AND, I can do things like displaying controls on the DMD during gameplay.

This feature may not actually be intentional, since it's not documented, and I fear it may disappear at some point.  Its really only useful for multi-display MAME setups which is usually a hybrid pincade type setup.  I thought I would share some of my latest explorations with MAME that will ensure this functionality can be maintained.

MAME uses layout files (.lay) to control rendering of information on screens.  MAME also supports up to 4 separate displays ("windows" in MAME parlance).  In mame.ini I set up the number of screens to 3 (backglass, DMD, playfield).  I then assigned a screen to each physical display (0, 1, 2) in the OSD Per-View Display settings.  Note that the "address" of each display can be determined by running MAME from the command line with "-verbose".  It will look something like "\\.\DisplayX" where 'X' is a number for each physical display in your system.  For each screen, I tell it to only display a view that I define (marquee_only, controls_only).  The definition for those views will be provided in a layout file (.lay) in MAME.  The images below show the relevant MAME config settings and an example .lay file for Armor Attack (armora).  Note the use of pre-defined parameter values? (~deviceshortname~). This allows me to automatically search for the artwork for any ROM without having to create a new .lay file for each.  The only time a new file is needed is for special cases like Armor Attack, which uses overlays as part of the game field.  A few others have similar issues.  For the most part though, all of my games use 1 .lay file, which is vertical.lay and horiz.lay, depending on the orientation of the game.  Just put the artwork in the appropriate folder and MAME will find them.

 

 

 

IMG_0766.jpeg

IMG_0767.jpeg

IMG_0739.jpeg

  • Like 1
  • Thanks 1
Posted

Very nice! Some very useful information and hope you continue to update as your exploration continues.

To that end, I am going to pin this in the FAQ subforum.

BTW, great use of the DMD monitor to display the CP for the MAME games! 

Posted
23 minutes ago, Draco1962 said:

Very nice! Some very useful information and hope you continue to update as your exploration continues.

To that end, I am going to pin this in the FAQ subforum.

BTW, great use of the DMD monitor to display the CP for the MAME games! 

Stole the idea from TerryRed’s Pinkadia

Posted

UPDATE!

Using the technique I originally posted, you would have to put the images in the respective artwork folders (horizont, vertical), and any custom .lay files (armora, bzone, etc).  This seemed like an annoyance to me.  So, I discovered that you can use relative paths and that's a game changer.  Now I can simply have one folder for all of my backglass images and one for my controls, and have the .lay file look there to find them.

The one downside to all of this is that MAME is always trying to load image files.  If it can't find one, it displays a rather unattractive pattern.  I could copy default images and name them according to the ROM name (which I probably will for now), but there's also a way to run LUA scripts from the .lay file.  I may explore to see if that can automatically provide my default images if a ROM specific image isn't available.

relative_paths.JPEG

ugly_placeholder.JPEG

  • Like 1
Posted

You may have "stolen the idea" but you are making it your own with the improvements and sharing back to the community. Everyone starts off of the labors of others, but few pay it forward to the benefit of those that will be coming after. Thanks for being one of the few, your contributions are appreciated and noticed.

  • Like 1
Posted

Well, this got complicated REALLY fast.  The frontend was hiding a warning that MAME was outputting with regard to my element typed.  It turns out that element types "bezel", "backdrop", "overlay", etc.. are now deprecated and could disappear from MAME support at any time.  Instead, everything should be a named element, and views should reference them using the "ref=" attribute, BUT... this is where the tricky part comes in.  For any defined screen element, if your bounds overlap with another element, you have to tell MAME how to render it.  By default MAME will use ALPHA blending, but there are other options as well, such as "ADD" and "MULTIPLY".  I think these terms are a bit confusing.  In the first image, you can see the warning messages. The second picture shows what Battle Zone's (bzone) RGB layer looks like when blending is set to ALPHA (default).  The third picture shows the "ADD" option.  The final picture shows the "MULTIPLY" option, which is the one that restores the game to its original look.  Also, you have to define your screen bounds before any element references.  Otherwise the playfield will overwrite everything else, and your added elements will NOT display

I've updated my default "horizont" and "vertical" artwork files as well as armora and bzone on my files area at: /-PinballX-/Other Uploads/MrGrynch/mame/artwork

 

IMG_0806.JPEG

IMG_0807.JPEG

IMG_0808.JPEG

IMG_0809.JPEG

  • Like 1
  • Draco1962 changed the title to [GUIDE] MAME: Displaying Marquee on Backglass and Controls on DMD

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...