Author Topic: RetroPie  (Read 360 times)

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4472
  • Trogdor!
    • My Funagain Games Wishlist
RetroPie
« on: January 18, 2017, 23:42:37 »
Before Christmas, my wife had mentioned that she had been looking for one of the new Classic NES game systems to get for me, but there weren't any available. She did come across some discussions online that mentioned turning a Raspberry Pi into a little gaming system like that. A couple years ago I had gone to the Hack-a-thon in St. Petersburg to help out with some programming on an open source project when I saw that they had a standing video game arcade cabinet which ran on a Raspberry Pi. So... even though my wife wasn't able to get it for me for Christmas, it was an inspiration to break out some of my old toys.

At first I had tried installing RetroPie over top of my old Raspbian installation for my RPI B+, but that didn't go so well, so I bought a new SD card and was pretty easy to get installed on the RPI 3.

It might be surprising, but I still have my NES from childhood, along with several games - many of the ones that were selected for the NES Classic Edition (2016). I watched a video on YouTube from HouseholdHacker showing a simple mod, and it's a quick little video, less than 3 minutes, which was encouraging for me. I decided that I also wanted to use one of my original NES controllers with my RPI setup and found some other recommendations online to buy the RetroKit from RetroUSB.com, so I ordered it.

After my RetroKit came in the mail, I spent a few hours updating my NES controller. It had been quite a while since I'd done any soldering, so my first attempt back at it was rough and I struggled with it quite a bit. (I really wish I had one of those alligator clip contraptions.) Unfortunately, day one was just for practice... when I was all done, my controller wasn't working.

I went looking for a program that would help test my controller to see if it was a problem on my RPI or if it was other computers too. jscal and jstest seemed to do the trick... My daily PC was able to detect the USB controller was plugged them in, but I wasn't sure what to expect from the program.
Code: [Select]
:~$jscal /dev/input/js0
Joystick has 2 axes and 8 buttons.
Correction for axis 0 is broken line, precision is 0.
Coeficients are: 112, 142, 5534751, 5534751
Correction for axis 1 is broken line, precision is 0.
Coeficients are: 112, 142, 5534751, 5534751


:~$ jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (RetroUSB.com RetroPad) has 2 axes (X, Y)
and 8 buttons (BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect).
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off ^C

At this point, all I knew is that unplugging the USB controller would give "No such device" errors, so at least it was recognizing something. I also went through the Troubleshooting Tips on the RetroUsb site, and sure enough, I had removed some soldering that needed to be there, but it still didn't resolve everything.

Day 2... I removed the wires that I had soldered on the previous day and tried again. My soldering iron wasn't getting very hot before, so I thought it was bad, but I guess it really was just that it wasn't cleaned up. I tried using some thinner solder that I had after cleaning off the end of the soldering iron a bit, and it seemed to do much better this time. I decided to remove all the wires and try soldering from the beginning again.

I put the controller back together and tried again... but no luck. Then I decided to take the back of the controller off and see if I could spot any problems. I used a multimeter to test out the wires that were soldered to the NES controller board and it seemed like things were working. (I'm not very experienced with the multimeter, but was at least able to confirm that I was getting a signal through the soldering jobs that I had done this time.) With the back of the NES controller off, I plugged it into my PC and ran the jstest with the same results as before... Then I tried pressing a button - WOOHOO! The program responded! I tried all the buttons! It worked just fine. So I carefully put the back of the controller back on, hooked it up to my RetroPie, configured the controller settings (with my keyboard still attached to the RPI), and was able to play Super Mario Bros.; It was a great feeling!

My son came into the room at that point, while I was playing SMB, and he was interested in checking it out, so I snapped a photo of him playing the game with my modded controller. So cool!
« Last Edit: January 18, 2017, 23:53:28 by Dragon »
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)