Commit Graph

1439 Commits

Author SHA1 Message Date
emoose
052ce3d389 [Kernel] Make KeEnter/LeaveCriticalRegion only affect the caller thread
Adds a new X_KTHREAD::apc_disable_count field at 0xB0 into X_KTHREAD based on where 360 kernel seems to store it, and made CriticalRegion funcs act on that, instead of locking things between all threads, and changes DeliverAPCs to check that field before running the APCs.

XThread::LockApc/UnlockApc were also updated too as those previously called into EnterCrit/LeaveCrit to work, but AFAIK the code that uses LockApc/UnlockApc does have an actual need for locking between threads, so changed them to work on XThread::global_critical_region_ directly instead.
2021-06-25 23:11:14 -05:00
Joel Linn
6d548f51b3 [Kernel] net: name anonymous struct
- fixes GCC compilation error due to
  "member with constructor in anonymous struct"
2021-06-02 22:28:43 -05:00
Joel Linn
c0fb300a05 [Kernel] Remove explicit SHIM calling convention
Shim exports are called from GuestToHostThunk which dictates the calling
convention. The default system calling convention is different depending
on OS (Windows vs. everything else) and architecture. PR #1339 addresses
this for x64 Linux.
There is no reason for explicit `__cdecl`. Also, it is not available in
GCC. We could use `__attribute__((ms_abi))` or
`__attribute__((sysv_abi))` but that just adds complexity.
2021-06-02 22:28:43 -05:00
Joel Linn
07a060b002 [Kernel] Solve ambiguity in RegisterExport()
- Remove overload for exports with `void` return type
- Use `if constexpr (std::is_void<R>::value)` to differentiate
2021-06-02 22:28:43 -05:00
Joel Linn
a86d7173e1 Refactor FourCC magic uses
- Use new fourcc_t type
- Improves compiler compatibility by removing multi chars
2021-06-02 22:28:43 -05:00
Gliniak
fbc31652e0 [XAM/Net] inet_addr: Handle edge cases 2021-05-27 16:16:56 -05:00
Gliniak
29f7987401 [XAM] XamReadTileToTexture: tile_id safety check 2021-05-27 16:16:20 -05:00
Gliniak
29f28b8b60 [Kernel/XAM] CloseContent: Close files related to closed content 2021-05-27 16:16:01 -05:00
Gliniak
f298d7620a [Kernel/XAM] XamContentGetCreator: Added check for existing content 2021-05-27 16:11:35 -05:00
Triang3l
ea9625fca8 [Kernel] VdSwap virtual/physical address clarification 2021-05-25 21:31:02 +03:00
Triang3l
e49e26e4a0 [Kernel] shim_utils lint fix 2021-05-16 18:34:27 +03:00
Gliniak
a69a058991 [XAM/App] Fixed issue when error code was handled as success 2021-05-13 23:08:02 -05:00
Gliniak
93c97fdbda [XAM/Content] Provide title ID for aggregate content 2021-05-13 23:08:02 -05:00
gibbed
21c28a07f1 [XAM] Write stub buffer in XamReadTileToTexture.
[XAM] Write stub texture buffer (white) in XamReadTileToTexture.
2021-05-08 11:13:30 -05:00
gibbed
8d8bab853d [XAM] Define unknown args for XamReadTileToTexture. 2021-05-08 11:13:30 -05:00
gibbed
37a733e33a [XAM] More values for dummy achievement details.
[XAM] Provide image ID and flags for dummy achievement details.
2021-05-08 11:13:30 -05:00
gibbed
0f6bfcf0d5 [XAM] Base dummy achievement details at ID 1. 2021-05-08 11:13:30 -05:00
gibbed
5d778cfef6 [XAM] Better text for dummy achievement details. 2021-05-08 11:13:30 -05:00
gibbed
b2011453cc [XAM] Cap dummy achievement details to 100. 2021-05-08 11:13:30 -05:00
gibbed
b735e3f40d [XAM] Fix dummy achievement details count. 2021-05-08 11:13:30 -05:00
gibbed
cf2037cdf6 [XAM] Cap the number of dummy achievement details. 2021-05-08 09:10:28 -05:00
gibbed
1c78c9d75d [XAM] Fix adding dummy achievement details.
[XAM] Fix infinite loop in adding dummy achievement details when
count>255.
2021-05-08 09:10:28 -05:00
gibbed
084b8c5dbe [XAM] Fix missing buffer check on XamEnumerate. 2021-05-08 09:10:28 -05:00
Gliniak
d2ca54d909 [Kernel/XAM] Dummy X_ACHIEVEMENT_DETAILS support
Co-authored-by: gibbed <rick@gibbed.us>
2021-05-08 07:47:03 -05:00
emoose
ce19d948f0 [Base] Move XdbfLocale to xbox.h as XLanguage, let STFS headers use it
Renamed to XLanguage because AFAIK locale on Xbox is a different concept involving countries, this enum only involves languages though.
2021-05-05 12:35:51 -05:00
Triang3l
40ca4abc0b [GPU] Small ring buffer setup function cleanup 2021-05-04 23:13:55 +03:00
Gliniak
1f658f9b32 [XAM/Content] Prevent deletion of open packages 2021-05-02 10:46:20 -05:00
gibbed
38c3db1afb [CPU/Kernel] Transparently byteswap xex2_version. 2021-05-01 17:29:05 -05:00
Gliniak
e5948bb810 [Kernel] Implemented: XeKeysHmacShaUsingKey 2021-05-01 12:31:14 -05:00
gibbed
524efcab7d [Kernel] Lint fix. 2021-05-01 12:20:14 -05:00
Gliniak
d4c3d665d5 [XAM/Content] Set disposition for overlapped cases 2021-04-30 20:12:56 -05:00
Gliniak
30ea6e3ea3 [Kernel/Memory] Return error when region_size is 0 2021-04-10 07:19:59 -05:00
gibbed
4ce43369a7 Use English game title when available. 2021-04-07 03:47:17 -05:00
Gliniak
9ccdbb2153 [Kernel/Memory] Do not clear range if it was previously commited 2021-04-07 03:42:13 -05:00
Gliniak
010f0aa517 [XAM/Party] Added stubs for:
- XamPartyGetUserList
 - XamPartySendGameInvites
 - XamPartySetCustomData
 - XamPartyGetBandwidth
2021-04-06 23:39:40 -05:00
Gliniak
6c9662d17e [XAM/UI] Added Stubs For:
- XamShowPartyUI
 - XamShowCommunitySessionsUI
2021-04-06 23:39:40 -05:00
Gliniak
a6954aced3 [Kernel/XAM] XamContentCreateEx - Extended Error Support 2021-01-31 23:58:07 -06:00
emoose
690b0d9197 [Kernel/XAM] Prevent Sleep from being used on main thread, fixes #1749 2021-01-31 23:39:13 -06:00
emoose
57764f6bea [Kernel/XAM] Improve NetDll_XNetQosServiceLookup stub, implement NetDll_XNetQosRelease
Needed for Saints Row 1 (TU1) to start up properly
2021-01-31 23:26:47 -06:00
emoose
40bbf704e0 [Kernel/XBDM] Change return values of RegisterCommandProcessorEx & DmWalkLoadedModules 2021-01-31 23:26:47 -06:00
sephiroth99
6baf6351a1 [Kernel] Fix usage of date library
For backwards compatibility reasons, the date library does not use the
new C++17 uncaught_exception signature, even if compiling under C++17.

With GCC 10, libstdc++ marks the old uncaught_exception signature as
deprecated, so this causes a compilation error.

Fortunately, date library provides a way to select which
uncaught_exception version to use, so force using the new version.

Signed-off-by: sephiroth99 <sephiroth99@gmail.com>
2021-01-31 23:22:59 -06:00
emoose
2d9326e02d [Kernel] Implement XeCryptBnQwNeRsaPubCrypt via BCrypt (win32 only) 2021-01-03 14:38:01 -06:00
emoose
8c11f2a39a [Kernel] Implement XeCryptBnQw_SwapDwQwLeBe 2021-01-03 14:38:01 -06:00
emoose
4b13ecb752 [Kernel] Implement NtReadFileScatter via adding XFile::ReadScatter 2021-01-03 13:50:34 -06:00
emoose
0400eba274 [Kernel] XFile::Read: add notify_completion param to allow disabling XIOCompletion 2021-01-03 13:50:34 -06:00
Triang3l
ea9ee0d4ba [Kernel] Make HDTV gamma the default 2020-12-31 16:14:26 +03:00
Gliniak
74cb0117cf [Kernel] WaitForNotification skip wait w/o wait_ticks 2020-12-26 04:57:21 -06:00
Gliniak
ea6969f378 [Kernel] Implemented NtSetIoCompletion 2020-12-26 04:57:21 -06:00
Gliniak
06ab8589b4 [Kernel/IO] Return error creating dir as non-dir.
[Kernel/IO] Return error when creating directory with non-directory
flag in NtCreateFile.
2020-12-06 17:07:34 -06:00
Gliniak
ff5c5f01e0 [Kernel] Zeroing out pages without write protect flag 2020-12-05 14:18:03 -06:00