Fixes a TON of games.
The flags are not yet in use in the Interpreters, this will ideally be commited next (requires VU code changes).
The Div/Sqrt method is unoptimized for now, the team is working on a faster equivalent.
Fixes:
- Final Fantasy X (fully playable)
- Klonoa 2
Partially Fixes:
- Mortal combat Shaloin Monks
- Gran Turismo 4 (game patch will be neceassary to skip Licence Test CRC check).
- Tourist Trophy (game patch will be neceassary to skip Licence Test CRC check).
The stop gap div measure is not yet enough to fully fix GT4/TouristTrophy (they will need different rounding modes per licences). Currently this is bridged on the Div Rounding Mode setting.
MacOS does not support an equivalent of MAP_FIXED_NOREPLACE via mmap(),
which means that our usage for allocating PCSX2's memory map is not
thread-safe.
All games use mailbox/triple buffering. Except when you enable sync to
host refresh, in which case FIFO/double buffering is used.
This means vsync enabled will ever tear, but at the same time, never
drop to 30fps on a missed frame due to frame rate differences.
To have the "best of both worlds", you should enable vsync and sync to
host refresh. Previously, this resulted in additional input lag, since
the host vsync would drive the EE frame timing. Now, this behaviour is
disabled by default, unless you enable "Use Host VSync Timing".
MAP_FIXED will clobber any existing memory mapping, and is not safe
to use in a multi-threaded environment. Whether we like it or not,
we are a multi-threaded environment, because Qt initializes before
we get to main(), so it's already too late to safely use MAP_FIXED
by the time we get there.
Use MAP_FIXED_NOREPLACE instead. This is how MAP_FIXED should have
behaved from the beginning.
Obviously this means you'll need Linux 4.17+ and a semi-recent libc
to use PCSX2 now. But if you're running a 6 year old unsupported
kernel, you have bigger problems.
Fixes "random" startup crashes.