Saturday, 10 December 2016

DreamPi 1.6 Released!

'This'is really just a bug fix release, although it's a pretty good one!
  • Incorporated a program called dcgamespy which was written by Jonas Karlsson which manipulates packets of games like Starlancer to avoid your ISP blocking them as a security measure. Thanks again Jonas!
  • Reduced the modem communication rate which should hopefully fix a lot of those weird "DreamPi doesn't work for me?!" issues, and may restore support for serial modems. Maybe.
  • The script now waits for an Internet connection before doing anything, this should fix the issue where the AFO routing rules wouldn't take effect.
 Download the new image here.

Sunday, 6 November 2016

DreamPi 1.5 Released!

This is a big release with new features and multiple bugs fixed:

  • New software is included written by Jonas Karlsson called "dcvoip" this system process makes the VOIP communication in Planet Ring work! The software is distributed with permission.
  • There is now built-in support for the upcoming Alien Front Online servers that will allow your vanilla normal AFO CD to work without a boot disc! (Thanks again for Jonas for the information to do this).
  • The Pi's firmware has been updated which should bring better device support
  • A bug has been fixed where the DreamPi software wouldn't shut down correctly
  • The modem command timeout has been increased which fixes a number of bugs on modems which are slow to respond (for some reason...). Thanks to Neoblast on the DC-talk forums for finding this.
  • Fixed a bug where the DreamPi process would boot before there was an internet connection (mainly affected WiFi) and would require restarting multiple times to get things to initialize correctly.

Special thanks to PCwzrd13 for being an awesome tester!

You can download the new release here. If you have any problems please post on DC-talk or create an issue on GitHub.

Saturday, 10 September 2016

SEGA Should Resurrect the Dreamcast Brand

Yesterday, it was the 17th anniversary of the SEGA Dreamcast in the U.S. and the occasion caused Twitter and Faceback to fill with birthday greetings for the console that refuses to die. If you're reading this you are probably well aware of the stubborn and ever-growing “Dreamcast Scene”, but if this is news to you then I'll give you a quick overview.

After SEGA stopped supporting their last home console, homebrew developers made tools to create games for it, and every year more and more games created by indie developers are released. On top of that, the Dreamcast continues to gain more and more online multiplayer games as aspiring geniuses reverse engineer the old game servers. Just in the past year alone, Chu Chu Rocket, Toy Racer (dial up), PAL Quake 3 and The Next Tetris, have returned from the dead. On the horizon is Alien Front Online, and there are sure to be more to come. There are weekly game nights scheduled for both the U.S. and UK, and well over 100 people now regularly play online. Which is quite some achievement considering you have to actually do some soldering to get the dial-up Dreamcast to connect in a fibre-optic world.

In summary, the Dreamcast isn't dead, it's alive and well. Sure it doesn't compete with current gen consoles but no other console in history has had as much community support. Which brings me onto the main topic of the article; SEGA should bring the Dreamcast back.

Saturday, 14 May 2016

DreamPi 1.4 Released

This is a bug fix release.

  • New image. Fixes corruption issues with the previous release.
  • Improved Pi 3 support. This release is tested to work with the Pi 3.
  • Updated firmware. Includes the latest Raspbian updates (Linux kernel 4.4)
  • Improved IP allocation. This code has been completely rewritten to use the arping command and seems much more reliable and fixes several known issues.
You can download the release here.

Friday, 22 April 2016

Avoid C++ Typo-bugs with this One Cool Trick!

Recently I found an online quiz created by a company which develops some static code analysis tool. You were presented with buggy C++ code which the tool had detected and you had to click on where the bug in the code was.

The large majority of the bugs in the questions were down to typos. These normally occurred when someone had written the same line of code 3 or 4 times, but with different attributes (e.g. .x, .y and .z for a vec3)

Well, here's a neat trick that will allow you to avoid such typos. In the following example I recalculate the min/max values of a bounding box given a vector (pos):

            /* Iterate the X, Y and Z attributes and assign them if necessary */
            auto attrs = { &Vec3::x, &Vec3::y, &Vec3::z };

            for(auto& attr: attrs) {
                if(pos.*attr < bounding_box.min.*attr) bounding_box.min.*attr = pos.*attr;
                if(pos.*attr > bounding_box.max.*attr) bounding_box.max.*attr = pos.*attr;

By using C++11 initializer lists, and auto, you can elegantly create a list of pointers to member attributes. C++11 range-for loops allow you to iterate them easily without a bunch of type definitions, and then you can just apply the pointers to the two vectors. This ensures that you never accidentally check the value of .y against .x or something like that. It's also fewer lines of code than repeating the if checks (4 vs 6). You could also tidy it up more if you create some extra reference variables in the loop. Win.

Saturday, 16 April 2016

DreamPi 1.3 Released!

This is a minor release which simply updates the Raspberry Pi firmware on the image. This should mean that the Pi 3 is supported, but I don't have one to test that!

You can download the new release here!

Being Spread Too Thin

It's come to my attention that I have way too many projects on the go. This post is going to summarize what needs to be done to each of them in a kind of semi-apology for why things you are waiting for might take a while...

It's also worth remembering I can only work on some of these projects in certain locations. DreamPi stuff must happen at home where I have a Dreamcast and a DreamPi set up. Electronics stuff needs to happen near electronics kit, SDL 2 needs a PC with a Dreamcast emulator, access to a Dreamcast and KallisitiOS which I only have at home. Most of my computer time happens on the train, so... yeah.


The DreamPi software image has been a huge success. pcwzrd13 of Dreamcast Live recently reported the most active online Dreamcast game session ever as a result of more people getting their Dreamcast connected. Even though the software works, here's a list of things that are still left to do:
  • Better IP address allocation, what is there now is incredibly buggy
  • Cutting down the image, and swapping the init system for systemd then writing a proper systemd service file
  • Detecting modem hotplugging and handling it gracefully
  • Hanging up and reconnecting every 5 minutes or so when generating the dial-tone to workaround the modem apparently going to sleep
  • Speeding up the connection process by removing excess AT commands
  • Upgrading the image to support the Pi 3
  • Coming up with a way to easily configure Wifi dongles


Dreamcast Now 

Connected, but separate, Dreamcast Now has become a useful tool, here are the things I'd like to fix:
  • Add more game domain hashes (e.g. Toy Racer)
  • Add Dreamcast Live and Dreamcast-talk versions of the listing so that those sites can iframe them in

DC-Pheonix (DreamArena)


This is working amazingly well considering I hammered it out in a few hours. Still left to do though:

  • Add Quake 3 PAL support
  • Add a clone of the DreamArena registration site so users can register with DreamKey 1.0
  • Database-backed user registration so that the entire process works as it did back in the day

Serial Connector / Link Cable 

I'd like to design and manufacture these, but this is on hold until I have some line voltage inducers made. The whole process for making a PCB is pretty time consuming so don't expect this stuff soon!

Line Voltage Adapters

I have 3 prototype PCBs. I need to manually hot-plate solder the components, and then 3D print cases for them. At that point I can decide whether I have the time to sell them and whether it's worth it. This can only be done when I'm at my work's electronics club which unfortunately I can only make occasionally. Don't expect these any time soon either :(

Also, I need to fix some bugs in Fritzing (the PCB software) to make these PCBs export correctly without me manually fixing up the Gerber export files.

Dreamcast SDL 2 Port

This is about 70% done. It needs testing and fixing. I'll get around to this when I start porting my game engine to the Dreamcast....

My Game Engine (KGLT)

This is the main project I really want to focus on. Here's what I intend to do:
  • Improve rendering performance
  • Fix Quake 2 BSP lightmap loading
  • Add an OpenGL 1.x renderer for Dreamcast support
  • Port to the Dreamcast
  • Write a game for the Dreamcast

As you can see, I have a lot going on, and that's ignoring all the support requests / questions I get about the Dreampi and all the other things I'm helping individuals with. It also ignores the non-Dreamcast related stuff that I already have out there.

So, if you are waiting for something, I apologise, but all of my code is open source, I'd appreciate the help if you can contribute!

Thursday, 7 April 2016

Toy Racer Back Online for Everyone!

I'm excited to announce that an experimental replacement server for Dreamarena is now online and as a result, Toy Racer is back online for everyone, even if you don't have a BBA!

DreamPi users have this support right now, just try it! Anyone else on dial-up will need to point their DNS at to use the new server.

As I said, this server is HIGHLY EXPERIMENTAL. It will likely crash, not work, behave weirdly etc. the server will keep improving as I gain more understanding of the authentication protocol.

Quake 3 PAL doesn't work at the moment, but that support is coming soon too!

Special thanks go to Jonas Karlsson who did the hard job of deciphering the protocol!

Monday, 22 February 2016

Debugging Issues with your DreamPi

Sometimes despite your best efforts, your DreamPi setup just isn't working. This blog post will summarize some of the things you can do to debug the issue!

SSH is Your Friend

The first thing you need to do is to be able to connect to your DreamPi to see what is going on. Now you could do this by connecting a keyboard, then connecting it to the TV and switching between outputs. This works, but it's fiddly, if you do this you can't really see in real-time what is going on.

SSH is a protocol for allowing you to remotely connect to a machine and run commands as if you were directly logged in. If you use Windows you'll want to use Putty, if you use another (more sensible :p) operating system SSH should be built in or easily installable and usable from the built-in terminal.

If you do use Putty, there is a tutorial here for setting it up. The key thing is that you are connected to the same network as your DreamPi, and the hostname you use to connect is "dreampi.local". The username must be "pi" and the password is "raspberry". Once connected you will be dropped to a Linux command shell. If you want to disconnect press CTRL+D at the same time.

Watch the Logs!

Whether you're directly connected to the Pi or over SSH the next thing you'll need to do is run a Linux command. This one:

sudo tail -f /var/log/syslog

I'll break it down so you know what it's doing:
  • sudo - runs the command as an admin, you'll be asked for the password again
  • tail - the "tail" command shows the end of a file
  • -f - this flag tells the tail command to stream the file in real-time 
  • /var/log/syslog - this is the file we're watching
Now, that's all you need to do. Now if you connect your Dreamcast you can see the output from the DreamPi software but also from the PPP service which is responsible for routing the connection.


Saturday, 30 January 2016

Setting up KallistiOS on Fedora

KallistiOS (or KOS for short) is the open source SDK for Dreamcast development. It can be a little tricky to understand the installation process so I'm just explaining it here, this is more for my own benefit than anything.

There are instructions for configuring KallisitiOS on the website, but they are focused on installing globally in /opt/ whereas I'm going to explain how to setup KOS in your home folder.

Friday, 29 January 2016

An Update on those Line Voltage Inducer Cables

I mentioned on the Dreamcast Junkyard Podcast that I was intending to build and sell some special phone cables which add the required voltage for a Dreamcast to connect with a DreamPi setup - official DreamPi cables if you will. At the time I was waiting for a test run of PCBs to arrive, and they have!

There are some minor issues with this PCB revision, but I have a working cable, here it is in all its glory:

As you can see, the power comes directly from the Raspberry Pi itself providing you have a spare USB socket. I've been forced to test this by playing PSO online for an hour, and I can confirm that the circuit works perfectly!

So straight onto manufacturing right? Well.. not quite.

Firstly, obviously I don't intend to sell cables with exposed circuitry, so before I sell any cables I need to get some boxes 3D printed. But more importantly, I think I can do better than this.

I think it should be possible to create an adapter box that plugs directly into the Dreamcast, leaving you to just connect any standard modem cable. Not only will this be more robust, but also be quicker and cheaper for me to manufacture (the cable costs £3-4 alone for a decent one).

The next revision of boards I send off will probably an attempt at this, and as end-to-end design, manufacture, shipping, soldering and testing takes about 3 weeks, I'm afraid I won't be shipping these for a little while.

Still, I've proven that it works, and this is a thing I can build. I'll keep you all updated!

P.S. This has all only been possible because of the electrical know-how of my mate Rob!

Monday, 25 January 2016

DreamPi 1.2 Released!

This is a bug fix release:

  • Pi to Modem communication now uses a fixed-baud speed. This will hopefully fix some issues that people were having sending commands to the modem but I'm not sure.
  • Earlier disconnection. The software now disconnects from the modem as soon as the handover to PPP is complete, this should allow for a faster disconnect/reconnect cycle when you finish a game and avoid the DreamPi software interfering with PPP.
  • More reliable startup. Occasionally there was an error on startup while detecting the modem. Now this will be caught and will fall back to ttyACM0 rather than crashing. A better fix would be to wait until the modem is ready - this will happen in a later release.
You can download the new release here.

Thursday, 21 January 2016

DreamPi 1.1 with Dreamcast Now! Released

I'm happy to announce that version 1.1 of the DreamPi software image is now available. This release introduces the Dreamcast Now! service (as discussed here) and also lays the foundations for a web-based configuration system.

As this release introduces some new features, this is probably a more unstable release than 1.0. 

Once you have the new image up and running on your Raspberry Pi, you should head over to to configure the Dreamcast Now! service.

This release also includes updated firmware for the Raspberry Pi and so it should now run on the PiZero.

Keep an eye on this blog for more updates! Lots more exciting things in the works!

Download the new release here!

Tuesday, 5 January 2016

Announcing Dreamcast Now!

I'm excited to announce a new feature of the DreamPi software which will be coming in the unstable 1.1 release!

Dreamcast Now! is a new service which allows players to see which and how many DreamPi users are online, and also what they are playing. You can preview the Dreamcast Now! service at the rather spectacular URL:

It looks something like this (on mobile):

But there's more! I'm working closely with the team to provide a level of integration with their site which will allow you to see who's online without ever leaving the confines of the Dreamcast.

I'll also be providing user-specific URLs for widgets that can be embedded in forum signatures to show when you are online.

I hope to release this over the next couple of weeks, a few select testers will be receiving test DreamPi images over the next few days so keep an eye on the page for online gamers!

How does it work (technical stuff ahead)?


It's all just a little bit clever. On boot a unique identifier is generated from your Raspberry Pi, this is your secret key which allows the service to know which DreamPi is online. When you connect to an online game, the DreamPi sends a message to the Dreamcast Now! service indicating that the user with that unique identifier came online. This is all pretty much anonymous, the whole communication happens securely over SSL and the only thing that is sent is the Pi's unique ID.

Once the game is connected, the first thing it will do is perform a DNS lookup for the game's server. The DreamPi software watches for the domain query, creates a non-reversable hash of the domain (using SHA256) and sends this to the server. Again, this is all over SSL and the server has no way of knowing what the domain was unless it happens to match one of the game domain hashes we have on the server. These domain hashes are never stored.

This is how the server detects when a DreamPi comes online and what game is being played.

What about usernames and profile images?

These are entirely optional. If you don't do anything you'll get an auto-generated username (e.g. Unnamed_12345) and just a default profile image will be shown. However it will be possible to browse to the DreamPi's IP address in your browser (e.g. dreampi.local) and enter a username, and a Gravatar email. The email is MD5 hashed before being sent to the server, the only data sent to the server that isn't just a hash value is the username. Usernames are not permanent, you "lease" them. They are associated with your DreamPi's unique ID but if you fail to go online for 30 days then they are free to be associated with another DreamPi. This is necessary so that if your DreamPi breaks, you'll be able to regain your username after 30 days by associating it with another DreamPi.

I don't like the sound of this, can I disable it?

Yes. It can be switched off from the same page you configure your username. It will be enabled by default though.