The most commonly used Playstation 1 Programming Language


What programming language were Playstation 1 games written in? Were they mainly written in C or MIPS Assembly? What were the alternatives?

The most commonly used Playstation 1 Programming Language was C. Games became too big to be written in Assembly Language alone. C++ was too new for the industry at that time. Although there were exceptions to the rule, the industry standard was C.

But why was that? And what about the exceptions? This article will answer these and other questions.

Why C was the most commonly used Playstation 1 Programming Language

On Systems before the PlayStation 1, developers would oft program their games in the system appropriate Assembly Language. At the beginning of the 1990s programs and projects got bigger and memory capacity increased. It was very daunting to write a program of that scope in the Assembly Language. With the C Programming Language, the development speed increased.

The Sony Playstation 1 had an R3000 MIPS RISC processor. The optimization you can get with Assembly is not too much, compared to the Amiga Motorola 68k or an ARM processor. The C compiler already generates well optimized code.

Portability was also a big consideration. You could compile C on almost any system available. Publishers wanted to bring their games on different platforms like Amiga (though declining), PC and consoles like the Playstation 1 or the Nintendo 64. C was the quasi industry standard at that time.

Another reason to use C was that Sony provided very good libraries for the system functions. This improved development speed even further. The SDK was easy to use and made the use of Assembly Language almost needless.

Exceptions to the Rule

Not every game was written entirely in C. One famous exception is Naughty Dog’s Crash Bandicoot from 1996. The Gameplay Logic is developed in LISP and C is only used for the system functions. Also Forth was used sparingly. Some developers used script languages to develop logic. And despite the good SDK, some developers programmed graphics-related parts in Assembly Language.

One should also take into consideration that C itself was comparatively new for many teams. If they were used to Assembly, for instance, they would use it preferably.

The Playstation 1 and C++

There may be programs, or at least parts of programs, that are written in C++. But it had not that many proponents on the PSX as it hat on the PC at that time. There are many reasons for that.

At first, memory allocations were harder to keep down in C++ than in C. Then, C++ was too young for the industry. Very little development teams had real experience. And there was no internet as we know it today, with tutorials and videos. The advantages compared to C were too small. There was no STL or boost library. And last but not least the C++ compilers were slow as hell.

Playstation 1 Programmer Development Kit

One cannot program a Playstation game directly on the Playstation. Before the PSX, Sony had a development console for each gaming console where you could develop. For the Playstation 1 Sony decided to use the PC as programming platform. The data could then be transferred and tested on the PSX with a Development Kit.

The official Development Kit for the Playstation 1 was the PsyQ. Sony only gave it to authorized and well known development studios for the not so cheap price of about $12,000. All subsequent hardware tools and software upgrades were at least included.

For the not so lucky, authorized or rich developers, Sony introduced the Net Yaroze Development Kit in 1996. It was made for hobbyists and cost about $750. The downside here is that games made with the Net Yaroze could only be played by users that also had a Net Yaroze.

What engine did Playstation 1 Games use

The Playstation One was before the time of generic engines as we know them today. Games were in general coded fairly close to the hardware. Although there had been engines earlier on (like the SCUMM VM from Lucas Arts), the workflow for game development was not as settled as it is today.

The game engines were mostly property of the teams that created them. It suited one or more projects for a studio but was not generalized like Unreal or Unity engines are today. For example, Andy Gavin from Naughty Dog created a game engine called “Game Oriented Object LISP 2” for Crash Bandicoot.

Geometry Transformation Engine (GTE)

Despite its name, the Geometry Transformation Engine (GTE) is not a software engine for creating games. It is a Co-Processor that is attached to the main processor of the Playstation One. Its purpose is doing mathematical operations fast. It is also called Cop2 because it is the second Co-Processor.

By design it is ideal for mathematics that is required for calculations in 3D space. The main CPU is much slower in this specific task.

Mathematical Calculations in 3D space mainly consist of, but are not limited to:

  • 3D Matrix Calculations (Rotation/Translation/Projection)
  • Lighting Calculations
  • Colour Calculations

MIPS Processor Architecture

MIPS Computer Systems designed the R3000 processor. It had RISC architecture and implemented the MIPS 1 Instruction Set Architecture. It was a 32 Bit processor and could operate at 20, 25 or 33.33 MHz.

RISC stands for Reduced Instruction Set Computers. This means that the instructions for the CPU are processed within one cycle. This reduces the number of instructions per cycle at the cost of a higher number of instructions per program. The opposite architecture is CISC (Complex Instruction Set Computer). Here the number of instructions per program is reduced, but the trade off is a lower number of instructions per processor cycle.

You can find a good and detailed comparison between RISC and CISC here: Stanford Edu (opens in new tab)

Conclusion

Although there was the possibility to use all kinds of programming languages, C dominated the Playstation One. The reasons were portability, standardization and good support from the manufacturer Sony. C++ was on the horizon but at that time mainly used at the PC.

Marco Lieblang

Professional Programmer since 2003, passionate Programmer since the mid 90's. Developing in many languages from C/C++ to Java, C#, Python and some more. And I also may know a bit about Assembly Languages and Retro Systems.

Recent Posts