MAME/Retroarch bezel/overlay conversion tool
-
I've made a tool to converts MAME bezels to Retroarch overlays, so they can be used with any Libretro emulator, or Retroarch overlays to MAME bezels.
Download
Usage
Convert MAME bezels to RetroArch overlays
mame-bezel-converter.exe mtr --source path/to/mame/zips --output-roms output/roms --output-overlays output/overlay --template-game templates/game.cfg --template-overlay templates/overlay.cfg
--source
is the path where you store your zip files containing your MAME bezels--output-overlays
is where the png and overlay cfg files will be created--output-roms
is where rom cfg files will be created (where the screen dimensions are stored)--template-game
is a template rom cfg that will be modified (a sample is provided)--template-overlay
is a template overlay cfg that will be modified (a sample is provided)
Convert RetroArch overlays to MAME bezels
mame-bezel-converter.exe rtm --source-roms path/to/rom/files --source-configs path/to/config/files --output path/to/output --template templates/default.lay --zip
--source-roms
is the path to the rom cfg (the .zip.cfg files)--source-configs
is the path to the folder where the cfg files are located--output
is where the MAME bezels will be created--template
is the template for the lay file that will be modified (a sample is provided)--zip
zips the result (otherwise it just creates a folder)
Common parameters
--overwrite
to overwrite existing files--scan-bezel
to scan transparent pixels in the images instead of relying on the cfg/lay files--debug path/to/debug
to see the result of the conversion (it creates an image with a red square where the screen will be)--margin 10
to add or remove a 10px margin (positive value to crop a bit of the screen)--threads 4
to use 4 threads
It works under Windows x64/ARM64, Linux x64/ARM64, and Mac OS x64.
-
I have no idea why I can't edit my post?
I want to add that it works under Windows x64/ARM64, Linux x64/ARM64, and Mac OS x64.
-
@cosmo0 hi! It is a measure because we have had many users that have erased valuable information on their posts and changed it for inappropiate content because they weren't happy with something or just trying to be funny. I just added the compatibility at the bottom.
-
@paradadf Ok so I'll need to be careful to not forget anything when creating posts. 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
-
New version: now with a GUI (Windows only).