diff options
Diffstat (limited to 'src')
32 files changed, 1059 insertions, 25 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 59b999935..db3ee0837 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -173,6 +173,8 @@ void FileBackend::Write(const Entry& entry) { | |||
| 173 | SUB(Service, Friend) \ | 173 | SUB(Service, Friend) \ |
| 174 | SUB(Service, FS) \ | 174 | SUB(Service, FS) \ |
| 175 | SUB(Service, HID) \ | 175 | SUB(Service, HID) \ |
| 176 | SUB(Service, LBL) \ | ||
| 177 | SUB(Service, LDN) \ | ||
| 176 | SUB(Service, LM) \ | 178 | SUB(Service, LM) \ |
| 177 | SUB(Service, MM) \ | 179 | SUB(Service, MM) \ |
| 178 | SUB(Service, NFP) \ | 180 | SUB(Service, NFP) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index e7115933f..d22cb2966 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -60,6 +60,8 @@ enum class Class : ClassType { | |||
| 60 | Service_Friend, ///< The friend service | 60 | Service_Friend, ///< The friend service |
| 61 | Service_FS, ///< The FS (Filesystem) service | 61 | Service_FS, ///< The FS (Filesystem) service |
| 62 | Service_HID, ///< The HID (Human interface device) service | 62 | Service_HID, ///< The HID (Human interface device) service |
| 63 | Service_LBL, ///< The LBL (LCD backlight) service | ||
| 64 | Service_LDN, ///< The LDN (Local domain network) service | ||
| 63 | Service_LM, ///< The LM (Logger) service | 65 | Service_LM, ///< The LM (Logger) service |
| 64 | Service_MM, ///< The MM (Multimedia) service | 66 | Service_MM, ///< The MM (Multimedia) service |
| 65 | Service_NFP, ///< The NFP service | 67 | Service_NFP, ///< The NFP service |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 2e2de59b1..525ba39bc 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -136,6 +136,8 @@ add_library(core STATIC | |||
| 136 | hle/service/bcat/bcat.h | 136 | hle/service/bcat/bcat.h |
| 137 | hle/service/bcat/module.cpp | 137 | hle/service/bcat/module.cpp |
| 138 | hle/service/bcat/module.h | 138 | hle/service/bcat/module.h |
| 139 | hle/service/btdrv/btdrv.cpp | ||
| 140 | hle/service/btdrv/btdrv.h | ||
| 139 | hle/service/erpt/erpt.cpp | 141 | hle/service/erpt/erpt.cpp |
| 140 | hle/service/erpt/erpt.h | 142 | hle/service/erpt/erpt.h |
| 141 | hle/service/es/es.cpp | 143 | hle/service/es/es.cpp |
| @@ -156,8 +158,18 @@ add_library(core STATIC | |||
| 156 | hle/service/friend/friend.h | 158 | hle/service/friend/friend.h |
| 157 | hle/service/friend/interface.cpp | 159 | hle/service/friend/interface.cpp |
| 158 | hle/service/friend/interface.h | 160 | hle/service/friend/interface.h |
| 161 | hle/service/grc/grc.cpp | ||
| 162 | hle/service/grc/grc.h | ||
| 159 | hle/service/hid/hid.cpp | 163 | hle/service/hid/hid.cpp |
| 160 | hle/service/hid/hid.h | 164 | hle/service/hid/hid.h |
| 165 | hle/service/hid/irs.cpp | ||
| 166 | hle/service/hid/irs.h | ||
| 167 | hle/service/hid/xcd.cpp | ||
| 168 | hle/service/hid/xcd.h | ||
| 169 | hle/service/lbl/lbl.cpp | ||
| 170 | hle/service/lbl/lbl.h | ||
| 171 | hle/service/ldn/ldn.cpp | ||
| 172 | hle/service/ldn/ldn.h | ||
| 161 | hle/service/ldr/ldr.cpp | 173 | hle/service/ldr/ldr.cpp |
| 162 | hle/service/ldr/ldr.h | 174 | hle/service/ldr/ldr.h |
| 163 | hle/service/lm/lm.cpp | 175 | hle/service/lm/lm.cpp |
| @@ -170,6 +182,8 @@ add_library(core STATIC | |||
| 170 | hle/service/nfp/nfp_user.h | 182 | hle/service/nfp/nfp_user.h |
| 171 | hle/service/nifm/nifm.cpp | 183 | hle/service/nifm/nifm.cpp |
| 172 | hle/service/nifm/nifm.h | 184 | hle/service/nifm/nifm.h |
| 185 | hle/service/nim/nim.cpp | ||
| 186 | hle/service/nim/nim.h | ||
| 173 | hle/service/ns/ns.cpp | 187 | hle/service/ns/ns.cpp |
| 174 | hle/service/ns/ns.h | 188 | hle/service/ns/ns.h |
| 175 | hle/service/ns/pl_u.cpp | 189 | hle/service/ns/pl_u.cpp |
| @@ -225,6 +239,8 @@ add_library(core STATIC | |||
| 225 | hle/service/sm/sm.h | 239 | hle/service/sm/sm.h |
| 226 | hle/service/sockets/bsd.cpp | 240 | hle/service/sockets/bsd.cpp |
| 227 | hle/service/sockets/bsd.h | 241 | hle/service/sockets/bsd.h |
| 242 | hle/service/sockets/ethc.cpp | ||
| 243 | hle/service/sockets/ethc.h | ||
| 228 | hle/service/sockets/nsd.cpp | 244 | hle/service/sockets/nsd.cpp |
| 229 | hle/service/sockets/nsd.h | 245 | hle/service/sockets/nsd.h |
| 230 | hle/service/sockets/sfdnsres.cpp | 246 | hle/service/sockets/sfdnsres.cpp |
diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h index 82d19cefc..c63f0ed90 100644 --- a/src/core/hle/kernel/timer.h +++ b/src/core/hle/kernel/timer.h | |||
| @@ -32,13 +32,17 @@ public: | |||
| 32 | return HANDLE_TYPE; | 32 | return HANDLE_TYPE; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | ResetType reset_type; ///< The ResetType of this timer | 35 | ResetType GetResetType() const { |
| 36 | return reset_type; | ||
| 37 | } | ||
| 36 | 38 | ||
| 37 | bool signaled; ///< Whether the timer has been signaled or not | 39 | u64 GetInitialDelay() const { |
| 38 | std::string name; ///< Name of timer (optional) | 40 | return initial_delay; |
| 41 | } | ||
| 39 | 42 | ||
| 40 | u64 initial_delay; ///< The delay until the timer fires for the first time | 43 | u64 GetIntervalDelay() const { |
| 41 | u64 interval_delay; ///< The delay until the timer fires after the first time | 44 | return interval_delay; |
| 45 | } | ||
| 42 | 46 | ||
| 43 | bool ShouldWait(Thread* thread) const override; | 47 | bool ShouldWait(Thread* thread) const override; |
| 44 | void Acquire(Thread* thread) override; | 48 | void Acquire(Thread* thread) override; |
| @@ -67,6 +71,14 @@ private: | |||
| 67 | Timer(); | 71 | Timer(); |
| 68 | ~Timer() override; | 72 | ~Timer() override; |
| 69 | 73 | ||
| 74 | ResetType reset_type; ///< The ResetType of this timer | ||
| 75 | |||
| 76 | u64 initial_delay; ///< The delay until the timer fires for the first time | ||
| 77 | u64 interval_delay; ///< The delay until the timer fires after the first time | ||
| 78 | |||
| 79 | bool signaled; ///< Whether the timer has been signaled or not | ||
| 80 | std::string name; ///< Name of timer (optional) | ||
| 81 | |||
| 70 | /// Handle used as userdata to reference this object when inserting into the CoreTiming queue. | 82 | /// Handle used as userdata to reference this object when inserting into the CoreTiming queue. |
| 71 | Handle callback_handle; | 83 | Handle callback_handle; |
| 72 | }; | 84 | }; |
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp new file mode 100644 index 000000000..d0a15cc4c --- /dev/null +++ b/src/core/hle/service/btdrv/btdrv.cpp | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/service/btdrv/btdrv.h" | ||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | #include "core/hle/service/sm/sm.h" | ||
| 8 | |||
| 9 | namespace Service::BtDrv { | ||
| 10 | |||
| 11 | class BtDrv final : public ServiceFramework<BtDrv> { | ||
| 12 | public: | ||
| 13 | explicit BtDrv() : ServiceFramework{"btdrv"} { | ||
| 14 | // clang-format off | ||
| 15 | static const FunctionInfo functions[] = { | ||
| 16 | {0, nullptr, "Unknown"}, | ||
| 17 | {1, nullptr, "Init"}, | ||
| 18 | {2, nullptr, "Enable"}, | ||
| 19 | {3, nullptr, "Disable"}, | ||
| 20 | {4, nullptr, "CleanupAndShutdown"}, | ||
| 21 | {5, nullptr, "GetAdapterProperties"}, | ||
| 22 | {6, nullptr, "GetAdapterProperty"}, | ||
| 23 | {7, nullptr, "SetAdapterProperty"}, | ||
| 24 | {8, nullptr, "StartDiscovery"}, | ||
| 25 | {9, nullptr, "CancelDiscovery"}, | ||
| 26 | {10, nullptr, "CreateBond"}, | ||
| 27 | {11, nullptr, "RemoveBond"}, | ||
| 28 | {12, nullptr, "CancelBond"}, | ||
| 29 | {13, nullptr, "PinReply"}, | ||
| 30 | {14, nullptr, "SspReply"}, | ||
| 31 | {15, nullptr, "Unknown2"}, | ||
| 32 | {16, nullptr, "InitInterfaces"}, | ||
| 33 | {17, nullptr, "HidHostInterface_Connect"}, | ||
| 34 | {18, nullptr, "HidHostInterface_Disconnect"}, | ||
| 35 | {19, nullptr, "HidHostInterface_SendData"}, | ||
| 36 | {20, nullptr, "HidHostInterface_SendData2"}, | ||
| 37 | {21, nullptr, "HidHostInterface_SetReport"}, | ||
| 38 | {22, nullptr, "HidHostInterface_GetReport"}, | ||
| 39 | {23, nullptr, "HidHostInterface_WakeController"}, | ||
| 40 | {24, nullptr, "HidHostInterface_AddPairedDevice"}, | ||
| 41 | {25, nullptr, "HidHostInterface_GetPairedDevice"}, | ||
| 42 | {26, nullptr, "HidHostInterface_CleanupAndShutdown"}, | ||
| 43 | {27, nullptr, "Unknown3"}, | ||
| 44 | {28, nullptr, "ExtInterface_SetTSI"}, | ||
| 45 | {29, nullptr, "ExtInterface_SetBurstMode"}, | ||
| 46 | {30, nullptr, "ExtInterface_SetZeroRetran"}, | ||
| 47 | {31, nullptr, "ExtInterface_SetMcMode"}, | ||
| 48 | {32, nullptr, "ExtInterface_StartLlrMode"}, | ||
| 49 | {33, nullptr, "ExtInterface_ExitLlrMode"}, | ||
| 50 | {34, nullptr, "ExtInterface_SetRadio"}, | ||
| 51 | {35, nullptr, "ExtInterface_SetVisibility"}, | ||
| 52 | {36, nullptr, "Unknown4"}, | ||
| 53 | {37, nullptr, "Unknown5"}, | ||
| 54 | {38, nullptr, "HidHostInterface_GetLatestPlr"}, | ||
| 55 | {39, nullptr, "ExtInterface_GetPendingConnections"}, | ||
| 56 | {40, nullptr, "HidHostInterface_GetChannelMap"}, | ||
| 57 | {41, nullptr, "SetIsBluetoothBoostEnabled"}, | ||
| 58 | {42, nullptr, "GetIsBluetoothBoostEnabled"}, | ||
| 59 | {43, nullptr, "SetIsBluetoothAfhEnabled"}, | ||
| 60 | {44, nullptr, "GetIsBluetoothAfhEnabled"}, | ||
| 61 | }; | ||
| 62 | // clang-format on | ||
| 63 | |||
| 64 | RegisterHandlers(functions); | ||
| 65 | } | ||
| 66 | }; | ||
| 67 | |||
| 68 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 69 | std::make_shared<BtDrv>()->InstallAsService(sm); | ||
| 70 | } | ||
| 71 | |||
| 72 | } // namespace Service::BtDrv | ||
diff --git a/src/core/hle/service/btdrv/btdrv.h b/src/core/hle/service/btdrv/btdrv.h new file mode 100644 index 000000000..164e56f43 --- /dev/null +++ b/src/core/hle/service/btdrv/btdrv.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::BtDrv { | ||
| 12 | |||
| 13 | /// Registers all BtDrv services with the specified service manager. | ||
| 14 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 15 | |||
| 16 | } // namespace Service::BtDrv | ||
diff --git a/src/core/hle/service/grc/grc.cpp b/src/core/hle/service/grc/grc.cpp new file mode 100644 index 000000000..24910ac6c --- /dev/null +++ b/src/core/hle/service/grc/grc.cpp | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | |||
| 7 | #include "core/hle/service/grc/grc.h" | ||
| 8 | #include "core/hle/service/service.h" | ||
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | |||
| 11 | namespace Service::GRC { | ||
| 12 | |||
| 13 | class GRC final : public ServiceFramework<GRC> { | ||
| 14 | public: | ||
| 15 | explicit GRC() : ServiceFramework{"grc:c"} { | ||
| 16 | // clang-format off | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {1, nullptr, "OpenContinuousRecorder"}, | ||
| 19 | {2, nullptr, "OpenGameMovieTrimmer"}, | ||
| 20 | }; | ||
| 21 | // clang-format on | ||
| 22 | |||
| 23 | RegisterHandlers(functions); | ||
| 24 | } | ||
| 25 | }; | ||
| 26 | |||
| 27 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 28 | std::make_shared<GRC>()->InstallAsService(sm); | ||
| 29 | } | ||
| 30 | |||
| 31 | } // namespace Service::GRC | ||
diff --git a/src/core/hle/service/grc/grc.h b/src/core/hle/service/grc/grc.h new file mode 100644 index 000000000..e0d29e70d --- /dev/null +++ b/src/core/hle/service/grc/grc.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::GRC { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::GRC | ||
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 9a02ba686..e4619a547 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | #include "core/hle/kernel/event.h" | 14 | #include "core/hle/kernel/event.h" |
| 15 | #include "core/hle/kernel/shared_memory.h" | 15 | #include "core/hle/kernel/shared_memory.h" |
| 16 | #include "core/hle/service/hid/hid.h" | 16 | #include "core/hle/service/hid/hid.h" |
| 17 | #include "core/hle/service/hid/irs.h" | ||
| 18 | #include "core/hle/service/hid/xcd.h" | ||
| 17 | #include "core/hle/service/service.h" | 19 | #include "core/hle/service/service.h" |
| 18 | 20 | ||
| 19 | namespace Service::HID { | 21 | namespace Service::HID { |
| @@ -555,10 +557,233 @@ private: | |||
| 555 | } | 557 | } |
| 556 | }; | 558 | }; |
| 557 | 559 | ||
| 560 | class HidDbg final : public ServiceFramework<HidDbg> { | ||
| 561 | public: | ||
| 562 | explicit HidDbg() : ServiceFramework{"hid:dbg"} { | ||
| 563 | // clang-format off | ||
| 564 | static const FunctionInfo functions[] = { | ||
| 565 | {0, nullptr, "DeactivateDebugPad"}, | ||
| 566 | {1, nullptr, "SetDebugPadAutoPilotState"}, | ||
| 567 | {2, nullptr, "UnsetDebugPadAutoPilotState"}, | ||
| 568 | {10, nullptr, "DeactivateTouchScreen"}, | ||
| 569 | {11, nullptr, "SetTouchScreenAutoPilotState"}, | ||
| 570 | {12, nullptr, "UnsetTouchScreenAutoPilotState"}, | ||
| 571 | {20, nullptr, "DeactivateMouse"}, | ||
| 572 | {21, nullptr, "SetMouseAutoPilotState"}, | ||
| 573 | {22, nullptr, "UnsetMouseAutoPilotState"}, | ||
| 574 | {30, nullptr, "DeactivateKeyboard"}, | ||
| 575 | {31, nullptr, "SetKeyboardAutoPilotState"}, | ||
| 576 | {32, nullptr, "UnsetKeyboardAutoPilotState"}, | ||
| 577 | {50, nullptr, "DeactivateXpad"}, | ||
| 578 | {51, nullptr, "SetXpadAutoPilotState"}, | ||
| 579 | {52, nullptr, "UnsetXpadAutoPilotState"}, | ||
| 580 | {60, nullptr, "DeactivateJoyXpad"}, | ||
| 581 | {91, nullptr, "DeactivateGesture"}, | ||
| 582 | {110, nullptr, "DeactivateHomeButton"}, | ||
| 583 | {111, nullptr, "SetHomeButtonAutoPilotState"}, | ||
| 584 | {112, nullptr, "UnsetHomeButtonAutoPilotState"}, | ||
| 585 | {120, nullptr, "DeactivateSleepButton"}, | ||
| 586 | {121, nullptr, "SetSleepButtonAutoPilotState"}, | ||
| 587 | {122, nullptr, "UnsetSleepButtonAutoPilotState"}, | ||
| 588 | {123, nullptr, "DeactivateInputDetector"}, | ||
| 589 | {130, nullptr, "DeactivateCaptureButton"}, | ||
| 590 | {131, nullptr, "SetCaptureButtonAutoPilotState"}, | ||
| 591 | {132, nullptr, "UnsetCaptureButtonAutoPilotState"}, | ||
| 592 | {133, nullptr, "SetShiftAccelerometerCalibrationValue"}, | ||
| 593 | {134, nullptr, "GetShiftAccelerometerCalibrationValue"}, | ||
| 594 | {135, nullptr, "SetShiftGyroscopeCalibrationValue"}, | ||
| 595 | {136, nullptr, "GetShiftGyroscopeCalibrationValue"}, | ||
| 596 | {140, nullptr, "DeactivateConsoleSixAxisSensor"}, | ||
| 597 | {141, nullptr, "GetConsoleSixAxisSensorSamplingFrequency"}, | ||
| 598 | {142, nullptr, "DeactivateSevenSixAxisSensor"}, | ||
| 599 | {201, nullptr, "ActivateFirmwareUpdate"}, | ||
| 600 | {202, nullptr, "DeactivateFirmwareUpdate"}, | ||
| 601 | {203, nullptr, "StartFirmwareUpdate"}, | ||
| 602 | {204, nullptr, "GetFirmwareUpdateStage"}, | ||
| 603 | {205, nullptr, "GetFirmwareVersion"}, | ||
| 604 | {206, nullptr, "GetDestinationFirmwareVersion"}, | ||
| 605 | {207, nullptr, "DiscardFirmwareInfoCacheForRevert"}, | ||
| 606 | {208, nullptr, "StartFirmwareUpdateForRevert"}, | ||
| 607 | {209, nullptr, "GetAvailableFirmwareVersionForRevert"}, | ||
| 608 | {210, nullptr, "IsFirmwareUpdatingDevice"}, | ||
| 609 | {221, nullptr, "UpdateControllerColor"}, | ||
| 610 | {222, nullptr, "ConnectUsbPadsAsync"}, | ||
| 611 | {223, nullptr, "DisconnectUsbPadsAsync"}, | ||
| 612 | {224, nullptr, "UpdateDesignInfo"}, | ||
| 613 | {225, nullptr, "GetUniquePadDriverState"}, | ||
| 614 | {226, nullptr, "GetSixAxisSensorDriverStates"}, | ||
| 615 | {301, nullptr, "GetAbstractedPadHandles"}, | ||
| 616 | {302, nullptr, "GetAbstractedPadState"}, | ||
| 617 | {303, nullptr, "GetAbstractedPadsState"}, | ||
| 618 | {321, nullptr, "SetAutoPilotVirtualPadState"}, | ||
| 619 | {322, nullptr, "UnsetAutoPilotVirtualPadState"}, | ||
| 620 | {323, nullptr, "UnsetAllAutoPilotVirtualPadState"}, | ||
| 621 | {350, nullptr, "AddRegisteredDevice"}, | ||
| 622 | }; | ||
| 623 | // clang-format on | ||
| 624 | |||
| 625 | RegisterHandlers(functions); | ||
| 626 | } | ||
| 627 | }; | ||
| 628 | |||
| 629 | class HidSys final : public ServiceFramework<HidSys> { | ||
| 630 | public: | ||
| 631 | explicit HidSys() : ServiceFramework{"hid:sys"} { | ||
| 632 | // clang-format off | ||
| 633 | static const FunctionInfo functions[] = { | ||
| 634 | {31, nullptr, "SendKeyboardLockKeyEvent"}, | ||
| 635 | {101, nullptr, "AcquireHomeButtonEventHandle"}, | ||
| 636 | {111, nullptr, "ActivateHomeButton"}, | ||
| 637 | {121, nullptr, "AcquireSleepButtonEventHandle"}, | ||
| 638 | {131, nullptr, "ActivateSleepButton"}, | ||
| 639 | {141, nullptr, "AcquireCaptureButtonEventHandle"}, | ||
| 640 | {151, nullptr, "ActivateCaptureButton"}, | ||
| 641 | {210, nullptr, "AcquireNfcDeviceUpdateEventHandle"}, | ||
| 642 | {211, nullptr, "GetNpadsWithNfc"}, | ||
| 643 | {212, nullptr, "AcquireNfcActivateEventHandle"}, | ||
| 644 | {213, nullptr, "ActivateNfc"}, | ||
| 645 | {214, nullptr, "GetXcdHandleForNpadWithNfc"}, | ||
| 646 | {215, nullptr, "IsNfcActivated"}, | ||
| 647 | {230, nullptr, "AcquireIrSensorEventHandle"}, | ||
| 648 | {231, nullptr, "ActivateIrSensor"}, | ||
| 649 | {301, nullptr, "ActivateNpadSystem"}, | ||
| 650 | {303, nullptr, "ApplyNpadSystemCommonPolicy"}, | ||
| 651 | {304, nullptr, "EnableAssigningSingleOnSlSrPress"}, | ||
| 652 | {305, nullptr, "DisableAssigningSingleOnSlSrPress"}, | ||
| 653 | {306, nullptr, "GetLastActiveNpad"}, | ||
| 654 | {307, nullptr, "GetNpadSystemExtStyle"}, | ||
| 655 | {308, nullptr, "ApplyNpadSystemCommonPolicyFull"}, | ||
| 656 | {309, nullptr, "GetNpadFullKeyGripColor"}, | ||
| 657 | {311, nullptr, "SetNpadPlayerLedBlinkingDevice"}, | ||
| 658 | {321, nullptr, "GetUniquePadsFromNpad"}, | ||
| 659 | {322, nullptr, "GetIrSensorState"}, | ||
| 660 | {323, nullptr, "GetXcdHandleForNpadWithIrSensor"}, | ||
| 661 | {500, nullptr, "SetAppletResourceUserId"}, | ||
| 662 | {501, nullptr, "RegisterAppletResourceUserId"}, | ||
| 663 | {502, nullptr, "UnregisterAppletResourceUserId"}, | ||
| 664 | {503, nullptr, "EnableAppletToGetInput"}, | ||
| 665 | {504, nullptr, "SetAruidValidForVibration"}, | ||
| 666 | {505, nullptr, "EnableAppletToGetSixAxisSensor"}, | ||
| 667 | {510, nullptr, "SetVibrationMasterVolume"}, | ||
| 668 | {511, nullptr, "GetVibrationMasterVolume"}, | ||
| 669 | {512, nullptr, "BeginPermitVibrationSession"}, | ||
| 670 | {513, nullptr, "EndPermitVibrationSession"}, | ||
| 671 | {520, nullptr, "EnableHandheldHids"}, | ||
| 672 | {521, nullptr, "DisableHandheldHids"}, | ||
| 673 | {540, nullptr, "AcquirePlayReportControllerUsageUpdateEvent"}, | ||
| 674 | {541, nullptr, "GetPlayReportControllerUsages"}, | ||
| 675 | {542, nullptr, "AcquirePlayReportRegisteredDeviceUpdateEvent"}, | ||
| 676 | {543, nullptr, "GetRegisteredDevicesOld"}, | ||
| 677 | {544, nullptr, "AcquireConnectionTriggerTimeoutEvent"}, | ||
| 678 | {545, nullptr, "SendConnectionTrigger"}, | ||
| 679 | {546, nullptr, "AcquireDeviceRegisteredEventForControllerSupport"}, | ||
| 680 | {547, nullptr, "GetAllowedBluetoothLinksCount"}, | ||
| 681 | {548, nullptr, "GetRegisteredDevices"}, | ||
| 682 | {700, nullptr, "ActivateUniquePad"}, | ||
| 683 | {702, nullptr, "AcquireUniquePadConnectionEventHandle"}, | ||
| 684 | {703, nullptr, "GetUniquePadIds"}, | ||
| 685 | {751, nullptr, "AcquireJoyDetachOnBluetoothOffEventHandle"}, | ||
| 686 | {800, nullptr, "ListSixAxisSensorHandles"}, | ||
| 687 | {801, nullptr, "IsSixAxisSensorUserCalibrationSupported"}, | ||
| 688 | {802, nullptr, "ResetSixAxisSensorCalibrationValues"}, | ||
| 689 | {803, nullptr, "StartSixAxisSensorUserCalibration"}, | ||
| 690 | {804, nullptr, "CancelSixAxisSensorUserCalibration"}, | ||
| 691 | {805, nullptr, "GetUniquePadBluetoothAddress"}, | ||
| 692 | {806, nullptr, "DisconnectUniquePad"}, | ||
| 693 | {807, nullptr, "GetUniquePadType"}, | ||
| 694 | {808, nullptr, "GetUniquePadInterface"}, | ||
| 695 | {809, nullptr, "GetUniquePadSerialNumber"}, | ||
| 696 | {810, nullptr, "GetUniquePadControllerNumber"}, | ||
| 697 | {811, nullptr, "GetSixAxisSensorUserCalibrationStage"}, | ||
| 698 | {821, nullptr, "StartAnalogStickManualCalibration"}, | ||
| 699 | {822, nullptr, "RetryCurrentAnalogStickManualCalibrationStage"}, | ||
| 700 | {823, nullptr, "CancelAnalogStickManualCalibration"}, | ||
| 701 | {824, nullptr, "ResetAnalogStickManualCalibration"}, | ||
| 702 | {825, nullptr, "GetAnalogStickState"}, | ||
| 703 | {826, nullptr, "GetAnalogStickManualCalibrationStage"}, | ||
| 704 | {827, nullptr, "IsAnalogStickButtonPressed"}, | ||
| 705 | {828, nullptr, "IsAnalogStickInReleasePosition"}, | ||
| 706 | {829, nullptr, "IsAnalogStickInCircumference"}, | ||
| 707 | {850, nullptr, "IsUsbFullKeyControllerEnabled"}, | ||
| 708 | {851, nullptr, "EnableUsbFullKeyController"}, | ||
| 709 | {852, nullptr, "IsUsbConnected"}, | ||
| 710 | {900, nullptr, "ActivateInputDetector"}, | ||
| 711 | {901, nullptr, "NotifyInputDetector"}, | ||
| 712 | {1000, nullptr, "InitializeFirmwareUpdate"}, | ||
| 713 | {1001, nullptr, "GetFirmwareVersion"}, | ||
| 714 | {1002, nullptr, "GetAvailableFirmwareVersion"}, | ||
| 715 | {1003, nullptr, "IsFirmwareUpdateAvailable"}, | ||
| 716 | {1004, nullptr, "CheckFirmwareUpdateRequired"}, | ||
| 717 | {1005, nullptr, "StartFirmwareUpdate"}, | ||
| 718 | {1006, nullptr, "AbortFirmwareUpdate"}, | ||
| 719 | {1007, nullptr, "GetFirmwareUpdateState"}, | ||
| 720 | {1008, nullptr, "ActivateAudioControl"}, | ||
| 721 | {1009, nullptr, "AcquireAudioControlEventHandle"}, | ||
| 722 | {1010, nullptr, "GetAudioControlStates"}, | ||
| 723 | {1011, nullptr, "DeactivateAudioControl"}, | ||
| 724 | {1050, nullptr, "IsSixAxisSensorAccurateUserCalibrationSupported"}, | ||
| 725 | {1051, nullptr, "StartSixAxisSensorAccurateUserCalibration"}, | ||
| 726 | {1052, nullptr, "CancelSixAxisSensorAccurateUserCalibration"}, | ||
| 727 | {1053, nullptr, "GetSixAxisSensorAccurateUserCalibrationState"}, | ||
| 728 | {1100, nullptr, "GetHidbusSystemServiceObject"}, | ||
| 729 | }; | ||
| 730 | // clang-format on | ||
| 731 | |||
| 732 | RegisterHandlers(functions); | ||
| 733 | } | ||
| 734 | }; | ||
| 735 | |||
| 736 | class HidTmp final : public ServiceFramework<HidTmp> { | ||
| 737 | public: | ||
| 738 | explicit HidTmp() : ServiceFramework{"hid:tmp"} { | ||
| 739 | // clang-format off | ||
| 740 | static const FunctionInfo functions[] = { | ||
| 741 | {0, nullptr, "GetConsoleSixAxisSensorCalibrationValues"}, | ||
| 742 | }; | ||
| 743 | // clang-format on | ||
| 744 | |||
| 745 | RegisterHandlers(functions); | ||
| 746 | } | ||
| 747 | }; | ||
| 748 | |||
| 749 | class HidBus final : public ServiceFramework<HidBus> { | ||
| 750 | public: | ||
| 751 | explicit HidBus() : ServiceFramework{"hidbus"} { | ||
| 752 | // clang-format off | ||
| 753 | static const FunctionInfo functions[] = { | ||
| 754 | {1, nullptr, "GetBusHandle"}, | ||
| 755 | {2, nullptr, "IsExternalDeviceConnected"}, | ||
| 756 | {3, nullptr, "Initialize"}, | ||
| 757 | {4, nullptr, "Finalize"}, | ||
| 758 | {5, nullptr, "EnableExternalDevice"}, | ||
| 759 | {6, nullptr, "GetExternalDeviceId"}, | ||
| 760 | {7, nullptr, "SendCommandAsync"}, | ||
| 761 | {8, nullptr, "GetSendCommandAsynceResult"}, | ||
| 762 | {9, nullptr, "SetEventForSendCommandAsycResult"}, | ||
| 763 | {10, nullptr, "GetSharedMemoryHandle"}, | ||
| 764 | {11, nullptr, "EnableJoyPollingReceiveMode"}, | ||
| 765 | {12, nullptr, "DisableJoyPollingReceiveMode"}, | ||
| 766 | {13, nullptr, "GetPollingData"}, | ||
| 767 | }; | ||
| 768 | // clang-format on | ||
| 769 | |||
| 770 | RegisterHandlers(functions); | ||
| 771 | } | ||
| 772 | }; | ||
| 773 | |||
| 558 | void ReloadInputDevices() {} | 774 | void ReloadInputDevices() {} |
| 559 | 775 | ||
| 560 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 776 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
| 561 | std::make_shared<Hid>()->InstallAsService(service_manager); | 777 | std::make_shared<Hid>()->InstallAsService(service_manager); |
| 778 | std::make_shared<HidBus>()->InstallAsService(service_manager); | ||
| 779 | std::make_shared<HidDbg>()->InstallAsService(service_manager); | ||
| 780 | std::make_shared<HidSys>()->InstallAsService(service_manager); | ||
| 781 | std::make_shared<HidTmp>()->InstallAsService(service_manager); | ||
| 782 | |||
| 783 | std::make_shared<IRS>()->InstallAsService(service_manager); | ||
| 784 | std::make_shared<IRS_SYS>()->InstallAsService(service_manager); | ||
| 785 | |||
| 786 | std::make_shared<XCD_SYS>()->InstallAsService(service_manager); | ||
| 562 | } | 787 | } |
| 563 | 788 | ||
| 564 | } // namespace Service::HID | 789 | } // namespace Service::HID |
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp new file mode 100644 index 000000000..aaf311912 --- /dev/null +++ b/src/core/hle/service/hid/irs.cpp | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/service/hid/irs.h" | ||
| 6 | |||
| 7 | namespace Service::HID { | ||
| 8 | |||
| 9 | IRS::IRS() : ServiceFramework{"irs"} { | ||
| 10 | // clang-format off | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {302, nullptr, "ActivateIrsensor"}, | ||
| 13 | {303, nullptr, "DeactivateIrsensor"}, | ||
| 14 | {304, nullptr, "GetIrsensorSharedMemoryHandle"}, | ||
| 15 | {305, nullptr, "StopImageProcessor"}, | ||
| 16 | {306, nullptr, "RunMomentProcessor"}, | ||
| 17 | {307, nullptr, "RunClusteringProcessor"}, | ||
| 18 | {308, nullptr, "RunImageTransferProcessor"}, | ||
| 19 | {309, nullptr, "GetImageTransferProcessorState"}, | ||
| 20 | {310, nullptr, "RunTeraPluginProcessor"}, | ||
| 21 | {311, nullptr, "GetNpadIrCameraHandle"}, | ||
| 22 | {312, nullptr, "RunPointingProcessor"}, | ||
| 23 | {313, nullptr, "SuspendImageProcessor"}, | ||
| 24 | {314, nullptr, "CheckFirmwareVersion"}, | ||
| 25 | {315, nullptr, "SetFunctionLevel"}, | ||
| 26 | {316, nullptr, "RunImageTransferExProcessor"}, | ||
| 27 | {317, nullptr, "RunIrLedProcessor"}, | ||
| 28 | {318, nullptr, "StopImageProcessorAsync"}, | ||
| 29 | {319, nullptr, "ActivateIrsensorWithFunctionLevel"}, | ||
| 30 | }; | ||
| 31 | // clang-format on | ||
| 32 | |||
| 33 | RegisterHandlers(functions); | ||
| 34 | } | ||
| 35 | |||
| 36 | IRS_SYS::IRS_SYS() : ServiceFramework{"irs:sys"} { | ||
| 37 | // clang-format off | ||
| 38 | static const FunctionInfo functions[] = { | ||
| 39 | {500, nullptr, "SetAppletResourceUserId"}, | ||
| 40 | {501, nullptr, "RegisterAppletResourceUserId"}, | ||
| 41 | {502, nullptr, "UnregisterAppletResourceUserId"}, | ||
| 42 | {503, nullptr, "EnableAppletToGetInput"}, | ||
| 43 | }; | ||
| 44 | // clang-format on | ||
| 45 | |||
| 46 | RegisterHandlers(functions); | ||
| 47 | } | ||
| 48 | |||
| 49 | } // namespace Service::HID | ||
diff --git a/src/core/hle/service/hid/irs.h b/src/core/hle/service/hid/irs.h new file mode 100644 index 000000000..a8be701c7 --- /dev/null +++ b/src/core/hle/service/hid/irs.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service::HID { | ||
| 10 | |||
| 11 | class IRS final : public ServiceFramework<IRS> { | ||
| 12 | public: | ||
| 13 | explicit IRS(); | ||
| 14 | }; | ||
| 15 | |||
| 16 | class IRS_SYS final : public ServiceFramework<IRS_SYS> { | ||
| 17 | public: | ||
| 18 | explicit IRS_SYS(); | ||
| 19 | }; | ||
| 20 | |||
| 21 | } // namespace Service::HID | ||
diff --git a/src/core/hle/service/hid/xcd.cpp b/src/core/hle/service/hid/xcd.cpp new file mode 100644 index 000000000..49f733f60 --- /dev/null +++ b/src/core/hle/service/hid/xcd.cpp | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/service/hid/xcd.h" | ||
| 6 | |||
| 7 | namespace Service::HID { | ||
| 8 | |||
| 9 | XCD_SYS::XCD_SYS() : ServiceFramework{"xcd:sys"} { | ||
| 10 | // clang-format off | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {0, nullptr, "GetDataFormat"}, | ||
| 13 | {1, nullptr, "SetDataFormat"}, | ||
| 14 | {2, nullptr, "GetMcuState"}, | ||
| 15 | {3, nullptr, "SetMcuState"}, | ||
| 16 | {4, nullptr, "GetMcuVersionForNfc"}, | ||
| 17 | {5, nullptr, "CheckNfcDevicePower"}, | ||
| 18 | {10, nullptr, "SetNfcEvent"}, | ||
| 19 | {11, nullptr, "GetNfcInfo"}, | ||
| 20 | {12, nullptr, "StartNfcDiscovery"}, | ||
| 21 | {13, nullptr, "StopNfcDiscovery"}, | ||
| 22 | {14, nullptr, "StartNtagRead"}, | ||
| 23 | {15, nullptr, "StartNtagWrite"}, | ||
| 24 | {16, nullptr, "SendNfcRawData"}, | ||
| 25 | {17, nullptr, "RegisterMifareKey"}, | ||
| 26 | {18, nullptr, "ClearMifareKey"}, | ||
| 27 | {19, nullptr, "StartMifareRead"}, | ||
| 28 | {20, nullptr, "StartMifareWrite"}, | ||
| 29 | {101, nullptr, "GetAwakeTriggerReasonForLeftRail"}, | ||
| 30 | {102, nullptr, "GetAwakeTriggerReasonForRightRail"}, | ||
| 31 | }; | ||
| 32 | // clang-format on | ||
| 33 | |||
| 34 | RegisterHandlers(functions); | ||
| 35 | } | ||
| 36 | |||
| 37 | } // namespace Service::HID | ||
diff --git a/src/core/hle/service/hid/xcd.h b/src/core/hle/service/hid/xcd.h new file mode 100644 index 000000000..232a044df --- /dev/null +++ b/src/core/hle/service/hid/xcd.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service::HID { | ||
| 10 | |||
| 11 | class XCD_SYS final : public ServiceFramework<XCD_SYS> { | ||
| 12 | public: | ||
| 13 | explicit XCD_SYS(); | ||
| 14 | }; | ||
| 15 | |||
| 16 | } // namespace Service::HID | ||
diff --git a/src/core/hle/service/lbl/lbl.cpp b/src/core/hle/service/lbl/lbl.cpp new file mode 100644 index 000000000..8fc8b1057 --- /dev/null +++ b/src/core/hle/service/lbl/lbl.cpp | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | |||
| 7 | #include "common/logging/log.h" | ||
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/hle_ipc.h" | ||
| 10 | #include "core/hle/service/lbl/lbl.h" | ||
| 11 | #include "core/hle/service/service.h" | ||
| 12 | #include "core/hle/service/sm/sm.h" | ||
| 13 | |||
| 14 | namespace Service::LBL { | ||
| 15 | |||
| 16 | class LBL final : public ServiceFramework<LBL> { | ||
| 17 | public: | ||
| 18 | explicit LBL() : ServiceFramework{"lbl"} { | ||
| 19 | // clang-format off | ||
| 20 | static const FunctionInfo functions[] = { | ||
| 21 | {0, nullptr, "Unknown1"}, | ||
| 22 | {1, nullptr, "Unknown2"}, | ||
| 23 | {2, nullptr, "Unknown3"}, | ||
| 24 | {3, nullptr, "Unknown4"}, | ||
| 25 | {4, nullptr, "Unknown5"}, | ||
| 26 | {5, nullptr, "Unknown6"}, | ||
| 27 | {6, nullptr, "TurnOffBacklight"}, | ||
| 28 | {7, nullptr, "TurnOnBacklight"}, | ||
| 29 | {8, nullptr, "GetBacklightStatus"}, | ||
| 30 | {9, nullptr, "Unknown7"}, | ||
| 31 | {10, nullptr, "Unknown8"}, | ||
| 32 | {11, nullptr, "Unknown9"}, | ||
| 33 | {12, nullptr, "Unknown10"}, | ||
| 34 | {13, nullptr, "Unknown11"}, | ||
| 35 | {14, nullptr, "Unknown12"}, | ||
| 36 | {15, nullptr, "Unknown13"}, | ||
| 37 | {16, nullptr, "ReadRawLightSensor"}, | ||
| 38 | {17, nullptr, "Unknown14"}, | ||
| 39 | {18, nullptr, "Unknown15"}, | ||
| 40 | {19, nullptr, "Unknown16"}, | ||
| 41 | {20, nullptr, "Unknown17"}, | ||
| 42 | {21, nullptr, "Unknown18"}, | ||
| 43 | {22, nullptr, "Unknown19"}, | ||
| 44 | {23, nullptr, "Unknown20"}, | ||
| 45 | {24, nullptr, "Unknown21"}, | ||
| 46 | {25, nullptr, "Unknown22"}, | ||
| 47 | {26, &LBL::EnableVrMode, "EnableVrMode"}, | ||
| 48 | {27, &LBL::DisableVrMode, "DisableVrMode"}, | ||
| 49 | {28, &LBL::GetVrMode, "GetVrMode"}, | ||
| 50 | }; | ||
| 51 | // clang-format on | ||
| 52 | |||
| 53 | RegisterHandlers(functions); | ||
| 54 | } | ||
| 55 | |||
| 56 | private: | ||
| 57 | void EnableVrMode(Kernel::HLERequestContext& ctx) { | ||
| 58 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 59 | rb.Push(RESULT_SUCCESS); | ||
| 60 | |||
| 61 | vr_mode_enabled = true; | ||
| 62 | |||
| 63 | LOG_DEBUG(Service_LBL, "called"); | ||
| 64 | } | ||
| 65 | |||
| 66 | void DisableVrMode(Kernel::HLERequestContext& ctx) { | ||
| 67 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 68 | rb.Push(RESULT_SUCCESS); | ||
| 69 | |||
| 70 | vr_mode_enabled = false; | ||
| 71 | |||
| 72 | LOG_DEBUG(Service_LBL, "called"); | ||
| 73 | } | ||
| 74 | |||
| 75 | void GetVrMode(Kernel::HLERequestContext& ctx) { | ||
| 76 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 77 | rb.Push(RESULT_SUCCESS); | ||
| 78 | rb.Push(vr_mode_enabled); | ||
| 79 | |||
| 80 | LOG_DEBUG(Service_LBL, "called"); | ||
| 81 | } | ||
| 82 | |||
| 83 | bool vr_mode_enabled = false; | ||
| 84 | }; | ||
| 85 | |||
| 86 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 87 | std::make_shared<LBL>()->InstallAsService(sm); | ||
| 88 | } | ||
| 89 | |||
| 90 | } // namespace Service::LBL | ||
diff --git a/src/core/hle/service/lbl/lbl.h b/src/core/hle/service/lbl/lbl.h new file mode 100644 index 000000000..bf6f400f8 --- /dev/null +++ b/src/core/hle/service/lbl/lbl.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::LBL { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::LBL | ||
diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp new file mode 100644 index 000000000..167f2c66a --- /dev/null +++ b/src/core/hle/service/ldn/ldn.cpp | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | |||
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/result.h" | ||
| 9 | #include "core/hle/service/ldn/ldn.h" | ||
| 10 | #include "core/hle/service/sm/sm.h" | ||
| 11 | |||
| 12 | namespace Service::LDN { | ||
| 13 | |||
| 14 | class IMonitorService final : public ServiceFramework<IMonitorService> { | ||
| 15 | public: | ||
| 16 | explicit IMonitorService() : ServiceFramework{"IMonitorService"} { | ||
| 17 | // clang-format off | ||
| 18 | static const FunctionInfo functions[] = { | ||
| 19 | {0, nullptr, "GetStateForMonitor"}, | ||
| 20 | {1, nullptr, "GetNetworkInfoForMonitor"}, | ||
| 21 | {2, nullptr, "GetIpv4AddressForMonitor"}, | ||
| 22 | {3, nullptr, "GetDisconnectReasonForMonitor"}, | ||
| 23 | {4, nullptr, "GetSecurityParameterForMonitor"}, | ||
| 24 | {5, nullptr, "GetNetworkConfigForMonitor"}, | ||
| 25 | {100, nullptr, "InitializeMonitor"}, | ||
| 26 | {101, nullptr, "FinalizeMonitor"}, | ||
| 27 | }; | ||
| 28 | // clang-format on | ||
| 29 | |||
| 30 | RegisterHandlers(functions); | ||
| 31 | } | ||
| 32 | }; | ||
| 33 | |||
| 34 | class LDNM final : public ServiceFramework<LDNM> { | ||
| 35 | public: | ||
| 36 | explicit LDNM() : ServiceFramework{"ldn:m"} { | ||
| 37 | // clang-format off | ||
| 38 | static const FunctionInfo functions[] = { | ||
| 39 | {0, &LDNM::CreateMonitorService, "CreateMonitorService"} | ||
| 40 | }; | ||
| 41 | // clang-format on | ||
| 42 | |||
| 43 | RegisterHandlers(functions); | ||
| 44 | } | ||
| 45 | |||
| 46 | void CreateMonitorService(Kernel::HLERequestContext& ctx) { | ||
| 47 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 48 | rb.Push(RESULT_SUCCESS); | ||
| 49 | rb.PushIpcInterface<IMonitorService>(); | ||
| 50 | |||
| 51 | LOG_DEBUG(Service_LDN, "called"); | ||
| 52 | } | ||
| 53 | }; | ||
| 54 | |||
| 55 | class ILocalCommunicationService final : public ServiceFramework<ILocalCommunicationService> { | ||
| 56 | public: | ||
| 57 | explicit ILocalCommunicationService(const char* name) : ServiceFramework{name} { | ||
| 58 | // clang-format off | ||
| 59 | static const FunctionInfo functions[] = { | ||
| 60 | {0, nullptr, "GetState"}, | ||
| 61 | {1, nullptr, "GetNetworkInfo"}, | ||
| 62 | {2, nullptr, "GetIpv4Address"}, | ||
| 63 | {3, nullptr, "GetDisconnectReason"}, | ||
| 64 | {4, nullptr, "GetSecurityParameter"}, | ||
| 65 | {5, nullptr, "GetNetworkConfig"}, | ||
| 66 | {100, nullptr, "AttachStateChangeEvent"}, | ||
| 67 | {101, nullptr, "GetNetworkInfoLatestUpdate"}, | ||
| 68 | {102, nullptr, "Scan"}, | ||
| 69 | {103, nullptr, "ScanPrivate"}, | ||
| 70 | {200, nullptr, "OpenAccessPoint"}, | ||
| 71 | {201, nullptr, "CloseAccessPoint"}, | ||
| 72 | {202, nullptr, "CreateNetwork"}, | ||
| 73 | {203, nullptr, "CreateNetworkPrivate"}, | ||
| 74 | {204, nullptr, "DestroyNetwork"}, | ||
| 75 | {205, nullptr, "Reject"}, | ||
| 76 | {206, nullptr, "SetAdvertiseData"}, | ||
| 77 | {207, nullptr, "SetStationAcceptPolicy"}, | ||
| 78 | {208, nullptr, "AddAcceptFilterEntry"}, | ||
| 79 | {209, nullptr, "ClearAcceptFilter"}, | ||
| 80 | {300, nullptr, "OpenStation"}, | ||
| 81 | {301, nullptr, "CloseStation"}, | ||
| 82 | {302, nullptr, "Connect"}, | ||
| 83 | {303, nullptr, "ConnectPrivate"}, | ||
| 84 | {304, nullptr, "Disconnect"}, | ||
| 85 | {400, nullptr, "InitializeSystem"}, | ||
| 86 | {401, nullptr, "FinalizeSystem"}, | ||
| 87 | }; | ||
| 88 | // clang-format on | ||
| 89 | |||
| 90 | RegisterHandlers(functions); | ||
| 91 | } | ||
| 92 | }; | ||
| 93 | |||
| 94 | class LDNS final : public ServiceFramework<LDNS> { | ||
| 95 | public: | ||
| 96 | explicit LDNS() : ServiceFramework{"ldn:s"} { | ||
| 97 | // clang-format off | ||
| 98 | static const FunctionInfo functions[] = { | ||
| 99 | {0, &LDNS::CreateSystemLocalCommunicationService, "CreateSystemLocalCommunicationService"}, | ||
| 100 | }; | ||
| 101 | // clang-format on | ||
| 102 | |||
| 103 | RegisterHandlers(functions); | ||
| 104 | } | ||
| 105 | |||
| 106 | void CreateSystemLocalCommunicationService(Kernel::HLERequestContext& ctx) { | ||
| 107 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 108 | rb.Push(RESULT_SUCCESS); | ||
| 109 | rb.PushIpcInterface<ILocalCommunicationService>("ISystemLocalCommunicationService"); | ||
| 110 | |||
| 111 | LOG_DEBUG(Service_LDN, "called"); | ||
| 112 | } | ||
| 113 | }; | ||
| 114 | |||
| 115 | class LDNU final : public ServiceFramework<LDNU> { | ||
| 116 | public: | ||
| 117 | explicit LDNU() : ServiceFramework{"ldn:u"} { | ||
| 118 | // clang-format off | ||
| 119 | static const FunctionInfo functions[] = { | ||
| 120 | {0, &LDNU::CreateUserLocalCommunicationService, "CreateUserLocalCommunicationService"}, | ||
| 121 | }; | ||
| 122 | // clang-format on | ||
| 123 | |||
| 124 | RegisterHandlers(functions); | ||
| 125 | } | ||
| 126 | |||
| 127 | void CreateUserLocalCommunicationService(Kernel::HLERequestContext& ctx) { | ||
| 128 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 129 | rb.Push(RESULT_SUCCESS); | ||
| 130 | rb.PushIpcInterface<ILocalCommunicationService>("IUserLocalCommunicationService"); | ||
| 131 | |||
| 132 | LOG_DEBUG(Service_LDN, "called"); | ||
| 133 | } | ||
| 134 | }; | ||
| 135 | |||
| 136 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 137 | std::make_shared<LDNM>()->InstallAsService(sm); | ||
| 138 | std::make_shared<LDNS>()->InstallAsService(sm); | ||
| 139 | std::make_shared<LDNU>()->InstallAsService(sm); | ||
| 140 | } | ||
| 141 | |||
| 142 | } // namespace Service::LDN | ||
diff --git a/src/core/hle/service/ldn/ldn.h b/src/core/hle/service/ldn/ldn.h new file mode 100644 index 000000000..6b2a3c2b2 --- /dev/null +++ b/src/core/hle/service/ldn/ldn.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::LDN { | ||
| 12 | |||
| 13 | /// Registers all LDN services with the specified service manager. | ||
| 14 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 15 | |||
| 16 | } // namespace Service::LDN | ||
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp new file mode 100644 index 000000000..bd05b0a70 --- /dev/null +++ b/src/core/hle/service/nim/nim.cpp | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/service/nim/nim.h" | ||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | #include "core/hle/service/sm/sm.h" | ||
| 8 | |||
| 9 | namespace Service::NIM { | ||
| 10 | |||
| 11 | class NIM final : public ServiceFramework<NIM> { | ||
| 12 | public: | ||
| 13 | explicit NIM() : ServiceFramework{"nim"} { | ||
| 14 | // clang-format off | ||
| 15 | static const FunctionInfo functions[] = { | ||
| 16 | {0, nullptr, "CreateSystemUpdateTask"}, | ||
| 17 | {1, nullptr, "DestroySystemUpdateTask"}, | ||
| 18 | {2, nullptr, "ListSystemUpdateTask"}, | ||
| 19 | {3, nullptr, "RequestSystemUpdateTaskRun"}, | ||
| 20 | {4, nullptr, "GetSystemUpdateTaskInfo"}, | ||
| 21 | {5, nullptr, "CommitSystemUpdateTask"}, | ||
| 22 | {6, nullptr, "CreateNetworkInstallTask"}, | ||
| 23 | {7, nullptr, "DestroyNetworkInstallTask"}, | ||
| 24 | {8, nullptr, "ListNetworkInstallTask"}, | ||
| 25 | {9, nullptr, "RequestNetworkInstallTaskRun"}, | ||
| 26 | {10, nullptr, "GetNetworkInstallTaskInfo"}, | ||
| 27 | {11, nullptr, "CommitNetworkInstallTask"}, | ||
| 28 | {12, nullptr, "RequestLatestSystemUpdateMeta"}, | ||
| 29 | {14, nullptr, "ListApplicationNetworkInstallTask"}, | ||
| 30 | {15, nullptr, "ListNetworkInstallTaskContentMeta"}, | ||
| 31 | {16, nullptr, "RequestLatestVersion"}, | ||
| 32 | {17, nullptr, "SetNetworkInstallTaskAttribute"}, | ||
| 33 | {18, nullptr, "AddNetworkInstallTaskContentMeta"}, | ||
| 34 | {19, nullptr, "GetDownloadedSystemDataPath"}, | ||
| 35 | {20, nullptr, "CalculateNetworkInstallTaskRequiredSize"}, | ||
| 36 | {21, nullptr, "IsExFatDriverIncluded"}, | ||
| 37 | {22, nullptr, "GetBackgroundDownloadStressTaskInfo"}, | ||
| 38 | {23, nullptr, "RequestDeviceAuthenticationToken"}, | ||
| 39 | {24, nullptr, "RequestGameCardRegistrationStatus"}, | ||
| 40 | {25, nullptr, "RequestRegisterGameCard"}, | ||
| 41 | {26, nullptr, "RequestRegisterNotificationToken"}, | ||
| 42 | {27, nullptr, "RequestDownloadTaskList"}, | ||
| 43 | {28, nullptr, "RequestApplicationControl"}, | ||
| 44 | {29, nullptr, "RequestLatestApplicationControl"}, | ||
| 45 | {30, nullptr, "RequestVersionList"}, | ||
| 46 | {31, nullptr, "CreateApplyDeltaTask"}, | ||
| 47 | {32, nullptr, "DestroyApplyDeltaTask"}, | ||
| 48 | {33, nullptr, "ListApplicationApplyDeltaTask"}, | ||
| 49 | {34, nullptr, "RequestApplyDeltaTaskRun"}, | ||
| 50 | {35, nullptr, "GetApplyDeltaTaskInfo"}, | ||
| 51 | {36, nullptr, "ListApplyDeltaTask"}, | ||
| 52 | {37, nullptr, "CommitApplyDeltaTask"}, | ||
| 53 | {38, nullptr, "CalculateApplyDeltaTaskRequiredSize"}, | ||
| 54 | {39, nullptr, "PrepareShutdown"}, | ||
| 55 | {40, nullptr, "ListApplyDeltaTask"}, | ||
| 56 | {41, nullptr, "ClearNotEnoughSpaceStateOfApplyDeltaTask"}, | ||
| 57 | {42, nullptr, "Unknown1"}, | ||
| 58 | {43, nullptr, "Unknown2"}, | ||
| 59 | {44, nullptr, "Unknown3"}, | ||
| 60 | {45, nullptr, "Unknown4"}, | ||
| 61 | {46, nullptr, "Unknown5"}, | ||
| 62 | }; | ||
| 63 | // clang-format on | ||
| 64 | |||
| 65 | RegisterHandlers(functions); | ||
| 66 | } | ||
| 67 | }; | ||
| 68 | |||
| 69 | class NIM_SHP final : public ServiceFramework<NIM_SHP> { | ||
| 70 | public: | ||
| 71 | explicit NIM_SHP() : ServiceFramework{"nim:shp"} { | ||
| 72 | // clang-format off | ||
| 73 | static const FunctionInfo functions[] = { | ||
| 74 | {0, nullptr, "RequestDeviceAuthenticationToken"}, | ||
| 75 | {1, nullptr, "RequestCachedDeviceAuthenticationToken"}, | ||
| 76 | {100, nullptr, "RequestRegisterDeviceAccount"}, | ||
| 77 | {101, nullptr, "RequestUnregisterDeviceAccount"}, | ||
| 78 | {102, nullptr, "RequestDeviceAccountStatus"}, | ||
| 79 | {103, nullptr, "GetDeviceAccountInfo"}, | ||
| 80 | {104, nullptr, "RequestDeviceRegistrationInfo"}, | ||
| 81 | {105, nullptr, "RequestTransferDeviceAccount"}, | ||
| 82 | {106, nullptr, "RequestSyncRegistration"}, | ||
| 83 | {107, nullptr, "IsOwnDeviceId"}, | ||
| 84 | {200, nullptr, "RequestRegisterNotificationToken"}, | ||
| 85 | {300, nullptr, "RequestUnlinkDevice"}, | ||
| 86 | {301, nullptr, "RequestUnlinkDeviceIntegrated"}, | ||
| 87 | {302, nullptr, "RequestLinkDevice"}, | ||
| 88 | {303, nullptr, "HasDeviceLink"}, | ||
| 89 | {304, nullptr, "RequestUnlinkDeviceAll"}, | ||
| 90 | {305, nullptr, "RequestCreateVirtualAccount"}, | ||
| 91 | {306, nullptr, "RequestDeviceLinkStatus"}, | ||
| 92 | {400, nullptr, "GetAccountByVirtualAccount"}, | ||
| 93 | {500, nullptr, "RequestSyncTicket"}, | ||
| 94 | {501, nullptr, "RequestDownloadTicket"}, | ||
| 95 | {502, nullptr, "RequestDownloadTicketForPrepurchasedContents"}, | ||
| 96 | }; | ||
| 97 | // clang-format on | ||
| 98 | |||
| 99 | RegisterHandlers(functions); | ||
| 100 | } | ||
| 101 | }; | ||
| 102 | |||
| 103 | class NTC final : public ServiceFramework<NTC> { | ||
| 104 | public: | ||
| 105 | explicit NTC() : ServiceFramework{"ntc"} { | ||
| 106 | // clang-format off | ||
| 107 | static const FunctionInfo functions[] = { | ||
| 108 | {0, nullptr, "OpenEnsureNetworkClockAvailabilityService"}, | ||
| 109 | {100, nullptr, "SuspendAutonomicTimeCorrection"}, | ||
| 110 | {101, nullptr, "ResumeAutonomicTimeCorrection"}, | ||
| 111 | }; | ||
| 112 | // clang-format on | ||
| 113 | |||
| 114 | RegisterHandlers(functions); | ||
| 115 | } | ||
| 116 | }; | ||
| 117 | |||
| 118 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 119 | std::make_shared<NIM>()->InstallAsService(sm); | ||
| 120 | std::make_shared<NIM_SHP>()->InstallAsService(sm); | ||
| 121 | std::make_shared<NTC>()->InstallAsService(sm); | ||
| 122 | } | ||
| 123 | |||
| 124 | } // namespace Service::NIM | ||
diff --git a/src/core/hle/service/nim/nim.h b/src/core/hle/service/nim/nim.h new file mode 100644 index 000000000..2a2a92df0 --- /dev/null +++ b/src/core/hle/service/nim/nim.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::NIM { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::NIM | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 482989ea7..d2c05cc92 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -21,18 +21,23 @@ | |||
| 21 | #include "core/hle/service/apm/apm.h" | 21 | #include "core/hle/service/apm/apm.h" |
| 22 | #include "core/hle/service/audio/audio.h" | 22 | #include "core/hle/service/audio/audio.h" |
| 23 | #include "core/hle/service/bcat/bcat.h" | 23 | #include "core/hle/service/bcat/bcat.h" |
| 24 | #include "core/hle/service/btdrv/btdrv.h" | ||
| 24 | #include "core/hle/service/erpt/erpt.h" | 25 | #include "core/hle/service/erpt/erpt.h" |
| 25 | #include "core/hle/service/es/es.h" | 26 | #include "core/hle/service/es/es.h" |
| 26 | #include "core/hle/service/eupld/eupld.h" | 27 | #include "core/hle/service/eupld/eupld.h" |
| 27 | #include "core/hle/service/fatal/fatal.h" | 28 | #include "core/hle/service/fatal/fatal.h" |
| 28 | #include "core/hle/service/filesystem/filesystem.h" | 29 | #include "core/hle/service/filesystem/filesystem.h" |
| 29 | #include "core/hle/service/friend/friend.h" | 30 | #include "core/hle/service/friend/friend.h" |
| 31 | #include "core/hle/service/grc/grc.h" | ||
| 30 | #include "core/hle/service/hid/hid.h" | 32 | #include "core/hle/service/hid/hid.h" |
| 33 | #include "core/hle/service/lbl/lbl.h" | ||
| 34 | #include "core/hle/service/ldn/ldn.h" | ||
| 31 | #include "core/hle/service/ldr/ldr.h" | 35 | #include "core/hle/service/ldr/ldr.h" |
| 32 | #include "core/hle/service/lm/lm.h" | 36 | #include "core/hle/service/lm/lm.h" |
| 33 | #include "core/hle/service/mm/mm_u.h" | 37 | #include "core/hle/service/mm/mm_u.h" |
| 34 | #include "core/hle/service/nfp/nfp.h" | 38 | #include "core/hle/service/nfp/nfp.h" |
| 35 | #include "core/hle/service/nifm/nifm.h" | 39 | #include "core/hle/service/nifm/nifm.h" |
| 40 | #include "core/hle/service/nim/nim.h" | ||
| 36 | #include "core/hle/service/ns/ns.h" | 41 | #include "core/hle/service/ns/ns.h" |
| 37 | #include "core/hle/service/nvdrv/nvdrv.h" | 42 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 38 | #include "core/hle/service/pctl/pctl.h" | 43 | #include "core/hle/service/pctl/pctl.h" |
| @@ -190,20 +195,25 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 190 | AM::InstallInterfaces(*sm, nv_flinger); | 195 | AM::InstallInterfaces(*sm, nv_flinger); |
| 191 | AOC::InstallInterfaces(*sm); | 196 | AOC::InstallInterfaces(*sm); |
| 192 | APM::InstallInterfaces(*sm); | 197 | APM::InstallInterfaces(*sm); |
| 193 | BCAT::InstallInterfaces(*sm); | ||
| 194 | Audio::InstallInterfaces(*sm); | 198 | Audio::InstallInterfaces(*sm); |
| 199 | BCAT::InstallInterfaces(*sm); | ||
| 200 | BtDrv::InstallInterfaces(*sm); | ||
| 195 | ERPT::InstallInterfaces(*sm); | 201 | ERPT::InstallInterfaces(*sm); |
| 196 | ES::InstallInterfaces(*sm); | 202 | ES::InstallInterfaces(*sm); |
| 197 | EUPLD::InstallInterfaces(*sm); | 203 | EUPLD::InstallInterfaces(*sm); |
| 198 | Fatal::InstallInterfaces(*sm); | 204 | Fatal::InstallInterfaces(*sm); |
| 199 | FileSystem::InstallInterfaces(*sm); | 205 | FileSystem::InstallInterfaces(*sm); |
| 200 | Friend::InstallInterfaces(*sm); | 206 | Friend::InstallInterfaces(*sm); |
| 207 | GRC::InstallInterfaces(*sm); | ||
| 201 | HID::InstallInterfaces(*sm); | 208 | HID::InstallInterfaces(*sm); |
| 209 | LBL::InstallInterfaces(*sm); | ||
| 210 | LDN::InstallInterfaces(*sm); | ||
| 202 | LDR::InstallInterfaces(*sm); | 211 | LDR::InstallInterfaces(*sm); |
| 203 | LM::InstallInterfaces(*sm); | 212 | LM::InstallInterfaces(*sm); |
| 204 | MM::InstallInterfaces(*sm); | 213 | MM::InstallInterfaces(*sm); |
| 205 | NFP::InstallInterfaces(*sm); | 214 | NFP::InstallInterfaces(*sm); |
| 206 | NIFM::InstallInterfaces(*sm); | 215 | NIFM::InstallInterfaces(*sm); |
| 216 | NIM::InstallInterfaces(*sm); | ||
| 207 | NS::InstallInterfaces(*sm); | 217 | NS::InstallInterfaces(*sm); |
| 208 | Nvidia::InstallInterfaces(*sm); | 218 | Nvidia::InstallInterfaces(*sm); |
| 209 | PCTL::InstallInterfaces(*sm); | 219 | PCTL::InstallInterfaces(*sm); |
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 6aa1e2511..3211a8346 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp | |||
| @@ -109,4 +109,26 @@ BSD::BSD(const char* name) : ServiceFramework(name) { | |||
| 109 | RegisterHandlers(functions); | 109 | RegisterHandlers(functions); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | BSDCFG::BSDCFG() : ServiceFramework{"bsdcfg"} { | ||
| 113 | // clang-format off | ||
| 114 | static const FunctionInfo functions[] = { | ||
| 115 | {0, nullptr, "SetIfUp"}, | ||
| 116 | {1, nullptr, "SetIfUpWithEvent"}, | ||
| 117 | {2, nullptr, "CancelIf"}, | ||
| 118 | {3, nullptr, "SetIfDown"}, | ||
| 119 | {4, nullptr, "GetIfState"}, | ||
| 120 | {5, nullptr, "DhcpRenew"}, | ||
| 121 | {6, nullptr, "AddStaticArpEntry"}, | ||
| 122 | {7, nullptr, "RemoveArpEntry"}, | ||
| 123 | {8, nullptr, "LookupArpEntry"}, | ||
| 124 | {9, nullptr, "LookupArpEntry2"}, | ||
| 125 | {10, nullptr, "ClearArpEntries"}, | ||
| 126 | {11, nullptr, "ClearArpEntries2"}, | ||
| 127 | {12, nullptr, "PrintArpEntries"}, | ||
| 128 | }; | ||
| 129 | // clang-format on | ||
| 130 | |||
| 131 | RegisterHandlers(functions); | ||
| 132 | } | ||
| 133 | |||
| 112 | } // namespace Service::Sockets | 134 | } // namespace Service::Sockets |
diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index a6b1ca7d0..c1da59b24 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h | |||
| @@ -26,4 +26,9 @@ private: | |||
| 26 | u32 next_fd = 1; | 26 | u32 next_fd = 1; |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | class BSDCFG final : public ServiceFramework<BSDCFG> { | ||
| 30 | public: | ||
| 31 | explicit BSDCFG(); | ||
| 32 | }; | ||
| 33 | |||
| 29 | } // namespace Service::Sockets | 34 | } // namespace Service::Sockets |
diff --git a/src/core/hle/service/sockets/ethc.cpp b/src/core/hle/service/sockets/ethc.cpp new file mode 100644 index 000000000..d53c25eec --- /dev/null +++ b/src/core/hle/service/sockets/ethc.cpp | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/service/sockets/ethc.h" | ||
| 6 | |||
| 7 | namespace Service::Sockets { | ||
| 8 | |||
| 9 | ETHC_C::ETHC_C() : ServiceFramework{"ethc:c"} { | ||
| 10 | // clang-format off | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {0, nullptr, "Initialize"}, | ||
| 13 | {1, nullptr, "Cancel"}, | ||
| 14 | {2, nullptr, "GetResult"}, | ||
| 15 | {3, nullptr, "GetMediaList"}, | ||
| 16 | {4, nullptr, "SetMediaType"}, | ||
| 17 | {5, nullptr, "GetMediaType"}, | ||
| 18 | }; | ||
| 19 | // clang-format on | ||
| 20 | |||
| 21 | RegisterHandlers(functions); | ||
| 22 | } | ||
| 23 | |||
| 24 | ETHC_I::ETHC_I() : ServiceFramework{"ethc:i"} { | ||
| 25 | // clang-format off | ||
| 26 | static const FunctionInfo functions[] = { | ||
| 27 | {0, nullptr, "GetReadableHandle"}, | ||
| 28 | {1, nullptr, "Cancel"}, | ||
| 29 | {2, nullptr, "GetResult"}, | ||
| 30 | {3, nullptr, "GetInterfaceList"}, | ||
| 31 | {4, nullptr, "GetInterfaceCount"}, | ||
| 32 | }; | ||
| 33 | // clang-format on | ||
| 34 | |||
| 35 | RegisterHandlers(functions); | ||
| 36 | } | ||
| 37 | |||
| 38 | } // namespace Service::Sockets | ||
diff --git a/src/core/hle/service/sockets/ethc.h b/src/core/hle/service/sockets/ethc.h new file mode 100644 index 000000000..9a3c88100 --- /dev/null +++ b/src/core/hle/service/sockets/ethc.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service::Sockets { | ||
| 10 | |||
| 11 | class ETHC_C final : public ServiceFramework<ETHC_C> { | ||
| 12 | public: | ||
| 13 | explicit ETHC_C(); | ||
| 14 | }; | ||
| 15 | |||
| 16 | class ETHC_I final : public ServiceFramework<ETHC_I> { | ||
| 17 | public: | ||
| 18 | explicit ETHC_I(); | ||
| 19 | }; | ||
| 20 | |||
| 21 | } // namespace Service::Sockets | ||
diff --git a/src/core/hle/service/sockets/sockets.cpp b/src/core/hle/service/sockets/sockets.cpp index 05bd10d35..08d2d306a 100644 --- a/src/core/hle/service/sockets/sockets.cpp +++ b/src/core/hle/service/sockets/sockets.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/hle/service/sockets/bsd.h" | 5 | #include "core/hle/service/sockets/bsd.h" |
| 6 | #include "core/hle/service/sockets/ethc.h" | ||
| 6 | #include "core/hle/service/sockets/nsd.h" | 7 | #include "core/hle/service/sockets/nsd.h" |
| 7 | #include "core/hle/service/sockets/sfdnsres.h" | 8 | #include "core/hle/service/sockets/sfdnsres.h" |
| 8 | #include "core/hle/service/sockets/sockets.h" | 9 | #include "core/hle/service/sockets/sockets.h" |
| @@ -12,8 +13,14 @@ namespace Service::Sockets { | |||
| 12 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 13 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
| 13 | std::make_shared<BSD>("bsd:s")->InstallAsService(service_manager); | 14 | std::make_shared<BSD>("bsd:s")->InstallAsService(service_manager); |
| 14 | std::make_shared<BSD>("bsd:u")->InstallAsService(service_manager); | 15 | std::make_shared<BSD>("bsd:u")->InstallAsService(service_manager); |
| 16 | std::make_shared<BSDCFG>()->InstallAsService(service_manager); | ||
| 17 | |||
| 18 | std::make_shared<ETHC_C>()->InstallAsService(service_manager); | ||
| 19 | std::make_shared<ETHC_I>()->InstallAsService(service_manager); | ||
| 20 | |||
| 15 | std::make_shared<NSD>("nsd:a")->InstallAsService(service_manager); | 21 | std::make_shared<NSD>("nsd:a")->InstallAsService(service_manager); |
| 16 | std::make_shared<NSD>("nsd:u")->InstallAsService(service_manager); | 22 | std::make_shared<NSD>("nsd:u")->InstallAsService(service_manager); |
| 23 | |||
| 17 | std::make_shared<SFDNSRES>()->InstallAsService(service_manager); | 24 | std::make_shared<SFDNSRES>()->InstallAsService(service_manager); |
| 18 | } | 25 | } |
| 19 | 26 | ||
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index de276c559..c464fc6d1 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -29,6 +29,7 @@ enum class RenderTargetFormat : u32 { | |||
| 29 | RG16_UINT = 0xDD, | 29 | RG16_UINT = 0xDD, |
| 30 | RG16_FLOAT = 0xDE, | 30 | RG16_FLOAT = 0xDE, |
| 31 | R11G11B10_FLOAT = 0xE0, | 31 | R11G11B10_FLOAT = 0xE0, |
| 32 | R16_FLOAT = 0xF2, | ||
| 32 | R8_UNORM = 0xF3, | 33 | R8_UNORM = 0xF3, |
| 33 | }; | 34 | }; |
| 34 | 35 | ||
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 2f814a184..ca923d17d 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp | |||
| @@ -13,8 +13,10 @@ GPUVAddr MemoryManager::AllocateSpace(u64 size, u64 align) { | |||
| 13 | ASSERT(gpu_addr); | 13 | ASSERT(gpu_addr); |
| 14 | 14 | ||
| 15 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { | 15 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { |
| 16 | ASSERT(PageSlot(*gpu_addr + offset) == static_cast<u64>(PageStatus::Unmapped)); | 16 | VAddr& slot = PageSlot(*gpu_addr + offset); |
| 17 | PageSlot(*gpu_addr + offset) = static_cast<u64>(PageStatus::Allocated); | 17 | |
| 18 | ASSERT(slot == static_cast<u64>(PageStatus::Unmapped)); | ||
| 19 | slot = static_cast<u64>(PageStatus::Allocated); | ||
| 18 | } | 20 | } |
| 19 | 21 | ||
| 20 | return *gpu_addr; | 22 | return *gpu_addr; |
| @@ -22,8 +24,10 @@ GPUVAddr MemoryManager::AllocateSpace(u64 size, u64 align) { | |||
| 22 | 24 | ||
| 23 | GPUVAddr MemoryManager::AllocateSpace(GPUVAddr gpu_addr, u64 size, u64 align) { | 25 | GPUVAddr MemoryManager::AllocateSpace(GPUVAddr gpu_addr, u64 size, u64 align) { |
| 24 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { | 26 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { |
| 25 | ASSERT(PageSlot(gpu_addr + offset) == static_cast<u64>(PageStatus::Unmapped)); | 27 | VAddr& slot = PageSlot(gpu_addr + offset); |
| 26 | PageSlot(gpu_addr + offset) = static_cast<u64>(PageStatus::Allocated); | 28 | |
| 29 | ASSERT(slot == static_cast<u64>(PageStatus::Unmapped)); | ||
| 30 | slot = static_cast<u64>(PageStatus::Allocated); | ||
| 27 | } | 31 | } |
| 28 | 32 | ||
| 29 | return gpu_addr; | 33 | return gpu_addr; |
| @@ -34,8 +38,10 @@ GPUVAddr MemoryManager::MapBufferEx(VAddr cpu_addr, u64 size) { | |||
| 34 | ASSERT(gpu_addr); | 38 | ASSERT(gpu_addr); |
| 35 | 39 | ||
| 36 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { | 40 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { |
| 37 | ASSERT(PageSlot(*gpu_addr + offset) == static_cast<u64>(PageStatus::Unmapped)); | 41 | VAddr& slot = PageSlot(*gpu_addr + offset); |
| 38 | PageSlot(*gpu_addr + offset) = cpu_addr + offset; | 42 | |
| 43 | ASSERT(slot == static_cast<u64>(PageStatus::Unmapped)); | ||
| 44 | slot = cpu_addr + offset; | ||
| 39 | } | 45 | } |
| 40 | 46 | ||
| 41 | MappedRegion region{cpu_addr, *gpu_addr, size}; | 47 | MappedRegion region{cpu_addr, *gpu_addr, size}; |
| @@ -48,8 +54,10 @@ GPUVAddr MemoryManager::MapBufferEx(VAddr cpu_addr, GPUVAddr gpu_addr, u64 size) | |||
| 48 | ASSERT((gpu_addr & PAGE_MASK) == 0); | 54 | ASSERT((gpu_addr & PAGE_MASK) == 0); |
| 49 | 55 | ||
| 50 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { | 56 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { |
| 51 | ASSERT(PageSlot(gpu_addr + offset) == static_cast<u64>(PageStatus::Allocated)); | 57 | VAddr& slot = PageSlot(gpu_addr + offset); |
| 52 | PageSlot(gpu_addr + offset) = cpu_addr + offset; | 58 | |
| 59 | ASSERT(slot == static_cast<u64>(PageStatus::Allocated)); | ||
| 60 | slot = cpu_addr + offset; | ||
| 53 | } | 61 | } |
| 54 | 62 | ||
| 55 | MappedRegion region{cpu_addr, gpu_addr, size}; | 63 | MappedRegion region{cpu_addr, gpu_addr, size}; |
| @@ -62,9 +70,11 @@ GPUVAddr MemoryManager::UnmapBuffer(GPUVAddr gpu_addr, u64 size) { | |||
| 62 | ASSERT((gpu_addr & PAGE_MASK) == 0); | 70 | ASSERT((gpu_addr & PAGE_MASK) == 0); |
| 63 | 71 | ||
| 64 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { | 72 | for (u64 offset = 0; offset < size; offset += PAGE_SIZE) { |
| 65 | ASSERT(PageSlot(gpu_addr + offset) != static_cast<u64>(PageStatus::Allocated) && | 73 | VAddr& slot = PageSlot(gpu_addr + offset); |
| 66 | PageSlot(gpu_addr + offset) != static_cast<u64>(PageStatus::Unmapped)); | 74 | |
| 67 | PageSlot(gpu_addr + offset) = static_cast<u64>(PageStatus::Unmapped); | 75 | ASSERT(slot != static_cast<u64>(PageStatus::Allocated) && |
| 76 | slot != static_cast<u64>(PageStatus::Unmapped)); | ||
| 77 | slot = static_cast<u64>(PageStatus::Unmapped); | ||
| 68 | } | 78 | } |
| 69 | 79 | ||
| 70 | // Delete the region mappings that are contained within the unmapped region | 80 | // Delete the region mappings that are contained within the unmapped region |
| @@ -128,9 +138,7 @@ VAddr& MemoryManager::PageSlot(GPUVAddr gpu_addr) { | |||
| 128 | auto& block = page_table[(gpu_addr >> (PAGE_BITS + PAGE_TABLE_BITS)) & PAGE_TABLE_MASK]; | 138 | auto& block = page_table[(gpu_addr >> (PAGE_BITS + PAGE_TABLE_BITS)) & PAGE_TABLE_MASK]; |
| 129 | if (!block) { | 139 | if (!block) { |
| 130 | block = std::make_unique<PageBlock>(); | 140 | block = std::make_unique<PageBlock>(); |
| 131 | for (unsigned index = 0; index < PAGE_BLOCK_SIZE; index++) { | 141 | block->fill(static_cast<VAddr>(PageStatus::Unmapped)); |
| 132 | (*block)[index] = static_cast<u64>(PageStatus::Unmapped); | ||
| 133 | } | ||
| 134 | } | 142 | } |
| 135 | return (*block)[(gpu_addr >> PAGE_BITS) & PAGE_BLOCK_MASK]; | 143 | return (*block)[(gpu_addr >> PAGE_BITS) & PAGE_BLOCK_MASK]; |
| 136 | } | 144 | } |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index bb39c0a6f..bf0458b94 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -230,7 +230,8 @@ struct SurfaceParams { | |||
| 230 | return PixelFormat::RG16; | 230 | return PixelFormat::RG16; |
| 231 | case Tegra::RenderTargetFormat::RG16_SNORM: | 231 | case Tegra::RenderTargetFormat::RG16_SNORM: |
| 232 | return PixelFormat::RG16S; | 232 | return PixelFormat::RG16S; |
| 233 | 233 | case Tegra::RenderTargetFormat::R16_FLOAT: | |
| 234 | return PixelFormat::R16F; | ||
| 234 | default: | 235 | default: |
| 235 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 236 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 236 | UNREACHABLE(); | 237 | UNREACHABLE(); |
| @@ -437,6 +438,7 @@ struct SurfaceParams { | |||
| 437 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: | 438 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: |
| 438 | case Tegra::RenderTargetFormat::RG32_FLOAT: | 439 | case Tegra::RenderTargetFormat::RG32_FLOAT: |
| 439 | case Tegra::RenderTargetFormat::RG16_FLOAT: | 440 | case Tegra::RenderTargetFormat::RG16_FLOAT: |
| 441 | case Tegra::RenderTargetFormat::R16_FLOAT: | ||
| 440 | return ComponentType::Float; | 442 | return ComponentType::Float; |
| 441 | case Tegra::RenderTargetFormat::RGBA32_UINT: | 443 | case Tegra::RenderTargetFormat::RGBA32_UINT: |
| 442 | case Tegra::RenderTargetFormat::RG16_UINT: | 444 | case Tegra::RenderTargetFormat::RG16_UINT: |
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 2b45b8573..f5a5697a0 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp | |||
| @@ -328,11 +328,11 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeTimer::GetChildren() const { | |||
| 328 | const auto& timer = static_cast<const Kernel::Timer&>(object); | 328 | const auto& timer = static_cast<const Kernel::Timer&>(object); |
| 329 | 329 | ||
| 330 | list.push_back(std::make_unique<WaitTreeText>( | 330 | list.push_back(std::make_unique<WaitTreeText>( |
| 331 | tr("reset type = %1").arg(GetResetTypeQString(timer.reset_type)))); | 331 | tr("reset type = %1").arg(GetResetTypeQString(timer.GetResetType())))); |
| 332 | list.push_back( | 332 | list.push_back( |
| 333 | std::make_unique<WaitTreeText>(tr("initial delay = %1").arg(timer.initial_delay))); | 333 | std::make_unique<WaitTreeText>(tr("initial delay = %1").arg(timer.GetInitialDelay()))); |
| 334 | list.push_back( | 334 | list.push_back( |
| 335 | std::make_unique<WaitTreeText>(tr("interval delay = %1").arg(timer.interval_delay))); | 335 | std::make_unique<WaitTreeText>(tr("interval delay = %1").arg(timer.GetIntervalDelay()))); |
| 336 | return list; | 336 | return list; |
| 337 | } | 337 | } |
| 338 | 338 | ||
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index af9ed8fda..96998643e 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -101,6 +101,8 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { | |||
| 101 | 101 | ||
| 102 | ConnectMenuEvents(); | 102 | ConnectMenuEvents(); |
| 103 | ConnectWidgetEvents(); | 103 | ConnectWidgetEvents(); |
| 104 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", Common::g_build_name, Common::g_scm_branch, | ||
| 105 | Common::g_scm_desc); | ||
| 104 | 106 | ||
| 105 | setWindowTitle(QString("yuzu %1| %2-%3") | 107 | setWindowTitle(QString("yuzu %1| %2-%3") |
| 106 | .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc)); | 108 | .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc)); |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 5eca38b48..567f23417 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -118,7 +118,7 @@ bg_green = | |||
| 118 | layout_option = | 118 | layout_option = |
| 119 | 119 | ||
| 120 | # Toggle custom layout (using the settings below) on or off. | 120 | # Toggle custom layout (using the settings below) on or off. |
| 121 | # 0 (default): Off , 1: On | 121 | # 0 (default): Off, 1: On |
| 122 | custom_layout = | 122 | custom_layout = |
| 123 | 123 | ||
| 124 | # Screen placement when using Custom layout option | 124 | # Screen placement when using Custom layout option |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 72ba7d49c..e2945b6cf 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -164,6 +164,8 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 164 | OnResize(); | 164 | OnResize(); |
| 165 | OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); | 165 | OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); |
| 166 | SDL_PumpEvents(); | 166 | SDL_PumpEvents(); |
| 167 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", Common::g_build_name, Common::g_scm_branch, | ||
| 168 | Common::g_scm_desc); | ||
| 167 | 169 | ||
| 168 | DoneCurrent(); | 170 | DoneCurrent(); |
| 169 | } | 171 | } |