Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #114079
    k-bert
    Participant

    Hi,

    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.

    Any advice?

    Thanks,
    Kberr

    #114254
    w3ace
    Participant

    The gamecon_gpio_rpi script will install SNES controllers by default.

    Check your /etc/modules files. It probably reads:

    gamecon_gpio_rpi map=0,0,1,0,0,1

    Change the ones to twos (NES).

    -Craig

    #114283
    k-bert
    Participant

    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?

    Thanks again!

    K-bert

    #114286
    k-bert
    Participant

    I just tried rebooting my pi with the keyboard disconnected. The NES pad is now js0, but still doesn’t work in the games.

    #114287
    k-bert
    Participant

    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?

    Cheers,
    K-bert

    #114288
    w3ace
    Participant

    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.

    #114289
    k-bert
    Participant

    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…

    #114290
    w3ace
    Participant

    Two places to look that could get you working:

    Get rid of SNES here:
    /opt/retropie/configs/all/retroarch-joypads/

    Look here: I think I’ve seen people recommend removing this file and letting emulationstation rebuild (but look inside first)
    ~/.emulationstation/es_input.cfg

    Caution: but maybe something here.
    /opt/retropie/configs/all/retroarch.cfg

    #114293
    herbfargus
    Member
    #114297
    k-bert
    Participant

    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:

    <?xml version=”1.0″?>
    <inputList>
    <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″ />
    </inputConfig>
    </inputList>

    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…

    Cheers,
    K-bert

    #114299
    k-bert
    Participant

    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….

    #114300
    w3ace
    Participant

    I would start over if I was you.

    1. Install Image.
    2. raspi-config -> expand image
    3. reboot
    4. retropie_setup -> configure wifi
    5. gamecon setup … DO NOT let it configure for SNES.
    6. Add a line to /etc/modules -> gamecon_gpio_rpi map=0,0,2,0,0,0

    That works for me.

    #114301
    k-bert
    Participant

    Thank you, I will give it a try and report back (might be tomorrow).

    I’m not using wifi though, just a wired connection.

    Cheers,
    K-bert

    #114306
    herbfargus
    Member

    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?)

    #114309
    k-bert
    Participant

    Guess I had more time than I thought…

    RESULT!

    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.

    Thanks again!

    K-bert

    #114310
    w3ace
    Participant

    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.

    #114311
    k-bert
    Participant

    Hey Herbfargus,

    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.

    Cheers,
    K-berg

    #114314
    w3ace
    Participant

    k-bert, have you see this? My NES Pi Zero.

    #114340
    k-bert
    Participant

    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.

    Cheer,
    K-bert

    #114393
    k-bert
    Participant

    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.

    [URL=http://s150.photobucket.com/user/Berg9987/media/NESMESS_zps4kh33o7q.jpg.html][IMG]http://i150.photobucket.com/albums/s117/Berg9987/NESMESS_zps4kh33o7q.jpg[/IMG][/URL]

    Cheers,
    K-berg

    #114405
    herbfargus
    Member

    You could always look at PetRockBlock’s controlblock

    #114429
    w3ace
    Participant

    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?

    #114434
    herbfargus
    Member

    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.

    https://github.com/RetroPie/RetroPie-Setup/issues

    #114441
    k-bert
    Participant

    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.

    Cheers,
    K-bert

Viewing 24 posts - 1 through 24 (of 24 total)
  • The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.