What is this monstrosity? Final Fantasy VIII relies on X coordinates
being truncated during scanline drawing, with negative coordinates
becoming positive and vice versa. Fortunately the bits that we need
are consistent across the entire polygon, so we can get away with
truncating the vertices. However, we can't do this to all vertices,
because other game's vertices break in various ways. For example,
+1024 becomes -1024, which is a valid vertex position as the ending
coordinate is exclusive. Therefore, 1024 is never truncated, only
1023. Luckily, FF8's vertices get culled as they do not intersect
with the clip rectangle, so we can do this fixup only when culled,
and everything seems happy.
i.e. push all primitives through unless they are oversized, which the
GPU will definitely skip.
Needed because of coordinate truncation in Final Fantasy VIII, these
scenes will now render correctly with the software renderer again.
One more instruction on x86/ARM32, no additional instructions on ARM64.
Worth it so that the application doesn't crash if the game jumps to an
invalid PC. Note that the lower 2 bits are truncated, so an unaligned
jump will round down to the closest instruction. Obviously not correct,
but if a game ends up doing this, it's a lost cause anyway.
Max Power Racing and C3 Racing are slow with their DMAs out,
and get confused when an additional INT1 comes inbetween reading
the sector header and data.
Fixes these games crashing during loading. 5000 cycles is more in
line with what the real mech would do anyway, it's pretty slow.
And only dump when the mask bit check is not enabled.
The replacements are gated by the mask bit check anyway, so there's
no point dumping anything that can't be replaced.
Disable upscaling because they use a stupidly large UV range and
relies on junk texels not being sampled, which happens at 1x.
That and they're 2D anyway.