hrydgard/ppsspp — pull request #3175 by unknownbrackets (2013-08-15 06:03:35+00:00)
Title: Vfpu minor

The interpreter seems to already have the correct behavior and match the PSP. From my tests, although I'm not 100% confident for all cases it's true, the logic is as follows:

* If a branch test passes, and its delay slot also passes, take the delay slot target.
* If a branch test passes, but its delay slot does not pass, take the branch target.
* If a branch test fails, then evaluate the delay slot as the branch per the above rules.

That is, if 4 in a row pass and each has a different target, take target 2. If only 2 and 3 pass, take 3. If only 1 and 3 pass, take 1.

However, we've [only seen 3 games do this] (http://report.ppsspp.org/logs/kind/161), and they're all by the same developer, I'm assuming the important thing is to handle their case: multiple tests with the same target. This is relatively easy.

Fixes #1926.

-[Unknown]