How to properly map 6-button controllers?

I‘m trying to get two different SEGA-style 6-button controllers to work properly with RetroArch. Namely a retro-bit Sega Saturn bluetooth controller as well as a M30 bluetooth controller by 8BitDo.

If you go into RetroArch main controller setup menu, how should one map the buttons so that all the buttons properly align with the original button layout when using SEGA cores?

Button on 6 button pad = RetroArch layout

A = B
B = A
C = R1
X = Y
Y = X
Z = L1
LT = L2
RT = R2

I use this with a saturn controller. This is hard to explain and i’m probably going to do a terrible job but here goes:

You have to set the controls up twice so everything matches. First in the main menu before any games/cores are loaded, and then again in the core options (in a differeny menu entirely) after you have a game running. Once you do that you can save the remapped controls for that core.

(Left = Retropad, Right = Saturn Pad)

B button - B

Y button - Y

Select button - A

Start button - Start

A button - C

X button - Z

L button - L

R button - R

L2 button - X

Good luck.

Just FYI, different cores have different layouts (e.g., genesis plus gx and blastem both emulate Genesis/MD but they use different layouts), so just map the gamepad to the retropad however makes sense to you and know that you may need to remap sometimes for individual cores.