Dreamcast Linux: Looking Back At Linux On A SuperH-based Gaming Console

The Dreamcast is probably best known as the swansong of Sega’s ambitions as a gaming console manufacturer, but perhaps lesser known is the fact that you can run Linux on it. In a deep-dive by [Cameron Kaiser] over at the Old VCR blog, it is demonstrated what it takes to make this feat even work in 2023, and what one can expect from a system with a 200 MHz HItachi SuperH SH-4 CPU, 16 MB of RAM and the luxuries of VGA and network interfaces.

What’s interesting about Dreamcast Linux is that it was among the first times that Linux got put on a gaming console, even if it wasn’t entirely official or remotely supported by Sega. In fact, the fact that it works at all has its roots firmly in an exploit that was discovered shortly after the Dreamcast’s release. While Dreamcast discs are generally in a format called GD-ROM (Gigabyte Disc), early on it also supported the MIL-CD standard, which was Sega’s ill-fated attempt at creating multimedia CDs with MIL-CDs.

Not only did MIL-CDs flop in the market, the support form in Dreamcast units also provided a juicy exploit via the firmware that handles detecting and switching between GD-ROM and the much more constrained, audio-only MIL-CD mode. Later Dreamcast models dropped MIL-CD support and will thus also not boot Dreamcast Linux, which is an important gotcha to keep in mind when dragging out a Dreamcast for some Linux action.

As for running Linux on a Dreamcast, it’s pretty much what you’d expect from running it on such a constrained, RAM-disk only device. While [Cameron] was able to use workarounds such as swap-over-NFS to increase functionality, a lot more work remains to be done. Linux SuperH support seems to have petered out around the 2.6.x era, which would seem to have cemented the fate of Dreamcast Linux and similar SuperH platforms.

We’re curious, would double the RAM make a difference to this Linux platform?

The Dreamcast Legacy

The Dreamcast is a bit of an odd beast. Coming on the heels of the unpopular Sega Saturn, the Dreamcast was meant to be a simple console built with off-the-shelf parts and released in late 1998. The Nintendo 64 was already tough competition (1996). Ultimately, the Dreamcast fell out of the public eye in the early 2000s as the Playstation 2, Xbox, and Gamecube were all released with incredible fanfare just a few years later. In some sense, Sega’s last console is a footnote in gaming history.

But despite not achieving the success that Sega hoped for, the Dreamcast has formed a small cult following, because as we know, nothing builds a cult-like following like an untimely demise. Since its release, it has gained a reputation for being ahead of its time. It was the first console to include a modem for network play and an easy storage solution for transferring game data between consoles via the VMUs that docked in the controllers. It had innovative and classic games such as Crazy TaxiJet Set RadioPhantasy Star Online, and Shenmue. Microsoft even released a version of Windows CE with DirectX allowing developers to port PC games to the console quickly.

We see our fair share of console hacks here on Hackaday, but what is the ultimate legacy of the Dreamcast? How did it come to be? What happened to it, and why did so much of Sega’s hopes ride on it? Continue reading “The Dreamcast Legacy”

Dreamcast Homebrew Gets Boost From SD Card Cache

While it might have been a commercial failure compared to contemporary consoles, the Sega Dreamcast still enjoys an active homebrew scene more than twenty years after its release. Partly it’s due to the fact that you can burn playable Dreamcast discs on standard CD-Rs, but fans of the system will also point out that the machine was clearly ahead of its time in many respects, affording it a bit of extra goodwill in the community.

That same community happens to be buzzing right now with news that well-known Dreamcast hacker [Ian Micheal] has figured out how to cache data to an SD card via the console’s serial port. At roughly 600 KB/s the interface is too slow to use it as swap space for expanding the system’s paltry 16 MB of memory, but it’s more than fast enough to load game assets which otherwise would have had to be loaded into RAM.

A third-party Dreamcast SD adapter.

In the video below, [Ian] shows off his new technique with a port of DOOM running at 640×480. He’s already seeing an improvement to framerates, and thinks further optimizations should allow for a solid 30 FPS, but that’s not really the most exciting part. With the ability to load an essentially unlimited amount of data from the SD card while the game is running, this opens the possibility of running mods which wouldn’t have been possible otherwise. It should also allow for niceties like saving screenshots or game progress to the SD card for easy retrieval.

[Ian] says he’ll be bringing the same technique to his Dreamcast ports of Quake and Hexen in the near future, and plans on posting some code to GitHub that demonstrates reading and writing to FAT32 cards so other developers can get in on the fun. The downside is that you obviously need to have an SD card adapter plugged into your console to make use of this technique, which not everyone will have. Luckily they’re fairly cheap right now, but we wouldn’t be surprised if the prices start climbing. If you don’t have one already, now’s probably the time to get one.

To be clear, this technique is completely separate from replacing the Dreamcast’s optical drive with an SD card, which itself is a very popular modification that’s helped keep Sega’s last home console kicking far longer than anyone could have imagined.

Continue reading “Dreamcast Homebrew Gets Boost From SD Card Cache”

Interfacing The Dreamcast Controller With Just An Arduino

The Dreamcast is a somewhat forgotten console today, but for a shining minute in the late 1990s, it was possible to believe Sega were still in the fight. Regardless, their hardware lives on, lovingly preserved by collectors and enthusiasts. [Nicholas FitzRoy-Dale] is one such enthusiast, and set about interfacing the old console’s controllers to an Arduino.

Initial work involved getting the Arduino (presumably a basic 16 Mhz Uno) to read the controller’s buttons, and spitting the data out over serial. The Dreamcast’s Maple bus is fast, which presented some challenges, but it was simple enough. [Nicholas] then moved on to interfacing the VMU, the Dreamcast’s fancy controller-mounted memory card. After initial attempts were shaky and unstable, he redoubled his efforts. Research indicated that the VMU can vary the speed of the bus when it’s in control, so he updated his code to suit. It’s full of great hacks, like connecting the Dreamcast’s two data pins to four input pins on the Arduino, to save a handful of cycles by not having to shift incoming data.

The work is a great read for anyone into assembly-level optimisation of interfaces, as well as proper use of limited resources. Obviously, it’s easy to just throw a faster, more expensive microcontroller at the problem, but then nobody would have learned anything. We’ve featured a great many Dreamcast hacks over the years; [Nicholas]’s work here builds upon [Dmitry]’s work in 2017. We can’t wait to see what comes next out of the underground Sega hacking scene!

Wireless 360 Controllers Now On The Dreamcast

Perhaps the greatest convenience feature of modern consoles is the wireless controller. Eliminating the risk of tripping over cords and enabling play in all manner of poorly ergonomic positions, they added huge comfort to the console gaming experience. [ismell] was no fan of the Dreamcast’s original controller, and the cable was too short to boot. It was time to bring the 360 Wireless controller to Sega’s swansong.

Early attempts by [ismell] involved a Windows computer acting as a USB host for the 360 controller, which would then send out commands back to the Dreamcast via a Cypress EZ-USB FX2 microcontroller. If this sounds esoteric and messy, that’s because it is. It was also too slow to reliably work, as the Dreamcast’s Maple controller bus expects updates every millisecond, else it considers the controller disconnected.

Instead, a dedicated USB host was needed to speak to the 360 controller and also the Dreamcast. [ismell] landed on the MicroZed 7010, a System on Chip that also packs an FPGA on board. With Petalinux running on the board, it interfaces with the Xbox 360 USB wireless controller interface, and then sends the data out over a custom “network” driver that sends packets to the Dreamcast over the Maple bus.

It’s by no means a simple hack, and the MicroZed is far from cheap, but it works and works well as shown in the video below. We’ve seen other wireless controller adapters over the years, too – like the wild BlueRetro build. We always love to see a good retro console hack, so don’t be shy about sending in your own!

Continue reading “Wireless 360 Controllers Now On The Dreamcast”

Dreamcast Controller Adapter Even Works With Mice

PC gamers have the benefit of a broad ecosystem of peripherals built to serve their gaming pleasure. As a bonus, if there’s something out there that doesn’t work with the platform, someone is likely already selling an adapter for it. Console gamers aren’t so lucky, and the vast majority stick with the factory standard controller. [megavolt85] isn’t one of them however, and spun up a multi-adapter for the Sega Dreamcast.

The adapter lets the player use a huge variety of controllers with the Dreamcast. There’s support for both PS1 & PS2 controllers, including vibration support, as well as MegaDrive & Saturn pads, too. PS/2 mice and keyboards can be used as well, and up to 16 VMUs can be hooked up as well. The adapter uses the STM32F103C8T6 microcontroller, which runs at up to 72MHz, giving it plenty of grunt to emulate the Dreamcast’s Maple controller interface.

We’ve seen other hacks of the Dreamcast’s controller bus, too; this custom controller implements the interface on a Raspberry Pi Pico. If you’ve been cooking up your own glorious Dreamcast mods, be sure to drop us a line!

Retro Dreamcast Rhythm Game Controller Built From Scratch

Pop’n Music is a rhythm game which has had both arcade and home console releases over the years. [Charlie Cole] is a fan of the Dreamcast version, and decided to build his own controller for the game using the new hotness, the Raspberry Pi Pico.

The controller itself is built out of layers of lasercut MDF, along with an acrylic top and cork bottom to make it sit nicely on surfaces. Arcade buttons are installed to play the rhythm game, mimicking the design of the official cabinets seen in arcades. To run the controller, a Pico was pressed into service, with [Charlie] hoping to use the Pico’s PIO hardware to easily and effectively interface with the Dreamcast’s Maple bus. There were a few headaches along the way, and it didn’t quite live up to expectations, but with some clever use of dual cores, [Charlie] was able to get everything up and running.

Often, such vintage gaming hardware can be thin on the ground, so having the skills to build your own can come in handy. We’ve seen rhythm game hardware modded before too, like this repurposed DJ Hero controller. Video after the break.