Running Go Code on a PS2: A Hackery Adventure

2025-03-28
Running Go Code on a PS2: A Hackery Adventure

The author embarked on a challenging project: running Go code on a PlayStation 2. Go's lack of native PS2 support necessitated using the TinyGo compiler and the ps2dev SDK. The author overcame compatibility issues between Go and the PS2's Emotion Engine CPU (based on MIPS R5900), including differences in the N32 ABI and 64-bit instruction sets. A significant hurdle was the missing DDIVU instruction, solved by modifying the TinyGo compiler. A simple Go program was successfully run and verified on the PCSX2 PS2 emulator. Future plans include improving floating-point support and creating a custom LLVM MIPS CPU.

Development PS2 Development