Search A Touch of Shader

I wanted Gran Turismo on Switch. This got out of hand.

I wanted Gran Turismo on Nintendo Switch. That became a PPSSPP Vulkan fork, and GTA got a smoother ride.

Share

I wanted to play Gran Turismo on my Switch. I don’t think the Switch has a racing game that scratches that particular itch, and the PSP version of Gran Turismo was sitting there, inconveniently made for a different handheld.

Fortunately, there was already a Switch community build of PPSSPP, the PSP emulator. Other people had done the work of getting it onto the console, so I had something to build on. I made a fork and started looking for more performance. The plan to play a game now had a repository attached to it. This was going well.

The first big job was adding Vulkan, another way for the emulator to talk to the graphics hardware. PPSSPP already supported it, but the Switch build needed the pieces to connect it up. I brought in a driver called NXVK and got them working together. A perfectly proportionate response to wanting to drive a pretend car.

Getting a picture onto the screen was one milestone. Getting the right picture there efficiently was another. The faster display path could leave bits of an old frame behind, so I had to sort out how the graphics hardware handed finished images to the screen. Before worrying about how many frames I could show, I needed each one to stop bringing leftovers.

Then the job shifted from getting Vulkan running to finding the little things that kept interrupting play. Gran Turismo’s menu text sent me into code that was checking the same graphics over and over. GTA sent me after graphics preparation that was making the whole game wait. I cut down the repeated work and moved preparation into the background. There was no single magic “go faster” switch. There was, however, always another thing to poke at.

With the newest build, the improvement has been dramatic. A little overclocking—1.2 GHz CPU, 768 MHz GPU, and 2133 MHz RAM—gets the two PSP GTA games I’ve tested running at stable frame rates. Those clocks are part of the result. The fork is still experimental, and the README has the setup details if you want to try it.

Gran Turismo started this. Somewhere along the way, getting GTA to run steadily became part of the project too. I went looking for a racing game and came back with a smoother way to steal cars.