-
1Step 1
Step 1: Disassemble and strip stuff down
Remove three screws from the back and gently prise open the case. Then remove the one screw holding the PCB and remove all the controller buttons. Keep it all in a bag somewhere as the screws are small and easy to lose!
Using a dremel and a set of files, remove material internal pillars and flanges as shown in the images.
Remove the power micro-usb from the Pi zero, I also removed the camera connector to save me having any issues with it later.
From the power boost I had to remove the LED labelled PWR, this was to make it fit in the case and I might relocate to the 5mm case LED. Alternatively route a micro USB cable through the existing case cable mount and drop the case LED completely, this would save creating a separate power opening later.
-
2Step 2
Step 2: Add mounting bits
The pit sits on the base of the controller, so material is removed from one side of the clam-shell only (see photos).
The PowerBooster sits next to the Pi, and needs a spacer (a couple of m2 nuts and a push button worked for me) to mount it at a nice level. File back a slot in the other side of the pi case (no picture for this one I'm afraid).
Apply a chamfer to the ports, so they 'open up' as they go into the case - this will make it easier to locate the hardware and helps with the flanges on the micro-usb port.
Solder wires from the PowerBoost output directly to the Pi GPIO 5V and ground pins; don't bother with the included bulky USB or terminal block.
The push button is soldered to the reset pin of the Pi (to be used in emergencies) while the small switch can be mounted to fully power on/off the Pi zero - remember to shutdown where possible to avoid SD card corruption.
The LiPo sits in the other shell piece of the controller. It's a snug fit (tucked under the controller PCB) so make sure you have removed all traces of the internal structure it would clash with.
-
3Step 3
Step 3: Assemble and test
Taking the PCB check the traces match up to the colours below and then solder directly to the Pi. Add a blob of hot glue to act as strain relief on the wires once you have checked it all works.
NES Pin Wire Colour Signal GPIO 1 White Ground Any GND 2 Blue Clock GPIO10 3 Yellow Latch GPIO11 4 Brown Data GPIO2,3,4 or 7 7 Red +V +3V3 (NOT +5V) Plug the LiPo in, and tape all wires safely in place with electrical tape.
Reinstall the controller buttons and screw the controller PCB back in place, ensuring that it sits true.
Clip the two halves together, you may need to make some adjustments to make sure no wires are trapped and the case closes without bulging. Reinstall the screws (you can drill out and use some of the unused ones if you want) and the hardware mods are done!
-
4Step 4
Step 4: Software Setup
Boot into RetroPie and then got the settings, make sure it is up to date with the latest version. Enable the gamecon driver and snes controllers, and then goto the shell and make sure that:
- sudo nano /etc/modules
- Add a line at the bottom: gamecon_gpio_rpi
- save and exit
- sudo nano /etc/modprobe.d/gamecon.conf
- options gamecon_gpio_rpi map=0,0,0,0,0,0
- depending on which GPIO you wired the Data to, replace on the of the last four zeros in the command above with a 2 (#4,#7,#2,#3) i.e. if you wired to GPIO7 its map=0,0,0,2,0,0
Reboot and emulationstation should get you to configure the controller. If it doesn't work double check the GPIO pin you wired up and the mapping.
I had some issue where the controller would work in emulationstation (the auto-boot front-end in RetroPie) but not in the NES emulator. I ended up manually editing the player 1 controls in retroarch.cfg file in the /opt/retropie/config/nes as follows:
- input_player1_a_btn = "0"
- input_player1_b_btn = "1"
- input_player1_select_btn = "2"
- input_player1_start_btn = "3"
- input_player1_up_axis = "-1"
- input_player1_down_axis = "+1"
- input_player1_left_axis = "-0"
- input_player1_right_axis = "+0"
To be able to get back to the root menu when playing by pressing start and select together, setup:
- input_enable_hotkey_btn = "2"
- input_exit_emulator_btn = "3"
To make it play only NES games (and hide the other eumlators), move all folders but nes from /home/pi/RetroArch/roms to a /unused subdirectory.
-
5Step 5
Step 5: Play!
Power to the USB power port, micro HDMI to HDMI cable for the display and you are off. The battery helps if the power USB gets pulled out, and provides XX hours of Mario before flashing the warning lights. Extra peripherals can be added via the exposed USB port of the PI, though use a powered hub if you use high-drain devices as otherwise it will drain the battery even when plugged in.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.