Commit Graph

5856 Commits

Author SHA1 Message Date
RadWolfie d3caface5d fix VS 2019 compiler 2019-05-04 15:06:06 -05:00
PatrickvL 472baf66eb
Merge pull request #1601 from LukeUsher/fix-endpush-count
Fix D3DDevice_Begin/D3DDevice_EndPush length calculation
2019-05-04 21:39:06 +02:00
Luke Usher 57238afbe5 Remove now-unused variable 2019-05-04 20:31:27 +01:00
Luke Usher a8dfc34678 Fix Begin/EndPush length calculation 2019-05-04 19:54:55 +01:00
RadWolfie 4688b5cfc4
Merge pull request #1599 from LukeUsher/disable-multisampling-again
Disable multisampling yet again...
2019-05-04 08:53:10 -05:00
Luke Usher 7af45097b7 Disable multisampling yet again...
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*
2019-05-03 22:56:21 +01:00
PatrickvL 4986023ea5
Merge pull request #1596 from LukeUsher/fix-multisampling
Fix multisampling
2019-05-01 13:24:39 +02:00
Luke Usher 7d9b954491 Fix multisampling 2019-05-01 11:37:19 +01:00
Luke Usher cc552f3972
Merge pull request #1595 from LukeUsher/use-stretchrect
Use StretchRect to blit the Xbox backbuffer
2019-05-01 09:55:23 +01:00
Luke Usher 1626b9e4e4 restore param comments 2019-05-01 09:41:08 +01:00
Luke Usher ce51fdcd1c
Merge pull request #1593 from LukeUsher/bumpmap_bias
Selectively add bias modifier so bump-map is signed
2019-05-01 09:38:37 +01:00
Luke Usher fd5c575e88 Use StretchRect to blit the Xbox backbuffer
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.
2019-05-01 08:42:03 +01:00
Luke Usher 81741f3706
Merge pull request #1594 from LukeUsher/prevent-nvnet-hogging-cpu
Prevent NVNet hogging cpu
2019-05-01 08:19:08 +01:00
Luke Usher deb5268df8 Prevent NVNet hogging cpu 2019-05-01 08:18:16 +01:00
Luke Usher 50d47fc881 Update fix based on new information 2019-04-30 13:53:01 +01:00
Luke Usher 96d2f24877 Apply a bias to texbem if an unsupported input format is used (JSRF fix) 2019-04-29 20:22:46 +01:00
Anthony Miles 9694153db8 Add bias modifier so bumpmap is signed 2019-04-28 11:55:44 +12:00
RadWolfie 87367e89bb
Merge pull request #1590 from ergo720/emulog_move
Move EmuLog(Ex) together with the other logging functions
2019-04-21 08:21:22 -05:00
ergo720 884cef91e9 Move EmuLog(Ex) together with the other logging functions 2019-04-21 14:27:23 +02:00
PatrickvL c917ff0d47
Merge pull request #1588 from LukeUsher/more-d3d-hle-work
Implement missing LoadVertexShader & Declaration only Shader functionality
2019-04-18 20:34:44 +02:00
Luke Usher d5ac72d8cd Don't overrite initial Xbox RenderState/TextureState values 2019-04-17 13:49:51 +01:00
Luke Usher ab8a971215 Fix when titles attempt to create declaration only shaders, slightly improves Sonic Heroes 2019-04-17 13:49:51 +01:00
Luke Usher d58a69a9db Use Xbox definitions 2019-04-17 13:49:51 +01:00
Luke Usher f8af77d0e1 Fix when 3DDevice_LoadVertexShaderProgram is called while an FVF shader is set 2019-04-17 13:49:51 +01:00
Luke Usher 43e147777c Add LOG_TEST_CASE for previously unknown behavior
A fix for this scenario will be investigated soon
2019-04-17 13:49:51 +01:00
Luke Usher 53dc6441c6 Fix an issue with mipmap levels when using non-square textures 2019-04-17 13:49:51 +01:00
Luke Usher 670d90651c
Merge pull request #1586 from RadWolfie/ds-globalfocus-option
DirectSound unfocus audible option + minor fixes
2019-04-13 16:00:03 +01:00
RadWolfie 82909b939f add "Disable mute on unfocus" option to audio settings 2019-04-12 16:06:58 -05:00
RadWolfie b19fc40ff1 rename Hardware Video to Exclusive Fullscreen 2019-04-12 15:25:28 -05:00
RadWolfie 9d58043d41 fix generated resource file to use correct file path
Thanks to ergo720 for bring it up. I may had not find the cause at all.
2019-04-12 15:01:53 -05:00
RadWolfie 5d973b2dec fix Visual Studio resource generated files 2019-04-12 13:44:07 -05:00
PatrickvL 8f50a2c8e5
Avoid error on Cxbx post-build copy command when the SolutionDir contains a space. 2019-04-11 17:18:03 +02:00
PatrickvL e9afda2f0a
Merge pull request #1584 from LukeUsher/star-wars-dvd-demo
Allow XBE Section preload to fail
2019-04-11 13:05:48 +02:00
Luke Usher 3c3305a17a Update Comment 2019-04-11 09:50:46 +01:00
Luke Usher 4dbeab62ac Allow XBE Section preload to fail
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.
2019-04-11 08:32:39 +01:00
Luke Usher 10badd5f8f
Merge pull request #1583 from NZJenkins/unset_textures_on_release
Clear released texture from EmuD3DActiveTexture
2019-04-11 08:26:05 +01:00
Luke Usher 686ea7e303
Merge pull request #1582 from NZJenkins/catch_surfaces_as_textures
Log non-texture resources passed to GetHostTexture
2019-04-10 10:27:16 +01:00
Anthony Miles 35c3981f7d Clear released texture from EmuD3DActiveTexture 2019-04-10 21:22:42 +12:00
Anthony Miles b859491b19 Log non-texture resources passed to GetHostTexture 2019-04-10 21:16:49 +12:00
PatrickvL 2e5b9562e0
Merge pull request #1581 from LukeUsher/rdtsc-vsync-and-timing
Respect Xbox presentation interval
2019-04-09 09:20:46 +02:00
Luke Usher 843c65a11c Add dummy item where UncapFramerate used to sit, add note to explain why 2019-04-08 14:58:45 +01:00
Luke Usher 2ad5cfce8d Feedback 2019-04-08 11:01:42 +01:00
Luke Usher 8b2e758377 Respect Xbox presentation interval
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.
2019-04-08 08:11:12 +01:00
PatrickvL 13daf887c0
Merge pull request #1578 from LukeUsher/fix-render-texture-states
Minor Cleanup of Render State and Texture State handling
2019-04-07 13:07:05 +02:00
Luke Usher a0e8bb8973 Feedback 2019-04-07 09:21:11 +01:00
Luke Usher 372de28d7b Reduce D3DTOP >= 4361 exception to >= 4134: Fixes DOA3 PAL 2019-04-06 14:07:43 +01:00
Luke Usher 04b311ec8c Restore StageIndex-- 2019-04-05 15:09:21 +01:00
Luke Usher 4df55f2f24
Merge pull request #1579 from ergo720/fix_ke_deadlock
Fix a deadlock in KiTimerExpiration caused by KeWaitForSingleObject
2019-04-05 14:45:59 +01:00
Luke Usher 67569172cb More point sprite tweaks 2019-04-05 14:45:00 +01:00
Luke Usher 2d8f5124da Improve mappings of D3DTOP values for earlier XDKs
TODO: Verify when the values changed, it must be somewhere between 3911 and 4361 but where?
2019-04-05 14:30:00 +01:00