Commit Graph

243 Commits

Author SHA1 Message Date
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
Triang3l
ea9ee0d4ba [Kernel] Make HDTV gamma the default 2020-12-31 16:14:26 +03: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
gibbed
1513dd235b [Kernel] Code reentrance for guest fibers.
[Kernel] Code reentrance using exceptions for guest fibers.
2020-12-05 14:17:33 -06:00
gibbed
d420215de1 [Kernel] Allow 0 return for MmQueryAddressProtect. 2020-12-05 14:17:19 -06:00
gibbed
164aa8e8ca [Kernel] Scope object type enum. 2020-11-22 20:34:07 -06:00
gibbed
bdeae25353 [Kernel] Add comment about Shadowrun bug.
[Kernel] Add comment about Shadowrun thread name bug and a bonus lint fix.
2020-11-22 15:49:25 -06:00
Gliniak
26b0aa0cc4 [Kernel/Memory] Restrict NtVirtualMemory only to virtual memory range 2020-11-22 15:43:53 -06:00
Gliniak
aae292aab5 [Kernel/Memory] MmQueryAddressProtect - Check for protect_bits equals 0 2020-11-22 15:40:03 -06:00
gibbed
8749ca2260 [Kernel] Filter thread names from guest. 2020-11-22 14:54:08 -06:00
gibbed
4f25a96928 [Kernel] Overhaul Rtl time functions.
- Add date third party submodule.
- [Kernel] Add xclock.
- [Kernel] Reimplement RtlTimeToTimeFields using std::chrono/date/xclock.
- [Kernel] Reimplement RtlTimeFieldsToTime using std::chrono/date/xclock.
- Supersedes #1612.
2020-11-22 14:48:36 -06:00
Sandy
36466231d0 threading test: zero initialize counter
The high performance test atomic counters need to be set to zero to have reliable results.
2020-11-16 00:13:14 -06:00
Cancerous
ce1a31faad [Kernel] Set flag 5 in XboxHardwareInfo.
[Kernel] Set flag 5 (indicates storage is initialized) in XboxHardwareInfo.
2020-11-15 15:04:40 -06:00
gibbed
e848a20c23 [Kernel] Allow wildcard filter to end in *. 2020-11-15 13:29:34 -06:00
gibbed
32e8b47a33 [Kernel] Enforce *. in wildcard matching. Supersedes #1675. 2020-11-15 13:24:06 -06:00
Triang3l
a319617185 [Kernel] Thread affinity cleanup 2020-11-14 18:09:47 +03:00
Gliniak
2dc6b0b2ad [Kernel/Thread] Added missing paramteter to KeSetAffinityThread 2020-11-14 17:48:30 +03:00
Gliniak
ba565c3403 [Kernel/Usbcam] XUsbcamCreate
- Provided description to some parameters
- Provided description what function more/less should do
- Changed return code based on game behaviour
2020-09-17 23:14:33 +03:00
Triang3l
fd14a68420 [Kernel] NtQueryVirtualMemory state test case info 2020-08-27 16:59:42 +03:00
Triang3l
c2c263f34a [Kernel] Return only one state from NtQueryVirtualMemory 2020-08-27 15:47:51 +03:00
Gliniak
eac7e2cd1f [Kernel/Memory] NtQueryVirtualMemory - Added support for returning X_MEM_FREE state 2020-08-27 14:55:02 +03:00
gibbed
c99c430665 [Kernel] Reject IO for invalid characters.
[Kernel] Reject IO for paths with invalid characters.
2020-07-12 12:22:24 -05:00
Gliniak
ab2b9393c2 [Kernel] Implemented NtQueueApcThread 2020-07-12 08:56:15 -05:00
Triang3l
4bb0ca0e09 [GPU] Move all xenos.h to gpu::xenos, disambiguate Dimension/TextureDimension 2020-07-11 15:54:22 +03:00
gibbed
cf0251cd9f [Kernel/VFS] Cleanup info query/set+sector size.
[VFS] Device now exposes name, attributes, component name max length.
[VFS] Fix STFS device to return 0x200 sector size. XCTD compression
      userland code appears to always expect a sector size of 0x200.
[Kernel] Move X_FILE_*_INFORMATION structs to new files.
[Kernel] Move NtQueryInformationFile, NtSetInformationFile,
         NtQueryVolumeInformationFile to new file.
[Kernel] Cleanup implementation of NtQueryInformationFile,
         NetSetInformationFile, NtQueryVolumeInformationFile.
[Kernel] Properly validate arguments to NtQueryInformationFile,
         NetSetInformationFile, NtQueryVolumeInformationFile.
[Kernel] Properly implement query of XFileFsVolumeInformation.
[Kernel] Properly implement query of XFileFsSizeInformation.
[Kernel] Properly implement query of XFileFsAttributeInformation.
2020-04-20 16:08:02 -05:00
gibbed
1c2d6753bb [Kernel/VFS] Specify root entry to open from + cleanup.
[VFS] Allow specifying root entry to open from with OpenFile.
[Kernel] NtCreateFile now opens from root entry when available instead
         of needlessly building a full path and resolving from that.
[VFS] Reduce code duplication by adding Entry::ResolvePath.
[VFS] Remove ResolveBasePath to avoid multiple calls to find_base_guest_path.
2020-04-20 01:14:07 -05:00
gibbed
b338fb0caa [Kernel] Reformat locale cvar descriptions.
[Kernel] Reformat locale cvar descriptions to include newlines.
2020-04-13 12:57:14 -05:00
gibbed
fe016cc60c [Kernel] Fix vswprintf debug log. 2020-04-09 17:54:22 -05:00
gibbed
ed04d96e67 Avoid using '#' format spec for X hex numbers.
Avoid using '#' format spec for X (uppercase) hex numbers, as it
results in output like "0XABCDEF" instead of "0xABCDEF".
2020-04-09 11:25:08 -05:00
gibbed
a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
emoose
9185cdcc79 [Kernel] Fix wide-printf functions not processing %ws format correctly
This would break format strings like memory://%.*ws (that dashboard tries using), because the "ws" part would set FF_IsWide, but FF_IsWide actually seemed to be used as an "is opposite encoding" flag.
Since the format string is wide that'd make it treat the param as ASCII, but in dashboards case the param string provided is actually a wide string.
(in other words, it seems %ws is supposed to mean that the param is always a wide string, not that the param is just opposite encoding)

This changes the old FF_IsWide to FF_InvertWide, and adds a new FF_IsWide that means that the param is always wide.
2020-02-24 14:58:09 -06:00
emoose
ac5d548e90 [Kernel] *FormatData: make peek() match get() endian, fix skip() not advancing pointer 2020-02-24 14:58:09 -06:00
gibbed
a6e6f0f7bf Lint cleanup. 2020-02-22 13:29:07 -06:00
Triang3l
f858631245 [Kernel] Trigger memory callbacks after file read 2020-02-22 18:06:56 +03:00
Triang3l
028c784c5c [Memory] Make heap_size actually mean size rather than high address 2020-02-22 14:55:28 +03:00
Triang3l
8ec813de82 [Memory, D3D12] Various refactoring from data provider development 2020-02-15 21:35:24 +03:00
Gliniak
d241a98189 [Kernel] Rewrote ObReferenceObjectByHandle 2020-02-10 20:52:23 -06:00
gibbed
74c95c64d2 [Kernel] Ignore page size with base addr allocs.
Changes NtAllocateVirtualMemory so that it ignores specified page size when a
base address is specified.

Fixes a crash seen in N3 demo boot.
2020-02-09 06:54:27 -06:00
Silent
38bf6c8822 [Kernel] Make XexUnloadImage fully release the image
Previously XexUnloadImage did not cleanup the image fully,
and if XexLoadImage was to be called again on the same module,
it was not initialized fully, leading to a crash when using it.
2020-01-27 06:35:10 -06:00
Silent
9d48e904da [Kernel] (Partially) fix module refcounting
.xex module handles were retained twice in several places,
possibly causing them to leak.
More placed may have to be fixed too.
2020-01-27 06:35:10 -06:00
Silent
f278e30d21 [Kernel] Fix SHA1 and SHA256 state endianness
Fixes malfunctioning SHA256 hash,
corrupting its state between Update and Finish calls.
2020-01-27 06:33:39 -06:00
Silent
728531eff7 [Kernel] Operate on handle refcounts in Ob funcs
Although this seems counter-intuitive, operating on handle
reference counters in
- ObLookupThreadByThreadId
- ObReferenceObjectByHandle
- ObDereferenceObject
allows to cleanly clean up handles for resources created elsewhere
and destructed by ObDereferenceObject (for example, threads with 0x80
creation flag). Operating on pointer reference counters alone
would leave a stray handle in the slots list.
2019-11-30 20:08:30 -06:00
Silent
05ef022fd7 [Kernel] Do not retain handle in ExCreateThread
Closing the thread handle should delete the thread object
if it's finished. When this handle was retained, closing the handle
left a lingering handle reference and thus this XThread would leak
2019-11-30 20:08:30 -06:00
Triang3l
8ba6f3fc37 [Memory] Trigger watches when making pages writable, not the other way around 2019-11-10 14:21:36 +03:00
gibbed
b422ed750b Oops. Didn't mean to add that yet. 2019-09-04 23:16:06 -05:00