Paul Evans is a senior programmer in Austin, TX that loves to build great things. Before moving from the UK he worked for Lionhead Studios on tools for the Fable Franchise, Milo and other unreleased titles. He is currently freelancing in Austin after spending some time at Portalarium. You can find him on Linkedin, see other things he has written on his personal blog and AltDevBlogADay.org. You can also follow him on twitter @PaulECoyote. Everything in this article is Paul's opinion alone and does not necessarily reflect his employers views, nor constitute a legal relationship. Contact Paul if you are working on anything interesting!
Posts by Paul Evans
  1. ActionScript Tips for Programmers of C#/C++ ( Counting comments... )
  2. Idempotent - A Word in the Cloud ( Counting comments... )
  3. Behind the Scenes of Bit By Bit Games First Release ( Counting comments... )
  4. Travel Tips from an Englishman in Texas ( Counting comments... )
  5. Let me introduce you to Gameduino ( Counting comments... )
  6. Micro Talks ( Counting comments... )
  7. The XmlSerializer class in C# is asymmetric ( Counting comments... )
  8. JS1K Oregon Trail. Games & Demos in 1k of Javascript ( Counting comments... )
  9. Indies, how do you make a living? ( Counting comments... )
  10. Pop your head up ( Counting comments... )
  11. (Audio Post) Round Table: DLC ( Counting comments... )
  12. Do or do not ( Counting comments... )
  13. Cover Fire for Coders ( Counting comments... )
  14. Cats have nine lives ( Counting comments... )
Technology/ Code /

What is a Gameduino? It is an Arduino based gaming device that is a mixture between a science experiment and a classic gaming micro. It provides the kind of platform I grew up with (Oric-1, Acorn Electron, ZX Spectrum, C64, etc.) but with modern touches (USB, VGA, coprocessor).

I supported the Gameduino Kickstarter project and my reward was recently sent to me by the creator of the project, James Bowman. The community around this device so far is small but friendly. It includes electronics and programmers buffs from all kinds of backgrounds.

The Kit

One of the things that struck me when I first opened the box was how exposed everything seems! At some point I would like to either buy a case or mod something to hold the device; but as I have just moved from the UK to the Austin area in to a little apartment, I do not have the tools to fashion something myself just yet.

clip_image001

Here you can see the interfaces of the board. The ArduinoUno has a connection for USB and another for power. The Gameduino board provides a VGA connection and audio jack. The final board is a Joystick shield from SparkFun.

clip_image002

I put a pen in shot to give a sense of scale to the pictures.

clip_image003

The boards communicate to each other via pins and slots which can be seen in the picture above. The shields are designed in such a way that plugging things in the correct way feels natural. On my kit, the audio jack and USB are stacked directly in a way that makes it impossible to push the board all the way home; however, the pins are long enough that it does not matter.

After I constructed the device, the next thing I wanted to do was sit on the sofa with it and play on the television. After asking a few questions on the Gameduino answers forum I decided to try and use sixteen feet of VGA, USB and audio cable. I skipped buying a power supply as my television has a USB port - so I could buy a USB extension cable that is cheaper, less bulky and more generally useful.

Despite the length of the cable and low power draw of Gameduino, it works nicely (well for me anyway!) over that distance. So when playing the Gameduino, it only needs to be connected to the television - though granted via three cables. During development I use the laptop USB for both power and data transfer, while the TV acts as my screen.

clip_image004

Above you can see the boot screen of the Gameduino (which is on the right side of the Kinect under the television). It also plays a nice chord on startup.

Specifications

ArduinoUno (source)

Processor ATmega328 8-bit microcontroller
Clock Speed 16 Mhz
Flash Memory 32KB - 0.5KB used by boot loader
SRAM 2KB
EEPROM 1KB

Gameduino (source)

Resolution 400x300 - Compatible with any standard VGA monitor (800x600 @ 72Hz)
Color 512 colors, processed internally at 15-bit precision
Background graphics 512x512 pixel character background. 256 characters, each with independent 4 color palette. Pixel smooth X-Y scroll (wraparound)
Foreground graphics Sprites are 16x16 pixels with per-pixel transparency. Each can use 256, 16 or 4 colors. Four-way rotate and flip. 96 sprites per scan-line, 1536 texels per line. Pixel perfect sprite collision detection.
Audio Stereo. 12-bit frequency synthesizer. 64 independent voices 10-8000 Hz. Per-voice sine wave or white noise. Sample playback channel.
Memory 32 KB - addresses are 15 bit, last bit indicates read or write (via SPI interface)
Coprocessor J1 Forth CPU. 16-bit internal bus, 8-bit memory interface. 50 MIPS. Direct access to entire Gameduino memory. Executes code from set 256 byte range. Machine instructions very close to Forth. Single-cycle 16x16 bit multiply, plus barrel shifter. Fast, efficient stack machine.

Why

I wanted to get back to basics a little bit. My favorite language these days is C# but for a long time it was C++.

I believe constraints can force creativity in some interesting ways. Necessity is the mother of invention after all. The Gameduino is constrained with its specification, though has many interesting quirks I look forward to learning about. For example, the co-processor needs instructions in Forth!

Next

Practicing skills and learning new things is always more interesting when trying to accomplish something rather than just going through exercises. I plan to have a little game of my own running on it in time. I have not got that far yet, but below is a sneak peak.

clip_image005

Jan Boon has written an excellent emulator "gdemu" that provides a pretty good simulation of the hardware that has been allowed me to develop in Visual Studio without deploying to the Gameduino each time. I forked it on google code, but as I am also teaching myself git and git flow I imported that over to github.

I have started to get used to the processing based environment provided for Arduino. Projects are called sketches and basically include all the c/c++ source and header files in a folder. It is an IDE that provides a way to compile and upload your program, plus serial monitor which is helpful for sending debug messages. I do not think there is a way of stepping through code on the device without more hardware though.

My aim is to try some test driven development with the Gameduino now I have explored it a little. Ideally I would like my own project to be built and deployed to the device via a single line on the command line or a double click of an icon… I am not there yet though.

If anyone has any Gameduino projects to share or has worked on similar devices, please say something in the comments. It would be nice to know that people are reading this!

Further Reading