MAME/Retroarch bezel/overlays tool

@cosmo0 hello mate, I’m using your tool to convert MAME -> Retroarch and works well on Mac!!! Thanks for your work and your time!!!

Its really really easy to use and to have a converted overlay files!

I’ve extracted your tool to a folder called conversor, and I put in a new MAME folder with Artwork and Cfg folders. Later I’ve done a new folder called ‘converted’ where all files will be created as result of the procces. Structure like this.

- conversor
|- default files tool and other folders...
|- templates
|- Mame
   |- Artwork
      |- ffight.zip
   |-Cfg
      |-ffight.cfg
|- converted
   |- Artwork
      |- ffight.cfg
      |- ffight.png
   |-Cfg
      |-ffight.zip.cfg

This is my command to run it:

sudo ./bezel-tools mtr --source Mame/Artwork --output-roms converted/Cfg --output-overlays converted/Artwork --template-game templates/game.cfg --template-overlay templates/overlay.cfg

Sorry for my poor english. Great work again!!!

2 Likes

Thanks! :slight_smile: I’m glad it’s useful to someone else than me ^^

Please let me know if you find any bug :slight_smile:

1 Like

Man, I just wanted login to thank you for this work, . I will not be able to test it yet because I’m focused on other projects right now, but this tools basically will save me thousands of hours of manual work importing my mame overlays to RA, which is something I have on my to-do list.

I’ll try to give you feedback when I test it.

Thanks @cosmo0

2 Likes

Thanks! Let me know if it works for you, and if it doesn’t, what I can do to improve it :slight_smile:

Hi cosmo0 thanks for this tool it looks great

my screen resolution is 1600x1200

I’m trying to convert some mame bezels to retroarch.

sudo ./bezel-tools mtr --source /Users/tomplums/Documents/OVERLAYS/downloaded --output-roms /Users/tomplums/Documents/OVERLAYS/converted/cfg --output-overlays /Users/tomplums/Documents/OVERLAYS/converted/artwork --template-game /Users/tomplums/Documents/OVERLAYS/templates/game.cfg --template-overlay /Users/tomplums/Documents/OVERLAYS/templates/overlay.cfg --target-resolution 1600x1200

however the output files don’t seem quite right

puckman Extracting files from archive /Users/tomplums/Documents/OVERLAYS/downloaded/puckman.zip
puckman doesn't have a cfg file
puckman image: pacman_bezel_upright.png
puckman source screen: {"Center":{"X":1996,"Y":2121},"Height":2720,"Orientation":1,"Width":2040,"X":976,"Y":761}
puckman screen offset:
puckman target screen: {"Center":{"X":1996,"Y":2121},"Height":2720,"Orientation":1,"Width":2040,"X":976,"Y":761}
puckman processing image
puckman creating configs
puckman processing done
########## DONE ##########

have I got the correct command or are my source bezels causing a problem?

Can you provide me with the MAME bezel please so I can try on my side?

sure here are the bezels I’m testing:

https://mrdo.mameworld.info/artwork/puckman.zip https://mrdo.mameworld.info/artwork/mspacman.zip

New release: v3.2

Fixes two bugs during MAME to RA conversion when the bezel was resized.

Release MAME / Retroarch bezel / overlays tool · cosmo0/mame-retroarch-bezel-converter (github.com)

@mousemat86: it won’t completely fix your problem because the bezel packs you’re using are very complex: they have several variants with different sizes, and resizing/computing them properly is a pain.

You can use the --scan-bezel option to fix some issues, and you can use --output-debug to check if it works (like --output-debug tmp/debug).

2 Likes

thanks for investigating. I will take another look :pray:

Let me know how it goes!

At the very worst, you can extract the images you want from the MAME bezels, and then use the generate action:

bezel-tools generate --images samples/images --roms-configs samples/roms --template-overlay templates/overlay.cfg --template-rom templates/game.cfg

1 Like

yes nice – I will try that for any problematic bezels.

both puckman and mspacman worked out perfectly.

I tried another (Tetris) and it worked but the screen size wasn’t quite right, it may well be the original bezel but maybe you’d like to test it, link below.

https://mrdo.mameworld.info/artwork/atetris.zip

1 Like

I tried this generate action, it worked nicely. Thanks again

2 Likes

I finally got a PR up to add the win64 build to the online updater. Sorry it took so long :slight_smile:

I’ve read the documentation but I can’t seem to find an answer to this question, does this tool support converting MAME .lay files into Retroarch .cfg format? I only see MAME .cfg files mentioned.

New release that fixes a bug when the MAME LAY file doesn’t have the expected order of bezels.

Releases · cosmo0/mame-retroarch-bezel-converter (github.com)


@tekn0: you can indeed convert MAME .lay to RA .cfg, it’s the reason I created this tool :slight_smile:

bezel-tools mtr --source path/to/mame/zips --output-roms output/roms --output-overlays output/overlay --template-game templates/game.cfg --template-overlay templates/overlay.cfg

1 Like

I’ve been searching through various topics on the forum about using the MAME .lay bezel collection as overlays in RA, and then this topic popped up. What I’m trying to do is quickly add a bezel to each game, like I can with the standalone MAME core. What I want to avoid is having to individually add overlays for a couple thousand games. Can this be done in RA? Will converting the .lay files with this tool help me do that? Has anyone already converted the “official” MAME .lay files and made them available somewhere?

I’m really hoping there is an easy way to get this set up, as this has been the main thing holding me back from using RA MAME instead of standalone MAME.

Thanks for the help, everyone. :slight_smile:

@Drybonz This tool will convert your MAME .lay bezels to RA .cfg files. Just point it to your MAME bezels folder, and it will extract and convert all of them, but there is a caveat: the RA overlays are much more basic than MAME bezels, so you won’t have all the features. Basically this tool just takes the background layer, so it might not be enough for your needs, depending on your files.

That being said, I think that the latest RA versions can use MAME bezels, but I’m not sure.

1 Like

Thanks for the reply. I have been trying to find some solid info on how to load the MAME bezels so that it automatically matches each bezel to each game, without having to do it for each game individually.

Can I assume you tried the obvious and put game named layouts in your layout folder? I have never tried using layouts in RA but I would assume it works.

Yeah, it just displays your normally selected overlay, or if you turn that off, no overlay.