Author Topic: [Guide] Launch Bezels from Attract Mode Tutorial (The Bezel Project)  (Read 6838 times)

RetroMacGamer

  • Full Member
  • ***
  • Posts: 33
    • View Profile
As I am a macOS user this is fully operational on macOS with Attract Mode & RetroArch for macOS.  As these both applications are cross platform, with small change to the paths I would say this could also work in Windows & Linux

The concept is this;

Attract Mode from the args line can launch Bezels (RetroArch overlays), the following code will look for a "game" bezel, if not found then a "system" bezel will be loaded.

Bezels would normally need to be in the RetroArch config/emulator folder which can cause conflict eg Genesis Plus GX is used for 10 systems or more, many of these systems have the same game eg NBA Jam meaning you couldn't have multiple different bezels with the same name in this emulator folder.

Launching the bezels via Attract Mode means we can have the bezel folders wherever we want on our system.

This is a huge leap forward as with this method we can set per Attract Mode Emulator Bezels rather than per RetroArch emulator bezels, basically we have a lot more control!

The Emulator cfg would look like this;

Code: [Select]
# Generated by Attract-Mode v2.2.0-3
#
executable           /Applications/RetroArch.app/Contents/MacOS/RetroArch
args                 -L /Applications/RetroArch.app/Contents/Resources/cores/mednafen_psx_libretro.dylib "[romfilename]" --appendconfig "$HOME/Documents/RetroArch/overlays/configs/SonyPSX.cfg|$HOME/Documents/RetroArch/overlays/configs/PSX/[name].cfg"
rompath              /Volumes/Roms/psx
romext               .zip;.7z;.cue;.img;.mdf;.pbp;.toc;.cbn;.m3u
system               Sony Playstation
info_source          listxml
artwork    boxart          /Volumes/Roms/psx/boxart
artwork    cartart         /Volumes/Roms/psx/cartart
artwork    flyer           /Volumes/Roms/psx/flyer
artwork    marquee         /Volumes/Roms/psx/marquee
artwork    snap            /Volumes/Roms/psx/snap
artwork    wheel           /Volumes/Roms/psx/wheel

The args explained above;

Code: [Select]
-L /Applications/RetroArch.app/Contents/Resources/cores/mednafen_psx_libretro.dylib "[romfilename]" this part launches the rom

Code: [Select]
--appendconfig "$HOME/Documents/RetroArch/overlays/configs/SonyPSX.cfg this section loads the system bezel in this case SonyPSX and this bezel will stay if no game bezel found.

Code: [Select]
|$HOME/Documents/RetroArch/overlays/configs/PSX/[name].cfg" the last section of the args looks for a game bezel, if a game bezel cfg exists in the folder, the game bezel will load, if not then the system bezel will load.

The correct aspect ratio can also be set in the system bezel cfg (eg this is handy for odd aspect ratios or handhelds)

To understand the folder structure of the bezels well this is kinda a RetroArch thing and not Attract Mode but I guess as these bezels are launched from Attract Mode from different locations then it doesn't hurt to mention this briefly here;

We will continue to use the example above for Sony PSX

There are two config files that are used with this. The first config file “points” to a second config file. The second config file is located in the same folder as the bezel PNG file is. Retroarch can’t be told to “load a PNG”....it can only be told to “use a config file” for knowing what bezel PNG file to use.

These second config files (along with the PNG bezel files) are stored in a nominated folder.

Retroarch uses these two config files in conjunction with one another in order to know what bezel PNG file to use.

The first part of the -appendconfig points to the 1st cfg file for the system bezel it looks like this;
Code: [Select]
input_overlay = "~/Documents/RetroArch/overlays/borders/Sony-PlayStation.cfg"
That next cfg file (paired with a png) looks like this;
Code: [Select]
overlays = 1
overlay0_overlay = Sony-PlayStation.png
overlay0_full_screen = true
overlay0_descs = 0

So the first CFG file tells RetroArch to input an overlay, the second cfg file (which is paired with a png) tells RetroArch which actual actual bezel.png to load

For the per game Game Bezels which is the second half of the --appendconfig this points to a rom [name] cfg which will only trigger for that particular game and that looks like this; (This cfg name must match the rom file name)
Code: [Select]
input_overlay = "~/Documents/RetroArch/overlays/borders/GameBezels/PlayStation/Crash Bandicoot (USA).cfg"
That next cfg file (paired with a png) looks like this;
Code: [Select]
overlays = 1
overlay0_overlay = "Crash Bandicoot (USA).png"
overlay0_full_screen = true
overlay0_descs = 0

** IMPORTANT ** A few Minor settings need to be completed in RetroArch and these can be found in this part series https://www.youtube.com/watch?v=S6_XMC1pLZ4&t=1353s

Core remaps will not be affected, some core overrides may affect the display of a systems bezels.

The overlays can very easily be stopped or removed by simply renaming the folder that contains the cfg files

The Bezel Project are doing an amazing job creating all the thousands of individual game bezels that we can all enjoy. https://github.com/thebezelproject?tab=repositories

This new method was implemented in Hyperpie 2 for macOS with success.

Sing out if you have any further queries.
« Last Edit: October 03, 2018, 07:47:30 AM by RetroMacGamer »

dukpoki

  • Sr. Member
  • ****
  • Posts: 138
    • View Profile
Re: [Guide] Launch Bezels from Attract Mode Tutorial (The Bezel Project)
« Reply #1 on: October 08, 2018, 07:55:33 AM »
For the bezel thing in RA, I was thinking a workaround is just to duplicate the core file for each system it identifies with.

Example:
genesis_plus_gx_genesis_libretro.dll
genesis_plus_gx_game_gear_libretro.dll
genesis_plus_gx_sega_cd_libretro.dll

Though honestly I doubt it would work since the way RA structures the config paths.  Could give it a shot.
« Last Edit: October 08, 2018, 08:03:59 AM by dukpoki »

RetroMacGamer

  • Full Member
  • ***
  • Posts: 33
    • View Profile
Re: [Guide] Launch Bezels from Attract Mode Tutorial (The Bezel Project)
« Reply #2 on: October 28, 2018, 04:21:52 AM »
From what I have read on other forums and trialing this myself, no go duplicating the emulators and renaming.

A lot more control with the method above launching from the Attract Mode Args

amauri

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: [Guide] Launch Bezels from Attract Mode Tutorial (The Bezel Project)
« Reply #3 on: March 02, 2021, 01:46:40 PM »
Has anyone managed to use a bezel for each game on Attractmode using Retroarch? Can you help me ???
I've read this explanation about 30x and it doesn't work, Retroarch does not respect the --appendconfig and always reads the files below:
# Generated by Attract-Mode v2.6.1
#
executable retroarch
args --verbose -f -L $ HOME / .config / retroarch / colors / snes9x_libretro.so "[romfilename]" --appendconfig "$ HOME / .config / retroarch / config / Snes9x / bezels / [name] .cfg"
rompath $ HOME / modules / snes9x / roms /
romext .zip; .7z; .bin; .fig; .mgd; .sfc; .smc; .swc
system Super Nintendo (SNES)
info_source thegamesdb.net
artwork boxart $ HOME / modules / snes9x / boxart
artwork cartart $ HOME / modules / snes9x / cartart
artwork flyer $ HOME / modules / snes9x / flyer
artwork marquee $ HOME / modules / snes9x / marquee
artwork snap $ HOME / modules / snes9x / snap
artwork wheel $ HOME / modules / snes9x / wheel

verbose:
[INFO] [CORE]: Loading dynamic libretro core from: "/home/arcade/.config/retroarch/cores/snes9x_libretro.so"
[INFO] [Overrides]: Core-specific overrides found at /home/arcade/.config/retroarch/config/Snes9x/Snes9x.cfg.
[INFO] [Overrides]: No content-dir-specific overrides found at /home/arcade/.config/retroarch/config/Snes9x/roms.cfg.
[INFO] [Overrides]: Game-specific overrides found at /home/arcade/.config/retroarch/config/Snes9x/Zoop (USA) .cfg.
[INFO] [Overrides]: game-specific overrides stacking on top of previous overrides
[INFO] Config: appending config "/home/arcade/.config/retroarch/config/Snes9x/Snes9x.cfg"
[INFO] Config: appending config "/home/arcade/.config/retroarch/config/Snes9x/Zoop (USA) .cfg"

manzarek

  • Sr. Member
  • ****
  • Posts: 147
    • View Profile
    • YouTube
Re: [Guide] Launch Bezels from Attract Mode Tutorial (The Bezel Project)
« Reply #4 on: December 06, 2021, 09:08:39 AM »
I would like to try but laziness is turning against me :-\
Mame Fighting

PittStone

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: [Guide] Launch Bezels from Attract Mode Tutorial (The Bezel Project)
« Reply #5 on: December 08, 2021, 07:13:12 AM »
Is it possible to show a Bezel for every preview video (snap) in the Fullscreen Menu?

JonahUK

  • Full Member
  • ***
  • Posts: 32
  • Don't like what I say or how I answer? IDGAF.
    • View Profile
    • My Channel
Re: [Guide] Launch Bezels from Attract Mode Tutorial (The Bezel Project)
« Reply #6 on: December 08, 2021, 11:24:47 AM »
Is it possible to show a Bezel for every preview video (snap) in the Fullscreen Menu?

Yes, just treat the bezel as any other media and load accordingly. Check out the SAFT layout (http://forum.attractmode.org/index.php?topic=3889.msg27082#msg27082) for a good, clean, simple and basic example of this.

I also do a more advanced method for Arcade here: https://www.youtube.com/watch?v=72XICuVxhp0&list=PLcXmyF-dTf9weG-H1NIOFJMBU1rrIPCOB
« Last Edit: January 21, 2022, 08:08:40 AM by JonahUK »