It's a shame but the previous 'fix' only worked for the dashboard, and caused
issues in many games themselves.
For example, GTA3 only rendered to half-the-screen due to multisampling issues.
A better fix needs to be investigated and implemented, sadly, we can't rely on
D3D9's native multisampling as it prevents the buffers from being locked... which
Cxbx-R *requires*
This is a huge performance increase when using higher resolutions while
the Render to Host Backbuffer hack is disabled.
This was not easily possible in D3D8, but now we have D3D9, we can use
StretchRect to prevent unnecessary GPU->CPU transfers.
Since all sections in all Xbes are usually marked as preload, the Xbox
kernel attempts to load them all regardless.
In some titles (for example, Lego Star Wars DVD demo) the whole XBE is
too large to fit in RAM, and it is *expected* for the preload to fail.
Previously, when hit with this scenario, Cxbx-R would hard crash.
Now it mirrors hardware behavior and gracefully continues, skipping the
failed Xbe section.
Q: Why is this the case?
A: It's possible (and proven) that with titles such as the Lego Star Wars
DVD Demo, *all* game data is contained within the XBE file, rather than
on-disc as raw files. Naturally, these are too big to fit into the Xbox
RAM, so certain large sections fail to allocate, and are skipped
entirely by the Xbox Kernel.
The game then reads data from these sections by *not* loading them to
memory, but parsing the section *headers* to do raw file-io and read the
Xbe file as a binary blob, parsing the virtual filesystem.
This change allows Lego Star Wars DVD Demo (and other large Xbe titles)
to boot.
Lego Star Wars DVD Demo doesn't work yet, however, as it attempts a
dashboard update and fails, but it no longer crashes the whole emulator.
This allows us to improve our frame-limiter, so that we can disable it
if a game does not require a fixed frame-rate, and enable it for titles
that do.
Result:
XDK Samples can now run at high frame-rates (100+ fps) without effecting actual
speed (just like on real hardware)
Dashboard can reach over 100fps, and still run at the correct speed
JSRF and other titles that tie game speed to frame-rate are limited to
60FPS.
Fixed broken VSYNC handling too: Disable VSYNC has been broken since the
D3D9 port, perhaps before then.