aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/hid/hid_server.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Vibration support for ns2 gamesnéo Luigi29 hours1-32/+18
| | | | | | | | | This branch supports vibration by achieving proper rumble reading from games and uses regular eglantine/eden logic from ns1 to send them over. Tested on windows 10 on Mario Kart World Assisted-by: Claude Opus 5.5 (code cleanup)
* Merge remote-tracking branch 'origin/nx2' into neo.ai/vibration-fixnéo Luigi31 hours1-34/+87
|\ | | | | | | | | | | | | | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # src/core/hle/service/hid/hid_server.cpp # src/core/hle/service/hid/hid_server.h
| * service: placeholder handlers for known but unimplemented commandsTakoroka3 days1-34/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add StubReplyZeroed, StubReplyEvent and StubReplyInterface to ServiceFrameworkBase: for Switch 2 callers they reply with zeroed data, with zeroed data and a copy handle to an event that never fires, or with an nx2: stub interface; other callers get the unimplemented-function path as before. Each command is logged once. Use them for the commands of the interfaces games open that had no handler or a nullptr one (hid, am, audio, aoc, caps, mii, set, lm, acc, ssl, bsd and the nx2 vi2/gsv/gpu/syncpt sessions): a command that returns an interface now returns one, a command that returns a handle returns an event, so callers no longer get handle 0 or object 0 back.
| * hid: handle Switch 2 commands 213 and 220Takoroka3 days1-0/+13
| | | | | | | | | | | | | | | | 213 (32 bytes and the aruid, no reply data) is sent per controller every frame by Kirby Air Riders; through the auto stub it logged two lines per call. 220 (16 bytes and the aruid) replies with one byte, which the auto stub left to the message buffer's leftovers. Accept 213 quietly and answer 220 with zero.
* | Vibration fix for ns2 games | Assisted by claude (code)néo Luigi3 days1-4/+35
|/
* Switch 2: back GPU-only regions, pace presents, interleaved split methodsTakoroka7 days1-0/+6
| | | | | | | | | | | | | | | | - gpu 214 creates GPU-only memory the graphics server backs itself (title 4 renders everything into six 300 MB regions at 0x81_0000_0000). Back each with application-pool pages mapped into the alias code region and map that for the GPU. This is what made title 4's frames appear. - vi2 229 waits (bounded) for the presented frame's GPU fence: the reply reports every buffer free, so without this the game laps Eden's GPU thread and rewrites command memory it has not read yet. - Split methods: keep several parked methods keyed by resume address (NVN interleaves command buffers) and drop them when the submission ends. - hid 214 (per-frame vibration send) answered quietly. - Debug aids: EDEN_NX2_WINDOW_TRACE / EDEN_NX2_RT_TRACE (render targets, clears, textures), EDEN_NX2_AUDIO_LEVEL (output peak), EDEN_NX2_PB_DUMP (command list for offline replay), parsed-entry change check.
* Revert "[hle] constexpr handler dispatch maps, introduce version gating ↵PavelBARABANOV2026-10-151-198/+198
| | | | | | | | | | | | | | | | | (#4480)" (#4532) This reverts commit 218c6705d950635bc18f8458d738a1996fb592b6. - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md). - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4532 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [hle] constexpr handler dispatch maps, introduce version gating (#4480)lizzie2026-10-131-198/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR primarily focuses on upbringing constexpr maps for handlers. Each time an HLE object of a service is construed, it registers it's own handlers, over and over. Regardless of whetever it needs them at the moment or not. Additionally we don't require to keep track of different function pointers amongst each object. This can be done by overriding the given function instead, as opposed to having a separate hash map for every given object. In other words: Remove handlers (and handlers_tipc) map for every instance then read from a static defined per-class. - [x] Migrate all HLE functions to new `frozen::map` constexpr time finder - [ ] Measure if this approach actually makes better codegen Optional: - [x] Properly gate all functions (that have versions commented next to them) - [x] Maybe store `HandlerFnP<>` and `const char*` separately, version gating can go in a different map as well Information such as name can be used on debug builds, but doesn't particularly help on release as one can consult an external reference (or have an annotated IPC map) Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Co-authored-by: Maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4480 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [core, hle, video_core, memory] Improve multi-process, display layers, ↵Maufeat2026-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | dynamic shader cache and rework overlay (#4238) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- - Dynamic shader cache reloading capability for qlaunch - Multi-process improvements (thanks to @frank1734), instead of just using the main application we now respect caller process (also did it for HID devices while I was at it) - Layer stack masks & shared buffer screenshot for video core, added different masks (screenshot, recording, etc.) this was discovered as an issue due to how in qlaunch the transition was not right between applications. May not be perfect but also fixes screenshots while using qlaunch - Reworked overlay display management (input and visibility) - instead of random numbers as I've previously did, I decided to add an AppletZIndex enum for better readability. Also split capability of input by touch and gamepad. - etc. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4238 Reviewed-by: Samuel <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [fmt] use {#:x} instead of 0x{:#x} (#4170)lizzie2026-07-251-2/+2
| | | | | | | | | | continuation of #309 but applying to even more files than before :) also makes them lowercase because `0xfafafa` is better as `0XFAFAFA` Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4170 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [hle] stub SetMouseLibraryVersion (#4222)Maufeat2026-07-241-1/+7
| | | | | | | | fix for Avatar Legends Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4222 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [video_core, hle] remove redundant parent references in system structs (#3908)lizzie2026-06-231-53/+24
| | | | | | | | | | reworked a bit to remove references of parent objects and instead pass as arguments to methods to prevent useless reloads Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3908 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev>
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [hle, kernel] Add support for FW21 and kernel changes (#3004)lizzie2025-11-161-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | - Adapts kernel changes from atmosphere for firmware 21.0.0. - Fixes launch error of firmware 21.0.0 applets. - Adds new commands for `prepo` (New `SaveSystemReport` & `SaveSystemReportWithUser`). - Adds new commands for `IReadOnlyApplicationControlDataInterface` (cmd 19; incomplete!) - Adds `{12010, nullptr, "SetButtonConfigLeft"},` undocumented IHidServer. - Adds new commands for `ngc:u` (`Mask2` and `Check2`) - Adds new commands for system settings server (GetHttpAuthConfig) for webapplet - Removes incompatible firmware popup warning. Signed-off-by: lizzie lizzie@eden-emu.dev Co-authored by: maufeat sahyno1996@gmail.com Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Co-authored-by: Maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3004 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [fmt] use {:#X} for format instead of 0x{:X} (#309)lizzie2025-08-271-1/+1
| | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/309 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* Add Airplane Mode + Host Network Interface Details (#204)Maufeat2025-06-261-0/+3
| | | | | | | | | | | | | Adds Airplane Mode function to settings, host states, etc. Windows implemented only for now. Closes #203 Co-authored-by: crueter <swurl@swurl.xyz> Co-authored-by: Aleksandr Popovich <alekpopo@pm.me> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/204 Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
* [hid] stub for ActivateDebugMousePavel Barabanov2025-06-241-1/+6
|
* everything related to the FW 20 has been deleted.Pavel Barabanov2025-05-111-5/+3
|
* started adding services for firmware 20.0.0 without implementationPavel Barabanov2025-05-031-3/+5
|
* Implement HID function stub "SetGestureOutputRanges" (#105)EmulationEnjoyer2025-04-041-0/+10
| | | | | | | | | | | | | | | | | | | | | Add function stub for "SetGestureOutputRanges" in HID service Fixes userspace panic when booting Donkey Kong Country Returns HD: > Debug <Critical> core\hle\service\service.cpp:operator ():78: Assertion Failed! Unknown / unimplemented function '92(<unknown>)': port='hid' cmd_buf={[0]=0x6, [1]=0x8000000C, [2]=0x1, [3]=0x0, [4]=0x4F434653, [5]=0x0, [6]=0x0, [7]=0x0, [8]=0x49434653} > Service.AM <Info> core\hle\service\am\service\application_functions.cpp:SetTerminateResult:187: (STUBBED) called, result=0x1a80a (2010-0212) > Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:Break:52: Userspace PANIC! info1=0x0000001086D02C4C, info2=0x0000000000000004 > Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:operator ():33: debug_buffer_err_code=1A80A > Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:Break:102: Emulated program broke execution! reason=0x0000000000000000, info1=0x0000001086D02C4C, info2=0x0000000000000004 ref: https://git.citron-emu.org/Citron/Citron/commit/132077e18f491d12d305e94f594470d6b93e8d8d ![](https://i.imgur.com/hbBnlYs.png) Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/105 Co-authored-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost> Co-committed-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
* service: hid: Migrate HidServer to new IPCNarr the Reg2024-02-231-1790/+757
|
* service: hid: Move and migrate AppletResource and ActiveVibrationDeviceNarr the Reg2024-02-231-61/+3
|
* Merge pull request #12780 from german77/touch_resource5liamwhite2024-02-011-8/+16
|\ | | | | service: hid: Fully implement touch resource
| * service: hid: Fully implement touch resourceNarr the Reg2024-01-281-8/+16
| |
* | service: hid: Implement GetPlayerLedPattern accuratelyNarr the Reg2024-01-301-12/+33
|/
* service: set: Implement more settings functions for QlaunchNarr the Reg2024-01-251-2/+2
|
* service: hid: Fully implement abstract vibrationNarr the Reg2024-01-151-145/+189
|
* service: hid: Create abstracted pad structuregerman772024-01-111-1/+1
|
* service: hid: Implement SetNpadSystemExtStateEnabledgerman772024-01-061-2/+2
|
* service: hid: Implement CaptureButtonAssignmentgerman772024-01-061-7/+11
|
* hid_core: Move hid to it's own subprojectNarr the Reg2024-01-051-18/+17
|
* service: hid: Implement NpadResource and NpadDataNarr the Reg2024-01-031-78/+144
|
* service: fetch objects from the client handle tableLiam2023-12-241-6/+3
|
* service: hid: Fix crash on InitializeVibrationDeviceNarr the Reg2023-12-201-1/+1
|
* service: hid: Allow to create multiple instances of shared memoryNarr the Reg2023-12-131-11/+12
|
* service: hid: Improve CreateAppletResource implementation and free resourcesgerman772023-12-101-6/+4
|
* service: hid: Introduce proper AppletResource emulationNarr the Reg2023-12-061-1/+6
|
* Fixed controller applet crashing when on FW17+FrozenAra2023-11-271-0/+16
|
* service: hid: Create appropriate hid resourcesNarr the Reg2023-11-201-253/+184
|
* Merge pull request #12011 from Macj0rdan/controller-appletNarr the Reg2023-11-201-2/+2
|\ | | | | Implemented qlaunch version of the controller applet
| * Implemented qlaunch version of the controller appletFrozenAra2023-11-191-2/+2
| |
* | service: hid: Ensure resource manager is initializedSquall-Leonhart2023-11-201-1/+1
|/ | | | | | Ensures the proper initialization of the IActiveVibrationDeviceList. By using GetResourceManager() instead of resource_manager, we make sure that the IActiveVibrationDeviceListis initialized before it's used, preventing potential null issues. Fixes #12088
* service: hid: Introduce firmware settings and update activate controller callsNarr the Reg2023-11-161-35/+111
|
* service: hid: Implement xpad callsNarr the Reg2023-11-161-36/+131
|
* service: hid: Split hid.cpp into individual interfacesNarr the Reg2023-11-151-0/+2269