Live data from Hacker News

Architecture of the Playstation

copetti.org

1–10 of 116 posts

Re: Architecture of the Playstation

#3
I led a small dev team to port a PC title to the original PSX. It had a physics engine that ran at 30Hz and needed to run close to isochronously to preserve gameplay.

One of the hacks we created was a limited pre-emptive multi-tasking system on the original Playstation to run our physics engine at a constant frequency. We'd asked Sony US who escalated to Sony Japan and told us it couldn't be done and we should write our code in a cooperative multi-tasking style.

We eventually figured out how to use the vertical blank interrupt to save all the registers, modify the return address to return from the interrupt to our physics code, then our physics code would run (not in the interrupt context), then restore the registers and longjmp back to the main game code which had been originally interrupted by the vertical blank interrupt.

This wasn't general-purpose pre-emption and had only fixed divisors of the screen refresh rate available, but was enough to get our physics engine to run close to isochronously.

Side note 1: our game (NASCAR Racing) was comparatively terrible and I remember being in awe of what the Crash Bandicoot, Ridge Racer, and other early PSX teams accomplished in gameplay and graphics.

Side note 2: as unconventional as the PSX was, it was positively mainstream compared to its contemporary Sega Saturn.

Re: Architecture of the Playstation

#4
The PSX did not age well.

I noticed this at a friend house, while looking for something in the garage we came across his old system and games. We could not resist taking it back into the house and setting it up.

The first thing I noticed was how long the load times were. And how noisy the machine was when reading and seeking on the discs.

The next thing was the primitive texture mapping. Polygons 'jiggling' and 'sparkling' all over the place. It reminded me of my first attempts at programming 3D graphics in VGA, before realizing what floating point (or fixed point) could do.

We tried re-living some of the classics, and after not even an hour we just shook our heads and went back to what we were originally doing.

Re: Architecture of the Playstation

#6
It’s a minor point in the breakdown of the system, but I had absolutely no idea that the Memory Card Slots and the Controller Ports on the PlayStation were electrically identical, when I was younger I had recognised that they both had 9 contacts. But I hadn’t considered that they would be electrically the same. The only difference being in how they were addressed.

I regularly use my PlayStation instead of my PlayStation 2 for playing PS1 games, it appears to me that the video output on the PS2 while playing PS1 games is of a lower fidelity (while using an SCART lead), the output is always off centre on the PS2. I assume it’s something to do with the hardware differences in the video output between the two?

Re: Architecture of the Playstation

#7
> During the development of the PlayStation, MIPS was offering the R3000A series of processors.

The TMPR5900 (the MIPS chip developed by Toshiba to power the PS2) was sufficiently complex to develop that we developed a cycle-accurate simulator so Sony (and a few game developers) could start development before hardware was available.

However emulation isn't always the best approach: the PS2 (at least the first edition) implemented back compatibility by simply including a PS1 on board. That's a kind of Moore's law in that the cost of doing so had dropped so much since the original PS introduction that it was worth it.

Re: Architecture of the Playstation

#8
post #4

The PSX did not age well. I noticed this at a friend house, while looking for something in the garage we came across his old system and games. We could not resist taking it back into the house and setting it up. The first thing I noticed was how long the load times were. And how noisy the machine was when reading and seeking on the discs. The next thing was the primitive texture mapping. Polygons 'jiggling' and 'spar…

I find that the PSX (and PS2 to an extent) look better on a legacy CRT TV, the video artifacting while still present does not appear as unsightly as it does on an modern LCD. Perhaps this is down to my nostalgia for the system

Re: Architecture of the Playstation

#9
This is a great overview. I don't remember having to put in padding instructions to prevent the pipeline issues mentioned here; maybe we just never ran into that. (I wrote pretty much all the R3000 code for Crash 1 and just do not recall problems like that coming up.)

To us the elephant in the room limitation of PS1 is not mentioned here as far as I could tell from a quick read-through: it had no Z-buffer. This meant that you either had to do heroic pre-computation (sort polygons ahead of time) or you ended up with lots of flickering polygons (bluedino's "jiggling and sparkling" comment below seems apt).

The other thing to note is that to make a truly high-performance game for PS1 you had to completely ditch Sony's sanctioned C APIs -- something they said would cause your game to get banned, but which we did anyway. Sony's libraries spent more time copying registers to and from the stack than they did doing the actual work, so they were a big lose.

Finally, that 2KB scratchpad was immensely powerful if you used it well. It's the only reason the 3D collision detection on Crash was fast enough; it took me 9 months to get that performant enough to ship. The CPU and RAM in those machines were just incredibly slow by today's standards.

Re: Architecture of the Playstation

#10
post #3

I led a small dev team to port a PC title to the original PSX. It had a physics engine that ran at 30Hz and needed to run close to isochronously to preserve gameplay. One of the hacks we created was a limited pre-emptive multi-tasking system on the original Playstation to run our physics engine at a constant frequency. We'd asked Sony US who escalated to Sony Japan and told us it couldn't be done and we should write…

I started to read your side note 2 and immediately wondered what you would have called the Saturn but then you addressed it.
Post reply on HN