My controls don’t work in n64 emulator
-
@Dakotadog18 If your PI is networked, then you can access these files over file shares - from a PC - through the
\\retropie\configs
share (similar to how you Transfer ROMs using file shares).
So the N64 configuration folder becomes\\retropie\configs\n64
(instead of/opt/retropie/configs/n64
). -
@mitu Thanks. I will try it. If anything goes wrong, I’ll tell you in this post
-
@mitu I found the file, but I am not sure how and what to edit. There is just a number for each key. What should I edit them to. When I built the pi grrl, there was button numbers when I soldered the button wires to the pcb. Do I put those numbers in? I just don’t know how I should edit this.
-
@mitu Also one more thing I forgot to mention. I don’t have a core. If I need one how do I get get one and which one do I get. So when I assign my buttons, when I hold down on the controller, it shows as keyboard. Every time I input a button, it shows as a keyboard key (example: a = s key) should I use one of those key number value charts to determine what number goes in the controls slot.
-
Can you post the existing configuration file (
inputAutoCfg.ini
) on pastebin.com so we can take a look ? -
@mitu here is the link. Tell me what I should edit. pastebin.com/SbfAwCgt
-
Here is my take on the configuration:
If you look in the
inputAutoCfg.ini
file, you'll see that how the emulator maps a N64 controller inputs (buttons/D-Pad/Joystick) to keycodes (key (X)
,X
is the key code).
The Retrogame Adafruit utility maps a key name to physical inputs (GPIO pins) - the default one for the Pigrrl2 is below (taken from here:LEFT 4 # Joypad left RIGHT 19 # Joypad right UP 16 # Joypad up DOWN 26 # Joypad down LEFTCTRL 14 # 'A' button LEFTALT 15 # 'B' button Z 20 # 'X' button X 18 # 'Y' button SPACE 5 # 'Select' button ENTER 6 # 'Start' button A 12 # Left shoulder button S 13 # Right shoulder button ESC 17 # Exit ROM; PiTFT Button 1 1 22 # PiTFT Button 2 2 23 # PiTFT Button 3 3 27 # PiTFT Button 4
So, for instance, the D-Pad LEFT is declared as
You should look at the the phyiscal buttons mapping above and then add the corresponding keycode to the emulator buttons in the.cfg
file, based on theHow to map keyboard keys to emulator controls is explained in this page. The
.ini
file your posted shows the default keycodes show on the page:A
(key code = 97) is mapped toD Pad L
S
(key code = 115) is mapped toD Pad D
and so forth. The key code are linked from the wiki page - https://www.libsdl.org/release/SDL-1.2.15/include/SDL_keysym.h.
You'd have to check your Retrogame Adafruit configuration file (I think it's in
/etc/retrogame.cfg
), note each of the keys mapped and then add the corresponding codes in theinputAutoCfg.ini
file. -
@mitu so I cannot find the retrogame.cfg file, should I just change the key numbers? Also if I changed for example a to 97, what would the d pad left’s (or whatever dpad control had 97) number in place of that.
-
@Dakotadog18 said in My controls don’t work in n64 emulator:
Also if I changed for example a to 97, what would the d pad left’s (or whatever dpad control had 97) number in place of that.
You'll have to find what the keycode for the
Left
key from the wiki page I linked and it to the.ini
page, replacing the97
with that keycode. -
@mitu do you suggest I just change the numbers to the chart numbers? I don’t know if that solves the whole problem, but I’ve never tried it. Also I can’t find for example “key up” or “key down” on the keycode chart.
-
@Dakotadog18 said in My controls don’t work in n64 emulator:
Also I can’t find for example “key up” or “key down” on the keycode chart.
From the page I linked:
/** @name Arrows + Home/End pad */ /*@{*/ SDLK_UP = 273, SDLK_DOWN = 274, SDLK_RIGHT = 275, SDLK_LEFT = 276, SDLK_INSERT = 277, SDLK_HOME = 278, SDLK_END = 279, SDLK_PAGEUP = 280, SDLK_PAGEDOWN = 281, /*@}*/
-
@mitu ok I think I know what to do. Should I edit the file to the keycodes?
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.