I’ve been working every night on the opcode replay buffer for about a week now. It’s really starting to come along, and I’ve fixed a lot of issues with it. I’d overlooked the fact that the CPU could decide to change a bunch of things in memory midframe. Some of these things include the:
- Index Buffer
- Vertex Buffer
- Vertex Shader Constants
- Geometery Shader Constants
- Pixel Shader Constants (?)
I didn’t know too much about the Direct3D 11 rendering pipeline before this week, so it was a good way to ramp up on Direct3D at the same time. So far I’ve implemented fixes for the Vertex Buffer and Vertex Shader Constants. This fixes a bunch of games that had terrible flashing and corruption making them unplayable with the Opcode Replay Buffer enabled. Things aren’t perfect. My fix has only been implemented for Direct3D, so I still have to figure out how to do the same thing in OpenGL. I also need to add options to correct the rest of the bullet points. Will the other bullet points help at all? I’m not sure, but there’s only one way to find out!
The discovery of a CPU->GPU synchronization option hidden in the “Enable Idle Skipping” section of the code was also a big win. This helps fix issues on a bunch of games. Generally now, it is always recommended to run with “Enable Idle Skipping” on. I’ve found that this fixes judder issues, synchronous timewarp issues, as well opcode replay errors, crashes and warnings. The only game I’ve found that has issues with it being enabled is Zelda: Wind Waker. I’ve forced off the synchronization in the .ini though, so end users don’t have to worry about figuring out the correct settings! Eventually I hope to fix this so the game works either way, but it’s a solid workaround for now.
Some synchronization issues persist (Super Mario Sunshine objects bouncing, start of game lockup), and I still haven’t implemented it when the XFB is enabled, or in deterministic dual core mode. So much to do still, but I’m glad I’m making progress on it again!