Components
Repository: https://github.com/AP-AAiS/MahPicoBoi
For those interested, PCBs and pre-assembled kits can be bought over on my e-bay page: https://www.ebay.de/itm/315250373588
Building your own MahPicoBoi is a fast, cheap, and easy affair. In its most basic form, all you’ll need is a pair of scissors, a knife, a soldering iron and the following set of components:
Amount | Component |
1x | Game Boy variant other than the Game Boy Micro* |
1x | MIDI-Source (Keyboard, Synth, PC, …) |
1x | Game Boy (NOT GBA!) FlashCart with mGB or LSDJ** |
1x | Raspberry Pi Pico |
1x | Micro USB Cable |
1x | H11L1 or 6n 138 Optocoupler |
1x | 220 Ω Resistor |
1x | 470 Ω Resistor |
1x | 1n914 or 1n4148 Diode |
1x | MIDI Cable / USB MIDI Cable |
1x – 2x | 5 Pin MIDI Connector*** |
1x | Set of Jumper Wires |
1x | Game Boy or Game Boy Pocket Game Link Cable |
3 – 4x | Male Dupont Connectors or Luster Terminals or Similar |
1x | Breadboard |
1x | Set of Raspberry Pi Pico Pin Headers |
0x – 1x | 10 Ω Resistor*** |
0x – 1x | 33 Ω Resistor*** |
*GB Micro is not supported, since neither mGB nor LSDJ work with it.
**While you can run mGB and LSDJ on a GBA flashcart, you’ll need an original GB / GBC flashcart to be able to access the GBA’s GBP Link Port.
***If you don’t care about the MIDI-OUT capabilities of your MahPicoBoi, you can get away with only using one MIDI port. In that case, you also won’t need the 10 Ω and 33 Ω resistors.
The Circuit
With these components at hand, you can build your very own MahPicoBoi circuit. The wiring of our final circuit would look something like this:
And put on your breadboard, the end result should look something like this:
(Do keep in mind that the above illustration shows the MIDI jacks pointed in the wrong direction. In our final circuit, their front sides will be facing towards the upper end of the board!)
Build Instructions
The following step-by-step guide will walk you through the entire build:
Step 1: Solder the pin headers to your Raspberry Pi Pico.
Note: If you can get your hands on a Pico with pre-soldered header pins, you can skip this step and the otherwise necessary usage of a soldering iron entirely.
The pin headers will allow the pins of our Pico to make contact with the metal rails of the protoboard. Simply sticking them into the pin slots without soldering them to the Pico won’t be enough, since we require a reliable electrical connection between our Pico and the components on the breadboard.
Step 2: Place the Pico onto the protoboard in accordance with the diagram above.
The header pins for GP0 and VBUS should be slotted into points C1 and H1.
Step 3: Wire up the 3.3V rail.
Connect pin 36 (3V3(OUT)) with the lower, positive, red power rail.
Connect pin 3 (GND) with the lower, negative, blue power rail.
Step 4: Wire up the 5V rail.
NOTE: This step is only required if you’re using a 6n 138 Optocoupler!
Connect pin 40 (VBUS) with the upper, positive, red power rail.
Connect pin 38 (GND) with the upper, negative, blue power rail.
Step 5: Place your MIDI-Connectors onto the breadboard.
As noted previously, despite what is shown in the diagram above, the front sides of the MIDI-IN and MIDI-OUT jacks need to face away from the center of the breadboard.
If you only wish to send MIDI signals to your Game Boy and do not require / wish for the ability to receive MIDI from your Game Boy or to use your MahPicoBoi as a MIDI-THRU device, you can get away with only using one single MIDI-IN connector.
Step 6: Place the 270 Ω resistor onto the breadboard in accordance with the diagram above.
This component will provide the required resistance to the 5V side of our MIDI-IN circuit.
Step 7: Place the 1n914 or 1n4148 diode onto the breadboard in accordance with the diagram above.
Note: The diode needs to be oriented the right way!
The cathode side of the diode, usually marked with a black stripe, should face towards the 270 Ω resistor.
The anode side of the diode, usually unmarked, should face towards where we’ll put our optocoupler in the next step.
Step 8: Place the H11L1 or 6n 138 optocoupler onto the breadboard in accordance with the diagram above.
Note: Again, orientation matters for this step!
We want pin 1 of our optocoupler to be facing away from our MIDI connectors. To find pin 1, we have two options:
If your optocoupler has a circle printed or etched right next to one of the outer pins, it typically marks the position of pin 1.
If your optocoupler only has a semicircular notch along one of its sides, position the optocoupler with the printed side facing toward yourself and the notch positioned on the left of the chip. In this orientation, pin 1 will be located at the bottom left of the chip.
With this first series of steps concluded, our build should look something like this:
Let’s now hook up our MIDI-IN connector. The required circuit will need to be adjusted depending on your choice of optocoupler. If you’re using a H11L1, the circuit will need to look like this:
And if you’re using a 6n 138, it’ll need to look like this:
So, let’s take this step by step once more!
Step 9: Wire up Pin 5 of your MIDI-IN jack.
H11L1: Pin 5 is first wired up to the anode side of our diode, and then connected to pin 2 of our optocoupler.
6n 138: Pin 5 is first wired up to the anode side of our diode, and then connected to pin 3 of our optocoupler.
Step 10: Wire up Pin 4 of your MIDI-IN jack.
H11L1: Pin 4 is brought into contact with the cathode side of our diode via the 270 Ω resistor and then hooked up to pin 1 of our optocoupler.
6n 138: Pin 4 is brought into contact with the cathode side of our diode via the 270 Ω resistor and then hooked up to pin 2 of our optocoupler.
Step 11 (6n 138 only): Connect pin 8 of your 6n 138 to the positive 5V power rail.
Step 12: Connect pin 5 of your optocoupler with one of the two negative power rails.
Step 13: Place the 470 Ω resistor onto your breadboard.
H11L1: Have one end of your resistor connect with pin 4 of the optocoupler and the other with pin 6.
6n 138: Have one end of your resistor connect with pin 6 of the optocoupler and the other via a jumper cable to the positive 3.3V rail.
Step 14: Wire up the signal pin.
Note: Regardless of your optocoupler, the 470 Ω resistor should be slotted in closer to the signal pin of your optocoupler than your signal jumper wire.
H11L1: Use a jumper wire to connect pin 4 of your optocoupler with pin 17 (GP13) of your Pico.
6n 138: Use a jumper wire to connect pin 6 of your optocoupler with pin 17 (GP13) of your Pico.
If you’re using a 6n 138 optocoupler, your breadboard should now look something like this:
Our MIDI-IN circuit is now fully operational! Next, we’ll deal with the MIDI-OUT circuit.
Note: If you don’t want to use the MIDI-OUT capability of the MahPicoBoi, you can skip steps 15 to 19.
Step 15: Place your 10 Ω resistor behind pin 5 of your MIDI-OUT jack in accordance with the diagram above.
Step 16: Place your 33 Ω resistor behind pin 4 of your MIDI-OUT jack in accordance with the diagram above.
Step 17: Wire up pin 5 of your MIDI-OUT connector:
Connect MIDI-OUT pin 5 via the 10 Ω resistor to pin 16 (GP12) of your PICO.
Step 18: Wire up pin 4 of your MIDI-OUT connector:
Connect MIDI-OUT pin 4 via the 33 Ω resistor to the positive 3.3V rail.
Step 19: Wire up pin 3 of your MIDI-OUT connector:
Connect MIDI-OUT pin 3 to either one of the two negative power rails.
With the MIDI-OUT circuit now also completed, your breadboard should look something like this:
Next, we’ll deal with our connection to the Game Boy.
Since we want to connect our Game Link Port to our Pico, we’ll need to cut one of the ends of a Game Link cable and then connect the inner wires with our breadboard via male Dupont connectors, Luster terminals or something similar.
The Game Link cable used for my own build was one of those green, 4-ended ones that has both a pair each of Game Boy and Game Boy Pocket connectors. I highly recommend using this type of cable, as you can find them across the net for around 5 to 20 bucks. Additionally, since both the GB and GBP wires are interconnected within the cable, we only need to modify a single end of it to hook our MahPicoBoi up to any Game Boy variant outside of the Game Boy Micro.
If you are using this type of Game Link cable, you can follow steps 20 to 23 to get it modified for hookup with your Pico. Otherwise, you may need to adjust the following steps to your own needs.
Step 20: Cut off one connector from your Game Link cable.
Try to make the cut as close to the connector as possible. We want as much wire leeway as we can get!
Step 21: Break open the cut connector using a pair of scissors and a knife.
This step is required since we need to check the internal wire colors for their connection with the pins of the now cut connector.
You’ll first need to cut through the rubber shell with a knife or a pair of scissors, and then you’ll need to bend open the metal casing with a knife or some other flat object. Make sure not to damage the wires connecting to the pins of your connector.
Step 22: Check the wire colors for their pin connections.
To do this, place the now bare connector with its angled sides facing upwards onto a flat surface. Now observe the connector from the front like this:
From this perspective, the different pin types and their respective position are as follows:
Pin Position | Pin Function |
Upper Left | GB: None
GBP: 5V VCC |
Upper Middle |
Serial-IN |
Upper Right | Clock |
Lower Left |
Serial-Out |
Lower Middle | None |
Lower Right | Ground |
Use the table above to determine the wire colors of the different pin types and write them down somewhere.
Step 23: Modify the ends of the wires.
Now that we know which colored wire serves which function, we’ll need to modify the ends of the wires “Serial-OUT”, “Clock” and “Ground” so that we can hook them up to different points on our breadboard. A modification of “Serial-IN” is only necessary if you want to use the MIDI-OUT capabilities of your MahPicoBoi.
To achieve this goal, we’ll first remove a part of the rubber isolation from the respective wires using either a specialized tool or a pair of scissors, and then we’ll connect the exposed wire strands to a Luster terminal or Dupont connector. If you’re using a Luster terminal, Dupont terminal or female Dupont connector, you’ll also need three or four jumper wires to connect the terminals to our breadboard.
Now our cable is ready to be connected with our Raspberry Pi Pico. I personally used Luster Terminals in my modification of the cable, making the end result look like this:
Again, depending on your cable and use of terminals, results may differ.
But regardless of your own personalized build experience, it’s now time to hook up our Game Link cable to the Pico:
Step 24: Hooking up the modified Game Link Cable
Slot in the ends of your Game Link cables as follows:
- Serial-OUT needs to be connected to the Pico’s pin 5 (GP3)
- Clock needs to be connected to the Pico’s pin 6 (GP4)
- Ground needs to be connected to either of the two negative power rails or to a GND pin of your choosing.
- If you wish to use your MahPicoBoi as a MIDI-THRU device, Serial-IN will stay disconnected for now. If you want to use your MahPicoBoi to send out MIDI-signals from your Game Boy to your MIDI-OUT connector, connect Serial-IN to the 10 Ω resistor of MIDI-OUT pin 4 and disconnect the cable to the Pico’s pin 16 (GP12).
Now our circuit is fully built and ready for action. Your breadboard should now look something like this:
The final part of this guide will now go over the steps required to get your MahPicoBoi operational on its first run:
Step 25: Load the ROMs for mGB / LSDJ onto your flash cart.
Step 26: Hook up your MIDI-cable to your MIDI source and to the MahPicoBoi.
The MIDI-OUT connector of your cable will slot into the jack of our MIDI-IN circuit, and the MIDI-IN connector of your cable will slot into the jack of our MIDI-OUT circuit.
Step 27: Use a Micro USB cable to hook up your MahPicoBoi to a PC.
You’ll need to hold down the “Bootsel” button of your Pico as you connect it up to your PC. The Pico should now show up as a new storage device that you can drag data onto.
Step 28: Drag the MahPicoBoiDX.uf2 file onto your Pico.
The Pico should immediately disconnect itself from your PC and the LED on top of the Pico should turn on after a few seconds. If the Pico disconnects itself without the LED turning on, quickly pull the Pico’s USB cable to cut its power and check the circuit you built. There’s a good chance you’re dealing with a short circuit. The LED should turn on once the short circuit has been dealt with and the Pico’s USB cable has been reconnected.
Step 29: Load up LSDJ or mGB on your Game Boy.
To do this, simply slot your flash cart into the cartridge slot, turn on the Game Boy and load one of the two ROMs.
Step 30: Connect one of the non-modified ends of your Game Link cable to the Game Link Port of your Game Boy.
Take caution with this step!
Upon connection, nothing of note should happen. If the Game Boy turns off or makes weird sounds, immediately pull the Game Link Cable and re-check the circuit you’ve built, as well as the wire colors on your Game Link cable. You can try again after any potential issues in your build have been resolved.
Step 31: Done!
Your MahPicoBoi is now ready to receive and send out MIDI signals. Once your MIDI source sends out signals corresponding to mGBs implementation of MIDI, you should hear your Game Boy making the sounds you’d expect. If things don’t work at this point, you’re probably dealing with a wrong configuration of your MIDI source. Cross-check your settings with the GitHub page of Trash80’s mGB repository, as mGB uses a somewhat peculiar implementation of MIDI.
And that’s that. You now own a fully functional MahPicoBoi that you can use in any way which pleases you, as long as your use case doesn’t cause harm to others around you. This guide, as well as the entire MahPicoBoi project, is still very much WIP, and if you’ve got some ideas and suggestions for the future, please let me know on GitHub or send them to me via E-Mail to “[email protected]”.
Thank’s for giving this project the time of your day, and have fun with your new MahPicoBoi!