3 ms·
I'm not seeing much advice related to the target itself (PlayStation 1). That target has both embedded constraints (2 MiB of RAM, no MMU...) and platform-specif
by boricj 3y ago
I'm not seeing much advice related to the target itself (PlayStation 1). That target has both embedded constraints (2 MiB of RAM, no MMU...) and platform-specific pitfalls that you don't see when targeting a modern system.
Off the top of my head:
- The PlayStation CPU doesn't have a FPU, forget about using floats.
- You only have 2 MiB of RAM and no MMU. Avoid malloc(), memory leaks and especially heap fragmentation will be fatal ; prefer custom allocation strategies that leverages lifetime properties of your data structures (static, bump, arena, per-frame...).
- The original PlayStation SDK is very, very old. Consider using something more modern like PSn00bSDK.
- Consider using modern emulators with debugging facilities like DuckStation for most of the development, they're fairly accurate nowadays and you'll have a much better debugging and iteration experience than relying on bare metal.
Now, I'm assuming your game will be fairly lightweight performance-wise. If you're going for something even moderately ambitious you'll quickly run into bottlenecks and limitations that will force you to properly understand your target and how to design your game around it. I'm not actually a PlayStation programmer (although I am reverse-engineering a PlayStation video game) so I can't give proper target-specific on how to use the scratchpad, the GTE and so on.