Commit Graph

5479 Commits

Author SHA1 Message Date
Luke Usher 1704f0e8ce Compiler warning fixes 2018-12-14 11:19:17 +00:00
Luke Usher 922d0a7627 Fix an assert that prevented Debug builds from working 2018-12-14 11:00:43 +00:00
Luke Usher 6c4e9d82f8
Update README.md 2018-12-06 13:19:56 +00:00
RadWolfie dc48499878
Merge pull request #1511 from LukeUsher/debugging-hangs
Debugging hangs
2018-12-01 12:39:32 -06:00
Luke Usher f3aa312cde Workaround a hang when PsCreateSystemThreadEx returns too soon 2018-12-01 17:31:49 +00:00
Luke Usher adba54da47 Fix a crash in Morrowind, add a test_case to notify us of the situation if it occurs elsewhere 2018-12-01 17:22:52 +00:00
Luke Usher 0eab84d268
Merge pull request #1512 from ergo720/sys_mem_fix
Fix a bug in AllocateSystemMemory
2018-11-29 20:12:57 +00:00
ergo720 8790b48c06 Fix a bug in AllocateSystemMemory 2018-11-29 20:14:32 +01:00
Luke Usher 2084e25ea9 More tweaks 2018-11-28 20:35:11 +00:00
Luke Usher fa82f10a48 Call SystemRoutine directly instead of bootstrap voodoo 2018-11-28 20:18:30 +00:00
Luke Usher 8c570badb0 Stop EmuX86 spamming the log in Unreal Championship, this kills performance 2018-11-28 18:40:29 +00:00
Luke Usher d1e2ddd335
Merge pull request #1510 from LukeUsher/disable-ps-notification
Disable PS Thread notification routines.
2018-11-26 19:51:20 +00:00
Luke Usher 4304bf8266 Disable PS Thread notification routines.
Our code for this is completely wrong and does more harm than good.
Turns out that we (incorrectly) assumed that these were used internally
the same way as XAPI Thread routines, but they're completely separate!

XAPI thread routines are called by XApiThreadStartup (Xbox code) so we
don't need to handle them at all!

PSNotification Routines are more complex and require objects/functions
that we do not currently create, making them impossible to implement at
present, so for now, we'll disable them to prevent the random crashes
and memory corruption it causes.

This fixes a crash in Morrowind's DSOUND driver, where the pThis pointer
became corrupted as a result of the invalid notification routine call!
2018-11-26 19:48:09 +00:00
Luke Usher 885af521dd
Merge pull request #1509 from LukeUsher/lets-fix-some-exclusives
Fix THPS2X Regression after PDO fix
2018-11-25 17:43:55 +00:00
Luke Usher 02e756aadf Call a thread notification routine *before* starting the new thread, not
after.

This is required as it is the job of the notification routine to
allocate any per-thread data structured that the new thread will
require.

Likewise, the routine is called again during thread termination, in
which it should cleanup these resources.

To clarify: The first call needs to happen before the new thread starts,
and MUST be called from the context of the current thread, not the new
thread.

The second call must be called during Thread termination, by the new
thread, just before it is destroyed
2018-11-25 17:20:23 +00:00
Luke Usher f74cba4486 Typo 2018-11-25 12:11:46 +00:00
Luke Usher 6afb63ac77 Fix regression in THPS2X: Needs re-testing with Panzer Dragoon Orta 2018-11-25 12:10:17 +00:00
Luke Usher ba5242ec39
Merge pull request #1508 from LukeUsher/lets-fix-some-exclusives
Rename JSRF hack to Smilebit hack, as it applies to Gunvalkyre too
2018-11-22 22:56:11 +00:00
Luke Usher f0f63f9e16 Rename JSRF hack to Smilebit hack, as it applies to Gunvalkyre too 2018-11-22 22:54:20 +00:00
Luke Usher cfbcd3509e
Merge pull request #1507 from LukeUsher/lets-fix-some-exclusives
Fix random crashes in Panzer Dragoon Orta
2018-11-22 21:57:56 +00:00
Luke Usher 602efd6d6e Remove upper limit on Xbox Threads: This was a left-over from original Cxbx and is unnecessary 2018-11-22 07:28:37 +00:00
Luke Usher b38b958730 This potentially improves stability 2018-11-20 19:35:19 +00:00
Luke Usher d7108e8c9e Fix a crash when draw functions are called with no plugin initialized 2018-11-18 14:58:07 +00:00
Luke Usher b594f04214
Merge pull request #1504 from LukeUsher/lets-fix-some-exclusives
Various bug-fixes (TLS, Vertex Shaders, X86)
2018-11-18 09:18:14 +00:00
Luke Usher cdf64197a6
Merge pull request #1505 from Fisherman166/RtlAppendUnicodeFix
Fix bug in RtlAppendUnicodeStringToString
2018-11-18 09:17:55 +00:00
Fisherman166 3f144fc7a9 Fix bug in RtlAppendUnicodeStringToString where the terminating null character was being placed in the wrong byte. 2018-11-17 21:33:53 -08:00
Luke Usher 21632e0eae More shader tweaks 2018-11-17 23:32:02 +00:00
Luke Usher 75a8b54e19 Restore JSRF hack: Still required 2018-11-17 23:31:02 +00:00
Luke Usher c650fad2ab Fix a typo that has been bothering me for some time 2018-11-17 20:14:57 +00:00
Luke Usher f38d1e7d3b Fix an issue where unsupported (on host) shader registers caused entire shaders to fail 2018-11-17 20:00:52 +00:00
Luke Usher 23fb78c272 Fix an issue where vertex declarations containing BackDiffuse and
BackSpecular completely failed to be created

With this, Spikeout & Project Gotham Racing progress further, although
they still fail to reach in-game.
2018-11-17 18:08:25 +00:00
Luke Usher 84e90157ab Prevent non xbox code threads from hogging the Xbox code execution core 2018-11-17 16:06:38 +00:00
Luke Usher c6e7360157 Only execute exceptions in single-instruction steps, to work around buggy instruction implementation: TODO: Replace EmuX86 with something better entirely 2018-11-16 08:12:05 +00:00
Luke Usher 53732ffb2f fix an issue where a title without TLS data would refuse to boot 2018-11-16 08:11:20 +00:00
Luke Usher 3393ccc684
Merge pull request #1503 from LukeUsher/fix-nxdk-and-more
Fix nxdk and KeQueryPerformanceCounter
2018-11-12 18:42:51 +00:00
Luke Usher 1618130603 Fix NXDK and CxbxGetPerformanceCounter 2018-11-12 18:19:45 +00:00
Luke Usher bac2d6a8e6 Fix KeQueryPerformanceCounter: It ticks at ACPI rate, NOT tsc 2018-10-30 21:20:56 +00:00
PatrickvL 73b6aea7da
Merge pull request #1499 from LukeUsher/ltcg-related-tweaks
Fix a crash within LTCG SetBorderColor, fix off-by-one error in mip-map level test
2018-10-30 09:59:50 +01:00
Luke Usher ed8c3137c4 Implement NOP 2018-10-29 21:07:11 +00:00
Luke Usher 1d2b7ae094 Fix off-by-one error in mip-map check 2018-10-29 19:42:19 +00:00
Luke Usher 6ca433b96a Fix a crash when calling D3DDevice_SetTextureState_BorderColor_: Trampolines don't work right for LTCG titles 2018-10-29 18:48:27 +00:00
PatrickvL 123d6d95be
Merge pull request #1497 from LukeUsher/smt-nine
Fix a crash when using more mip-map levels than D3D9 supports
2018-10-29 06:53:06 +01:00
Luke Usher 0ac8b589a5 Add LTCG specific D3DDevice_SetVertexData4f_16 2018-10-28 22:48:21 +00:00
Luke Usher 2e056347e9 Fix a crash when creating a texture with more mip-map levels than D3D9 allows 2018-10-28 22:29:41 +00:00
PatrickvL 97c0975bb4
Merge pull request #1495 from LukeUsher/performance-and-fixes
Fix Virtua Cop 3 (Chihiro)
2018-10-28 20:05:33 +01:00
Luke Usher d1ce72841a Feedback 2018-10-28 19:03:39 +00:00
Luke Usher 82a8b63965 Fix an incorrect LOG_TEST_CASE 2018-10-28 17:31:23 +00:00
Luke Usher 66b77b64ea Catch unusual vertex buffer situations + fix an issue where Vertex buffer information was not initialized properly 2018-10-28 16:01:36 +00:00
Luke Usher d286f6156f Oops, fix a double-free 2018-10-28 14:46:32 +00:00
Luke Usher 176cad275f Don't trash original shader handles, use a map instead 2018-10-28 12:14:25 +00:00