Commit Graph

70 Commits

Author SHA1 Message Date
Gliniak
ce990e2828 [HID] Added support for joystick deadzones
- Simplified logic for connected controllers
2024-06-01 14:54:01 +02:00
Gliniak
5ca173cd4f [Kernel] Fixed issue with unsupported deployment type by games.
Thanks Emoose for code for checking title_id type
2024-04-26 20:21:40 +02:00
Gliniak
1ff3dc4d10 [Kernel] Added support for custom kernel version 2024-03-05 11:33:14 +01:00
Gliniak
5ade4a1288 [XAM] Added Message: XTitleGetDeploymentType 2024-02-12 22:09:19 +01:00
Gliniak
18b5a6706a [Kernel] Revert Guest->Host Object Mapping 2024-01-20 10:15:54 +01:00
disjtqz
9b3601c6fa [Kernel] add object type stub functions, export object types 2023-10-14 22:35:49 +02:00
disjtqz
a7b047b2a2 Implement kernel processes 2023-10-12 22:13:40 +02:00
disjtqz
b5ddd30572 moved xsemaphore to xthread.d
add typed guest pointer template
add X_KSPINLOCK, rework spinlock functions.
rework irql related code, use irql on pcr instead of on XThread
add guest linked list helper functions
renamed ProcessInfoBlock to X_KPROCESS
assigned names to many kernel structure fields
2023-10-11 17:43:59 +02:00
chss95cs@gmail.com
2fa2f1a78c Add more wrapper functions to ppc_context_t in kernel, want to switch…
… over to referencing state through ppc_context as much as possible, it'll make implementing things like kernel processes much easier in the future

Move forward definitions of kernel types into kernel_fwd.h

Stub implementation of  XamLoaderGetMediaInfoEx
Partially implement XamSetDashContext
implement XamGetDashContext
Stub implementation of XamUserIsUnsafeProgrammingAllowed
Stub implementation of XamUserGetSubscriptionType
Expanded the supported object types for ObReferenceObjectByHandle and wrapped the logic for encoding the type in a constexpr function
ObReferenceObjectByName was taking lpstring_t for first param, but the function actually takes X_ANSI_STRING ptr

NtReleaseMutant actually does not return anything from KeReleaseMutant, it just checks the handle and returns whether it was invalid.

Changed the raise/lower irql functions to just set the irql on the pcr instead of setting it on field of Processor, processor is a shared object and irql is per-thread

Semi-stub implementation of KeGetImagePageTableEntry. I locked at it in the HV and got it so the values are in the same range the HV returns + actually reflect the page & memory range, but i doubt its equal to the values the hv returns on real hw. Used by modern dashboards, don't know for what.
Log error message for ObDereferenceObject w/ null ptr.

Allocate a special fixed page that dashboards reference, currently don't know what the data on that page is supposed to be.
Add current_irql field to X_KPCR
Added Device object member of XObject::Type enum
Added some notes about other gpu registers, found a table of register names and indices in xam
2023-04-23 10:39:52 -04:00
chss95cs@gmail.com
ab21e1e0f0 Several changes for timestamp bundle:
Fully defined the structure.
Single copy of it + single timer across all modules, managing it is now the responsibility of KernelState.

add global_critical_region::PrepareToAcquire, which uses Prefetchw on the global crit. We now know we can use Prefetchw on all cpus that have AVX.
add  KeQueryInterruptTime, which is used by some dashboards.

add threading::NanoSleep
2023-04-16 10:08:01 -04:00
Gliniak
202ab76300 [Kernel] Changed default notification position 2023-03-08 10:59:08 +01:00
Gliniak
0ec65be5ff [UI] Notification & Custom Font Support 2023-03-08 09:36:49 +01:00
Gliniak
9f0d3d4c5b [Kernel] Simple support for loading achievement data 2022-12-25 16:11:59 +01:00
Gliniak
dde8adc140 Allow XamUserReadProfileSettings to use xuid to define profile 2022-05-22 13:11:29 +02:00
Gliniak
db50db3215 Merge remote-tracking branch 'GliniakRepo/TU_APPLY' into canary_experimental 2022-05-19 11:00:34 +02:00
Gliniak
c65f240c0b [Kernel] Improved TUs Support
- Changed name of config option to apply_title_update to better reflect what that option does
- Mount TU package to UPDATE: partition
- Simplified UserModule::title_id()
- Splitted loading module into two parts to allow applying TUs and custom patches
2022-05-06 08:04:47 +02:00
Gliniak
17b30be56a Added support for local multiplayer 2022-02-02 13:44:28 +01: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
gibbed
f8e6ac4108 Defer XAM UI functions & other improvements.
- [Kernel] Fix global locking in kernel dispatch thread.
- [Kernel] Improve CompleteOverlappedDeferred/CompleteOverlappedDeferredEx.
- [XAM] Identify unknowns in XamNotifyCreateListener/XNotifyListener.
- [XAM] Defer XamShowMessageBoxUI.
- [XAM] Defer XamShowKeyboardUI.
- [XAM] Fix cancel handling in XamShowKeyboardUI.
- [XAM] Defer XamShowDeviceSelectorUI.
- [XAM] Defer XamShowDirtyDiscErrorUI.
2020-11-27 05:15:17 -06: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
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
Jonathan Goyvaerts
c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
gibbed
0d6bfc1a6b [Kernel] Rename NotifyListener to XNotifyListener to bring it in line with the naming scheme of kernel objects. 2019-07-29 13:43:13 -05:00
gibbed
4cc2aaf5b9 Remove unnecessary usage of xe::be. 2018-05-27 16:35:01 -05:00
Dr. Chat
a148b965f1 KernelState should handle module launching 2016-10-24 11:01:10 -05:00
Dr. Chat
eee0bb070c Store thread TLS in guest memory rather than using host APIs 2015-12-29 13:09:58 -08:00
Dr. Chat
bb5fd73b9e Register user-modules with the kernel in UserModule::Restore 2015-12-29 13:09:57 -08:00
Dr. Chat
f5237d486a KernelState::TerminateTitle - Release the global lock in smaller regions / No need for an argument specifying if called from guest 2015-12-29 13:09:51 -08:00
Dr. Chat
24f8295daa Make KernelState::TerminateTitle try to terminate XThreads safely. 2015-12-29 13:09:39 -08:00
Dr. Chat
712a5da64b KernelState::Save/Restore (and misc. changes) 2015-12-29 12:35:58 -08:00
Ben Vanik
e5fbf840d2 Shuffling kernel/. 2015-09-06 18:07:52 -07:00
Ben Vanik
8588fbc6cf Shuffling kernel util types to util/. 2015-09-06 13:45:52 -07:00
Ben Vanik
669f5b061f Moving DPC list into KernelState and removing unused file. 2015-09-06 09:36:39 -07:00
Ben Vanik
3c96b6fa0a DANGER DANGER. Switching to global critical region.
This changes almost all locks held by guest threads to use a single global
critical region. This emulates the behavior on the PPC of disabling
interrupts (by calls like KeRaiseIrqlToDpcLevel or masking interrupts),
and prevents deadlocks from occuring when threads are suspended or
otherwise blocked.
This has performance implications and a pass is needed to ensure the
locking is as granular as possible. It could also break everything
because it's fundamentally unsound. We'll see.
2015-09-06 09:30:54 -07:00
Ben Vanik
a92566dfc5 More style. 2015-08-07 21:29:03 -07:00
Dr. Chat
8d0fef1433 Kernel state terminate notification support 2015-07-21 22:11:33 -05:00
Ben Vanik
ecd4af10c9 Fixing some clang warnings/errors. 2015-07-15 23:26:58 -07:00
Dr. Chat
870aa092bb KernelState::GetKernelModule 2015-07-05 17:27:25 -05:00
Dr. Chat
5ccea06e7f KernelState::TerminateTitle 2015-07-05 15:42:30 -05:00
Ben Vanik
5b2f049d4c Adding deferred xoverlapped completion helper. 2015-06-29 12:02:08 -07:00
Ben Vanik
0716cf84c0 Renaming xe::fs to xe::filesystem and xe::kernel::fs to xe::vfs.
Progress on #294.
2015-06-27 13:31:21 -07:00
Ben Vanik
f07d620553 Moving misc stuff out of xbox.h.
Progress on #297.
2015-06-27 11:44:40 -07:00
Ben Vanik
52060af847 Best-guess process info block. 2015-06-04 17:46:00 -07:00
Ben Vanik
d746743d20 More object_ref'ing. 2015-05-25 00:51:28 -07:00
Ben Vanik
5cfb69434c Modules using object_ref. 2015-05-25 00:51:27 -07:00
Ben Vanik
8ac1f61c64 RAII object reference, debug mutex, etc. 2015-05-25 00:51:24 -07:00
Ben Vanik
f88bf33b4f Moving threads to XHostThread and making shutdown not crash. 2015-05-19 22:20:49 -07:00
Dr. Chat
f2ac2af8cd Change kernel state's object mutex to a recursive mutex
KernelState::IsKernelModule
2015-05-18 00:40:43 -05:00
Ben Vanik
46eedeab01 Fixing up some overlapped completion routine stuff. 2015-05-14 16:35:29 -07:00
Ben Vanik
abf7b794e6 Adding --headless and basic message box UI. 2015-05-14 16:21:08 -07:00