Comment

Comment by louthy

Anybody who did PS1 dev back in the day will have had to do some crazy hacking stuff to get performance or memory. The first project [1] I worked on I had a C version of my graphics engine and animation system, and in parallel I'd have a MIPS assembly version which was super optimised (the C version was effectively a reference).

I made the whole engine and animation system fit in 4K so it would fit into the instruction cache of the CPU. The whole frame update cycle wouldn't need to touch main memory (for the code).

Also, because loading from main memory was slow (4 cycles) and the chip was RISC (1 operation per cycle), you'd need 3 NOPs after the Load-op for the register to be loaded. The C compiler (if I remember right) never really filled those 3 NOPs with useful stuff. So, I'd do hand written concurrency (in MIPS assembly) by loading other stuff I'd need into those NOPs - this was particularly effective when working with 3 dimensional vectors or 4 dimensional matrices.

Trying to keep super-optimised hand-written concurrency in assembly, in my head, was a challenge and not something I'd recommend! Still, the engine had more throughput than Sony claimed of their machine. Every bit of performance gained would mean an edge over the other games.

Then the game was canned by Eidos. Pretty devastating for my first industry job :/

[1] https://www.unseen64.net/2020/11/16/lunatik-pure-entertainme...

parent louthy 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton