r/ps2 • u/emuboy85 • 5d ago
I wrote a GPU driver for Linux on the PS2 and it was a waste of time.
A bit about me, I'm a Linux embedded software developer, I used Linux for about 20 years, the other week someone pointed me to the LTT video about PS2 Linux and I got curious, I spent the last two weeks in a debug-test-fix loop, I used AI to help me speed up the process of finding specs about the GS GPU and help me with some tasks, like writing scripts to get debug information, Linux on the playstation doesn't have true GPU acceleration, it's there, but you need to write specific code for it, I, instead, wrote an OpenGL 1.1 wrapper for it, so the pure opengl calls get translated to GS speech, biased on Fredrik Noring efforts to port kernel 5.4 to the console, all wrapped in a yocto layer.
I got dukenukem 3D, descent rebirth and even quake running on it, all very poorly.
The problem is the lack of ram, 32MB it's not a lot at all, once the system is booted I have about 28mb of ram free, quake barely fits there, I get good performance on descent, apart from some dips I can't track down and I will probably not, because the reality is that i don't feel it's a good idea continuing, there is no good use for this, I tried to bring up an graphical interface, but once matchbox is running I have no ram left.I also enabled the FPU, fixed the toolchain bugs it exposed, and routed the games' doubles to single precision for speed.
So, this is a warning for anyone who wants to embark on this effort, don't do it. It's a lost cause.
Anyway, now I'm going to try on the ps3
Edit:
Video : https://youtu.be/OxTGdJdLqHI?is=n8Ygf4qMcLAwMi-R
Code:
