01/16/2016 at 04:48 #114079
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.
Kberr01/18/2016 at 14:09 #114254
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).
-Craig01/18/2016 at 19:37 #114283
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-bert01/18/2016 at 19:41 #114286
I just tried rebooting my pi with the keyboard disconnected. The NES pad is now js0, but still doesn’t work in the games.01/18/2016 at 19:49 #114287
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-bert01/18/2016 at 19:49 #114288
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.01/18/2016 at 20:01 #114289
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…01/18/2016 at 20:06 #114290
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.cfg01/18/2016 at 20:12 #11429301/18/2016 at 20:39 #114297
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-bert01/18/2016 at 20:48 #114299
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….01/18/2016 at 20:58 #114300
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.01/18/2016 at 21:00 #114301
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-bert01/18/2016 at 21:22 #114306
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?)01/18/2016 at 21:38 #114309
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-bert01/18/2016 at 21:50 #114310
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.01/18/2016 at 21:52 #114311
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-berg01/18/2016 at 22:16 #11431401/19/2016 at 03:14 #114340
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-bert01/19/2016 at 17:35 #11439301/19/2016 at 18:20 #114405
You could always look at PetRockBlock’s controlblock01/19/2016 at 20:25 #114429
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?01/19/2016 at 21:33 #114434
If you think its a bug I’d post it on github. I don’t have any experience with gpio or those drivers but that would be the place for discussion on solutions.01/19/2016 at 22:03 #114441
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.
Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/