Monday, November 27, 2023

Running a PS3 emulator (and could this be done in Unity?)



Saturday I picked up a used GT4 on craigslist. There are several Playstation emulators that allow you run this on a PC. Sony publishes the bios/firmware for PS3 on their website, and there's a tool that extracts the PS1 and PS2 firmware from that file, but the tool isn't from Sony - some third party posted it (or more likely it is from Sony, but it's just not supported). That was the only "risky" thing involved in the process. It's very impressive to me that the PS1 and PS2 firmwares are somehow embedded into the PS3 firmware, accessible via an extraction tool.


I also picked up GT5 but that requires a Blu-ray reader, which is on order. GT4 plays almost exactly like the original, but there are some quirks. It's essentially a virtual machine of a PS3 (or rather PS2) and some features don't always work, or they work only with a certain setting turned on and that same setting crashes if it's on at the wrong time, so just live without it.

This whole exercise made me wonder what sort of effort it would be to write a virtual machine player in C#, and import that into Unity, and write a game that has a gaming console in the game so you can play a game within a game. :)

And the answer is, it's as easy as following this nice little article, and screaming in horror at the sight of ASM. But I'm sure it would be a walk in the park...
https://www.codeproject.com/KB/recipes/B32Machine1/VMCS.pdf