k-bertParticipant01/16/2016 at 04:48Post count: 21
I received anothe Raspberry Pi 2 for Christmas and decided to make it a NES only emulator. I have a dead NES I will eventually put ut in.
I installed the latest version of retropie and have things up and running with a usb keyboard. I then installed gamecon_gpio_rpi through the setup menu and let it set itself up for SNES.
I then wired a NES controller up to the GPIO.
Back in emulation station it told me that it detected two gamepads. I held a button on the NES controller and went through all the button mapping. It then worked great for getting around in emulation station.
I then launched an NES game and the controller didnt do anything. Keyboard still works. If I exit the game the controller works again.
Trying again I noticed that it says that SNES controllers are configured on ports 0 and 1 in the bottom left when the game starts. Thinking that this is the 0 and 1 that the raspberry pi 2 doesnt use in the read me I tried remapping as per the readme, but that didnt change anything.
Kberrw3aceParticipant01/18/2016 at 14:09Post count: 8
The gamecon_gpio_rpi script will install SNES controllers by default.
Check your /etc/modules files. It probably reads:
Change the ones to twos (NES).
-Craigk-bertParticipant01/18/2016 at 19:37Post count: 21
Thank you for the reply Craig.
You were right I did have 0,0,1,0,0,1 in the map.
I did as you suggested and then remapped the controller as a NES controller in emulation station. Unfortunately I still have the same problem: The controller works in emulation station but not the games. Now it recognizes a NES controller on port 0 and on port 1 according to the dialogue on the bottom left when I start a game, but no button inputs are working.
Checking the js in /dev/input/ I have found that js1 is the controller I have plugged in and js0 is the keyboard. js2 is recognized as another NES controller but I don’t have one hooked up yet.
Do I need to somehow get the NES controller to be js0?
K-bertk-bertParticipant01/18/2016 at 19:41Post count: 21
I just tried rebooting my pi with the keyboard disconnected. The NES pad is now js0, but still doesn’t work in the games.k-bertParticipant01/18/2016 at 19:49Post count: 21
And through further experimentation I have found that the keyboard is controller on (even though it is listed as js2) and the NES controller is working as controller 2! So it is working, it’s just registered wrong somehow.
How can I change it?
K-bertw3aceParticipant01/18/2016 at 19:49Post count: 8
Did you by any chance install SNESdev from the retropie_setup menu? I had troubles with GPIO when I installed that by mistake. If you did, you may want to start over with a fresh image.k-bertParticipant01/18/2016 at 20:01Post count: 21
I did not install SNESdev. If you think a new image would help I could try all over again. I do have the NES controller working as player two, I feel I am so close now…w3aceParticipant01/18/2016 at 20:06Post count: 8
Two places to look that could get you working:
Get rid of SNES here:
Look here: I think I’ve seen people recommend removing this file and letting emulationstation rebuild (but look inside first)
Caution: but maybe something here.
/opt/retropie/configs/all/retroarch.cfgherbfargusMember01/18/2016 at 20:12Post count: 1858k-bertParticipant01/18/2016 at 20:39Post count: 21
I got rid of the SNES as you suggested. I then removed the config file again as you suggested. I rebooted again with the keyboard disconnected again and when emulation station fired up it right away stated that two controllers were detected. I mapped the NES controller an I am still in the same situation (controller works in ES but not in the games).
By the way the config file now looks like this:
<inputConfig type=”joystick” deviceName=”NES pad” deviceGUID=”150000000$
<input name=”a” type=”button” id=”0″ value=”1″ />
<input name=”b” type=”button” id=”1″ value=”1″ />
<input name=”down” type=”axis” id=”1″ value=”1″ />
<input name=”left” type=”axis” id=”0″ value=”-1″ />
<input name=”right” type=”axis” id=”0″ value=”1″ />
<input name=”select” type=”button” id=”2″ value=”1″ />
<input name=”start” type=”button” id=”3″ value=”1″ />
<input name=”up” type=”axis” id=”1″ value=”-1″ />
I am trying to avoid connecting the keyboard so I used putty to reset the pi so I don’t need to use the keyboard to exit the game.
I did a little more testing and I can’t get the NES to map to a second controller. I tried various GPIO pins, but it only seems to like GPIO4.
I did try to change the retroarch.cfg file to state that the first controller is 1 instead of 0, but again no change.
Thanks for the help, I might be getting close to starting from scratch again…
K-bertk-bertParticipant01/18/2016 at 20:48Post count: 21
Tried another test:
Changed the gamecon map to 0,0,2,0,0,0
Now when a game starts it does say NES controller on port 0.
Still not being used as controller 1 though.
I’m thoroughly confused….w3aceParticipant01/18/2016 at 20:58Post count: 8
I would start over if I was you.
1. Install Image.
2. raspi-config -> expand image
4. retropie_setup -> configure wifi
5. gamecon setup … DO NOT let it configure for SNES.
6. Add a line to
That works for me.k-bertParticipant01/18/2016 at 21:00Post count: 21
Thank you, I will give it a try and report back (might be tomorrow).
I’m not using wifi though, just a wired connection.
K-bertherbfargusMember01/18/2016 at 21:22Post count: 1858
I’ve never used gpio pins (yet) for a controller. Would it make sense to have different profiles on the setup script (like one for SNES and one for NES etc?)k-bertParticipant01/18/2016 at 21:38Post count: 21
Guess I had more time than I thought…
Now able to play games with NES controller connected to GPIO. Well at least a game (only had one loaded).
Thank you very much!
Now I just need to go dig out another controller and mount my pi inside my dead NES.
K-bertw3aceParticipant01/18/2016 at 21:50Post count: 8
It would be great if the gamecon script had an option to setup for whatever controller you are using. However some of it is now not necessary because of the way emulationstation configures your joypads on startup.k-bertParticipant01/18/2016 at 21:52Post count: 21
Sorry I didn’t see your post until after I posted my last one.
I am just using my pi for NES, nothing else. And I am mounting it in my dead NES with the goal of having it look and behave as close to an actual NES as possible.
As for your questions I’m not sure. Yes there is the nostalgia factor with using actual NES controller for a NES game, but the SNES also has all the buttons the NES would need. If I were to use my pi for NES and SNES I would just use the SNES controllers all the time (they are more comfortable after all).
According to the readme for the gamecon up to four controllers of mixed types can be used, so two NES and two SNES could be connected at all times and you can use either depending on what you are playing.
If I were building a multi platform emulator I would probably use PS3 controllers for everything but the N64 (I’m talking anything pre-Xbox or PS3), just because the N64 is a bit of a weird one. Also using PS3 would have sidestepped all of the headaches I just had trying to get this NES controller to work.
K-bergw3aceParticipant01/18/2016 at 22:16Post count: 8k-bertParticipant01/19/2016 at 03:14Post count: 21
I have not until now. That is pretty impressive, a NES anywhere there is a screen and power. How much deeper is the controller with that printed back? I’m kind of embarrassed now, I’m just going to build a mounting plate and a circuit board for controller break outs and a power supply. It won’t even compare to what you made.
I’m going to try and wire up a second controller in the next few days. If I’m reading the readme right I can use all the same connections except for the data pin which I can put on GPIO7 and then map the gamecon as 0,0,1,1,0,0. Sound right to you?
The problem with getting the controller working is now I’m spending time playing games instead of working on the project.
K-bertk-bertParticipant01/19/2016 at 17:35Post count: 21
Thanks again for your help, just wanted to report that I now happily have two controllers working with my raspberry. I did use GPIO7 and mapped the gamecon as 0,0,2,2,0,0.
Right now its just wires jammed into the controller plugs, something more permanent will come later.
K-bergherbfargusMember01/19/2016 at 18:20Post count: 1858
You could always look at PetRockBlock’s controlblockw3aceParticipant01/19/2016 at 20:25Post count: 8
Nice job k-bert, I thought I read somewhere that you couldn’t double up on the power and gnd without risking the controller circuitry. Looks like you’ve got it working, and playing the games is the biggest risk/reward to getting projects done in retro gaming.
herbfargus, I made another post in this section of the forum about some experimentation with Jessie (BETA) and my issues with gamecon not loading on boot, do you know who might be working on getting Jessie out of beta, should I post my results to github or somewhere else?herbfargusMember01/19/2016 at 21:33Post count: 1858k-bertParticipant01/19/2016 at 22:03Post count: 21
herbfargus: I was looking at the control block, but when I did it was temporarily out of stock. It also has a lot of functionality that I will never use with my NES only system. Besides, I have lots of electronic components on hand to build my own power control circuit and I want to be able to say that I built it myself (even though all the coding is already available).
w3ace: I haven’t seen anything written about risk of damage. I checked through the gamecon readme and the only mention I have found is that the raspberry can supply enough current to run four controllers. That’s two more than I will ever use. The circuitry is just a CMOS parallel to serial shift register which isn’t particularly fragile.
- The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.