Commit graph

5207 commits

Author SHA1 Message Date
RadWolfie
3a50d7e136 fix order of thread initialization 2022-04-13 07:54:19 -05:00
Anthony
2a3656bf24 Some comments on the "mount point" 2022-04-12 19:26:31 +12:00
Anthony
469352e72a Better support for UNC paths
Fix launching demos when the title was loaded from a UNC path
e.g. MechAssault with quantum redshift demo

We use GetFinalPathNameByHandle, which returns a "root local device" path beginning with '\\?\'

For UNC paths, this looks like '\\?\UNC\bla' - but this path was not handled correctly.

Before, '\\?\' was immediately stripped from the beginning of the path,
resulting in an invalid relative path e.g 'UNC\bla' - causing errors.

Now, we don't strip anything from the path, and accept it as-is.

In some related code, we also need to use the '\' character instead of '/'
since '/' is not the path separator on Windows and is not valid to add to a path beginning with '\\?\'.

Info about paths windows paths
https://googleprojectzero.blogspot.com/2016/02/the-definitive-guide-on-win32-to-nt.html
2022-04-12 19:11:42 +12:00
NZJenkins
72908248eb
Merge pull request #2341 from NZJenkins/jsrf-storage-spaces
Clear FILE_NO_INTERMEDIATE_BUFFERING in IoCreateFile
2022-04-07 19:32:28 +12:00
Anthony
e9212c35f7 Fix annoying assert
asserting when D3DDECLTYPE_FLOAT1 was in use
2022-04-06 22:21:12 +12:00
RadWolfie
a338a12d77 revert partial review remark 2022-04-06 03:42:35 -05:00
Anthony
88b686c27d Clear FILE_NO_INTERMEDIATE_BUFFERING in IoCreateFile
Fixes JSRF issue with loading titles from Windows Storage Spaces
2022-04-06 19:49:02 +12:00
RadWolfie
b84e80663f review remark 2 2022-04-05 17:57:05 -05:00
RadWolfie
351c9a7c86 review remark 2022-04-05 17:45:36 -05:00
RadWolfie
6d395bf2ee fix alignment from tabs to spaces 2022-04-03 19:08:14 -05:00
RadWolfie
57640cad49 Implement RtlGetCallersAddress 2022-04-03 19:08:13 -05:00
RadWolfie
1d030aa41f Implement RtlCaptureStackBackTrace 2022-04-03 19:08:13 -05:00
RadWolfie
c723c56e4a Implement RtlWalkFrameChain 2022-04-03 19:08:13 -05:00
RadWolfie
877c87537e review remark 2022-04-03 17:30:08 -05:00
RadWolfie
82427abcb8 fix hidden bug when binaries are mixed 2022-03-29 20:36:58 -05:00
RadWolfie
f0a1301b64 improve xbox thread implement 2022-03-29 20:36:58 -05:00
RadWolfie
d9785e7225 prepare and clean up kernel types 2022-03-29 20:36:58 -05:00
ergo720
5d5fc992da Fixed wrong type for MmGlobalData kernel export 2022-03-29 14:47:00 +02:00
ergo720
dc1f93b120
Merge pull request #2326 from NZJenkins/exp/dsound-buffer-streaming
DirectSoundBuffer streaming
2022-03-29 14:03:54 +02:00
ergo720
bfa9abbc1b Updated cxbxr projects to use and build with C++20 2022-03-22 00:52:52 +01:00
Anthony
aac207c78e Fix typo 2022-03-14 17:10:26 +13:00
Anthony
49b4988953 Co-locate imgui includes 2022-03-13 21:41:13 +13:00
Anthony
da27e1456b Restore Unlock logging 2022-03-12 09:57:32 +13:00
Anthony
baa1cf5470 Ensure End() is called after Begin/BeginChild, regardless of return value
Note this is not required for other Begin apis
2022-03-12 09:53:22 +13:00
Anthony
feb1f0383d Comment some includes 2022-03-12 09:45:23 +13:00
Anthony
4186d4ba8b Avoid expensive calls to DirectSound on buffers unless they've been played at least once 2022-03-07 21:24:35 +13:00
Anthony
4c30264136 DirectSoundBuffer visualization debug view
- Visualize play progress, play region, loop region
- Buffer streaming controls
- Scale visualization to window by RadWolfie
2022-03-07 21:24:35 +13:00
Anthony
7528d9a4e3 Change locking APIs to nops
to prevent interference DirectSoundBuffer streaming.
2022-03-07 20:33:12 +13:00
Anthony
60dbf241e8 Stream audio from Xbox DirectSoundBuffers
to handle cases where titles write to sound buffers after they are created.
Note titles do not have to lock the buffer or otherwise call any API to write to sound buffers.

Every few ms, for each sound buffer currently playing, write a chunk of sound data ahead of the current audio play cursor.

Fixes audio issues in titles including:
- NBA Live 2005 (no audio)
- Crash Tag Team Racing (audio looping incorrectly)
- Madagascar (audio looping incorrectly)
2022-03-07 20:33:11 +13:00
Anthony
852adf0d21 optimize DirectSound Buffer's StopEx function 2022-03-06 21:00:02 +13:00
Luke Usher
3a59c62753
Update src/core/hle/Patches.cpp
Co-authored-by: RadWolfie <RadWolfie@users.noreply.github.com>
2022-03-01 22:41:18 +00:00
Luke Usher
884a9080b5 hle: detect when patches fail to apply 2022-03-01 20:40:56 +00:00
ergo720
d3b2554b20 Use a separate array for the native handles in NtWaitForMultipleObjectsEx 2022-02-20 16:07:42 +01:00
ergo720
f174872702 Unpatch timeSetEvent and timeKillEvent + fixes a crash in chihiro games + missing audio effects in virtua cop 3 + fixes a bug in SignalObjectAndWait 2022-02-20 12:22:36 +01:00
ergo720
c6ea72dcf4 Use a condition variable to notify interrupts, fixes stuttering in the dashboard 2022-02-18 20:17:22 +01:00
ergo720
bc98e164b2 Removed CxbxKrnlTerminateThread and some unnecessary calls to TerminateProcess 2022-02-18 15:30:18 +01:00
ergo720
6867907a3c Fixed a bug in NtWaitForMultipleObjectsEx that caused the dashboard to deadlock + more review remarks 2022-02-18 12:42:56 +01:00
ergo720
7589f0a94c Avoid using std::async in WaitApc 2022-02-17 02:33:44 +01:00
RadWolfie
a769e896c6 hidden bug while debugging on xbox kernel thread's issue 2022-02-16 18:20:04 +01:00
RadWolfie
44ed2ee3aa update Timer_Shutdown to reduce wait time for shutdown if threads are all xbox 2022-02-16 18:20:04 +01:00
ergo720
06f34134ff Review remarks + use PsCreateSystemThread to start all xbox threads 2022-02-16 18:20:04 +01:00
RadWolfie
6320dd5539 fix shutdown process crashed on shutdown and reboots 2022-02-16 18:20:03 +01:00
RadWolfie
8c7247abf5 reimplement suspend xbox threads so we can shutdown emulation properly 2022-02-16 18:20:02 +01:00
RadWolfie
0b90a48434 register duplicated xbox handle require duplicated handle from host 2022-02-16 18:20:01 +01:00
ergo720
e85af190d5 Properly set the ref count of ethread, fixes Amped 2022-02-16 18:20:01 +01:00
ergo720
733670c7f8 Fixed an issue with xbox handle registration 2022-02-16 18:20:01 +01:00
ergo720
79ac0c3019 Updated thread timings in ethread + null id upon thread termination 2022-02-16 18:20:00 +01:00
ergo720
ec6b16c68a Added support to Ps notification routines 2022-02-16 18:20:00 +01:00
ergo720
e9cc351bba Unpatch XSetProcessQuantumLength + moved unused xapi patched to standalone file + added code to handle xbox user APCs in SignalObjectAndWait 2022-02-16 18:19:59 +01:00
RadWolfie
e208c73586 fix thread calls issue from GetNativeHandle to keep special handle return 2022-02-16 18:19:59 +01:00