libretro / libretro/RetroArch

[Feature Request] Add ergonomic face button layout for two-button controllers

Open
#18,982 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Description

I have developed a script, generate-remaps-to-rotate-retropad-face-buttons-for-nes-cores.sh, that automates the generation of RetroArch remap files for NES cores to ensure a consistent, ergonomic control layout. It rotates RetroPad face buttons 90° clockwise.[1]

Feature request

To streamline this feature, I recommend integrating the functionality of my script directly into RetroArch as a toggle labeled "Rotate RetroPad face buttons 90° clockwise for cores with two buttons".

Unlike my existing Bash script, this native implementation would automatically generate the necessary remaps whenever core content is loaded, providing a more seamless and convenient way for users to apply this layout.

Background

RetroArch’s default GBA/NES layout maps the B button to the bottom and the A button to the right, disrupting the original ergonomics and making it less comfortable to hold B while pressing A; moving B from to the physical bottom to the left, and A from the physical right to the bottom face button restores the intended thumb positioning—holding B with the tip while tapping A with the middle—and improves playability. In order to do this the X, and Y buttons also have to be rearranged.

Face button rearrangement:

  • Map physical Top face button → RetroPad Right
  • Map physical Right face button → RetroPad Bottom
  • Map physical Bottom face button → RetroPad Left
  • Map physical Left face button → RetroPad Top

For Nintendo Switch Pro Controller, this means:

  • X → A: Map physical Top face button → RetroPad Right
  • A → B: Map physical Right face button → RetroPad Bottom
  • B → Y: Map physical Bottom face button → RetroPad Left
  • Y → X: Map physical Left face button → RetroPad Top

For Xbox One Controller, this means:

  • Y → B: Map physical Top face button → RetroPad Right
  • B → A: Map physical Right face button → RetroPad Bottom
  • A → X: Map physical Bottom face button → RetroPad Left
  • X → Y: Map physical Left face button → RetroPad Top

Core testing

The FCEUmm core is ideal for layout testing because it only occupies the bottom and right face buttons by default. This simplicity ensures that any clockwise button rearrangement follows strict, easy-to-track logic, since the top and left face buttons start unassigned. In contrast, other NES cores that utilize all face buttons make tracking layout changes much more confusing.

All NES cores

Cores that use only the two original face buttons can be identified by inspecting the video game console specified in their core info files. For example, NES cores include:

  • mesen_libretro.info: display_name = "Nintendo - NES / Famicom (Mesen)"
  • fceumm_libretro.info: display_name = "Nintendo - NES / Famicom (FCEUmm)"

If the display_name begins with "Nintendo - NES / Famicom ", the core should be recognized as an NES core, and a corresponding .rmp file should be generated when the core is loaded.

.rmp content

In .rmp remaps (for example retroarch/config/remaps/Mesen/Mesen.rmp), values are always abstract indices (0-15), remapping logical buttons post-autoconfig—e.g., input_remapping_b_btn = "8" swaps B (0) to A position. These values remain identical across any controller, as they reflect the universal RetroPad standard rather than hardware-specific codes. You should not source values from autoconfig profiles, which handle the initial hardware-to-RetroPad translation.

If the proposed setting is enabled, it could instruct RetroArch to automatically generate a core-specific configuration (.rmp) file alongside the standard options (.opt) file.

Button Label Index Value
B (Down) 0
Y (Left) 1
A (Right) 8
X (Top) 9

.rmp file content to '''Rotate retroPad face buttons 90° clockwise''':

input_player1_btn_a = "9"
input_player2_btn_a = "9"
input_player3_btn_a = "9"
input_player4_btn_a = "9"
input_player5_btn_a = "9"
input_player6_btn_a = "9"
input_player7_btn_a = "9"
input_player8_btn_a = "9"
input_player1_btn_b = "8"
input_player2_btn_b = "8"
input_player3_btn_b = "8"
input_player4_btn_b = "8"
input_player5_btn_b = "8"
input_player6_btn_b = "8"
input_player7_btn_b = "8"
input_player8_btn_b = "8"
input_player1_btn_x = "1"
input_player2_btn_x = "1"
input_player3_btn_x = "1"
input_player4_btn_x = "1"
input_player5_btn_x = "1"
input_player6_btn_x = "1"
input_player7_btn_x = "1"
input_player8_btn_x = "1"
input_player1_btn_y = "0"
input_player2_btn_y = "0"
input_player3_btn_y = "0"
input_player4_btn_y = "0"
input_player5_btn_y = "0"
input_player6_btn_y = "0"
input_player7_btn_y = "0"
input_player8_btn_y = "0"

History and reference layouts

Nintendo groups A and B as primary action buttons, while X and Y serve as secondary ones.

Super Mario series defaults vary by era and title.
Early NES Super Mario Bros. used A for jump and B for run/fire. SNES Super Mario World shifted to B for jump, Y or X for run/spin (Y preferred for ergonomics). Modern 2D titles like Super Mario Bros. Wonder and New Super Mario Bros. U stick with B jump, Y dash/run by default, supporting thumb rolls from rest.

3D Mario games often flip for accessibility.
Super Mario Odyssey and Super Mario 3D World map A to jump, B or X to run/crouch, but offer Y/B swaps matching 2D muscle memory. Players frequently remap to Y run/B jump for comfort.

Thumb ergonomics drives the Y/B preference over alphabetical A/B.
The diamond layout positions Y (Left face button) and B (Bottom face button) for simultaneous tip/joint access during platforming, overriding "primary" labels. Button mapping in Switch settings accommodates both.

Original GBA/NES controller

[B] [A]

In Super Mario Bros.:

  • Left face button: Run.
  • Right face button: Jump.

This layout allow the thumb to comfortably hold the run button with the tip while tapping jump with the middle of the thumb.

SNES / Switch Pro Controller

   [X]
[Y]   [A]
   [B]

Super Mario All-Stars for any title, including Super Mario Bros.:

  • Left face button: Run.
  • Right face button: Jump.

This layout allow the thumb to comfortably hold the run button with the tip while tapping jump with the middle of the thumb.


Retroarch

Current RetroArch layout (SNES cores) (control)

Nintendo Switch Pro Controller used as testing controller.

   [X]
[Y]   [A]
   [B]

Aligns with the SNES / Switch Pro Controller.


Current RetroArch layout (GBA, NES cores) (issue)

Nintendo Switch Pro Controller used as testing controller.

    [TA]
[TB]    [A]
    [B]

TA = Turbo A
TB = Turbo B


Issue

In games like Super Mario Bros.:

  • The run button (Core B) is positioned at the bottom.
  • This makes it awkward to hold B while pressing A to jump.
  • As a result, performing long jumps (run + jump) is less comfortable than on original hardware.

Proposed layout

Nintendo Switch Pro Controller used as testing controller.

   [TB]
[B]    [TA]
   [A]

A = Core Bottom
B = Core Left
TA = Turbo A. Core Right
TB = Turbo B. Core Top


  • The position of the "A" and the "B" face button matches the ergonomic intent of the original GBA/NES controller.
  • Aligns with the position of the face buttons for SNES / modern Nintendo controller layouts.
    • Left face button: Y (not B), which uses the same action as "B" on GBA/NES controller
    • Bottom face button: B (not A), which uses the same action as "A" on GBA/NES controller
Example games:
Super Mario Bros.
  • Core Left to use RetroPad Bottom index: Run
  • Core Bottom to use RetroPad Right index: Jump

Rationale:

  • Improves usability in games requiring simultaneous run + jump input.
  • Reduces thumb strain and awkward finger positioning.
Gun.Smoke

Example: Arcade-style Horizontal Layout (e.g., Gun.Smoke)

  • Core Left to use RetroPad Bottom index: Shoot left
  • Core Bottom to use RetroPad Right index: Shoot right
  • Core Top to use RetroPad Left index: Turbo A (turbo shoot left)
  • Core Down to use RetroPad Bottom index: Turbo B (turbo shoot right)

Rationale: On a diamond-shaped pad, the Top button is physically to the left of the Right button. This creates a natural horizontal axis for games where buttons dictate directional fire.

How to evaluate

  • Install Nestopia: Main Menu → Online Updater → Core Downloader → Nintendo
  • NES / Famicom (Nestopia)
  • Load Super Mario Bros.
  • Complete World 1-1 as quickly as possible (hold run button) using the default controller layout and a standard thumb grip (no claw grip)
  • Remap Port 1 controls (Quick Menu → Controls → Port 1 Controls) so that the left face button is set to Jump and the bottom face button is Run.
  • Complete World 1-1 again with the new layout.
  • Compare both setups and determine which face button configuration feels better.

References

1

The easiest way to confirm that a core successfully rotates RetroPad face buttons 90° clockwise is to run an in-core controller test. However, since the NES version of the 240p Test Suite (Main Menu → Online Updater → Content Downloader → Nintendo - Nintendo Entertainment System → 240p Test Suite.nes) lacks a built-in controller tester.

While the standard face button layout is usually preferred for SNES cores (since they utilize all four face buttons), you can temporarily use an SNES core for this test because its version of the 240p Test Suite includes a dedicated controller input test. Here is how to use it:

  • Main Menu → Online Updater → Core Downloader → Nintendo - SNES / SFC (bsnes)
  • Add this to retroarch/config/remaps/bsnes/bsnes.rmp:
input_player1_btn_a = "9"
input_player1_btn_b = "8"
input_player1_btn_x = "1"
input_player1_btn_y = "0"
  • Go to: Main Menu → Online Updater → Content Downloader → Nintendo - Super Nintendo Entertainment System
  • Download 240pTestSuite-SNES-latest.zip
  • Go to: Main Menu → Load Content → Downloads → 240pSuite.sfc
    • Open it with Nintendo - SNES / SFC (bsnes) if multiple SNES cores are installed
  • Inside the 240p Test Suite menu, select Controller Test.
  • Press the left face button on your physical controller. It should activate the bottom face button on the RetroPad layout, as shown below:
Image * Close RetroArch and delete the retroarch/config/remaps/bsnes/bsnes.rmp file that you created for this temporary test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing generate-remaps-to-rotate-retropad-face-buttons-for-nes-cores.sh and the remap example in retroarch/config/remaps/Mesen/Mesen.rmp. Inspect mesen_libretro.info and fceumm_libretro.info, then trace how RetroArch loads core content and remaps. Done means an optional toggle generates the described core-specific .rmp for NES cores and the behavior can be checked with FCEUmm or the Nestopia Super Mario Bros. procedure.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, c
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.