MAME/Retroarch overlay/bezel conversion tool
-
Retroarch bezels / overlays tool
Overlays (or bezels) are images added "above" the emulator, to mask the black borders around the image.
This tool provides several utilities:
- convert MAME bezels to Retroarch overlays, so they can be used with any Libretro emulator
- convert Retroarch overlays to MAME bezels
- check Retroarch overlays integrity
It works under Windows x64/ARM64, Linux x64/ARM64 and MacOS x64. You can build it for any platform supported by .Net 5 (it's very easy).
Download
Usage
!!! BACKUP YOUR FILES BEFORE USING THIS TOOL !!! I have used it on my own files but I cannot guarantee that it will work on yours.
Get a detailed help and list of options by running
bezel-tools --help
orbezel-tools [verb] --help
.Check overlays integrity
Simple check:
bezel-tools check --overlays-config samples/retroarch/overlays --roms-config samples/retroarch/roms
Check and fix when possible:
bezel-tools check --overlays-config samples/retroarch/overlays --roms-config samples/retroarch/roms --autofix --input-overlay-path /opt/retropie/configs/all/retroarch/overlay/ --template-overlay templates/overlay.cfg --template-rom templates/game.cfg
Convert MAME bezels to RetroArch overlays
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
Convert RetroArch overlays to MAME bezels
bezel-tools rtm --source-roms path/to/rom/files --source-configs path/to/config/files --output path/to/output --template templates/default.lay --zip
-
+1000 internets for osx. =D
-
@theissdev You mean you like the fact that there's an OSX version? Well, I develop under OSX, so... ^^
-
Looks like a nice program you made and perhaps we could use this program in our project here :
https://retropie.org.uk/forum/topic/29682/development-of-module-script-generator-for-lr-mess-and-mame-standaloneI don't have any idea about what bezels are though.
Could you explain with pictures (and perhaps some config examples) on how MAME artwork is transformed into Retroarch overlay ? -
@folly Thanks!
I'm not sure what you want to do with my tool, but you're obviously free to use it however you please. It has a MIT licence (meaning you can do whatever you want), and it's .Net 5 so it's cross-platform and should run on the Pi (I haven't tested it though). You're obviously free to fork it and edit it to change your needs, or copy part of the code in your project.
MAME bezels are basically like Retroarch overlays. They both have pros and cons, but in practice they're mostly used for the same purpose : display a picture around the emulator screen.
I've written down the way to convert a MAME lay file to a Retroarch CFG: https://github.com/cosmo0/mame-retroarch-bezel-converter/blob/master/lay_files_specs.md
It's based on my experimentations though (official documentation is sparse), so take it with a grain of salt.If you want to know exactly how it works down to the details, my code is available (https://github.com/cosmo0/mame-retroarch-bezel-converter/tree/master/src), and I try to comment it. The app is not very complex, I don't think you even have to know .Net to understand it, but if you want me to explain, let me know. You can open it with VSCode or Visual Studio community, both free, to navigate easily in the codebase.
However, know that I'm currently working on adding multiple features. You can see my progress here: https://github.com/cosmo0/mame-retroarch-bezel-converter/projects/1
-
Thank you for explaining a bit.
Now it's a bit more clear to me.If I have some time for it, I will read some of the stuff you mentioned.
In my project I did somewhat the same for the handhelds, but the extracting only the background from MAME artwork converting it to an background overlay with configs.
While doing that, it made me wonder how you could achieve the look that the original MAME artwork has.
So here are pictures below, of how I converted that.
So what you call, bezel, is gone in the Retroarch overlay.
It's not a problem though, I like the full screen !
This script (part 4) is doing that, on the fly now :
https://github.com/FollyMaddy/RetroPie-Share/blob/main/00-scripts-00/get-cheats-artwork-overlays.shSo summarizing it : ( am I correct ? )
Your program makes the MAME artwork (first picture) look the same as the Retroarch overlay ? -
@folly If your MAME bezel has multiple pictures then no, it doesn't. My programs does the same as your script, it just extracts one of the pictures from the MAME file (probably not the same one as yours, though).
But it shouldn't be too hard to do what you want; if you provide me with a sample I think I can do it (but not right now because my priority is converting @Orionsangel 's overlays for use in Retropie).
-
@cosmo0 said in MAME/Retroarch overlay/bezel conversion tool:
@folly If your MAME bezel has multiple pictures then no, it doesn't. My programs does the same as your script, it just extracts one of the pictures from the MAME file (probably not the same one as yours, though).
Indeed, ours have multiple pictures.
But it shouldn't be too hard to do what you want; if you provide me with a sample I think I can do it (but not right now because my priority is converting @Orionsangel 's overlays for use in Retropie).
I will see how our project evolves.
I will keep your offer in my mind, thanks.๐ -
New version: v2.0
https://github.com/cosmo0/mame-retroarch-bezel-converter/releases/latest
New features
- Checks the integrity of your RA overlays, and fixes them
Warning the tool has change name (because it does more than convert now).
Usage
!!! BACKUP YOUR FILES BEFORE USING THIS TOOL !!! I have used it on my own files but I cannot guarantee that it will work on yours.
Get a detailed help and list of options by running
bezel-tools --help
orbezel-tools [verb] --help
.Check overlays integrity
Simple check:
bezel-tools check --overlays-config samples/retroarch/overlays --roms-config samples/retroarch/roms
Check and fix when possible:
bezel-tools check --overlays-config samples/retroarch/overlays --roms-config samples/retroarch/roms --autofix --input-overlay-path /opt/retropie/configs/all/retroarch/overlay/ --template-overlay templates/overlay.cfg --template-rom templates/game.cfg
Convert MAME bezels to RetroArch overlays
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
Convert RetroArch overlays to MAME bezels
bezel-tools rtm --source-roms path/to/rom/files --source-configs path/to/config/files --output path/to/output --template templates/default.lay --zip
-
New release: v3.0
New feature: generates overlays directly from images.
bezel-tools generate --images samples/images --roms-configs samples/roms --template-overlay templates/overlay.cfg --template-rom templates/game.cfg
https://github.com/cosmo0/mame-retroarch-bezel-converter/releases/tag/v3.0
I'm done with what I want to do with this tool right now (for my own personal use) and I'll move on to other projects.
Feel free to open an issue if you find a bug, or if you want another feature.
I want to generate "complete" overlays from MAME layouts (with background layers, etc) but it can get pretty complicated pretty fast, and I don't need it personally right now, but if people want it, I can take some time to do it. I'm open to pull requests, and I welcome forks.
-
New release that fixes a but with some LAY files.
https://github.com/cosmo0/mame-retroarch-bezel-converter/releases/tag/v3.3
-
Can your program convert gameandwatch dual screen artwork (only backgrounds) to retroarch overlay ?
I think a nice example is gnw_zelda.
I did already some manually :
my post
But it's quite some work and not all are done yet.I just checked your github page, I am missing a pre-compiled package for arm32bit as most RetroPie's run on 32bit.
Btw. How does it compile ?ps.
I read a bit trough your thread again seems I asked you a similar question a long time ago.
Multiple pictures are not supported by your script, right ? -
@Folly If you provide me with a sample of what you're trying to convert, I can check whether it would be possible. The problem is that last time I checked, RA did not support multi-monitor games very well, but I can take a look (hopefully before next year).
I've added ARM32 binaries to the release (same link).
The build instructions are at the bottom of the readme.
-
These are the artwork files on which I added a Background.png manually :
(created from one or the TOP/BOTTOM or LEFT/RIGHT backgrounds)
https://drive.google.com/drive/folders/1YkISUXfKsdHvMv6HACwKhsVHBiGGHCjvAn option "creating background overlays" in my add-system-mamedev.sh script unzips the Background.png pictures and renames it and places them in the correct folder along with the needed configs.
In the folder RAconversions I added one RAconversion.
(Be aware that I did not add the folder structure, just the files) -
@Folly Thanks, I created an issue https://github.com/cosmo0/mame-retroarch-bezel-converter/issues/2
I'll see if I have some time to do it, but don't count on it too soon! :P
-
Thank's for looking at it.
I know it's a difficult one and that not everyone has the time to make solutions.
So I know that perhaps you will not find one.
It will not be the end of the world ;-)
Take your time.Btw.
Be aware that the Background.png normally does not exist.
Also the screen has to match the LC-display figures. -
New version: now with a GUI (Windows only).
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.