Can't map new HotKeys by modifying retroarch.cfg
-
Hello, the guys over on Reddit can't figure this out so I thought I'd try my friends across the pond! I'm running RetroPie 4.1, on a Raspberry Pi 3.
What I'm trying to do is use a 2-button (A+B) style Nintendo controller with the lr-fceumm (NES) emulator and get some hotkeys working for save and load save. I can’t use the original hotkeys for save/load because those are mapped to shoulder buttons which the Nintendo style controller doesn’t have. I want to ONLY change the hotkeys for NES and not system wide so I’m editing the /opt/retropie/configs/nes/retroarch.cfg file. This isn’t working no matter what I do.
What I tried is basically taking the defauly hotkeys listed in the GitHub here:
https://github.com/retropie/retropie-setup/wiki/retroarch-configuration#default-joypad-hotkeysand I’m switching the ones for save/load (which uses the Select+shoulder buttons my controller doesn’t use), with the default hotkeys for “Input save Slot Increase/Decrease” which uses the Select+left/right buttons my controller DOES have. You can see the original code in the link above, and here’s my new code I put above the #include line like they say to do:
http://pastebin.com/raw/yFhnydWN
(ignore the “video_shader”’s I have setup - that’s totally separate)Any advice on how to get this to work? To complicate matters I started to work on this because I wanted to play Castlevania III, which uses the Select button quite often (unlike most other NES games)….so if anybody knows how to change the Select part of the hotkey fo the Start button (or some other option) that would be great as well. Thank you.
Oh, I will also add (just in case), that the default system-wide retroarch.cfg file (in the "opt/retropie/configs/all" folder) is completely stock except for 1 single line I added to get the analog stick to work as a d-pad (which I hope isn't messing up the above):
input_player1_analog_dpad_mode = "1" -
In case this helps anybody else, here’s the code I used so you can save (and change save slots) with a NES/Nintendo-style 2-button controller. Select+ Left/right loads saves/saves game, and Select+ up/down increases/decreases the save state. You want to go to the “/opt/retropie/configs/all/retroarch-joypads/“ folder and look for a .cfg file which is usually named something relating to your NES-stule controller (mine is named “NESPCGamePad.cfg”).
[code] input_device = " NES PC Game Pad NES PC Game Pad " input_driver = "udev"
input_up_axis = "-1" input_down_axis = "+1" input_left_axis = "-0" input_right_axis = "+0" input_start_btn = "3" input_select_btn = "2" input_a_btn = "0" input_b_btn = "1"
input_enable_hotkey_btn = "2" input_reset_btn = "1" input_exit_emulator_btn = "3"
input_load_state_axis = "-0" input_save_state_axis = "+0" input_state_slot_increase_axis = "-1" input_state_slot_decrease_axis = "+1" [/code] -
input_save_state_btn = "h0right" input_load_state_btn = "h0left" input_state_slot_increase_btn = “5” input_state_slot_decrease_btn = “4”
last two lines have the wrong type of double quote. should be the straight ones:
""
not“”
-
also we can't know if this configuration is correct without seeing the full config file for your nintendo controller found in /opt/retropie/configs/all/retroarch-joypads
-
oh i see you already fixed it :) never mind!
-
@dankcushions said in Can't map new HotKeys by modifying retroarch.cfg:
oh i see you already fixed it :) never mind!
I never changed my post, just copy and pasted my code! I don't even know how to get the slanted quotes!!! lol
Hey, what forum code do you use to get the nice black box to put code in? (so I can start posting all fancy like that in the future ;)
-
@Dochartaigh said in Can't map new HotKeys by modifying retroarch.cfg:
@dankcushions said in Can't map new HotKeys by modifying retroarch.cfg:
oh i see you already fixed it :) never mind!
I never changed my post, just copy and pasted my code! I don't even know how to get the slanted quotes!!! lol
the thing i was quoting was your nes config. if it's still like that you'll want to fix it. if you edit files in some text editor on your computer they can automatically mess up the quotes like that without you doing anything. best to use notepad or something like that, or ideally edit it on the pi directly using nano.
Hey, what forum code do you use to get the nice black box to put code in? (so I can start posting all fancy like that in the future ;)
:D see http://commonmark.org/help/
-
@dankcushions said in Can't map new HotKeys by modifying retroarch.cfg:
the thing i was quoting was your nes config. if it's still like that you'll want to fix it. if you edit files in some text editor on your computer they can automatically mess up the quotes like that without you doing anything. best to use notepad or something like that, or ideally edit it on the pi directly using nano.
I use Adobe Dreamweaver on my Mac to edit code - even the stock text edit program (which is supposed to be TEXT only) sometimes rarely adds little things to code so I prefer to edit it in a program specifically made for editing code (don't like to use the built-in Linux editor, can't even drag and select text and simple tings like that).
And thanks for the Markdown tutorial! Seems to work
-
@Dochartaigh ok so how you do the code block is simple. So paste your info you need in code block. Make sure there is a blank line on top and bottom of the code. On each line (not ones that run over to the next line though) press spacebar 4 times so the line is indented 4 spaces. So here is an example of how you do it:
Code info here would be in code block if i put a blank line between this line and the line above it and indented these two sentences 4 spaces.
You dont put a blank line in between multiple lines of code block.Now if you put four spaces at the beginning of line and a space in between it and normal text it will look like this:
Code info here would be in code block if i put a blank line between this line and the line above it. You dont put a blank line in between multiple lines of code block.
-
@edmaul69 you can just put ``` above and below the block of code - saves having to indent.
-
@BuZz i wish i knew that sooner....😄
-
@edmaul69 at the top right of the box where you edit posts it has a link compose? which opens a popup which links to http://commonmark.org/help/ which has all the info :)
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.