PlayStation Architecture
The original Playstation. Released on 03/12/1994 in Japan, 09/09/1995 in North America, 29/09/1995 in Europe
Showing model 'SCPH-1000'. Remaining DRAM is fitted in the back. Later models included SG-RAM instead of VRAM and removed most of the I/O

A quick introduction

Sony knew that 3D hardware can get very messy to develop for, for this reason their new console will keep its design simple and practical… Although this may come with a cost!


CPU

The main processor is a modification of LSI’s CoreWare CW33300 which, at the same time, is binary-compatible with SGI’s MIPS R3051. This chip runs at 33.87 MHz and it features:

Like other MIPS R3000-based CPUs, it supported configurations with up to four coprocessors, Sony customised it with two:

Additionally, there’s an extra processor found in the main CPU:

Taking over the CPU

Sometimes any subsystem (graphics, audio or CD) may require large chunks of data at a fast rate, however the CPU may not be able to always keep up with the demand.

For this reason, the CD-ROM Controller, MDEC, GPU, SPU and the Parallel port have access to an exclusive DMA controller that takes control of the main bus whenever they require it.


Graphics

Graphics data is manipulated by the CPU with the cooperation of the GTE and then sent to Sony’s Proprietary GPU for rendering.

Drawing the scene

If you’ve been reading the Sega Saturn article, let me tell you that the design of this GPU a lot simpler!

Insomniac’s Spyro: Year of the Dragon will be used as example to show how a scene is drawn.

Models

Models
Primitive view of the scene

To start with, the GPU uses triangles as primitives to form 3D models. Being the only available primitive means that backgrounds and foregrounds make no difference in terms of composition (both are made of triangles).

2D games inherit the same nature: They are just flat polygons (two triangles joined to form a quadrangle). Furthermore, the GPU includes extra routines for handling quadrangles as sprites.

Compared to the more complex Sega Saturn, all graphics are drawn into a single frame-buffer.

Shaders

Shaders
Gouraud shading in action

In order to apply lighting effects over these polygons, the system provides two algorithms:

  • Flat shading: Each primitive has a constant light level.
  • Gouraud shading: Each primitive’s vertex has its own light level, then the brightness between each point is automatically interpolated. As you can imagine the results are more realistic. On the other hand, this algorithm is not available for sprites.

The reason of having this choice comes down to the fact that Flat shading provides ~2.5 times more polygons per second than Gouraud, so it’s important to optimise which polygons need a more realistic shading than others.

Textures

Textures
Textures applied (Tada!)

The GPU applies a very cheap routine called Affine Texture Mapping to stamp textures into our polygons.

This technique only operates using 2D coordinates (x/y values) while discarding the third coordinate used for perspective (z value).

Subsequently, clipping is applied to skip operations over unseen polygons.

The system also includes the following effects available to use:

  • Semi-Transparency: Simulates light passing through multiple textures.
  • Dithering: Soften sudden changes in colour while adhering to the same colour palette.
  • Fog: Simulates smoke in the environment.

It’s worth mentioning that the PS1 happened to excel at these features!


Designs

Here are some examples of game characters designed from the ground up for the 3D era, they are interactive so I encourage you to check them out!

3D model
Spyro the Dragon (1998)
413 triangles
3D model
Crash Bandicoot (1996)
732 triangles

Playing with VRAM

The system uses an adaptive frame-buffer to optimise VRAM usage.

In essence, while the GPU can output an impressive resolution of 640x480 pixels with 24-bit colours (16.7 million), most CRT TVs of that era could only display lower specifications. So instead of wasting valuable VRAM, the GPU can decrease the dimensions of the frame-buffer so developers can instead distribute VRAM according to their needs (this is what adaptive is all about). A common setup consisted in dividing the big frame-buffer into two with lower resolutions, then using page-flipping to render multiple scenes at the same time, and finally switching between both frames whenever they needed it. All of this for the user to notice faster loading times!

Additionally, since we have 1 MB of VRAM available, our suggested layout only consumed ~1/3 of it. The rest was often used to store colour lookup-tables and textures that, combined with 2 KB of texture cache available, resulted in a very convenient and efficient setup.

Secrets and Limitations

Whereas the PS1 had a very simple and suitable architecture, problems ended up arising anyway. Surprisingly, certain issues were tackled with very clever workarounds!

Wobbling textures

Textures jiggle a bit while they move
Square Soft's Final Fantasy VIII (1999)

The routines used for applying textures do have a couple of issues:

  • GPU coordinates are limited to fixed-point precision (no decimals): This contributes to sudden jumps when polygons move slightly.
  • As you know, Affine transformations have no sense of perspective. In a nutshell, the result can be quite deceiving when the camera is close to the polygon and its angle is perpendicular to the viewer. This also affects clipping.

This explain why users may notice instabilities while playing some games. The effect is also called texture warping and these games often resorted to tessellation (dividing a big polygon into smaller ones) in order to reduce these unwanted effects.

Pre-rendered graphics

Pre-rendered background
Scene with Pre-rendered background
The way models interact and move is essential to trick the user's perception
Square Soft's Final Fantasy VII (1997)

If a game strived for a more realistic scenery than the GPU could provide, one available option was to stack two triangles and use the Motion Decoder to feed pre-rendered cinematic on them. FMV video could weight a lot of space, luckily the CD-ROM was prepared for this.

Some games relied on it specifically for composing backgrounds and, honestly, it was quite convincing to see them in a CRT TV, obviously modern emulators with upscaling capabilities will tell on very quickly.


Audio

The Sound Processing Unit or ‘SPU’ takes care of this. It supports the enormous amount of 24 channels of ADPCM samples (a more efficient version of the well-known PCM sampling) with a sampling rate of 44.1 KHz (CD quality).

This chip also provides the following capabilities:

512 KB of buffer is used to transfer audio, this memory is accessible from the CPU and CD controller, the latter will reserve it while playing an Audio CD.


Games

Similarly to the Saturn’s boot process, after turning this console on, it will:

  1. Execute a small OS found in the BIOS ROM.
    1. Initialise the hardware.
  2. Display the splash screen.
  3. If there is a CD inserted, the CD-ROM controller will check if it’s genuine:
    • It is: The controller will allow to read its content.
      1. The CPU will look for ‘SYSTEM.CNF’ and continue execution from there.
    • It’s not: The CPU will display an error message.
  4. With no CD inserted, the CPU will open the memory card manager, the user is now in control.
    1. Inside the manager there’s an option to open the CD audio player.

Games have all the facilities that the CD medium provides: Large storage (640 MB), good audio quality and a ‘not-so-slow’ read speed thanks to the 2x drive. Additionally, there are two I/O ports (Serial and Parallel) available for add-ons, however these were removed in later revisions of the console due to lack of use and the fact that they could also be applied to crack the copy protection system.

The SDK provided C libraries which used BIOS routines to access the hardware. This is the main factor that helped to emulate the PS1 on wide range of platforms.

I/O design

The port of the controller and the Memory Card are electrically identical so the address of each one is hardcoded, Sony altered the physical shape of the ports to avoid accidents.


Anti-piracy / Region Lock

Like any other optical media, in order to fetch data from a CD, a laser beam is used to read the pits (zeroes) and lands (ones) from the track of the disc. Now, conventional discs are not 100% flat and they often have tiny fluctuations in their tracks. These defects are completely unnoticeable while reading the data since lasers can automatically calibrate themselves as they read.

This is what Sony based their copy protection on: The CD reader of the PS1 will only accept discs with a defined frequency known as Wobble Groove which is only applied during mastering. These patterns cannot be replicated through conventional burners.

However, this check is only executed once at the start, so manually swapping the disc just after passing the check can defeat this protection… with the risk of damaging the drive. Alternatively, tiny boards programmed to emulate the wobble signal could be soldered in the console. These boards are known as Modchips and, while legally questionable, were incredibly popular.

The use of emulators were seen as a threat for publishers as well, as a result some games included their own checks (mostly checksums) to combat any type of unauthorised use.


Sources / Keep Reading

General

CPU

Graphics

Copy protection

Photography


Contributing

This article is part of the Architecture of Consoles series. If you found it interesting please consider donating, your contribution will be used to get more tools and resources that will help to improve the quality of current articles and upcoming ones.

Paypal

Changelog

## 2019-10-29

- Added some 3d models to fiddle with

## 2019-10-09

- Improved Scratchpad term

## 2019-09-17

- Added a quick introduction

## 2019-08-29

- Better explanations

## 2019-08-09

- Corrected vague CPU info

## 2019-08-08

- Ready for publication

Rodrigo Copetti

Rodrigo Copetti

Hope you enjoyed the article! If you want to know more about the author tap here and if you'd like to support him tap here instead

rss facebook twitter reddit