How to Use MAME Layout Files As Overlay

I would like to use the new MAME layout support for overlays, as described in https://github.com/libretro/RetroArch/issues/7419 and implemented in https://github.com/libretro/RetroArch/pull/8712 by @huwpascoe and @markwkidd

However, I don’t understand how to set it up. I am running lr-mame in RetroArch 1.7.6 on Linux, using the GL driver. I launch a MAME game and go into the RA menu, select Onscreen Overlay -> Overlay Preset and browse for a MAME artwork file. I have tried loading an artwork .zip file, and well and unzipping the artwork into a directory and selecting the .lay file directly. But the .lay file extension is not available for selection in the GUI.

I’m sure I’m doing something wrong, but cannot find any clear documentation on how to enable this. Can anyone point me in the right direction?

1 Like

Of course after posting this message I come to realize that 1.76 was released before the PR was merged, so I guess this is a 1.77 feature. Regardless, is there anyone using this feature and can confirm how it is intended to be set up / used? Thank you!

I am also interested in this overlay-stuff. Its simply amazing to have the official artworks running with RA!!! no more fiddling arround with overlays on per-game basis would be REALLY AWESOME :smiley:

I don’t think it’s been made active yet. It should be available with a compile-time switch, but I don’t know it offhand, and it currently breaks some video drivers (which is why it’s not compiled in by default). We need to fix that.

1 Like

Not trying offend anyone, but I think the bounty should not have been paid if the work is not completed. If I were one of the investors of this particular bounty, I would not be satisfied (by now).

Greetings.

Looking more closely at the code, the compile-time switch that @hunterk was referring to appears to be HAVE_VIDEO_LAYOUT. I have not had a chance to play with that or 1.7.7 in general yet, but wanted share the info.

This was a tough call, but we (as in, the donors) decided that it would be unreasonable to ask the contributor to implement it for each and every video driver, so it was only implemented for GL. The problem is that some of it bleeds into code that the other drivers touch, so we need to reconcile that. Again, that work felt outside of the scope of the bounty.

I was a backer of this bounty, I think it could have been my biggest contribution actually.

I understand how tricky getting things done in open source can be and have no ill feeling towards the person that got us this far.

Saying that I was a little disappointed it got paid out on a feature that’s not easily usable. I decided not to accept or challenge the pay out just let it play out. S**t happens and we are now closer which is good.

I would love to see some usage/demo of this feature in action though :slight_smile:

It’s my hope that we can get it fixed up and usable in the near future.

1 Like

Hi, just curious if there are any updates on this feature? Thanks.

I’ve been pushing for twinaphex to enable it for GL, despite it not working for the other video drivers. I brought it up the other day after seeing your post as something I would like to see enabled before the next version, but I haven’t seen any commits related to it. Hopefully soon…

1 Like

@hunterk: sorry for my ignorance, but is this about using mame *.lay as regular RetroArch overlays?
Like those in the overlays folder?

retroarch/
    overlays/
        some_folder/
            game.cfg
            game.png

Sort of, yes. There was a bounty awhile back to get MAME artwork bundles to be supported by RetroArch, including scaling the image to fit within the artwork’s viewport, underlays, etc. (i.e., a bunch of stuff that our overlay system doesn’t support)

Someone fulfilled the bounty, but only for the GL driver. Twinaphex wanted it for every driver, but I felt like that was an unreasonable demand, since we have like a dozen of them and no single person is familiar enough with all of them (including twinaphex) to add it all at once.

Now we have a chicken/egg problem where Twinaphex doesn’t want to enable it for GL alone, but nobody is likely to add the other drivers unless/until it’s out there and working.

1 Like

I agree with twinaphex, it should be done at least for the main backends, better wait for it to be complete than releasing it as is right now. Maybe a new bounty could be opened to port it to at least to vulkan, d3d11 and glcore? I would probably give some money into it

From my perspective, we have other options, such as Hard GPU Sync, that don’t work with every driver. I don’t see how this one needs to be any different.

If there’s enough demand for it on other backends, someone will make a bounty and/or work on it, but nobody’s going to do either if they can’t see that it already works somewhere (i.e., that much of the heavily lifting is already done).

Anyways, shouldn’t RA have a backend-agnostic part on the video layer that allowed things like this to be coded once and it should not need to be completely rewritten for every backend? Sorry, just talking from a user perspective, and I’m talking about areas I’m a complete dumb, but looks like something like artwork/overlays is not anything that needs to be so much inherent to specific backend. Thanks for all the work you do guys :slight_smile:

Unfortunately it is. Even the existing overlays have to be specifically supported on each individual backend, as well. IIRC, some consoles don’t support them for that reason.

Yes i read the whole stuff, but i thought it was to implement mame artworks for the mame core. My fault :slight_smile: (language barrier i think)

Thanks for the explanation.

[EDIT] Another question:

do RetroArch overlays supports blend modes?

mame *.lay:

                                                ____
    4. layer:   bezel (blend mode: normal)      \____\  ══╗
    ------------------------------------------  ____      ║
    3. layer:   backdrop (blend mode: screen)   \____\  ══╣
    ------------------------------------------  ____      ║
    2. layer:   overlay (blend mode: multiply)  \____\  ══╣
    ------------------------------------------  ____      ║
    1. layer:   game screen                     \____\  ══╝

@hunterk - Thank you very much for the update. I hope you are successful in convincing twinaphex to enable it GL. I agree that the best way to encourage development for other backends would be to demonstrating it working on GL - otherwise we are stuck in a chicken-and-egg scenario. Good luck!

whoops, I just saw this. RetroArch overlays do not, but the MAME system does/should.

1 Like