There oughta be a WiFi Game Boy cartridge

70
There oughta be a WiFi Game Boy cartridge

16 December 2021

It took a whereas, but I lastly managed to perform my very personal Game Boy cartridge. With WiFi! At this level, it might perchance perhaps well handiest demo a easy telnet-style dialog and access Wikipedia articles, but I am confident that I will showcase more at some point. For now, the involving and surprisingly subtle segment is how the element works the least bit.


Thumbnail of the youtube video a render image of the cartridge PCB in front of a Game Boy with the text Wifi cartridge next to it.
Click the image to tag the video on youtube.com.

If you correct prefer to tag the cartridge in motion or prefer to get into the whole necessary functions, I highly counsel to search out the video first because it goes throughout the difficulties and their respective solutions. In disagreement, this text right here is much less visual in its explanations and mostly paperwork the instrument intimately, so unless you are already wide awake of the parallel memory interface of the Game Boy, you can prefer to open with the overview from the video.

What it does

Ahead of you waste your time with this text, I might well moreover merely peaceful presumably accomplish good what this cartridge can end and, perchance more importantly, what it might not end. Right here’s a conventional 32kiB Game Boy cartridge with an ESP8266 microcontroller so that you just might perchance add Wifi capabilities. With this, you can moreover access recordsdata from the online or your local community to your Game Boy or send recordsdata from it. Since the ESP8266 can end a quantity of preprocessing for the Game Boy, a Twitter client is correct as conceivable as a Reddit browser. If you enforce one. Right here isn’t a generic browser, but you can moreover pretty easily enforce services on the ESP8266 and write easy code that is accomplished on the Game Boy as an interface.

On the time of penning this text, I bear handiest utilized two demos: A easy dialog demo that lets you log onto the cartridge through telnet and send and receive textual articulate material messages. And a Wikipedia client, which lets you enter the title of a piece of writing1, then fetches the “extract” of that article and displays it.


Sequence of three closeup photos of a Game Boy, showing the greeting screen of the Wikipedia demo, followed by a screen with an onscreen keyboard and finally, on the right, the Game Boy showing an excerpt of the Wikipedia article on the topic Game Boy.
Left to correct: Greeting display veil of the Wikipedia demo including the fresh IP address of the Game Boy cartridge, onscreen keyboard to enter a piece of writing title, beginning of a piece of writing displaying on the Game Boy display veil (you can moreover proceed by pressing A). (Click/tap to get the elephantine dimension version of the image.)

This cartridge does not point out you can moreover play your broken-down video games on-line or to access your ROM library through community. Having fun with broken-down video games on-line would handiest be likely within the occasion you bear been in a position to change them massively, on myth of they would don’t bear any idea what a community is, ideas to tackle its lengthen and the most reasonable likely device community access even works on my cartridge originate. Having access to the ROM library appears to be like more sensible to me in idea, but since on my cartridge the Game Boy instrument is accomplished from a conventional EEPROM which might’t be programmed by the micro-controller, this might require a redesign to either enable the ESP8266 to program the EEPROM with a binary from the community or to replace the memory fully, which other initiatives did, but which has a couple of drawbacks as you’ll be taught below.

The cartridge interface

Since I made up our minds so that you just might perchance add WiFi to a cartridge as one more of including WiFi to the link cable (for which two good initiatives exist already 23), we might well moreover merely peaceful first focus on about, how a Game Boy cartridge works and the most reasonable likely device we can keep in touch right here. In disagreement to the link cable that communicates at a slack 8 kHz charge, the Game Boy cartridges are not an interface to enforce arbitrary dialog, but a serious parallel memory bus, running at 1 MHz. In position of very without problems sending some recordsdata to sync multiplayer video games, it is the backbone of all Game Boy memory with a really particular protocol and a relentless clock.

If this sounds pretty over dramatic to you, I’m in a position to bid you that the identical bus is outmoded by the Game Boy to access its internal RAM and VRAM. Genuinely, the cartridge will tag (a couple of of) these requests on the cartridge pins, too, so this interface genuinely manner change. If you would love to grab the whole necessary functions, I might well counsel the Game Boy CPU manual, however the short version is the next:

View onto the pins of a rendered Game Boy cartridge with labels for each pin.

The pinout of a Game Boy cartridge.

The cartridge connector provides 16 address pins and eight recordsdata pins. On the address pins the Game Boy objects the memory address it desires to read or write and on the information pins it then reads or writes one byte of recordsdata. This access is managed by a clock (CLK) pin, a read (RD) pin, a write (WR) pin and a chip grasp out (CS) pin. RD and WR are outmoded to grunt if recordsdata desires to be read or written, whereas CLK provides a 1 MHz reference clock signal for read/write timing. The CLK is highly relevant as the RD and WR pins end not return to their off teach between consecutive reads or writes, so it might perchance perhaps well moreover merely be subtle to discern a sequence of reads if there isn’t any clock.

The CS pin is genuinely not that relevant for our cartridge. Generally, a CS pin is outmoded to enable or disable particular chips (therefore is also believed as chip enable or output enable) in grunt to swap between assorted chips on the identical bus. Nonetheless, in a easy4 Game Boy cartridge handiest the decrease half of of the memory is outmoded by the ROM on the cartridge. 16 pins might well address 64kiB of memory, but handiest 32kiB are on the ROM, whereas the final 32kiB are outmoded to home internal memory (RAM, VRAM and so forth.) and registers (as soon as more, tag the CPU manual for more necessary functions). Because of the this fact, from the level of seek of a conventional cartridge, the supreme address pin A15 acts as an inverted CS input because it is HIGH correct for the upper 32kiB.

The cartridge connector also functions a voltage present through a +5V and a ground (GND) pin, which we exercise for the WiFi cartridge, and lastly a reset (RST) and a few form of audio pin, which we end not want right here.

Why is this subtle?

Appears to be like like a easy interface, doesn’t it? My first idea of course turned into as soon as the as much as the moment favorite maker acknowledge: Hook up a recent micro controller to all these pins and solve the dialog in instrument. Shall we desire a couple of stage shifters or bus transceivers and the sheer series of pins limits the becoming microcontrollers, but otherwise a recent 100 MHz micro-processor might well moreover merely peaceful don’t bear any anguish talking to a 4 MHz Game Boy CPU on a 1 MHz recordsdata bus, correct? Successfully, it is genuinely likely as an STM32 (168 MHz) cartridge by Emeryth and an RP2040 cartridge by u/LyneByLine (0xen) demonstrate. The latter even works with a Game Boy Shade with twice the clock charge. Nonetheless, the RP2040 needed to be overclocked to 200 MHz, so correct from the naive comparability of clock speeds, this appears to be at the limit of what might well moreover merely be completed with this capacity.

The matter is that the 1 MHz clock for the cartridge denotes memory cycles. One cycle equals one written or read byte. A CPU cycle might well moreover merely be more versatile, but a CPU can not take a look at the address pins, elaborate their meanings, retrieve and even calculate the information that desires to be the response and position the output pins all in one cycle. As the initiatives demonstrate, it is in a position to whole so, but this vogue that there might be not grand reserve to whole anything. The CPU can either protect an glance on the pins and genuinely not end anything or you can strive to work with interrupts. But you handiest bear 500ns to react on these interrupts and since you get read and write events the whole time, even for internal memory access, the interrupt is firing the whole time. The easy Arduino interrupts eradicate a couple of µs to react, so these are out at the least. I am not good how like a flash you can moreover get with some assembly, but you wouldn’t free up grand spare time for the CPU.

But we prefer some spare processing time. The CPU desires to have a tendency to the WiFi connection, accomplish requests for the Game Boy (like http requests to Wikipedia) and convert recordsdata for the Game Boy, on myth of you undoubtedly don’t prefer to parse Wikipedia’s JSON response on the Game Boy itself. Per chance more fresh multi-core micro-processors might well inspire right here and in all likelihood one day davedarko will get his strive at an ESP32-basically basically based WiFi cartridge to work, but correct now I tag these ideas more as a proof of idea. So, I went for a more tidy acknowledge (not not as much as I judge so) and got away with the exercise of correct a dated ESP82665 (80 MHz) that turned into as soon as a leftover from one more project.

The device in which it genuinely works

The premise is to sever backpedal on the series of memory requests that the micro-controller has to tackle as effectively as the series of pins it has to protect a watch on. So, initially, as one more of looking to replace the whole cartridge by a micro-processor, let’s exercise the part that is supreme to tackle mundane memory requests: A correct broken-down 32kiB EEPROM. Genuinely, let’s open with mostly a conventional 32kiB cartridge originate, on myth of in spite of every thing, many of the memory requests will be static stuff like photography or the byte code running on the Game Boy. Getting recordsdata from the community and therefore from the ESP is carried out much less continuously.

Render image of the PCB on black background, including all components.

The PCB of the WiFi cartridge.

To genuinely get recordsdata from the ESP as effectively, I made up our minds to draw two bytes of the Game Boy’s memory home to the ESP8266: 0x7ffe and 0x7fff. If the Game Boy desires to read from the ESP, it accesses 0x7ffe to retrieve one byte after one more, and if it desires to write a sequence of bytes to the ESP, it makes exercise of 0x7fff6. These two addresses bear two advantages. They’re at the very end of the conventional 32kiB ROM home and handiest interfere with our program code if we bear been to make exercise of the whole 32kiB and so they’ve a binary representation that makes it extraordinarily easy to behold them with a couple of common sense gates. As 0x7ffe = 0b0111111111111110 and 0x7fff = 0b0111111111111111, all we want to whole is invert the excessive bit A15 and keep it through an AND gate (NAND in my originate) along with all other pins correct down to A1. The result indicates whether the ESP is being addressed or not (ESPADDR) and the closing bit A0 might well moreover merely be outmoded to resolve whether it is being read from or written to. If we combine this closing pin with ESPADDR, we get ESPRD, which is handiest excessive if the Game Boy tries to read from the ESP, which is also the supreme time at which the ESP ever might well moreover merely peaceful flip on the output on these pins which might well be linked to the information line D0 to D7.

Excerpt of the schematic showing the logic gates that combine the address pins A0 to A15 to form the abstract states ESPADDR, ROMADDR, ESPCLK and ESPRD.

Logic gates combine the address pins to offer more abstract common sense states, figuring out which part is being addressed.

But most severely, combining ESPADDR with the Game Boy clock through an AND gate (I genuinely outmoded NOR common sense as one more) leads to ESPCLK, which handiest ever goes excessive if the Game Boy desires to keep in touch with the ESP and which contains the falling flank of the distinctive CLK signal, which is a really grand marker for the 2nd the Game Boy begins using the information pins. This means that the ESP now handiest has to care just a few single input which handiest adjustments if the ESP genuinely has to react and we handiest want ESPRD on a 2nd pin to judge ideas to react to ESPCLK. The relaxation of the time, the ESP can end other stuff and mind its personal change. The supreme imperfection right here is that for the reason that Game Boy adjustments the address a exiguous bit after the next clock upward push, we get a exiguous bit extra height at the end of each ESPCLK, which we don’t want, but this might easily be filtered in instrument7.

Screenshot of an oscilloscope showing the Game Boy's clock signal, one of its address pins, the ESPCLK signal from the logic gates and the ESPRD signal. The Game Boy's clock signal is periodic at a frequency of 1MHz, but the address signal becomes high only ones, starting at half of a positive period of the clock signal and ending just when it goes high the next time. ESPCLK is clearly a cutout of the original clock signal of exactly the period during which the address pin is high. The ESPRD signal looks identical to the address signal (although this is only true if the corresponding address is set).

Screenshot of an oscilloscope displaying the Game Boy’s clock, undoubtedly one of its address pins and ESPCLK as effectively es ESPRD. The latter handiest bound excessive if the address pins target the ESP. (Show that attributable to the constraints for labels on this scope, they’re labeled eCLK and eRD.

These common sense gates are also outmoded to manipulate the outputs of different components on the bus. The ESP with its 3.3V common sense is hooked as much as the Game Boy’s 5V recordsdata lines through a bi-directional bus transceiver and its output enable pin is at as soon as managed by ESPADDR to flip it off unless the ESP is within the loop. Within the same vogue, a couple of more common sense gates generate ROMADDR, which is handiest excessive if the address is within the vary of 0x0000 to 0x7ffd to disable the EEPROM output in all other cases. With the exception of for some likely temporal overlap of few nano seconds, this can moreover merely peaceful build away with most anguish of bus contention, other than for one: The ESP has to flip off its D0 to D7 outputs through instrument unless ESPRD is excessive. If it ever turns on the output whereas ESPRD is low and ESPADDR being excessive at the identical time, this might work in opposition to the output of the bus transceiver and effectively reason a transient circuit. To this level, for me this handiest ended in a brown out of Game Boy and ESP and of course it came about reasonably normally all through constructing, but I can not thunder that it might perchance perhaps well not lastly hurt one thing.

Which leads us to the voltage present for the cartridge. We bear a blended machine with the ESP running on 3.3V common sense and the EEPROM and common sense gates the exercise of the identical 5V as the Game Boy. So the 3.3V is transformed from the Game Boy’s 5V by an NCP1117, which might moreover merely peaceful bear adequate headroom. Genuinely, right here is the identical voltage regulator as outmoded by the NodeMCU DevKit v1.0 and proper like the NodeMCU I added a 100µF capacitor to stabilize the output along with the fashioned 100nF and 10µF pairs. Peaceful, my first prototype had massive brown-out complications, so though I might well not fully rule out bus contention attributable to other originate flaws within the first protoype, I added a 680µF on high. With this, the cartridge in all fairness stable – not not as much as when the batteries are unique. Within the occasion that they’re correct pretty depleted you open to tag some memory corruption and even on elephantine batteries you can moreover hear static from the Game Boy speaker every time the ESP8266 makes exercise of its WiFi module.

I suspect that the broken-down linear voltage regulator of the Game Boy can not tackle the sudden fresh spikes of a WiFi module. Your whole Game Boy makes exercise of pretty over 100mA at 5V. If we naively engage supreme efficiency of the vitality regulator, this translates to roughly 150mA at 3.3V. One might well moreover merely peaceful also tag that this consumption desires to be pretty stable as the broken-down hardware of the Game Boy does not swap snappily between assorted vitality righteous modes or trade clock speeds like as much as the moment hardware does. In disagreement, the ESP8266 can snappily trade its vitality consumption to arrangement a fresh wherever within the vary from a couple of 10 µA to a whopping 200mA. In a standard exercise sample, we can engage that it attracts around 80mA (which might well be handsome for the Game Boy) and spikes as much as 150mA when the exercise of the WiFi module, which in all fairness a blow for the Game Boy’s voltage regulator. I am not good if correct including even bigger capacitors would in actuality solve the realm, though the becoming element about this teach is certainly that WiFi spikes appear to be short and the Game Boy appears to be like to tackle bigger vitality consumption pretty gracefully if it has time to adapt.

You might moreover gain the elephantine schematics, PCB layout and gerber files within the github repository for this project.

Conversation patterns

With the whole hardware in position, we can now position out to write our code. There are of course two objects of instrument we want to write: The code that can be kept within the EEPROM to be high-tail on the Game Boy and the instrument running on the ESP8266.

The Game Boy code is written the exercise of the Game Boy Pattern Equipment gbdk-2020, which in case of these traditional textual articulate material basically basically based examples makes it extraordinarily easy. Since gbdk-2020 implements stdio, we can merely throw a couple of putc, print and getc true into a textual articulate material editor to get the code we prefer. Till I strive some more visual demos, the harsh work is within the ESP code.

Thanks to behavior and convenience, I wrote the ESP code within the Arduino IDE. There is nothing unsuitable with the exercise of simplified Arduino instructions as lengthy as where to protect away from them in desire of some optimization. The code every so many times connects to a WiFi access level with hardcoded credentials and displays two personality arrays as inbound and outbound buffer to the Game Boy. Reckoning on the real demo, this might react to commands within the inbuffer and write outcomes to the outbuffer, demand webpages or convert recordsdata into textual articulate material for the Game Boy.

The subtle segment is how particular particular person bytes are transmitted or bought throughout the devoted memory addresses. From the level of seek of the ESP, it has to react to an interrupt monitoring ESPCLK and an interrupt on ESPRD8. But because it already takes a couple of microseconds ahead of they even open executing their code, we haven’t any chance to at as soon as react to one thing the Game Boy throws at us. As a replace, we trigger on the falling edges (at that timing presumably not genuinely relevant) and exercise the interrupts to be taught if the Game Boy correct tried to read or write to prepare for the next occasion.

Since we high-tail our personal code on the Game Boy, we can educate it some persistence and repair assorted dialog patterns for reading and writing bytes from the ESP.

If the Game Boy desires to read from the ESP, it makes a predominant read strive which might return garbage recordsdata, for the reason that ESP did not even bear adequate time to flip on the GPIO output. But, the interrupt causes the ESP to flip the output on in time for the next read strive and to position their outputs to the first byte to be transmitted. So, the Game Boy merely discards the rubbish from the first read strive and (whether it isn’t retrying too like a flash, which is in our arms) can receive the first byte on the next read. This 2nd read in flip triggers the interrupt on the ESP as soon as more, which might now position the outputs to the 2nd byte. Because of the this fact, after discarding the very first read strive, the Game Boy can correct sequentially read more bytes without losing any further read attempts. It correct desires to be obvious that to be insensible adequate. In grunt to end when there isn’t any recordsdata left to read, the ESP sends 0x00 as the closing byte, which is supreme for transmitting null terminated strings. After the interrupt turned into as soon as triggered whereas 0x00 is already position at the output, the ESP turns off its output and, conversely, the Game Boys stops reading after encountering 0x00.

Schematic of the read process. The image shows four consecutive read attempts in columns with five rows indicating what happens during each attempt. Of these five rows two show what the signal of ESPCLK and ESPRD look like and three show the state of the data lines and the contributions of the Game Boy and the ESP to the data lines.

When the Game Boy reads from the ESP8266, it wants one extra first read that need to be discarded. Consecutive reads correct might well moreover merely peaceful be insensible adequate as they trigger the ESP to prepare each following read.

Sending recordsdata from the Game Boy to the ESP8266 is genuinely pretty trickier. The matter is that the Game Boy handiest drives the information bus for 500ns and we are in a position to not trade that. When reading from the ESP, the ESP can correct flip on its outputs indefinitely and wait except the Game Boy has picked up the information, but when the Game Boy writes to the ESP, the ESP gets a 500ns window to prefer that byte and that’s it.

We are in a position to, on the opposite hand, send the identical price multiple times. It peaceful requires correct timing on behalf of the ESP, on myth of this handiest manner that there’ll be one more 500ns window after a hole, but this permits us as soon as more to make exercise of the first write as a trigger. So, in grunt to write a byte to the ESP, the Game Boy objects address 0x7fff to its price, which triggers the interrupt on the ESP capacity too gradual. This time, the Game Boy stays within the interrupt feature for a couple of microseconds and proper begins reading ESPCLK in a loop, trying ahead to it to upward push, indicating one more write. The Game Boy then merely writes the identical price as soon as more to 0x7fff, but this time, the Game Boy does not prefer to stay up for an interrupt. It notices the rising ESPCLK within a couple of of its cycles, waits extra for it to plunge as soon as more (which happens when the Game Boy begins using the information bus for 500ns, tag CPU manual) and then reads the byte within the 500ns window without any anguish. Easiest downside is that unless we prefer the CPU to permanently stumble on ESPCLK, it now as soon as more need to be triggered by an interrupt first and therefore, the Game Boy desires to send each byte twice with a transient quit between writes.

Schematic of the write process. The image shows two pairs of write attempts in columns with five rows indicating what happens during each attempt. Of these five rows two show what the signal of ESPCLK and ESPRD look like and three show the state of the data lines and the contributions of the Game Boy and the ESP to the data lines.

When the Game Boy writes to the ESP8266, it desires to repeat each write strive as the first one handiest serves to get the ESP8266 in a position to prefer the information on the 2nd strive.

Nonetheless, there might be not that grand recordsdata to be sent from the Game Boy itself – not not as much as I can not imagine grand to send from the Game Boy to the ESP other than for particular person input and a few requests initiated by particular person actions. So, it appears to be like becoming that writing to the ESP in all fairness slower than receiving from it.

Oh, and there might be one exiguous confusing detail, which handiest suits into this part: For some motive, I want to flip on the inner pull-up resistors for the GPIO-pins of the ESP8266 which might well be linked to the bus transceiver for D0 to D7. If I don’t, all these pins (of us who end not bear an exterior pull-up at the least) wouldn’t bound low when the ESP sends recordsdata. I engage that it has one thing to whole with the capacity I enable the output throughout the ESP’s GPES register. Per chance I find yourself in some form of Initiate Drain configuration, which of course would require the inner pull-ups? If somebody spots the motive, I might well love to be taught about it.

Constructing your individual

Okay, as the title of this part suggests, I am sharing the whole hardware schematics and the provision code, so you can moreover make your individual version. Nonetheless, ahead of you bawl “Hell, certain!” and pull out your soldering iron, you can moreover merely peaceful pretty seek at the next warnings, required tools and urged abilities.

Warnings ahead of your make this your self

  • Study the “The device in which it works” part on bus contention and the cramped vitality present to grab that this hack is by no manner “electrically sound”. Right here’s a hack. The Game Boy isn’t designed for this and my PCB is a like a flash and soiled portion of electronics. The outcomes might well moreover merely be unreliable and you can hurt your Game Boy, the micro-controller or any other portion of hardware.
  • I am a physicist, not an electrical engineer. So, “it works” is correct adequate for me and I demand that the originate has some electrical flaws. (Yep, one more version of not stable and might well hurt your Game Boy.)
  • As described above, bus contention might well moreover merely be triggered by instrument. You might moreover merely peaceful know the device the dialog works within the occasion you intent to trade the code.
  • The PCB does not bear a diode to end fresh drift back to a vitality present. Function not vitality the PCB from the Game Boy and from irrespective of you exercise to program the ESP at the identical time!

Required tools

  • A soldering iron and area fabric correct for SMD soldering.
  • A USB to serial converter correct to program an ESP-12F module (a constructing board like a NodeMCU or a identical ESP32 board can normally be outmoded for this) and a few cables, ideally with hook ends.
  • An EEPROM programmer like the TL866II with a PLCC32 socket/adapter.
  • A 3d printer for the cartridge case, though you can presumably also match the bare PCB within the Game Boy. Ultimate tag that it might perchance perhaps well be pretty too thick for standard Game Boy cartridges.
  • Extremely urged: A voltmeter and an oscilloscope to debug in case one thing does not work correct away.
  • Ordering or manufacturing PCBs.
  • Deciding on electronic components unless you can moreover grunt exactly what I outmoded.
  • SMD soldering (this turned into as soon as my first ever SMD project, so it isn’t too grand).
  • Traditional recordsdata on the exercise of an ESP8266 whether it isn’t segment of a constructing board (i.e. getting it into programming mode and flashing it).
  • If you would love to change the instrument, you desires to be wide awake of C, bitwise operations and null-terminated strings.

Procuring checklist

  • You have to the PCB. I ordered mine from aisler.earn and within the previous I bear merely shared the real project I ordered through their web keep of dwelling, so you can moreover easily grunt the identical. But on this case, their KiCAD-render deviated from the originate shown in KiCAD and from what KiCAD exported as gerber files, which ended in some 3.3V lines not being tag within the manufactured PCB. I created these lines as segment of a stuffed home as one more of enlighten lines, but KiCAD perfectly understood them as earn connections, entails them in gerber exports and so they even showed up in Aisler’s computerized testing, so I judge that this can moreover merely peaceful work in idea. I might well easily repair this when soldering the PCB9, but since Aisler did not acknowledge to my quiz on ideas to repair this for other users, I genuinely can not counsel ordering from them as I for sure end not know ideas to end that from occurring. As a replace, you can moreover merely peaceful correct exercise the gerber files from the github repository or the KiCAD project to grunt out of your trusted PCB producer.
  • The components you would like currently price a whole of about 50€. Basically the costliest part by a ways being the 32kiB EEPROM, so it might perchance perhaps well accomplish sense to look for alternative sources for this one. In addition to that, of course, even a couple of weeks after I designed, ordered and make this project, some components bear already change into unavailable, so you can prefer to look for likely choices if what to look for. You might moreover gain the bill of area fabric below as effectively as on this link to a mouser browsing cart.
Quantity Half Number Manufacturer Description
1 2491 Adafruit 802.11 ESP8266 SMT Module – ESP-12F
1 69802-432LF FCI / Amphenol Ingredient Sockets 32P PLCC SOCKET
1 AT28C256-15JU Atmel EEPROM 256Okay 32Okay x 8 150 ns 4.5V-5.5V
2 74AHCT30D-Q100J Nexperia Logic Gates 8-input NAND gate
2 SN74AHCT02D Texas Devices Logic Gates Quad 2-Input
1 SN74LVC4245ADWRG4 Texas Devices Octal Bus Transceiver 3.3V To 5V Shifter
2 SN74LV1T34DBVRG4 Texas Devices Voltage Ranges Single Vitality Provide BUFFER Logic Level Shifter (no enable) 5-SOT-23 -40 to 125
6 RC1206FR-0712KL YAGEO SMD Thick Movie Resistors – SMD 12 kOhms 250 mW 1206 1%
1 CRGCQ1206J330R TE Connectivity SMD Thick Movie Resistors – SMD CRGCQ 1206 330R 5% SMD Resistor
1 C1206C106K8PAC KEMET SMD/SMT Multilayer Ceramic Capacitors MLCC – SMD/SMT 10V 10uF X5R 1206 10%
4 C1206C104M5RACTU KEMET SMD/SMT Multilayer Ceramic Capacitors MLCC – SMD/SMT 50V 0.1uF X7R 1206 20%
1 TAJE687M010RNJV Kyocera AVX Tantalum Capacitors – Solid SMD 10V 680uF 20% 2917 ESR= 400 mOhm
1 TAJB107M010RNJ Kyocera AVX Tantalum Capacitors – Solid SMD 10V 100uF 1210 ESR=1.4Ohms 20%
1 156120BS75000 Wurth Elektronik SMD Usual LEDs – SMD WL-SMRW RvsMnt Mono Rect 1206 Blue
1 NCP1117IST33T3G onsemi LDO Voltage Regulators ANA 1.0A 3.3V LDO REG
7 5015 Keystone Electronics PCB MINI SMT TEST POINT

After soldering your PCB, it is time to make the instrument. You might moreover gain the whole code on github within the folders “esp8266” and “gb” with (you guessed it) the code for the ESP8266 and the Game Boy respectively. Show that each folder contains subfolders with matching names for every demo. You bear to be obvious that that you just normally exercise the matching code for the ESP and the Game Boy. Function not, as an instance, combine the serial demo with the wiki demo. With any luck, I will add a couple of more demos right here at some point.

Top-view photo of the completely soldered PCB.

The assembled PCB. (Yes, I might well moreover merely peaceful bound and tidy up that solder paste residue.)

In grunt to make the instrument for the Game Boy, you desire to download a gbdk-2020 open and unzip it such that the following gbdk folder is subsequent to the gb folder. After that you just wants so that you just might perchance correct bound into the “gb” checklist and form “accomplish” to make all demos (within the occasion you’ll have anguish on working programs without an correct grunt line (i.e. Windows), seek into the gbdk-2020 documentation for instructions on ideas to make initiatives there). For that reason, you can moreover merely peaceful gain a .gb file in each demo folder, which you desire to write to your EEPROM with your programmer. That’s it. Ultimate pop the EEPROM into the PLCC32 socket on the cartridge and the Game Boy segment desires to have the capability to head.

Macro picture of the EEPROM PLCC32 package in its socket on the PCB.

As the PCB does not bear the capability to program the EEPROM, it is placed in a PLCC32 socket to be removed for programming.

Within the “esp8266” folder you’ll gain Arduino initiatives, that you just might perchance moreover merely originate in your Arduino IDE. Be good to edit the “secrets.h” file to position your WiFi credentials10. You might moreover merely assemble and upload the code from the Arduino IDE as you might well presumably to any other ESP8266 (be obvious that to position up and grasp out the becoming board), but you desire to figure out the most involving wiring first. There are loads tutorials and examples on the online on what you can moreover exercise to program an ESP-12F and ideas to glue a USB to serial adapter right here. If you outmoded the Keystone take a look at functions from the weather checklist above, you can moreover exercise hook connectors to stable the cables all through programming. For a variety of setups, you correct prefer to glue 3V3, GND, RXD and TXD.

Also, eradicate a seek at the schematics and you might well gain that the PCB has the whole resistors in position to boot the ESP8266 into execution mode by default, so you’ll prefer to glue GPIO0 to GND whereas resetting the ESP by shortly connecting nRST to GND (the much like preserving BOOT whereas pressing EN on a constructing board) to get it into programming mode. Be sure that your Game Boy is turned off whereas programming the ESP as there isn’t any diode to end fresh from flowing back into either voltage offer.

Macro picture of test pin loops on the PCB.

I highly counsel to make exercise of hook clips to glue the ESP for programming.

At this level, you can moreover presumably push the PCB at as soon as into the Game Boy. Nonetheless, I counsel printing not not as much as the decrease half of of the cartridge shell because it makes it more straightforward to tackle it. Ultimate grasp the STL files from github or from thingiverse, slit them at the most involving surroundings for your printer (it’s not a gargantuan print anyway) without helps and print them. Show, that my PCB has a thickness of 1.6mm and I modified the cartridge to bear reasonably skinny partitions to myth for this reasonably thick PCB as effectively as for the height of the EEPROM socket. I doubt that this PCB will match into any normal Game Boy cartridge.

Now you’ll have your very personal WiFi Game Boy cartridge and are obliged to let me know what you end with it 🙂

Conclusion

Despite the real fact that the following cartridge is nowhere shut to anything that might well be outmoded in production I am genuinely happy in regards to the result. Within the end, I correct wished to proof to myself that I perceive the broken-down hardware effectively adequate to lengthen it with as much as the moment tools. When it involves usefulness, I end not tag grand that might well be completed with this that need to not completed with better and more fresh tools than a Game Boy. Granted, they’ve been so favorite that they’re available within the market cheaply despite their nostalgia price, but whereas they’re very sturdy and legit, the display veil is so depraved from our as much as the moment level of seek that it becomes very anxious to make exercise of a Game Boy.

With grand much less pricey and better likely choices for handheld devices this day, I handiest tag a nostalgia price right here. Per chance somebody desires to originate a retro-themed restaurant where guests can grunt from WiFi-enabled long-established Game Boys? Successfully, nostalgia is without problems rate one thing. I did not bear that grand fun with a project shortly and deciding on up the broken-down Game Boy for 100th time all through constructing peaceful brought a smile to my face.

I hope that I’m in a position to end a convention up with some more complex and in all likelihood visual demos than correct pushing textual articulate material throughout the community.

Join the pack! Join 8000+ others registered users, and get chat, accomplish teams, publish updates and establish mates across the area!
https://www.knowasiak.com/register/

Knowasiak
WRITTEN BY

Knowasiak

Hey! look, i give tutorials to all my users and i help them!