Commit Graph

415 Commits

Author SHA1 Message Date
Gliniak
5f62db9289 [Kernel] Added kHighFrequency for RtlInitializeCriticalSectionAndSpinCount 2026-03-11 19:54:19 +01:00
Herman S.
f45a254774 [Linux/Threading] Self-suspend with condition variable instead of spin 2026-03-11 00:02:26 +09:00
Herman S.
4f1394bbaa [Kernel/Threading] Fix some kernel threading issues
- broken atomic exchange on linux
- spinlock release memory buffer
- race in thread suspension
- removed misleading volatile qualifiers
2026-03-10 23:53:03 +09:00
Herman S.
3585b6e592 [Kernel] Replace BCrypt RSA with portable bignum implementation
Removes the Windows-only BCrypt dependency from XeCryptBnQwNeRsaPubCrypt
and replaces it with a portable modular exponentiation implementation
using 64-bit arithmetic, enabling RSA signature verification on all
platforms. Adds Catch2 tests validating the implementation with a
2048-bit RSA key.
2026-03-10 16:20:38 +09:00
Herman S.
b0a387c6ea [XboxKrnl] Don't crash the host on guest trap 2026-03-09 14:15:14 +09:00
Herman S.
a00fd0eb12 [Kernel] Remove some log spam 2026-03-09 14:15:14 +09:00
Herman S.
5ac07f686d [Xboxkrnl] Remove devkit memory access assert and replace with warning 2026-03-09 14:15:14 +09:00
Herman S.
92b07391df [Linux/Threading] change self-suspend to wait to be resumed 2026-03-09 13:43:56 +09:00
Herman S.
32b8c341ee [Kernel] ReleaseSemaphore for Posix to match Windows semantics 2026-03-09 13:43:56 +09:00
Herman S.
bc3585d0ef Keep threads from trying to suspend themselves on Linux
Avoids certain sporadic lockups (usually on startup)
2026-03-09 13:43:56 +09:00
Herman S.
02fccd9113 [Kernel/XMP] Add title-specific file I/O hooks for XMP volume sync
Some games persist BGM volume through their own save files but never
call XMPSetVolume. Add a TitlePatch system that intercepts NtReadFile/
NtWriteFile to apply game-specific logic as well as logic to identify
the memory location that the volume data is read into and monitor that
memory location for changes, updating XMP player volume if it changes
during gameplay.

Includes patches for known games with this issue:
Dead or Alive Xtreme 2 (544307D2), PGR4 (4D5307F9) and PGR3 (4D5307D1)
2026-03-09 08:59:15 +09:00
AllanCat
e8263d3672 [XboxKrnl/Audio] Corrected XMASetLoopData's pointer type.
Fixed an issue where bgm was not looping for games that uses looping feature.
2026-03-07 11:02:23 +09:00
The-Little-Wolf
dd585ca0c8 [XboxKrnl/Crypt] - Implement XeCrypt & XeKeys Functions (#566)
- Implement XeKeysGetConsoleID, XeKeysGetKeyProperties, XeCryptDesEcb, and XeCryptDesKey.
- Stub XeCryptBnQwBeSigVerify, XeCryptRotSumSha, XeKeysGetKey, and XeKeysConsolePrivateKeySign.
2026-02-23 17:33:19 +09:00
Gliniak
8f5da619f9 [Kernel] Replaced Yield in XAudioGetVoiceCategoryVolumeChangeMask with NanoSleep
- Removed Yield in XamUserGetSigninState
2026-02-08 23:01:44 +01:00
The-Little-Wolf
a8fe4666ad [XEX] - log outputs
- Finish XEX_HEADER_XBOX360_LOGO, XEX_HEADER_FILE_FORMAT_INFO, XEX_HEADER_DELTA_PATCH_DESCRIPTOR, XEX_HEADER_SYSTEM_FLAGS_32, XEX_HEADER_ENABLED_FOR_CALLCAP, and XEX_HEADER_GAME_RATINGS
- Add missing xex2_header_keys
- Add flag name outputs
- Removed magic number
- Added X_FILE_CHARACTERISTICS to X_FILE_FS_DEVICE_INFORMATION
2026-01-30 18:45:04 +01:00
The-Little-Wolf
38ccc71afa [XboxKrnl/Threading] - implement KeInitializeTimerEx
- Taken from Crispy's Nukernel build
2026-01-29 23:05:23 +01:00
Gliniak
2ba82072fc [Kernel] Added stub for: NtCancelIoFile 2026-01-29 20:41:01 +01:00
Anton Dorozhkin
e588a772d4 [XBDM] Implement DmQueryTitleMemoryStatistics 2025-12-03 10:05:56 +01:00
Anton Dorozhkin
dfa70b3677 [Kernel] Change _vsnprintf overflow behavior. 2025-12-01 23:06:09 +01:00
Adrian
481ab595ce [Kernel] ObReferenceObjectByHandle Cleanup 2025-11-23 21:45:39 +01:00
Adrian
38ad9bf342 [Kernel] Fixed NtYieldExecution
Fixed Ninja Gaiden 3 stuck exiting challenge trials
2025-10-17 22:40:52 +02:00
Gliniak
777c394e25 [Kernel] Added VdQueryRealVideoMode 2025-10-17 09:24:06 +02:00
Adrian
a717c0cd9f [Kernel] Implemented RtlDowncaseUnicodeChar 2025-07-27 18:05:58 +02:00
The-Little-Wolf
39621ddec8 [KERNEL] - Replacing Unk
- Changes here are from Chrispy's Nukernel
2025-07-26 22:27:21 +02:00
Gliniak
4182852a4b [Base] Split of xbox.h file
- Splitted into: kernel.h and xam.h
- Removed UpdateSpaData from KernelState into ContentManager
2025-07-26 21:25:32 +02:00
The-Little-Wolf
c83522060e [XBOXKRNL/XCONFIG] - Properly set PC values
- Adding PC Related flags
- set correct size of XCONFIG_USER_PC_HINT
2025-07-23 21:46:49 +02:00
The-Little-Wolf
6314388c51 [XAM] - Replacing Unk
- Replacing unk parameters
- Naming unk xmp calls
- Added missing xmp structs
- Added missing messenger structs
- Added missing XamProfileCreate related structs
2025-07-19 20:37:23 +02:00
The-Little-Wolf
0f804c3690 [SMC] - add structs and enum for poweron and standby messages
- add structs for poweron and standby messages
- add enum for poweron and standby messages
- add enum for HalReturnToFirmware and log
2025-07-07 15:40:48 +02:00
Gliniak
b864149575 [Misc] Cleanup in Kernel 2025-05-31 12:00:47 +02:00
Gliniak
50492a951e [Misc] Moved pe_image to base from 3pp and cut unnecessary parts 2025-05-31 10:05:00 +02:00
Gliniak
96c2fb13f7 [Kernel] NtReadFile: Add APC call only for successful executions 2025-05-30 20:08:26 +02:00
Gliniak
97a45315e3 [XConfig] Added enum for all config settings 2025-05-20 22:41:27 +02:00
Gliniak
a79c00f67a [XConfig] Changed raw category values into enum 2025-05-20 22:13:53 +02:00
Gliniak
d211130c6c [Kernel] Fixed incorrect behaviour of IsSystemTitle util
- Added missing symlinks
2025-05-17 22:28:22 +02:00
Gliniak
fe739208b6 [VFS] Rewrote STFS to use memory mapping
- Replaced old-style buffer, buffer_length with std::span
- Added STFS and SVOD specific Entry and File classes
- Other smaller improvements
2025-05-14 21:38:02 +02:00
Gliniak
e85c2392ba [Kernel] Implemented: KeSetPriorityThread 2025-05-12 21:10:35 +02:00
Gliniak
f6d9e76fca [XAM] Fixed assertion related to incorrect casting
This should fix crash in 12xxx dashboard while browsing achievements

- Fixed issue with invalid time being presented for some achievements
- Added stub for: XampWebInstrumentationSetProfileCounts
2025-05-07 20:05:29 +02:00
Gliniak
c15dde52d6 [Kernel/Video] Removed unknown fields from X_VIDEO_MODE structure
- Additionally changed some messages level to more reasonable one
2025-05-05 21:30:40 +02:00
Adrian
2941b672d6 [Kernel] Implemented NtFreeEncryptedMemory 2025-04-23 07:56:28 +02:00
The-Little-Wolf
0771938db6 [Kernel] - Implemented SystemManagementController Class
- Added handling (partial or dummy) for SMC actions:
 - QUERY_TEMP_SENSOR, QUERY_TRAY, QUERY_AV_PACK, QUERY_SMC_VERSION, QUERY_IR_ADDRESS, QUERY_TILT_SENSOR
 - SET_FAN_SPEED_CPU, SET_FAN_SPEED_GPU, SET_DVD_TRAY, SET_IR_ADDRESS, SET_POWER_LED, SET_LEDS

- Stub HalOpenCloseODDTray, XamLoaderGetMediaInfo, XamLoaderGetMediaInfoEx
- Partially Implement HalSendSMCMessage
- Implement XamLoaderGetDvdTrayState
- HalOpenCloseODDTray is used by dash and HalSendSMCMessage can be used by custom dashboards
2025-04-06 17:30:56 +02:00
The-Little-Wolf
4b24f128f6 [XBOXKRNL & XAM] - Video, Hal, And XConfig
- Properly implement HalGetCurrentAVPack, and XGetAudioFlags.
- Return proper flags for AV Component, AV Composite, and VGA from xconfig.
- Set to HD to proper value.
- Correct wrong widescreen flag.
2025-04-01 07:59:22 +02:00
Xphalnos
5f918ef28d [Misc] Replaced const with constexpr where possible 2025-03-25 19:50:37 +01:00
The-Little-Wolf
180be3664e [Xboxkrnl/Xconfig] - add xboxkrnl_xconfig.h
- Add xboxkrnl_xconfig.h to hold known Xconfig flags
- Implement more xeExGetXConfigSetting cases
2025-02-07 08:29:13 +01:00
The-Little-Wolf
de79cb3db4 [Xboxkrnl/XConfig] add user audio config
- Allows for user to set their audio type in the config
- Record audio flags and how they function
2025-01-18 14:55:20 +01:00
Gliniak
1688ea5d69 [Kernel] Replaced TranslateAnsiString with TranslateAnsiPath for file paths.
This removes paths that starts or ends with whitespace characters
2025-01-14 22:45:43 +01:00
Gliniak
09be7e874a [All] Fixed multiple issues during build on Linux
- Added some fixes introduced by RodoMa92 in PR198

- Lack of AVX2 extension (should be done differently in the future)
- Disable deprecated-volatile warning
- Added missing override in posix EventInfo, ImGui notification class and XContent class
- Removed not used XAudio2.h include in XMP
- Fixed missing switch-case in XObject
- Added fugly template in native_list.h
- Fixed multiple smaller issues
2025-01-10 21:41:45 +01:00
The-Little-Wolf
57eeed86b7 [XboxKrnl/xconfig.cc] - Stub ExSetXConfigSetting and ExReadModifyWriteXConfigSettingUlong
- Stubbing ExSetXConfigSetting and ExReadModifyWriteXConfigSettingUlong
- ExSetXConfigSetting is a simple value swap from buffer_ptr
- ExReadModifyWriteXConfigSettingUlong handles combined values with buffer_ptr holding the replacement values
- added log to show what the new setting should be and what is being replaced
- To Implement would need to convert settings to strucs
2025-01-07 19:52:11 +01:00
The-Little-Wolf
b5d319834e [XboxKrnl/xconfig.cc] - Fixes and logging changes
- Adding more information in logs for easier debugging
- XamSetDashContext correction
- XCONFIG_USER_VIDEO_FLAGS reports widescreen when set in config by user
- XCONFIG_SECURED_AV_REGION reports proper values when set in config by user
- Added missing \n
2025-01-06 19:49:48 +01:00
Gliniak
c3586bc165 [C++] Uplift version to C++20 2024-12-26 23:42:31 +01:00
Gliniak
3318ab5d4c [3PP] Uplifted FMT version and adjusted messages 2024-12-12 20:28:11 +01:00