It's supposed to check the next instruction, which is PC, rather than
the current instruction which is CompilePC. This mistake is what caused
graphical errors in RE2.
Instruction Reordering broke Mia Hamm and possibly other games too. The
easiest way to fix the problem was to simply disable reordering for
specific cases that were never accounted for.
Not only were certain instructions missing, but also some were in the
wrong place or had the wrong attributes.
Also VSUB needed to be added to IsNextInstructionMmx.
There were no other members of struct `tagOPCODE` besides one nameless union, so, to fix some nameless union compiler warnings, I deleted struct tagOPCODE and named the nameless union, union tagOPCODE. Since "OpCode.h" is #include'd 9 times across the RSP source, technically this commit fixes 9 warning messages, even though it's really just 1 warning.
It may be true that this SQV edge case only seems to happen when
isRegConst = true, I forgot to account for the possibility that GPR
Constant Analysis could be disabled.
I also just noticed that I goofed with the non-sse shuffling ;/ . The
registers weren't in order.
I totally forgot that LDV handles elements differently than SDV. I added
a fallback to deal with unusual elements and added an alert to notify
that it exists in a particular game. I removed the & 0xF since that's
not needed. My previous change caused Stunt Racer 64 to have audio
issues. It should now be fixed.
I have only seen the edgecase for SQV happen when
IsRegConst(RSPOpC.base) == TRUE. Changing SQV fixed Telefoot / Mia Ham.
I optimized VAND, for games like Kirby64.
The possibility of the RSP instruction at address 0xFFC being JR was
never accounted for. This fixes Wave Race and Star Wars - Shadow of the
Empire.
The accumulator analysis was wrong, which broke games like Mario No
Photopie.
Fixing SW allows a lot more games to work. Fixing LW fixes games like
WDC and improves performance somehow. Fixing VMRG fixes certain bugs,
like Kirby 64's intro.