My Android Apps

I’ve had my Android phone about 18 months now. As the sort of person who likes to program everything that isn’t nailed down (starting from my dad’s ZX Spectrum and eventually progressing up to supercomputers) I just had to have a go at making some apps.

Android is good for coding your own apps, which is one of the reasons I chose it. For iPhone and iPad you need to use a Mac for development (which I don’t have and have no intention of getting) and you also have to either pay a developer fee of $99 per year or jailbreak your device. Even then you can’t test your code on anyone else’s phone unless they also pay the fee or jailbreak it. Thankfully Android is more accessible for programmers… you can just download a free software development kit for Windows, Mac or Linux and get started straight away.

Most of my apps are quite boring. There’s one that backs up all my contacts and text messages to a file and puts it in my Dropbox folder automatically. That was the first one I wrote and I’ve used it a lot ever since, though I improved it and added the Dropbox integration more recently. Another keeps track of my finances, and there’s one that allows me to access the task tracker I use (without which my life would probably be frighteningly close to unravelling completely) from my phone. But the most fun ones are the emulators.

Emulators are programs that make a computer behave like a different kind of computer. They let you run old programs on hardware that didn’t even exist when they were written. There are huge numbers of emulators out there allowing you to turn your PC into any kind of old, clunky computer or console imaginable. They’ve always interested me, partly because I like old computers for nostalgic reasons and partly because of the technical intricacy that goes into making emulators work. So since I started programming on the Spectrum and could still just about remember how it works inside out, it seemed fitting that I should code a Spectrum emulator for Android.

Here it is, running one of my favourite old games (Spellbound Dizzy) on my phone. I’m quite proud of it… I think it works rather well. (If your definition of “well” encompasses turning a cutting edge smartphone into an ancient, primitive computer, that is 😉 ). It runs at full speed, which the other emulators I tested didn’t seem to quite manage on my slow-ish HTC Wildfire.

Then I decided that at this point it wouldn’t be too much work to make a Sega Master System emulator as well. I never owned a Master System (went straight from the Spectrum to Megadrive and our first PC) but I loved playing Sonic on other people’s whenever I got the chance.

It uses exactly the same main processor as the Spectrum and a lot of the other emulator code could be shared as well, so I got it up and running a lot quicker than the first one. The only hard bit was getting the Master System’s graphics working properly.

Finally (for now) I did a Gameboy emulator as well:

Tetris is even fiddlier to play with the controller on the touchscreen, though.

If you have an Android phone and feel like reliving the games of the early 90s, you can play with my emulators too. I put them online here (you will need to have the “Unknown sources” box ticked in your application settings to be able to install them). I’ve only tested them on two phones so far so it’s possible they won’t play well on all devices. If they don’t seem to work properly, please feel free to get in touch and I might be able to fix them, though I can’t promise anything. There are probably better emulators out there for all these machines, I really just made these ones for my own amusement.

(As well as installing the emulator app, you will need to put some games on your memory card. There are hundreds if not thousands of Spectrum games on World of Spectrum, which seems to be at least semi-legitimate. I don’t know of any legal sites for Gameboy and Master System ROMs but they’re pretty easy to find by googling anyway).

Have fun :).

Raspberry Pi!

I have to admit I’m getting really excited waiting for this to be released…

This pic from the official site, not taken or owned by me... if there's a problem with me using it, let me know and I'll take it down!

It’s a tiny little credit card sized computer, designed for teaching kids programming. Despite not being a kid (well, not physically anyway) and already knowing how to program, I want one.

Or several… they’re only going to cost 25USD for the basic Model A or 35USD for the slightly more powerful Model B. But despite the ridiculously small size and price they are capable of playing full HD video, which is more than my netbook can manage. This is made possible by the fact that the Raspberry Pi is using a mobile phone processor rather than a normal PC processor. (The main processor core, an ARM11, is very similar to the chip in my HTC Wildfire, but the one in the Pi runs a bit faster and is coupled with a very powerful graphics processor to handle video decoding and 3D acceleration).

The idea of it, a simple little machine that plugs into a TV and is easy to write your own programs for, takes me back to the old home computers of the 80s and early 90s that I first learned to code on. I did most of my learning on a ZX Spectrum +3, which is probably still in the wardrobe somewhere along with a BBC Micro Model B+ that I acquired a bit later. They were laughably primitive machines by any sort of modern standard, but I miss the simplicity and accessibility of them. You could turn them on and immediately start writing a program, and if you were curious there was plenty of information out there that would let you learn how the machine worked inside out.

The Raspberry Pi won’t be quite the same as that. It will still run a modern operating system (some form of Linux; Windows won’t play well on hardware like this) and elements of it, especially the graphics chip, will be too complex for most people to learn fully. But it seems like it will be a fairly large step in that direction. The Model A and Model B naming, in fact, is a nod to the first two versions of the old BBC Micro.

Normally when I want something like this, I’d probably buy one eventually, but have nagging doubts at the back of my mind. “You’re already working with computers all day”, they would say. “Why do you want to spend your free time hunched in front of a screen playing with code as well when you could be enjoying so many of life’s other rich pleasures instead?”. “But I want toooo… it’s fuuuun….”, another voice would argue back in the tone of a whining five-year-old.

This time, though, I’ve neatly side-stepped that whole dilemma by offering to supervise a project at work involving Raspberry Pis. So I can legitimately play with, um, create something valuable and useful with them in work time and even get paid to do it. Yay!

Can’t wait for the release date… which is hopefully January 2012 :). Next problem is how to actually get hold of one… seems I’m far from the only person to be disproportionately excited about this, and I wouldn’t be surprised if the first batch sells out pretty quickly.