Category: psx

PSX - Part 1: The Callingpsxpsx-game2022-11-15

So in the not-so-recent past, I’ve become increasingly more interested in developing games for old game consoles. A while ago I found out about the psx crate, which allows you to build games for the first PlayStation (PSX) in rust. As a long time Rustacian, this naturally piqued my interest. Unfortunately the crate is incomplete, and is missing many necessary features, such as doing geometry calculations using the Geometry Transformation Engine (GTE). Not to be deterred, I scoured the source code to figure out how the crate compiles Rust code into a PSX executable, and from there I followed the excellent, though unofficial, PSX documentation by nocash to fill in the gaps. How far did I get? Well, far enough to render the famous hello triangle. We will not go as far in this post, since that would make it ridiculously long, but the hello triangle is gonna be one of our big milestones for this series.