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!