Browse Source
[hle] Fixes for nxident, nxmp and nxplay, remove hbl.nsp workarounds (#3996)
[hle] Fixes for nxident, nxmp and nxplay, remove hbl.nsp workarounds (#3996)
adds `gpio` and `i2c` services implements `IApplicationFunctions::SetMediaPlaybackStateForApplicatio` stubs `IBtmSystemCore::GetDiscoveredAudioDevice` implements `nvhost_ctrl_gpu::PmuGetGpuLoad` IOCTL (0x20) implements `PSM::GetBatteryAgePercentage`, `PSM::GetBatteryVoltageState` and `PSM::GetBatteryChargeInfoFields` implements `ISystemSettingsServer::GetConsoleInformationUploadFlag`, `ISystemSettingsServer::SetConsoleInformationUploadFlag`, `ISystemSettingsServer::GetAutomaticApplicationDownloadFlag`, `ISystemSettingsServer::SetAutomaticApplicationDownloadFlag`, `&ISystemSettingsServer::GetUsb30EnableFlag`, `ISystemSettingsServer::SetUsb30EnableFlag` removes `hbl.nsp` specific workarounds Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3996 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>pull/4091/head
committed by
crueter
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
29 changed files with 356 additions and 60 deletions
-
4src/core/CMakeLists.txt
-
4src/core/hle/kernel/k_process.cpp
-
8src/core/hle/kernel/k_process.h
-
7src/core/hle/kernel/svc/svc_exception.cpp
-
3src/core/hle/service/am/applet.h
-
10src/core/hle/service/am/service/application_functions.cpp
-
1src/core/hle/service/am/service/application_functions.h
-
7src/core/hle/service/btm/btm_system_core.cpp
-
8src/core/hle/service/btm/btm_system_core.h
-
33src/core/hle/service/gpio/gpio.cpp
-
15src/core/hle/service/gpio/gpio.h
-
76src/core/hle/service/i2c/i2c.cpp
-
15src/core/hle/service/i2c/i2c.h
-
8src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
-
8src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h
-
14src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp
-
7src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp
-
7src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
-
68src/core/hle/service/ptm/psm.cpp
-
6src/core/hle/service/ptm/psm.h
-
8src/core/hle/service/services.cpp
-
55src/core/hle/service/set/system_settings_server.cpp
-
6src/core/hle/service/set/system_settings_server.h
-
17src/core/loader/deconstructed_rom_directory.cpp
-
12src/core/loader/deconstructed_rom_directory.h
-
2src/core/loader/kip.cpp
-
2src/core/loader/nro.cpp
-
3src/core/loader/nsp.cpp
-
2src/yuzu/main_window.cpp
@ -0,0 +1,33 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
|||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
|||
#include "core/core.h"
|
|||
#include "core/hle/service/gpio/gpio.h"
|
|||
#include "core/hle/service/ipc_helpers.h"
|
|||
#include "core/hle/service/service.h"
|
|||
|
|||
namespace Service::GPIO { |
|||
|
|||
class GPIO final : public ServiceFramework<GPIO> { |
|||
public: |
|||
explicit GPIO(Core::System& system_) |
|||
: ServiceFramework{system_, "gpio"} |
|||
{ |
|||
static const FunctionInfo functions[] = { |
|||
{0, nullptr, "Cmd0"}, |
|||
}; |
|||
RegisterHandlers(functions); |
|||
} |
|||
~GPIO() override = default; |
|||
}; |
|||
|
|||
void LoopProcess(Core::System& system) { |
|||
auto server_manager = std::make_unique<ServerManager>(system); |
|||
server_manager->RegisterNamedService("gpio", std::make_shared<GPIO>(system)); |
|||
ServerManager::RunServer(std::move(server_manager)); |
|||
} |
|||
|
|||
} // namespace Service::GPIO
|
|||
@ -0,0 +1,15 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project |
|||
// SPDX-License-Identifier: GPL-3.0-or-later |
|||
|
|||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
namespace Core { |
|||
class System; |
|||
} |
|||
|
|||
namespace Service::GPIO { |
|||
void LoopProcess(Core::System& system); |
|||
} // namespace Service::GPIO |
|||
@ -0,0 +1,76 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
|||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
|||
#include "core/core.h"
|
|||
#include "core/hle/result.h"
|
|||
#include "core/hle/service/i2c/i2c.h"
|
|||
#include "core/hle/service/ipc_helpers.h"
|
|||
#include "core/hle/service/cmif_serialization.h"
|
|||
#include "core/hle/service/cmif_types.h"
|
|||
#include "core/hle/service/service.h"
|
|||
#include "core/hle/service/server_manager.h"
|
|||
|
|||
namespace Service::I2C { |
|||
|
|||
class I2CSession final : public ServiceFramework<I2CSession> { |
|||
public: |
|||
explicit I2CSession(Core::System& system_) |
|||
: ServiceFramework{system_, "I2CSession"} |
|||
{ |
|||
static const FunctionInfo functions[] = { |
|||
{0, nullptr, "SendOld"}, |
|||
{1, nullptr, "ReceiveOld"}, |
|||
{2, nullptr, "ExecuteCommandListOld"}, |
|||
{10, C<&I2CSession::Send>, "Send"}, |
|||
{11, nullptr, "Receive"}, |
|||
{12, nullptr, "ExecuteCommandList"}, |
|||
{13, nullptr, "SetRetryPolicy"}, |
|||
}; |
|||
RegisterHandlers(functions); |
|||
} |
|||
~I2CSession() override = default; |
|||
|
|||
Result Send(InBuffer<BufferAttr_HipcMapAlias> in_data, u32 transaction_option) { |
|||
LOG_WARNING(Service, "(stubbed) topt={}", transaction_option); |
|||
R_THROW(ResultUnknown); |
|||
} |
|||
}; |
|||
|
|||
enum class I2CDevice : u32 { |
|||
ClassicController, |
|||
Ftm3bd56, |
|||
}; |
|||
|
|||
class I2C final : public ServiceFramework<I2C> { |
|||
public: |
|||
explicit I2C(Core::System& system_) |
|||
: ServiceFramework{system_, "i2c"} |
|||
{ |
|||
static const FunctionInfo functions[] = { |
|||
{0, nullptr, "OpenSessionForDev"}, |
|||
{1, C<&I2C::OpenSession>, "OpenSession"}, |
|||
{2, nullptr, "HasDevice"}, |
|||
{3, nullptr, "HasDeviceForDev"}, |
|||
{4, nullptr, "OpenSession2"}, |
|||
}; |
|||
RegisterHandlers(functions); |
|||
} |
|||
~I2C() override = default; |
|||
|
|||
Result OpenSession(I2CDevice device, OutInterface<I2CSession> out_session) { |
|||
LOG_DEBUG(Service, "(stubbed)"); |
|||
*out_session = std::make_shared<I2CSession>(system); |
|||
R_SUCCEED(); |
|||
} |
|||
}; |
|||
|
|||
void LoopProcess(Core::System& system) { |
|||
auto server_manager = std::make_unique<ServerManager>(system); |
|||
server_manager->RegisterNamedService("i2c", std::make_shared<I2C>(system)); |
|||
ServerManager::RunServer(std::move(server_manager)); |
|||
} |
|||
|
|||
} // namespace Service::I2C
|
|||
@ -0,0 +1,15 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project |
|||
// SPDX-License-Identifier: GPL-3.0-or-later |
|||
|
|||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
namespace Core { |
|||
class System; |
|||
} |
|||
|
|||
namespace Service::I2C { |
|||
void LoopProcess(Core::System& system); |
|||
} // namespace Service::I2C |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue