@substring You can, I created one retroarch.cfg associated with each console and referenced it in recalbox.conf like this:
#recalbox.conf
snes.configfile=/opt/recalbox/configs/snes/retroarch.cfg
gb.configfile=snes.configfile=/opt/recalbox/configs/gb/retroarch.cfg
and inside each of those .cfg files, I associated specific overlays and viewports for each console like this for example
# Vertical Monitor resolution
custom_viewport_width = 1379
# Horizontal emulator resolution
custom_viewport_height = 1035
# Vertical emulator resolution
custom_viewport_x = 290
# The first X pixel of the emulator image
custom_viewport_y = 22
# The first Y pixel of the emulator image
aspect_ratio_index = 22
# Aspect Ratio set to custom
input_overlay = /opt/recalbox/emulators/retroarch/overlays/16-9/Scanlines_4x_1080p_Borderless.cfg
# Overlayimage
input_overlay_enable = true
# Overlay Image enable
input_overlay_opacity = 0.7
# opacity of the overlayimage
input_overlay_scale = "1.000000"
#include "/recalbox/configs/retroarch/retroarchcustom_snes_PM.cfg"
and at the bottom of each of thoses .cfg files I include
another custom .cfg file corresponding and replacing the recalbox generated retroarchcustom.cfg
For example:
#retroarchcustom_snes.cfg
#here I define everything related to my controllers and so on like that I can use specific controllers for each console
#8bitdo SFC30 for super nes, PS4 controllers for PSX and arcade game, etc...
#A part of the config for the example
input_joypad_driver = udev
#8bitdo SFC30 Gamepad
input_player2_analog_dpad_mode = 0
input_player1_joypad_index = 0
input_player1_a_btn = 0
input_player1_b_btn = 1
input_player1_x_btn = 3
input_player1_y_btn = 4
input_player1_l_btn = 6
input_player1_r_btn = 7
input_player1_select_btn = 10
input_player1_start_btn = 11
input_player1_right_axis = +0
input_player1_left_axis = -0
input_player1_up_axis = -1
input_player1_down_axis = +1
And to find the proper configuration for my controllers, I first let recalbox set the defaults config, opened the retroarchcustom.cfg generated and checked the proper buttons number. Then I could create proper files for each controllers/consoles
And it's working flawlessly, it's really close to real consoles like this