PCem (short for PC Emulator) is an IBM PC emulator. This version of PCem has multi-threading disabled in order to ensure determinism when running though libTAS.
I don't know how it was working before. The single-threaded patch broke the Voodoo FIFO command execution. In the patch, commands are immediately executed after being pushed in the FIFO, as long as the corresponding instruction is complete, but commands are actually not written sequentially in the FIFO.
Normal execution (second to last is value, last is address). Notice the written addresses are not sequential!
Write CMDFIFO 002001a4(001201a4) 800000c0 001201a4
Write CMDFIFO 002001a0(001201a0) 00012601 001201a0
Write CMDFIFO 002001a8(001201a8) 00012611 001201a8
Write CMDFIFO 002001ac(001201ac) 000040ff 001201ac
...
CMDFIFO get 00012601
CMDFIFO get 800000c0
CMDFIFO get 00012611
CMDFIFO get 000040ff
Current patched code execution:
Write CMDFIFO 002001a4(001201a4) 800000c0 001201a4
CMDFIFO get 00000000
Write CMDFIFO 002001a0(001201a0) 00012601 001201a0
CMDFIFO get 800000c0
Write CMDFIFO 002001a8(001201a8) 00012611 001201a8
CMDFIFO get 00012611
Write CMDFIFO 002001ac(001201ac) 000040ff 001201ac
CMDFIFO get 00012611
CMDFIFO get 000040ff
The first pulled value is 0, because the FIFO was increased, but no value was written in that place.
I don't know how it was working before. The single-threaded patch broke the Voodoo FIFO command execution. In the patch, commands are immediately executed after being pushed in the FIFO, as long as the corresponding instruction is complete, but commands are actually not written sequentially in the FIFO.
Normal execution (second to last is value, last is address). Notice the written addresses are not sequential!
Current patched code execution:
The first pulled value is 0, because the FIFO was increased, but no value was written in that place.
The intended instructions are:
But instead it executes: