A hand-holding exercise – the Nintendo DS

I’ve always been a fan of Nintendo’s portable game devices, from the early Game and Watch units to the various editions of the Game Boy. Dr Mario on the original Game Boy is still one of my favourite games to this day. I’d go as far as saying it’s better than Tetris – I once played it for so long that when I went to sleep and closed my eyes I could still see small pills falling downwards.

I’d already helped Nintendo along by getting a Game Boy Color and Game Boy Advance (which I picked up on a holiday in Japan), so when the chunky metallic blue Nintendo DS came on sale I got one. The launch titles weren’t too bad and showed what the touch screen brought to the party. I initially thought the dual screens and stylus were seen just gimmicks but they did bring some genuine innovation to handheld games.

Gameboy Color, Gameboy Advance, Nintendo DS and Nintendo DS Lite.
A family reunion.

I’d obtained flash cartridges for the DS’s ancestors. These let you put multiple dumps of ROM images on one cartridge – so you only needed one cartridge and didn’t have to carry all your games around with you. Apart from software piracy, they unlocked the world of home brew on these devices. The Game Boy Color and Game Boy Advance had a surprising amount of home brew software- I had versions of Jet Set Willy and Jet Pac for the Game Boy Color and a full Spectrum emulator for the Game Boy Advance. Outside of doing proper development work for Nintendo and having access to the official developer kits and hardware, flashcards were the only way for home brew developers to get their code running on the Game Boy and Game Boy Advance.

Jet Set Willy on the Gameboy Color.
Who needs a Vega Plus?

The first DS flash card I got was called the GBA Movie Player. This fitted into the DS’s GBA cartridge slot (Slot 2). It had to go here as it was too large to fit inside the native DS cartridge slot (Slot 1). The card had a full sized SD card slot which you could copy files on to. Nintendo had also implemented some security on the DS where you could only run code from Slot 1 if the correct RSA security signature was present. All legitimate DS cartridges had this signature so they could run on the device.

To get round this, a second device called a Passkey had to be fitted into Slot 1, alongside with an actual DS game. The passkey then used the signature from the real game to get the code running from the Slot 2 device. While this worked, it wasn’t an ideal solution as the DS would no longer lay flat on a surface as the Passkey and donor game hung out of Slot 1. The situation would eventually be improved by the continual shrinking of flash memory technology. SD cards were superseded by Micro SD cards. The size of these cards easily fit inside the Slot 1 cartridge form factor.

One Slot 1 flashcard went on to become the standard, the google or photoshop if you will – the R4. I bought an original one from a computer fair for £30 pounds. As befitting for a device that enables piracy, the R4 was copied and cloned and various knock off versions flooded the market. The R4 removed the need for a Slot 2 device and also did away with the need for the Passkey.

Nintendo DS flashcards.
The inevitable march of technology.

The R4 flashcard made piracy a lot easier on the device. I remember the guy who sold it to me at the computer fair telling me I could fill the Micro SD card with games and his genuine surprise when I told him that you could also run home brew titles like Lemmings DS or emulators on it too. Subsequent versions of the DS hardware and some games included more checks to stop games running if they were being played from one of these devices. Unsurprisingly newer cards were produced and in game protections were removed by the groups releasing game dumps for these devices.

It is fair to say that the original DS is not a looker. The chunky casing and styling was a nod back to the original dual screen Game and Watch devices. Nintendo released the much slinkier looking DS Lite. This was basically the original Nintendo DS put on a severe diet and taking styling pointers from Apple. I held out for a while before purchasing this as I was slightly miffed at buying the first version at full price only for this much improved version to turn up not much later. There is a lesson here – never buy the first version of a Nintendo product.

Nintendo DS and a DS Lite.
Sibling rivalry.

As I now had a chunky blue paperweight in my possession, I decided to perform some light surgery on it. Some clever people had managed to crack the security on the DS firmware so you could run Slot-1 code without the security signature. You just needed to re-flash the firmware. This involved removing the battery cover and jamming a metal screw into an innocuous hole inside the casing to short a connection – what could possibly go wrong? After a nervy few minutes, I ended up with a modded DS and not a chunky bricked blue paperweight.

Home brew development on the Nintendo DS was made possible by libnds – a subset of the devkitpro home brew development kit (this also supported other devices like the GP32 and Game Boy Advance). Installing this gave you a gcc style environment to compile C / C++ into the .nds file format that ran on the Nintendo DS. As this development kit was not officially sanctioned by Nintendo, accessing the features of the device had to be done from scratch and not using any copyrighted material. In earlier versions of libnds, the routines to handle and read locations from the stylus and touchscreen were not as accurate compared to that in commercial versions. As the developers unlocked the secrets of the device, these problems went away.

The first thing I managed to get running with the libnds development kit on my DS was a hacked up port of Quirky’s Chaos Advance. This itself was a port of the seminal ZX Spectrum game Chaos for the Game Boy Advance. This utilised the larger screen of the DS so you no longer had to scroll the screen around to see the full game board – the Spectrum screen resolution of 256 x 192 pixels (minus the border) was the same as the DS. It also added it some basic touch screen input so you could enter player names with an on screen keyboard or select spells.

I did the bulk of the work using an emulator – Dualis originally, then no$gba once it added more Nintendo DS features – as the workflow was much faster than having to compile the code, take the SD card out of the flash card, write the new .nds file from the PC to the SD card, put it back into the flashcard, turn the DS on and then select the file from the loader menu. You couldn’t completely avoid using real hardware as the emulators were still quite early on in their development so you could end up in situations where the emulator crashed running your code, whereas the DS didn’t and vice versa.

ChaosDS screen shot
While it’s all kicking off below, the upper screen is not being used to it’s full potential.

When I did encounter crashes or bugs either in the emulator I then had the fun or trying to track the problem down without a debugger. I’d been developing on Windows with Visual C++ for some years and had been spoiled rotten by it’s lovely debugger. I had to switch back to printf-ing debug output onto one of the screens with messages to see how far the code had gotten when the crash occurred – Got here, Got here1, Got here2 and so on. I used this as a divide and conquer mechanism to narrow down the section of code that was causing the issue.

Quirky eventually updated his GBA port to run on the Nintendo DS, negating the need for my hacked up version. This was not a wasted endeavour as it gave me a good grounding in developing homebrew on the Nintendo DS with libnds. I was now on the look out for a new project.

To be furthered…

Oh man, the future!

My Aunt and Uncle did not have children so when we used to go and visit them my brother and I would have to take something with us to keep us entertained. This all came to a halt in the late 80s after my Uncle, for reasons unknown to me – as he’d never shown any interest in the subject up to that point – decided to purchase a home computer. He’d bought a Commodore C64.

Doubling down on this with a disk drive, printer and freezer cartridge, he’d also managed to obtain a large box of copied disks from someone he worked with. If this wasn’t exciting enough for us, the disk drive and printer combination added an extra frisson. If you powered the C64, disk drive and printer in the wrong order, you could end up damaging the C64. Pocket money crippling woes aside, this new acquisition posed another problem. Although we now had something to do, we were technically sleeping with the enemy.

Back in the 1980s home computer wars, you picked a side and stuck to it. I’d bought myself a ZX Spectrum 48k+ in 1984 as I wanted in on the home computer craze. The C64 wasn’t even on my radar due to the sheer cost of the machine. The Spectrum held sway at my primary school. There were a couple of people with Amstrad CPC 464s and a few Commodores. A friend of my mother who went to a different local school had bought their child a BBC Micro which we got to play on when we went round to visit.

Parents did not buy the Beeb for games. It was for far nobler pursuits like education or running a small business from. Even the big ticket games for it like Elite (fiddly space based ship simulator with you having to run a business in space) or Revs (fiddly Earth based race car simulator) seemed to revel in being difficult for small kids to play and required you to memorise at least fifteen different keys. The lack of games for the Beeb saw it off as a rival. In our eyes, any machine that didn’t have a version of Ghostbusters was a spent force. This combined with the lack of a proper joystick – from memory, a weird non centring analogue contraption – sealed the fate of the Beeb as an also-ran in the playground games scene.

The C64 was a different proposition. It did have proper joysticks. It did have Ghostbusters and it played the music from the film all the way through the game. Coming from the ZX Spectrum, the first thing to note about the C64 is how loud and musical it is. This is thanks mainly to it’s SID chip. In game music on the Spectrum was do-able but was tricky. Manic Miner and Jet Set Willy play single note beeper music throughout the game but the full on musical riot of the soundtrack provided by Rob Hubbard to Thing On A Spring was in another league.

The disk drive, at the time was a revelation too. Yes, even the notoriously slow C64 disk drive seemed nippy after spending minutes loading (or not loading) game in from tapes. Full games loading in under a minute and not having to rewind or turn tapes over for multi event titles like World Games left a mark. The graphics were more colourful – if a little chunkier and browner in places – and didn’t clash.

These occasional forays into the C64 did not cause major problems. I managed to get a 3rd party disk drive for my Spectrum +2 (my original 48k Spectrum had met a grisly end having a Kempston joystick interface knocked out of it’s expansion port with the power on which spelt insta-electra-death to the internals) and all was well with the world. But not for much longer. A storm was coming.

As the 80s ticked into the 90s, the old guard of home computers was under attack. The 16 bit machines released in the mid to late 1980s were now becoming more affordable and were becoming the machines of choice. The move up to secondary school had widened the social circles I moved in and while there will still C64s, Amstrads and Spectrums there were other, more affluent kids who had Atari STs and Commodore Amigas.

My first experience of the 16 bit world was near Christmas 1990. Not in a computer shop but in a music lesson at secondary school. As it was the last lesson before Christmas, the music teacher had brought the Atari ST that lived in the ‘music studio’ opposite (a soundproofed broom cupboard with a MIDI keyboard) into the classroom as a treat. I got to play a conversion of Metrocross.

Sir, are you sure this is a legitimate games compilation?

Like that old magazine advert from FAST, the teacher was running copied software on the school’s Atari. The following Christmas, he was taking copies of disks that a classmate had bought in, including a James Pond & Lotus Esprit Turbo Challenge compact disk. I didn’t get much time on it as once you were killed, someone else was let on to have a go. But the future seemed certain. I’d be getting an Atari ST at some point as my next computer and I’d be able to swap games easily as there seemed to be groups of people chucking out disks full of games.

This was a revelation coming from a tape based machine like the Spectrum. Although there were ‘cracked’ versions of software available for it these tended to originate from outside the UK. Most of the time you could copy a game with a twin cassette deck or using a freezer interface to snapshot the entire game to tape or disk. Even my dad managed to circumvent the colour code protection on Jet Set Willy by writing out all the colour codes as numbers on an A4 piece of paper.

So as I started to plan how many future Christmases I’d have to mortgage to get an ST, fate intervened in the shape of my Uncle. Again, for reasons that were never massively clear, he’d bought a new computer to replace his C64 – the Commodore Amiga 500. I don’t think it was brand new new as again, it came with a disk box full of hand labelled games. Labels that read ‘Xenon II’, ‘R-Type’, ‘Stunt Car Racer’ and ‘Shadow Of The Beast’.

The hand that rocked the boat.

The white screen with the hand holding a floppy disk greeted us when my brother and I switched the Amiga on – fortunately a much simpler and less costly operation than the bomb disposal-esque startup routine of the C64. But where to start? Around this time in the Spectrum’s software life cycle it was trying to keep up with these new upstarts with various ports of popular 16 bit games back on to the 8 bit platforms. I’d heard of a game called Shadow Of The Beast from a preview in Your Sinclair magazine, so I popped that in the drive and the drive sprang into life.

I later found out that Shadow Of The Beast was often used by computer shops to draw the crowds in and to show off the Amiga’s music and sound capabilities. In both aspects it performed admirably. The music and graphics as the game loaded were amazing. Then the game started and the parallax scrolling kicked in. In hindsight Shadow Of The Beast is a poor game but my brother and I were suitably impressed punching and kicking waves of smoothly animated enemies.

After this we listened to the Amiga belt out a song from Bomb The Bass in the intro to Xenon II. An actual song, with samples. We hurtled round a roller coaster race track in Stunt Car Racer and winced when we heard the damage we had inflicted on the car. We enjoyed the novelty of playing Rick Dangerous in 1940s cinema serial black and white instead of the black and green we were used to on the Spectrum.

As if this wasn’t enough to take in, there was also the hand eye coordination challenge of using a mouse. This was the first time I’d used a mouse in anger – up until then I’d only ever seen them advertised as peripherals for the Spectrum or during Micro Live on the telly. This in combination with the icons and windows of the Amiga’s Workbench meant I was finally living the blue, white, black and orange WIMP dream!

And then it all came to a grinding halt. We’d gone to visit my Aunt and Uncle on a Sunday evening and tomorrow was a school day. Falling from the dizzying heights of cutting edge 16 bit technology to be dumped back into yesterday’s 8 bit future. What a come down! As the following days turned into weeks and months, I still liked my Spectrum – I even bought a mouse for it to try and recreate that buzz – but this brief foray into the future had been a wake up call.

I didn’t really have much choice but to make do with what I had, as the Amiga was more expensive than the Atari ST I had lined up to replace the Spectrum. My brother managed to save his money and got an Amiga A600 for Christmas some years later. A year or so after that, I managed to get the funds together to buy an Amiga 500 Plus. Ironically by the time I’d managed to jump on the 16 bit bandwagon, the Amiga and ST had been superseded by the Mega Drive and Super Nintendo and the PC was starting to get it’s act together too.

As everything changed in the great switch over from 8 to 16 bit, everything stayed the same. Spectrum vs Commodore C64 was now Atari ST vs Commodore Amiga and PC owners were the new Beeb owners. But for a couple of hours my brother and I travelled in time. And it was exhilarating.