Inspiration

The Sony Playstation released in the USA on September 9, 1995. Gaming classics like Final Fantasy VII, Spyro the Dragon, Crash Bandicoot, and Resident Evil had their start on the console. At the time, those games were cutting edge and were developed by large teams with large budgets, but nowadays the tools and knowledge exists such that someone could make something amazing in their bedroom. Today, games are developed for platforms which usually have gigabytes of storage and memory using the latest technologies and techniques; We wanted to challenge ourselves to create a game for a much more constrained system. The Playstation has only 2MB of RAM and 1MB of VRAM with assets loaded from the CD-ROM which can hold at most 650MB. Games run directly on the hardware without a virtual memory system, leaving developers to figure out a lot of things for themselves. Most games at the time used completely bespoke methods for memory management, managing 3D models and textures, printing text, playing sounds, and anything else.

What it does

It's a simple space shooter game which runs natively on the PS1. The game incorporates some custom textures and audio, and has procedurally generated 3D objects. These are turned into a .bin and .cue file containing the game assets and executable, and burned to a CD to run on the console.

How we built it

We used the a converted version original Playstation PsyQ libraries (which is able to be linked by modern GCC), official Sony documentation, and a cross-compiler GCC toolchain for MIPS architecture. We also leveraged a lot of resources from the broader PS1 gamedev community. We used psxavenc to convert sound effects to play on the SPU, and img2tim to generate textures in the proper format. We also use mkpsxiso by LameGuy64 to generate the disc image from an XML manifest. We used the PCSX-Redux emulator to test our code before finally burning it to a CD-R and playing it on official Playstation hardware.

Challenges we ran into

Although one of our developers had some limited experience with making an assembly patch for a PS1 game, none of us had ever made a full game. Getting the starting template running with debugging text was simple, but expanding on that to have textures, CD audio, and 3D objects was very difficult and required a lot of scaffolding just to get the systems working. A lot of time was spent just reading documentation and code examples and constantly editing and retrying until we had something that didn't crash. Programming in C on the PS1 has similar constraints to modern microcontrollers; Code runs bare-metal without an OS, so you have to implement a lot of things yourself, and often can't even rely on the C standard library. We used python and Make to set up a build pipeline where we could quickly rebuild the game image and run it in the emulator to preview our changes and ensure the game still runs. All modern game engine editors have some kind of 'quick preview' feature like this built in, and it was interesting to build this from scratch with just some simple scripts.

Accomplishments that we're proud of

We got the game running on a real Playstation!

What we learned

Writing C for the PS1 put a lot of things into practice from our coursework in Systems Programming and Machine Architecture. It's fun that we get to control every single nuance of the system, but it's also a hassle that modern systems and game engines conveniently abstract from us.

What's next for us

making a better game on limited hardware and lots of sleep :-)

Built With

Share this project:

Updates

Submission history