I’ve bought a few old devkits from ebay recently and have been having a little play with them. Old devkits are cool little bits of history, but become even more interesting when you still have the software to use them! 

The first unit I got hold of was an old PSX (PlayStation 1) blue debug unit, these are basically like retail units but will play unsigned code. Back in 2000 I wrote my own developer ROM using a neat little hacker tool called EzORay

This cool little tool let you burn your own ROM onto this flash cart, and so with that, I wrote a full MIPS rom that pretended to be the official devkit – but cost only £10, and not the £15,000 of the official PSX devkit.

SN-Systems wrote the PC tools, and a little COM driver, that the debugger used to talk to the hardware. So, using another very cool little tool called SoftICE for DOS, I hacked the coms protocol, wrote my own driver, and suddenly, the whole office could have a proper devkit – instead of just 5 or 6 people. This was a game changer for our devs, having access to a full devkit – including artists! I was able to do a reduced version for them that let them preview graphics on a real device. This was obviously unheard of back when a devkit cost so much, companies just couldn’t afford that for an artist to look at some pictures.

Writing the cart was great fun, and Russell Kay – who owned Visual Sciences at the time, didn’t tell me he was trying to avoid buying the devkits. He’d decided to give me 2 weeks to see if I could get something working. I got pretty far with the devtools downloading game code, running etc. but I was having a trouble with single stepping. it just didn’t work. It could step one, sometimes two instructions, then it’d just run.

I spent a good couple of days trying to figure this out, then I realised what a bit of code I’d been looking at did. You see the original hacker ROM had 4K of “nops” with a return at the end, and it kept calling it. I had no idea why. Then it came to me. The CPU cache. The PSX has a 4K cache, and by running a function with 4K of NOPs, it’d flush the cache, allowing the software breakpoints to actually work again.

Once I executed the NOPs before returning to the game, everything worked fine. Russell then smugly told me what he’d been planning, and I started to add more dev features, like remote file systems etc.

Having our own devkit ROM was very cool, it meant we could do some really neat things, not only giving artists tools, but also testers. They could play the game, and then when it crashed, they could flip the little switch, and then run a PC tool that would “snap shot” the whole game – sounds and video RAM included, ZIP it up, and put it up on an internal test website. Programmers could then download the crash, upload it to the cart, and debug the crash – complete with full stack trace, symbols, source code – everything.

After all this, Russell decided to actually make some real, custom dev carts. The action replay was fine, but official devkits had extra memory, where as these carts could only run release builds as all we had was the 2Mb the machine came with. So Russell commissioned someone to design and make us a cart with an extra 2Mb “debug” memory. I had to write my own flash code this time. 

Flash memory is pretty simple to use, you basically write patterns to addresses and the flash detects this and then lets you write to the flash ROM. You can see that at work in the code above. Once I had upgraded the ROM to use the new parallel port COMs, and did the flash code, I then added into our PSX memory manager to allocate memory from the new debug memory. It was slow to access, but that didn’t matter for debug builds. I really wish I’d saved one of these, but I guess they’ve long since been scrapped by now.

The last thing I did back in the day, was create a VSSEND boot disk that let me send stuff via the PSX serial port. I can’t quite remember why I made this, it might have been so I could mess about at home, but I’m not really sure. So, I’ve ordered a PSX link cable, and a couple of serial to USB things, and I hope to try and create a new PSX to USB cable – this will probably fail massively, but it’s worth a shot. I’ve still got the VSSEND PC C code, so I hope to rewrite this in C# and be able to send code to the debug PSX. That’d be fun….