
Doragasu’s MegaWifi cartridge placed in a MegaWifi programmer. (Image Credit: doragasu/Kernel Hacks)
Retrofitting old electronics with new abilities is an obsession I didn’t know I needed.
We love playing video games online. But what if we could do that with vintage gaming systems? Now, that’s possible thanks to a project called MegaWifi Addon, created by developer doragasu. This nifty device provides the Sega 16-bit system with online play capability. The Kickstarter video even shows a custom port of Namoc’s Battle City using the MegaWifi Addon.
One side of the Mega WIFI Addon connects to the Genesis’ cartridge bus so the 68000 CPU can talk to the hardware. For WIFI, Doragasu integrated an ESP8266 wireless module and a UART chip in the cartridge. The UART bridges the Genesis cartridge interface and the ESP8266 serial interface by converting the console’s cartridge commands into serial data that the ESP8266 understands.
The ESP8266 functions like a network co-processor for the console. It doesn’t force the 68000 CPU to implement internet protocols like TCP/IP networking and Wifi communication. Instead, the ESP8266 handles those tasks. The Genesis issues high-level commands while the module does the networking.
Additionally, the creator wrote firmware for the WIFI module and a matching library/command-based API for Genesis developers. With the API, the cartridge becomes usable from 68k code and makes software development easier. Developers call pre-built functions that scan Wifi networks, join access points, open TCP or UDP sockets, perform HTTP or HTTPS requests, sync the system clock using SNTP, or transfer data.
Those requests are then packed into a command containing a payload length, optional data, and an identifier before the ESP8266 firmware receives those results. Afterward, it processes the request and performs the specified task, such as connecting to a server or making an HTTPS request. It then returns the requested data or an error message. Those results are sent back to the Genesis console.
MegaWifi also allows developers to upload ROMs over Wifi rather than using a programming cable or removing the cartridge. In this workflow, the wflash bootloader receives the ROM image and writes it to the cartridge flash memory. This ensures faster development and testing. Along with that, the hardware and API support online gameplay. MegaWifi-enabled titles can exchange player state through the cartridge. That data is then sent to a remote peer over the network to support online gameplay.
This MegaWifi Addon concept isn’t just for the Sega Genesis/Mega Drive. It can be adapted for other retro systems. Consoles that communicate with a cartridge or other expansion device could use this technique to add online play. By pairing legacy hardware with a modern Wifi microcontroller over the appropriate bus or interface, developers can add internet connectivity and online features without redesigning the console. For example, wifi Game Boy cartridges shows that this idea isn’t just for Sega hardware.
Have a story tip? Message me here at element14.