Introduction: RetroPie Megadrive (Genesis)
Being fond of retro consoles from the 1990s and also being a big fan of the RetroPi project (http://retropie.org.uk), I'd been toying with the idea of combining a Raspberry Pi with an old console enclosure to come up with a modern twist on the old style. By far my favourite old console is the Sega Megadrive (or the Genesis as it was known in the United States) and after coming across a ‘for spares’ Megadrive II on Ebay, I decided it was time to give it a go. I've seen a few other console enclosures fitted with a Rpi but not a Megadrive.
Step 1: Stuff You Will Need....
The shopping list.... Initially I thought this would be relatively small however as I went through the project I found I was tweaking and adding various things to improve the final version. Ebay is a great source for inexpensive electronics components and old consoles.
Faulty Megadrive II …. or any other console you fancy! (£10 From Ebay)
Raspberry Pi. I used a Model 3 to make the most of the extra power. (£33 From Amazon)
PiSupply Kit (http://tinyurl.com/nbmvxvx) (£12 From Amazon)
USB Wireless Game Controllers (http://amzn.eu/6N10Apb) (£25 From Amazon)
USB Extension Cable (50cm or less) (£2 From Ebay)
HDMI Extension Cable (20cm) (£3 From Ebay)
Micro USB Male to Female (20cm) (£2 From Ebay)
Small Momentary Pushbutton Swtiches (x3) (£1 From Ebay)
Jumper Cables with female ‘Dupont’ connectors on one end (doesn’t matter about the other end) (£2 Ebay)
LED (3.3v) (£1 From Ebay)
300ohm Resistor (£1 From Ebay)
Heatshrink (£1 From Ebay)
Nylon Standoffs, Nuts and Screws (3mm Thead) (£1 From Ebay)
Sharp Knife or Scalpal
Soldering Iron, Helping Hands, Solder etc
Hot Glue Gun + Glue Sticks
Sugru Mouldable Glue (Black)
Flat Nose Pliers
Drill + 3.5mm drill bit
Dremil + cutting wheel (optional!)
Step 2: Dismantling & Modding the Case
Turn over the Megadrive II (MD2) case, locate and remove the four screws that hold the case together and then the top half should easily come away. Once you’ve removed it (store it somewhere safe until later) you will see the mainboard is shielded with some thin steal.... be really careful handling this as the edges are rough and sharp. The top section of shielding is secured with several small screws, remove these and lift the shield off disposing of it carefully. Now you need to unscrew the the mainboard from the case and once removed, again it can be disposed of carefully. You should now have a naked case all ready to be modded.
How you carry out the next bit really depends on where and how you want the connectors to be located. There are a couple of things to bare in mind though; You need to consider that on the top of the case there is a large piece of plastic which originally supported the ROM cart. This takes up quite a lot of room inside the case and can be removed, however the little flaps that cover the ROM slot are part of that assembly and if you want to retain the flaps you need to leave that piece attached, however you can 'modify' it to reduce it's depth. Once you’ve decided where you’d like the connectors to go, mark the cuts on the case and use the junior hacksaw to make small vertical cuts, use the sharp knife to score the horizontal cut and then the pliers to gently bend the plastic to remove the piece of plastic. Repeat this for all of the connector locations. If you want you can utilise the existing holes in the case where the old connectors were. There are two at the front for the controllers and two round holes at the rear where the power and video out were. In the beginning I decided to go ‘wireless’ with the controllers and therefore wouldn’t need to include a USB port, however In the end I decided to include one just in case I needed to attach a keyboard for debugging / maintenance etc. I cut two openings, one for the USB, the other for the HDMI and I used one of the existing holes in the rear for the Micro USB. Filling any space around connectors can be done using Sugru (https://www.sugru.com). If you've not come across this stuff, it comes in the form of a coloured putty. You can mount it and shape it to whatever you want; it will bond to plastics and metals alike. It's party trick is that after 24 hours, it changes from a malleable putty into felxible rubber. It has almost unlimited uses.... but in this case, it's perfect for filling any holes around connectors in the case.
While you are cutting the case there are some posts which should be removed to make more space and also there is a large section of plastic which sat underneath the ROM slot. The easiest way to remove this is with some flat nosed pliers. Grasp a little section and gently, but firmly, twist and you’ll find the plastic snaps away easily. After a couple of minutes of 'nibbling' you'll find you have a reasonably flat base to work with. Finally you will need to drill a few holes so you can mount the Raspberry Pi securely to the base. Again, where you mount it is up to you however you need to take into consideration that large bit of plastic on the top half of the case and also clearance required for connecting the extensions to the RPi.
I decided to mount mine on the right hand side therefore leaving plenty of space for cables and connectors as well as the PiSupply assembly. Use the RPi to guide where the holes should be marked and drill using a 3.5mm bit. While you've got a drill in your hand, stick a hole in the rear of the case on the left hand side. This will be used to access a ‘hard’ reset switch so you can reboot your RPi should it hang.
Step 3: Mounting the Raspberry Pi
I decided to mount the PI on small nylon standoffs (5mm) to allow airflow all around the board. Although it doesn’t kick out masses of heat, I felt that as it was going to be enclosed it would possibly build up a bit of heat with heavy usage. I did consider maybe fitting a small 50mm fan however decided this was probably overkill so to help disperse the heat from the Pi itself, I fitted it with some little heat-sinks which I found on Ebay. I have used 5mm standoffs with a 3mm thread on one end.
Step 4: Mounting the Connectors
There are two options for mounting the connectors…. hot glue or epoxy. I chose to go down the epoxy route as I thought that the connectors would potentially have extra stresses caused by the plugging and unplugging of the HDMI and power connectors and I felt that hot glue wouldn’t probably stand up to it as well as epoxy. I used the hot glue gun to make little ‘platforms’ for the connectors to sit on and let that solidify before using epoxy to cement the connectors in position. As you can see from the photo…. I used a lot…. just to make sure.
A little word of warning at this point: Let it cure completely before trying to attach the various plugs. The first time I did it, I only gave it a couple of hours before pushing in an HDMI cable (just to make sure it sat ok) and when removing it, the whole thing just gave way and I had to spend 30 mins cleaning the whole thing up ready to do it again. The longer you leave it the stronger the epoxy will get.
Step 5: Some Light Relief…..
Time for one of my favourite things….. soldering! I love soldering and after Santa recently bringing me a lovely new soldering iron, I was looking forward to this bit. So a few things that needed to be soldered, the main one being the PiSupply switch which handles the safe powering up and down of the RPi and also three small pushbutton switches to be used to control the PiSupply and an LED.
Using a RPi has one big downside: It’s not recommended to just pull the power on it and it should be shutdown properly. I wasn’t planning on having a keyboard constantly connected to my console so this wasn’t got to be easy to do. The EmulationStation software allows you to perform a shutdown however what I really wanted was to just press a button, just as on the original console. After lots of digging I camne across the PiSupply (http://tinyurl.com/nbmvxvx) switch; a clever little circuit which can ‘talk’ to the RPi, tell it to shutdown and sense when that has happened. This allows it to then kill the power (using a little relay to break the circuit). Clever, simple and cheap. The switch comes as a kit: board, components (about 16), switches and leads and is a nice little 30 minute soldering job (http://tinyurl.com/hahgkrc).
I had to make a couple of small modifications to the switch for it to work with my project:
- The first was to install ‘header pins’ rather than the USB socket they’d included. This is actually recommended by the designers themselves when using with the RPi v3 as they had seen issues with using a normal USB cable and undervoltage issues. The fix is to connect the PiSupply directly to the GPIO on the RPi.. so using Dupont connectors is an easy way to achieve this.
- Rather than fitting the included tactile switches to the PiSupply, again I installed header pins so that I could move the switches elsewhere in the case and connect them to the PiSupply.
- A potential extra mod would be to install header pins in place of the LED to allow that to be relocated too. I’ve yet to do this although I am planning on it.
The other thing that had to be made up were some flying leads. Three switches and an LED. Nice and simple! The switches are the momentary pushbutton type and have two wires connected which end in Dupont conenctors. All three are the same. Their soul job is to connect to the header pins on the PiSupply and supply the startup / shutdown / reset signals needed. The LED is again soldered to leads with Dupont connectors with the 330ohm resistor soldered inline to the negative leg (the shorter of the two). All soldered connections are protected with heat-shrink.
Step 6: Attaching the Switches
This step had been haunting me since I started the project…. I'd spent a lot of time trying to think of the best way I could use the existing ‘red’ switches to control the RPi. In my mind I had lots of different ideas on how to mount the switches to the case but in the end, the solution was simple. I actually used a top from a pen, pushed the switch snugly into it and then glued the pen top to the case using hot glue. It wasn't the most elegant of solutions however it allowed me to mount the switches in perfect positions so I could use the original red switches and make it look almost the same as it did before I tinkered with it. While you’ve got the hot glue out, attach the LED to the cloudy white part between the two switches and also glue the third switch toward the rear left of the case in front of where you drilled that extra hole. I found that building up a little ‘bed’ of glue first made this easier.
I had to remove the locking tabs from each of the red switches, applied a little dot of hot glue in the centre of the button at the back and pressed it firmly into place on the switch cap. The result looked the same as the original.
Step 7: Installing RetroPie
That’s about it for the actual build. There isn’t much else you can do apart from assemble it. However before you do that, you’ll need to install the RetroPie image on the card and get it up and running.
First you need to acquire the RetroPi image from https://retropie.org.uk/download/. It’s a rather chunky 600MB so make take some time on a slow link. Make sure you get the right version for your RPi and install it to the microSD card as per the instructions (http://tinyurl.com/hlv44k4) and finally insert the microSD into the RPi.
Step 8: Hooking It All Up
Now it's time to connect up your RPi and do the initial configuration. During this phase of installation I plugged the power supply directly into the RPi bypassing the PiSupply as it won’t work properly until you have the RPi configured. Also make sure you have plugged in the two receivers for the gamepads. I actually removed the receiver boards from the bulky plastic housing before installing them. Just prise the housing with a small screwdriver and the two halves with just pop apart. Also plug in a keyboard as you’ll need it to setup the PiSupply.
The PiSupply itself is pretty straight forward to connect. Firstly you need to connect the positive and negative supply from the PiSupply to the GPIO on the RPi. The correct pin arrangement can be seen in the photo. You also need to connect the 'signal' wires from the PiSupply to the RPi. Again, please refer to the photograph.
Step 9: The Power Up
Turn on the RPi and finish the RetroPie installation. I’m not going to cover this as the instructions (http://www.tinyurl.com/hlv44k4) supplied by RetroPie are so easy to follow, there’s no point in duplicating things. Once you’ve got RetroPie up and running, gamepads configured, connected to Wifi and some of your favourite ROMS copied over (all covered in those instructions), you can finally configure the PiSupply. As I mentioned earlier, the PiSupply both talks and listens to the RPi so you need to install a preconfigured script to deal with the chat between the two devices.
The easiest way to install this is to navigate to 'Quit' in Emustation which will return you to a command prompt. Then follow step 2 from this page http://tinyurl.com/hdlnydv which will install the script and configure the RPi to run it at startup. It’s that simple! Ensure that the PiSupply and the RPi are connected as described in the assembly guide (http://tinyurl.com/hahgkrc) then connect the switch flying leads to the appropriate pins on the PiSupply board. I linked the ‘Power’ switch to the ‘On’ pins, the ‘Reset’ switch to the ‘Soft Reset’ pins and the ‘hidden’ switch at the rear to the ‘Off’ pins. You may need to fiddle with which pins you connect it to, to make it work (it should be one of the left, one on the right of each pair). Finally plug the power into the PiSupply and you are ready for your first power on test. Press the ‘Power’ button and you should hear a little click as the relay energises and the RPi springs into life. Let it boot and get to the Emustation selection screen. Once it’s stable, briefly press the ‘Reset’ button and after a couple of seconds, the screen should go black and the RPi will power down. If it fails to do this, you should check which pins you’ve connected on the ‘Soft Reset’, swap them and try again. If nothing works, hit the ‘hidden button’ at the rear and it will just shutdown instantly. If none of these work… you may want to check your soldering!
Step 10: And Finally.....
Once you’re happy that everything is working, fit the top of the case on properly and replace the four screws.
That’s it! One Raspberry flavoured Retro Console.
Happy 16-bit gaming.