RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Custom Mega-Drive Controls

    Scheduled Pinned Locked Moved Help and Support
    mega drivelibretro
    22 Posts 2 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mituM
      mitu Global Moderator @annomatik
      last edited by

      @annomatik said in Custom Mega-Drive Controls:

      enter Cog Wheels --> Input -> User 1 Binds

      What version of RetroPie/RetroArch are you using ?

      1 Reply Last reply Reply Quote 0
      • A
        annomatik
        last edited by

        RetroPie: 4.5.15 on a Raspberry Pi 3B+ (Raspbian Stretch)
        RetroArch: 1.7.9

        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator
          last edited by

          I don't recall an issue with that particular RetroArch version w.r.t. overrides - try another configuration for the C button, just test it in-game until you find the right combination and then save the input remap.

          1 Reply Last reply Reply Quote 0
          • A
            annomatik
            last edited by

            How would I do that? Is there a certain text file I can edit to accomplish that?

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @annomatik
              last edited by

              @annomatik Just use the same RGUI control menu to change the button/configure the input until it works correctly, then save the core input remap.

              1 Reply Last reply Reply Quote 0
              • A
                annomatik
                last edited by

                Thanks, I seem to be an other step closer to the solution. When I remap "User 1 A" from 3 to 5 in the RetroArch In-Game menu, the control scheme is as I'd like it to be. And now, it kind of makes sense -- the buttons are listed the other way round.

                Controller: A (0) - B (1) - C (5)
                RetroArch: C (0) - B (1) - A (5)

                Next step would be to save this as a PicoDrive core-setting. I tried Quick Menu -> Overrides -> Save Core Overrides, but unfortunatelly, this does not seem to work. There's a toast telling me that the Overrides have been saved successfully. But this is very missleading as it resets the configuration.

                So, when I use "Save Core Overrides", the "C-Button" mapping is gone (reset to "Auto 3"). If I just remap the button, the button works as it should within the current game. But of course, as soon as I go to a different game, I have to remap the button again.

                1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator
                  last edited by mitu

                  @annomatik said in Custom Mega-Drive Controls:

                  Quick Menu -> Overrides -> Save Core Overrides

                  Why ? Did you even look at the doc page I mentioned ? It's not core overrides, it's Save Core Remap File and it's right there in the Controls menu.

                  1 Reply Last reply Reply Quote 0
                  • A
                    annomatik
                    last edited by

                    Well, I don't have that option.

                    What I have is:

                    • Save Core Overrides
                    • Save Content Directory Overrides and
                    • Save Game Overrides

                    from these, "Save Core Overrides" made most sense to me. Where else could I look?

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @annomatik
                      last edited by

                      @annomatik Please re-read and understand what I've said earlier.

                      1 Reply Last reply Reply Quote 0
                      • A
                        annomatik
                        last edited by

                        Thanks, that doesn't seem to work either. Am I doing this right?

                        1. Cogs -> Input -> User 1 Binds -> User 1 A -> Set to "5".
                          Result: Works as it should in current game session

                        2. Quick Menu -> Controls -> Save Core Remap File

                        3. Quick Menu -> Resume
                          Results: Works as it should in current game session (No Reset!)

                        4. Select + Start to exit game

                        5. Start Aladdin again
                          Result: Settings not saved, Shooting Apples with "X" again.

                        So, when I go to Cogs -> Input -> User 1 Binds -> User 1 A, it says "3" again. Not 5.

                        It doesn't save either :-(

                        mituM 1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @annomatik
                          last edited by mitu

                          @annomatik said in Custom Mega-Drive Controls:

                          It doesn't save either :-(

                          Can you check if your remap is saved ? Should be in \\retropie\configs\megadrive (a .rmp file).

                          1 Reply Last reply Reply Quote 0
                          • A
                            annomatik
                            last edited by

                            There is a file in configs/megadrive/PicoDrive, but only there. It's called "PicoDrive.rmp" and contains:

                            input_libretro_device_p1 = "1"
                            input_libretro_device_p2 = "1"
                            input_libretro_device_p3 = "1"
                            input_libretro_device_p4 = "1"
                            input_libretro_device_p5 = "1"
                            input_player1_analog_dpad_mode = "0"
                            input_player2_analog_dpad_mode = "0"
                            input_player3_analog_dpad_mode = "0"
                            input_player4_analog_dpad_mode = "0"
                            input_player5_analog_dpad_mode = "0"

                            ...no Button 5. In /configs/megadrive, I only have emulators.cfg and retroarch.cfg .

                            mituM 1 Reply Last reply Reply Quote 0
                            • mituM
                              mitu Global Moderator @annomatik
                              last edited by

                              @annomatik You should remove any configuration overrides you've saved and re-do the remap. Look into \\retropie\configs\all\retroarch\config\Picodrive and see if you have any .cfg files saved, then delete them.

                              1 Reply Last reply Reply Quote 0
                              • A
                                annomatik
                                last edited by

                                Yes, there was a configuration override in configs/all/retroarch/config/Picodrive , which I've removed now. My megadrive-bezel is gone now, but save of the input config still does not work (even though there's a toast telling me that it saved).

                                1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator
                                  last edited by

                                  Try removing again the .rmp. file and re-save again the controls remap for the core.
                                  If that doesn't work, then post a debug log from RetroArch taken while you re-map the controls. You can enable debug logging from the runcommand launch menu; the resulting log file should be in /dev/shm/runcommand.log - upload it to pastebin.com.

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    annomatik
                                    last edited by

                                    Thanks, still not working. PicoDrive.rmp looks again like before -- the "Button 5 " config is not in there.

                                    Here's the debug-log: https://pastebin.com/LDLXLaEh

                                    1 Reply Last reply Reply Quote 0
                                    • mituM
                                      mitu Global Moderator
                                      last edited by mitu

                                      I don't understand why the remaps are not found, but here's how it works for me.

                                      1. Mapped the M30 controller (Switch mode) normally for ABXY, then chose Z for Left Shoulder and C for Right Shoulder, and the controller L/R shoulder buttons I mapped to the shoulder Trigger buttons.

                                      2. Picodrive starts with this default configuration for P1 (note that on the left there are the physical button names).

                                      picdrove-default.png

                                      1. Remaped Picodrive's P1 to look closer to a 6 button MD controller:

                                      picdrove-remap1.png

                                      After saving the remap for the core, this is the resulting .rmp file:

                                      input_libretro_device_p1 = "1"
                                      input_libretro_device_p2 = "1"
                                      input_libretro_device_p3 = "1"
                                      input_libretro_device_p4 = "1"
                                      input_libretro_device_p5 = "1"
                                      input_player1_analog_dpad_mode = "0"
                                      input_player1_btn_a = "1"
                                      input_player1_btn_l = "0"
                                      input_player1_btn_r = "8"
                                      input_player1_btn_x = "10"
                                      input_player1_btn_y = "9"
                                      input_player2_analog_dpad_mode = "0"
                                      input_player3_analog_dpad_mode = "0"
                                      input_player4_analog_dpad_mode = "0"
                                      input_player5_analog_dpad_mode = "0"
                                      

                                      Now, this should work fine, except that Alladin's default bindings are:

                                      • A - Throw
                                      • B - Sword
                                      • C - Jump

                                      I suppose there's an alternate config in the game's options that makes C as the Throw, so that's why you say it should be used for throwing apples.

                                      My controller .cfg file is here - I labeled the buttons based on the physical named to match the M30's configuration. The Select button is mapped on the left 'Star' button under Start.

                                      You can use the controller .cfg and then try the .rmp file I posted, checking in RGUI how it's mapped from the M30 buttons to the MD controls.

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        annomatik
                                        last edited by

                                        Ok thanks, kind of confusing, many layers of abstraction :-)

                                        I tried some things. I added the input_player1_btn_a = "5" to the remap file. And then, Aladdin would duck instead of jump. So this assigns "down" to "physical button b" (in my case). After some trial and error, I found this mapping:

                                        target "5" --> "down"

                                        input_player1_btn_a --> physical button "B"
                                        input_player1_btn_b --> physical button "A"
                                        input_player1_btn_x --> physical button "Y"
                                        input_player1_btn_y --> physical button "X"

                                        So... I might have found a bug or maybe that's just the way it is. Apparently, RetroArch is only able to configure things in the remap , if they exist in the controller config? In other words "if the button 5 is not configured in the config, it will be only available in the current session, but not for the remap file"?

                                        For me, the solution is now -- I'm mapping "Z" to "L2" and "C" to "R2", so the shoulder buttons are shoulder buttons, and I have Z as well as C available, too.

                                        In the config, I added

                                        input_l2_btn = "4"
                                        input_down_axis_label = "Z Button"
                                        input_r2_btn = "5"
                                        input_down_axis_label = "C Button"

                                        ...which means, that I now can access the Z and C buttons as L2 and R2 (C = input_player1_btn_r2).

                                        the "number keys" for the remap are (in my case), different than the ones in the config / used in the gui:

                                        0 = sword
                                        1 = throw
                                        2 = no action
                                        3 = start
                                        4 = up
                                        5 = down
                                        6 = go left
                                        7 = go right
                                        8 = jump
                                        9, 10 and higher = no action

                                        And thus, in the core remap, I added

                                        input_player1_btn_y = "10"
                                        input_player1_btn_r2 = "1"

                                        (button X = no action, button C = throw)

                                        And now, everything works as it should.

                                        Thanks for your patience & support!

                                        mituM 1 Reply Last reply Reply Quote 0
                                        • mituM
                                          mitu Global Moderator @annomatik
                                          last edited by mitu

                                          @annomatik said in Custom Mega-Drive Controls:

                                          So... I might have found a bug or maybe that's just the way it is. Apparently, RetroArch is only able to configure things in the remap , if they exist in the controller config? In other words "if the button 5 is not configured in the config, it will be only available in the current session, but not for the remap file"?

                                          Kind of. It's not really button 5, but button who' s input code is 5. If the input code is not mapped to one of the RetroPad's buttons, then it's not available for remap.

                                          If you modify your controller's .cfg file and add labels to the buttons (like I did), then you'll get rid of input codes and just see the button names in the control mapping menu - makes it easier to see which is which.

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.