Compare commits

...

10 commits

Author SHA1 Message Date
lizzie
c3ec6f62ed stub nv ctrl-gpu and nvdec debug stuff 2026-05-22 22:29:55 +02:00
lizzie
b09d073497 fx 2026-05-22 22:29:55 +02:00
lizzie
acb38a3123 i2c 2026-05-22 22:29:55 +02:00
lizzie
f8b1f5738d [hle/service{nvdrv,apm}] fixes for TetrisSwitch
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-05-22 22:29:55 +02:00
lizzie
5a5219da6f apm:p 2026-05-22 22:29:55 +02:00
lizzie
a280373f8e extra battery states 2026-05-22 22:29:55 +02:00
lizzie
37df681a2c + stubbed services 2026-05-22 22:29:55 +02:00
lizzie
6337aff0c4 implement stubs for i2c + gpio
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-05-22 22:29:55 +02:00
lizzie
b515dbd5ce [hle, core/loader] remove hbl.nsp specific workaround
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-05-22 22:29:55 +02:00
lizzie
9b18d0b111
[tools] refactor, use #!/bin/sh, update license files (#3998)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3998
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-05-22 21:15:31 +02:00
54 changed files with 444 additions and 150 deletions

View file

@ -7,7 +7,7 @@
EXCLUDE_FILES="CPM.cmake CPMUtil.cmake GetSCMRev.cmake renderdoc_app.h tools/cpm tools/shellcheck.sh tools/update-cpm.sh tools/windows/vcvarsall.sh externals/stb externals/glad externals/getopt externals/gamemode externals/FidelityFX-FSR externals/demangle externals/bc_decoder externals/cmake-modules"
# license header constants, please change when needed :))))
YEAR=2026
YEAR=$(date "+%Y")
HOLDER="Eden Emulator Project"
LICENSE="GPL-3.0-or-later"
@ -112,10 +112,10 @@ for file in $FILES; do
[ "$excluded" = "true" ] && continue
case "$file" in
*.cmake|*.sh|*CMakeLists.txt)
*.cmake|*.sh|*.ps1|*.py|*.rb|*.perl|*.pl|*.nix|*CMakeLists.txt)
begin="#"
;;
*.kt*|*.cpp|*.h|*.qml)
*.kt|*.kts|*.cpp|*.h|*.qml|*.c|*.hpp|*.hxx|*.cxx|*.h.in|*.inc)
begin="//"
;;
*)
@ -185,11 +185,12 @@ if [ "$UPDATE" = "true" ]; then
for file in $SRC_FILES $OTHER_FILES; do
case $(basename -- "$file") in
*.cmake|*CMakeLists.txt)
# Windows Powershell wont use shebangs
*.cmake|*.ps1|*CMakeLists.txt)
begin="#"
shell="false"
;;
*.sh)
*.sh|*.py|*.rb|*.perl|*.pl|*.nix)
begin="#"
shell=true
;;

View file

@ -1,22 +0,0 @@
#!/bin/bash -ex
# git-archive-all
export PATH="$PATH:/home/$USER/.local/bin"
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
GITREV="`git show -s --format='%h'`"
REV_NAME="eden-unified-source-${GITDATE}-${GITREV}"
COMPAT_LIST='dist/compatibility_list/compatibility_list.json'
mkdir artifacts
touch "${COMPAT_LIST}"
git describe --abbrev=0 --always HEAD > GIT-COMMIT
git describe --tags HEAD > GIT-TAG || echo 'unknown' > GIT-TAG
git-archive-all --include "${COMPAT_LIST}" --include GIT-COMMIT --include GIT-TAG --force-submodules artifacts/"${REV_NAME}.tar"
cd artifacts/
xz -T0 -9 "${REV_NAME}.tar"
sha256sum "${REV_NAME}.tar.xz" > "${REV_NAME}.tar.xz.sha256sum"
cd ..

View file

@ -46,7 +46,7 @@ Qt Widgets appears to be broken. For now, add `-DENABLE_QT=OFF` to your configur
This is needed for some dependencies that call cc directly (tz):
```sh
echo '#!/bin/sh' >cc
echo '#!/bin/sh -e' >cc
echo 'gcc $@' >>cc
chmod +x cc
export PATH="$PATH:$PWD"

View file

@ -59,7 +59,7 @@ EmuDeck will automatically create an *Emulators - Emulators* parser for ***Steam
4. Paste the following code into the contents of the file, save and close the file.
```bash
#!/bin/bash
#!/bin/sh -e
emuName="eden" #parameterize me
. "$HOME/.config/EmuDeck/backend/functions/all.sh"

View file

@ -13,6 +13,7 @@ The main origin repository is always at https://git.eden-emu.dev/eden-emu/eden.
- https://github.com/eden-emulator/mirror
- https://git.crueter.xyz/mirror/eden
- https://codeberg.org/eden-emu/eden
- https://collective.taymaerz.de/eden/eden
Other mirrors obviously exist on the internet, but we can't guarantee their reliability and/or availability.

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

View file

@ -1,5 +1,7 @@
#!/bin/sh
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2015 Citra Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
@ -10,20 +12,19 @@ paths_to_check="src/ CMakeLists.txt"
# If there are whitespace errors, print the offending file names and fail.
if ! git diff --cached --check -- $paths_to_check ; then
cat<<END
cat<<EOF
Error: This commit would contain trailing spaces or tabs, which is against this repo's policy.
Please correct those issues before committing. (Use 'git diff --check' for more details)
If you know what you are doing, you can try 'git commit --no-verify' to bypass the check
END
EOF
exit 1
fi
# Check for tabs, since tab-in-indent catches only those at the beginning of a line
if git diff --cached -- $paths_to_check | egrep '^\+.* '; then
cat<<END
cat<<EOF
Error: This commit would contain a tab, which is against this repo's policy.
If you know what you are doing, you can try 'git commit --no-verify' to bypass the check.
END
EOF
exit 1
fi

4
shell.nix Normal file → Executable file
View file

@ -1,3 +1,7 @@
#!/usr/bin/nix-shell
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
pkgs = import nixpkgs { config = {}; overlays = []; };

View file

@ -1121,6 +1121,10 @@ add_library(core STATIC
hle/service/vi/vi_types.h
hle/service/vi/vsync_manager.cpp
hle/service/vi/vsync_manager.h
hle/service/gpio/gpio.cpp
hle/service/gpio/gpio.h
hle/service/i2c/i2c.cpp
hle/service/i2c/i2c.h
internal_network/emu_net_state.cpp
internal_network/emu_net_state.h
internal_network/network.cpp

View file

@ -1174,8 +1174,7 @@ KProcess::KProcess(KernelCore& kernel)
KProcess::~KProcess() = default;
Result KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size,
KProcessAddress aslr_space_start, size_t aslr_space_offset, bool is_hbl) {
Result KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size, KProcessAddress aslr_space_start, size_t aslr_space_offset) {
// Create a resource limit for the process.
const auto pool = static_cast<KMemoryManager::Pool>(metadata.GetPoolPartition());
const auto physical_memory_size = m_kernel.MemoryManager().GetSize(pool);
@ -1247,7 +1246,6 @@ Result KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std:
aslr_space_start));
// Assign remaining properties.
m_is_hbl = is_hbl;
m_ideal_core_id = metadata.GetMainThreadCore();
// Set up emulation context.

View file

@ -133,7 +133,6 @@ private:
bool m_is_initialized : 1 = false;
bool m_is_application : 1 = false;
bool m_is_default_application_system_resource : 1 = false;
bool m_is_hbl : 1 = false;
bool m_is_suspended : 1 = false;
bool m_is_immortal : 1 = false;
bool m_is_handle_table_initialized : 1 = false;
@ -277,10 +276,6 @@ public:
return m_capabilities.CanForceDebug();
}
bool IsHbl() const {
return m_is_hbl;
}
u32 GetAllocateOption() const {
return m_page_table.GetAllocateOption();
}
@ -514,8 +509,7 @@ public:
}
public:
Result LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size,
KProcessAddress aslr_space_start, size_t aslr_space_offset, bool is_hbl);
Result LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size, KProcessAddress aslr_space_start, size_t aslr_space_offset);
void LoadModule(CodeSet code_set, KProcessAddress base_addr);

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -106,9 +109,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
system.CurrentPhysicalCore().LogBacktrace();
}
const bool is_hbl = GetCurrentProcess(system.Kernel()).IsHbl();
const bool should_break = is_hbl || !notification_only;
const bool should_break = !notification_only;
if (system.DebuggerEnabled() && should_break) {
auto* thread = system.Kernel().GetCurrentEmuThread();
system.GetDebugger().NotifyThreadStopped(thread);

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
@ -83,6 +83,7 @@ struct Applet {
// Application functions
bool game_play_recording_supported{};
bool media_playback_state{};
GamePlayRecordingState game_play_recording_state{GamePlayRecordingState::Disabled};
bool jit_service_launched{};
bool application_crash_report_enabled{};

View file

@ -11,6 +11,7 @@
#include "core/file_sys/registered_cache.h"
#include "core/file_sys/savedata_factory.h"
#include "core/hle/kernel/k_transfer_memory.h"
#include "core/hle/result.h"
#include "core/hle/service/am/am_results.h"
#include "core/hle/service/am/applet.h"
#include "core/hle/service/am/service/application_functions.h"
@ -56,7 +57,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_
{37, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"},
{40, D<&IApplicationFunctions::NotifyRunning>, "NotifyRunning"},
{50, D<&IApplicationFunctions::GetPseudoDeviceId>, "GetPseudoDeviceId"},
{60, nullptr, "SetMediaPlaybackStateForApplication"},
{60, D<&IApplicationFunctions::SetMediaPlaybackStateForApplication>, "SetMediaPlaybackStateForApplication"},
{65, D<&IApplicationFunctions::IsGamePlayRecordingSupported>, "IsGamePlayRecordingSupported"},
{66, D<&IApplicationFunctions::InitializeGamePlayRecording>, "InitializeGamePlayRecording"},
{67, D<&IApplicationFunctions::SetGamePlayRecordingState>, "SetGamePlayRecordingState"},
@ -364,6 +365,13 @@ Result IApplicationFunctions::InitializeGamePlayRecording(
R_SUCCEED();
}
Result IApplicationFunctions::SetMediaPlaybackStateForApplication(bool enabled) {
LOG_WARNING(Service_AM, "(stubbed) {}", enabled);
std::scoped_lock lk{m_applet->lock};
m_applet->media_playback_state = enabled;
R_SUCCEED();
}
Result IApplicationFunctions::SetGamePlayRecordingState(
GamePlayRecordingState game_play_recording_state) {
LOG_WARNING(Service_AM, "(STUBBED) called");

View file

@ -53,6 +53,7 @@ private:
Result IsGamePlayRecordingSupported(Out<bool> out_is_game_play_recording_supported);
Result InitializeGamePlayRecording(
u64 transfer_memory_size, InCopyHandle<Kernel::KTransferMemory> transfer_memory_handle);
Result SetMediaPlaybackStateForApplication(bool enabled);
Result SetGamePlayRecordingState(GamePlayRecordingState game_play_recording_state);
Result EnableApplicationCrashReport(bool enabled);
Result InitializeApplicationCopyrightFrameBuffer(

View file

@ -1,3 +1,6 @@
// 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
@ -15,12 +18,11 @@ void LoopProcess(Core::System& system) {
auto module = std::make_shared<Module>();
auto server_manager = std::make_unique<ServerManager>(system);
server_manager->RegisterNamedService(
"apm", std::make_shared<APM>(system, module, system.GetAPMController(), "apm"));
server_manager->RegisterNamedService(
"apm:am", std::make_shared<APM>(system, module, system.GetAPMController(), "apm:am"));
server_manager->RegisterNamedService(
"apm:sys", std::make_shared<APM_Sys>(system, system.GetAPMController()));
server_manager->RegisterNamedService("apm", std::make_shared<APM>(system, module, system.GetAPMController(), "apm"));
server_manager->RegisterNamedService("apm:am", std::make_shared<APM>(system, module, system.GetAPMController(), "apm:am"));
// Removed on [+8.0.0] but kept for compatibility
server_manager->RegisterNamedService("apm:p", std::make_shared<APM>(system, module, system.GetAPMController(), "apm:p"));
server_manager->RegisterNamedService("apm:sys", std::make_shared<APM_Sys>(system, system.GetAPMController()));
ServerManager::RunServer(std::move(server_manager));
}

View file

@ -29,7 +29,7 @@ IBtmSystemCore::IBtmSystemCore(Core::System& system_)
{10, nullptr, "StartAudioDeviceDiscovery"},
{11, nullptr, "StopAudioDeviceDiscovery"},
{12, nullptr, "IsDiscoveryingAudioDevice"},
{13, nullptr, "GetDiscoveredAudioDevice"},
{13, C<&IBtmSystemCore::GetDiscoveredAudioDevice>, "GetDiscoveredAudioDevice"},
{14, C<&IBtmSystemCore::AcquireAudioDeviceConnectionEvent>, "AcquireAudioDeviceConnectionEvent"},
{15, nullptr, "ConnectAudioDevice"},
{16, nullptr, "IsConnectingAudioDevice"},
@ -93,6 +93,11 @@ Result IBtmSystemCore::AcquireRadioEvent(Out<bool> out_is_valid,
R_SUCCEED();
}
Result IBtmSystemCore::GetDiscoveredAudioDevice(OutArray<std::array<u8, 0xFF>, BufferAttr_HipcPointer> out_audio_devices, s32 count, Out<s32> out_total) {
LOG_WARNING(Service_BTM, "(STUBBED) called");
R_SUCCEED();
}
Result IBtmSystemCore::AcquireAudioDeviceConnectionEvent(
OutCopyHandle<Kernel::KReadableEvent> out_event) {
LOG_WARNING(Service_BTM, "(STUBBED) called");

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@ -34,9 +37,8 @@ private:
Result DisableRadio();
Result IsRadioEnabled(Out<bool> out_is_enabled);
Result AcquireRadioEvent(Out<bool> out_is_valid,
OutCopyHandle<Kernel::KReadableEvent> out_event);
Result AcquireRadioEvent(Out<bool> out_is_valid, OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetDiscoveredAudioDevice(OutArray<std::array<u8, 0xFF>, BufferAttr_HipcPointer> out_audio_devices, s32 count, Out<s32> out_total);
Result AcquireAudioDeviceConnectionEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetConnectedAudioDevices(

View file

@ -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/i2c/i2c.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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -79,7 +79,9 @@ void nvdisp_disp0::Composite(std::span<const Nvnflinger::HwcLayer> sorted_layers
});
for (size_t i = 0; i < layer.acquire_fence.num_fences; i++) {
output_fences.push_back(layer.acquire_fence.fences[i]);
if (layer.acquire_fence.fences[i].id >= 0) {
output_fences.push_back(layer.acquire_fence.fences[i]);
}
}
}

View file

@ -47,6 +47,8 @@ NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8>
return WrapFixed(this, &nvhost_ctrl_gpu::FlushL2, input, output);
case 0x14:
return WrapFixed(this, &nvhost_ctrl_gpu::GetActiveSlotMask, input, output);
case 0x15:
return WrapFixed(this, &nvhost_ctrl_gpu::PmuGetGpuLoad, input, output);
case 0x1c:
return WrapFixed(this, &nvhost_ctrl_gpu::GetGpuTime, input, output);
default:
@ -234,6 +236,12 @@ NvResult nvhost_ctrl_gpu::GetActiveSlotMask(IoctlActiveSlotMask& params) {
return NvResult::Success;
}
NvResult nvhost_ctrl_gpu::PmuGetGpuLoad(IoctlPmuGetLoad& params) {
LOG_WARNING(Service_NVDRV, "(stubbed) called");
params.pmu_gpu_load = 100;
return NvResult::Success;
}
NvResult nvhost_ctrl_gpu::ZCullGetCtxSize(IoctlZcullGetCtxSize& params) {
LOG_DEBUG(Service_NVDRV, "called");
params.size = 0x1;

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@ -184,6 +184,11 @@ private:
};
static_assert(sizeof(IoctlGetCpuTimeCorrelationInfo) == 264);
struct IoctlPmuGetLoad {
u32 pmu_gpu_load;
};
static_assert(sizeof(IoctlPmuGetLoad) == 4);
NvResult GetCharacteristics1(IoctlCharacteristics& params);
NvResult GetCharacteristics3(IoctlCharacteristics& params,
std::span<IoctlGpuCharacteristics> gpu_characteristics);
@ -192,6 +197,7 @@ private:
NvResult GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, std::span<u32> tpc_mask);
NvResult GetActiveSlotMask(IoctlActiveSlotMask& params);
NvResult PmuGetGpuLoad(IoctlPmuGetLoad& params);
NvResult ZCullGetCtxSize(IoctlZcullGetCtxSize& params);
NvResult ZCullGetInfo(IoctlNvgpuGpuZcullGetInfoArgs& params);
NvResult ZBCSetTable(IoctlZbcSetTable& params);

View file

@ -25,18 +25,20 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8> in
switch (command.group) {
case 0x0:
switch (command.cmd) {
case 0x1:
case 0x01:
return WrapFixedVariable(this, &nvhost_nvdec::Submit, input, output, fd);
case 0x2:
case 0x02:
return WrapFixed(this, &nvhost_nvdec::GetSyncpoint, input, output);
case 0x3:
case 0x03:
return WrapFixed(this, &nvhost_nvdec::GetWaitbase, input, output);
case 0x7:
case 0x07:
return WrapFixed(this, &nvhost_nvdec::SetSubmitTimeout, input, output);
case 0x9:
case 0x09:
return WrapFixedVariable(this, &nvhost_nvdec::MapBuffer, input, output, fd);
case 0xa:
case 0x0a:
return WrapFixedVariable(this, &nvhost_nvdec::UnmapBuffer, input, output);
case 0x23:
return WrapFixed(this, &nvhost_nvdec::GetClkRate, input, output);
default:
break;
}

View file

@ -168,6 +168,13 @@ NvResult nvhost_nvdec_common::SetSubmitTimeout(u32 timeout) {
return NvResult::Success;
}
NvResult nvhost_nvdec_common::GetClkRate(IoctlGetClkRate& params) {
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
params.clk_rate = 614400000;
params.module_id = 0;
return NvResult::Success;
}
Kernel::KEvent* nvhost_nvdec_common::QueryEvent(u32 event_id) {
LOG_CRITICAL(Service_NVDRV, "Unknown HOSTX1 Event {}", event_id);
return nullptr;

View file

@ -111,6 +111,12 @@ protected:
};
static_assert(sizeof(IoctlMapBuffer) == 0x0C, "IoctlMapBuffer is incorrect size");
struct IoctlGetClkRate {
u32_le clk_rate{};
u32_le module_id{};
};
static_assert(sizeof(IoctlGetClkRate) == 8);
/// Ioctl command implementations
NvResult SetNVMAPfd(IoctlSetNvmapFD&);
NvResult Submit(IoctlSubmit& params, std::span<u8> input, DeviceFD fd);
@ -119,6 +125,7 @@ protected:
NvResult MapBuffer(IoctlMapBuffer& params, std::span<MapBufferEntry> entries, DeviceFD fd);
NvResult UnmapBuffer(IoctlMapBuffer& params, std::span<MapBufferEntry> entries);
NvResult SetSubmitTimeout(u32 timeout);
NvResult GetClkRate(IoctlGetClkRate& params);
Kernel::KEvent* QueryEvent(u32 event_id) override;

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2012 The Android Open Source Project
// SPDX-License-Identifier: GPL-3.0-or-later
@ -15,10 +18,8 @@ namespace Service::android {
class Fence {
public:
constexpr Fence() = default;
static constexpr Fence NoFence() {
Fence fence;
Fence fence{};
fence.fences[0].id = -1;
fence.fences[1].id = -1;
fence.fences[2].id = -1;
@ -26,7 +27,6 @@ public:
return fence;
}
public:
u32 num_fences{};
std::array<Service::Nvidia::NvFence, 4> fences{};
};

View file

@ -6,10 +6,12 @@
#include <memory>
#include "common/common_funcs.h"
#include "common/device_power_state.h"
#include "common/logging.h"
#include "core/core.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/result.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/kernel_helpers.h"
#include "core/hle/service/ptm/psm.h"
@ -134,12 +136,12 @@ PSM::PSM(Core::System& system_) : ServiceFramework{system_, "psm"} {
{9, nullptr, "DisableEnoughPowerChargeEmulation"},
{10, nullptr, "EnableFastBatteryCharging"},
{11, nullptr, "DisableFastBatteryCharging"},
{12, nullptr, "GetBatteryVoltageState"},
{12, &PSM::GetBatteryVoltageState, "GetBatteryVoltageState"},
{13, nullptr, "GetRawBatteryChargePercentage"},
{14, nullptr, "IsEnoughPowerSupplied"},
{15, nullptr, "GetBatteryAgePercentage"},
{15, &PSM::GetBatteryAgePercentage, "GetBatteryAgePercentage"},
{16, nullptr, "GetBatteryChargeInfoEvent"},
{17, nullptr, "GetBatteryChargeInfoFields"},
{17, &PSM::GetBatteryChargeInfoFields, "GetBatteryChargeInfoFields"},
{18, nullptr, "GetBatteryChargeCalibratedEvent"},
};
// clang-format on
@ -187,4 +189,64 @@ void PSM::OpenSession(HLERequestContext& ctx) {
rb.PushIpcInterface<IPsmSession>(system);
}
void PSM::GetBatteryVoltageState(HLERequestContext& ctx) {
LOG_DEBUG(Service_PTM, "(stubbed)");
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.PushRaw<u32>(0); //
}
void PSM::GetBatteryAgePercentage(HLERequestContext& ctx) {
LOG_DEBUG(Service_PTM, "(stubbed)");
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.PushRaw<f64>(1.f);
}
struct BatteryChargeInfoFields {
u32 input_current_limit; //mA
u32 boost_mode_current_limit;
u32 fast_charge_current_limit;
u32 charge_voltage_limit;
u32 charger_type;
u8 hi2_mode;
u8 battery_charging;
INSERT_PADDING_BYTES_NOINIT(2);
u32 vdd50_state;
u32 temperature_celcius;
f32 battery_charge_percentage;
u32 battery_charge_milli_voltage;
f32 battery_age_percentage;
u32 usb_power_role;
u32 usb_charger_type;
u32 charger_input_voltage_limit;
u32 charger_input_current_limit;
u8 fast_battery_charging;
u8 controller_power_supply;
u8 otg_request;
INSERT_PADDING_BYTES_NOINIT(1);
INSERT_PADDING_BYTES_NOINIT(0x14); //[+17.0.0]
};
static_assert(sizeof(struct BatteryChargeInfoFields) == 0x54);
void PSM::GetBatteryChargeInfoFields(HLERequestContext& ctx) {
LOG_DEBUG(Service_PTM, "called");
Common::PowerStatus power_status = Common::GetPowerStatus();
BatteryChargeInfoFields r{};
r.battery_charge_percentage = f32(power_status.percentage); //100%
r.battery_age_percentage = f32(power_status.percentage); //100%
r.battery_charging = power_status.charging ? 1 : 0;
r.charger_type = u32(power_status.has_battery && power_status.charging
? ChargerType::RegularCharger : ChargerType::Unplugged);
r.charger_input_voltage_limit = 100;
r.charger_input_voltage_limit = 100;
r.input_current_limit = 100;
r.boost_mode_current_limit = 100;
r.fast_charge_current_limit = 100;
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.PushRaw<BatteryChargeInfoFields>(r);
}
} // namespace Service::PTM

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@ -22,10 +22,12 @@ private:
LowPowerCharger = 2,
Unknown = 3,
};
void GetBatteryChargePercentage(HLERequestContext& ctx);
void GetChargerType(HLERequestContext& ctx);
void OpenSession(HLERequestContext& ctx);
void GetBatteryVoltageState(HLERequestContext& ctx);
void GetBatteryAgePercentage(HLERequestContext& ctx);
void GetBatteryChargeInfoFields(HLERequestContext& ctx);
};
} // namespace Service::PTM

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
@ -25,8 +25,10 @@
#include "core/hle/service/friend/friend.h"
#include "core/hle/service/glue/glue.h"
#include "core/hle/service/grc/grc.h"
#include "core/hle/service/gpio/gpio.h"
#include "core/hle/service/hid/hid.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/i2c/i2c.h"
#include "core/hle/service/jit/jit.h"
#include "core/hle/service/lbl/lbl.h"
#include "core/hle/service/ldn/ldn.h"
@ -144,7 +146,9 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system
{"ro", &RO::LoopProcess},
{"spl", &SPL::LoopProcess},
{"ssl", &SSL::LoopProcess},
{"usb", &USB::LoopProcess}
{"usb", &USB::LoopProcess},
{"i2c", &I2C::LoopProcess},
{"gpio", &GPIO::LoopProcess},
})
kernel.RunOnGuestCoreProcess(std::string(e.first), [&system, f = e.second] { f(system); });
}

View file

@ -142,10 +142,10 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
{22, C<&ISystemSettingsServer::SetEulaVersions>, "SetEulaVersions"},
{23, C<&ISystemSettingsServer::GetColorSetId>, "GetColorSetId"},
{24, C<&ISystemSettingsServer::SetColorSetId>, "SetColorSetId"},
{25, nullptr, "GetConsoleInformationUploadFlag"},
{26, nullptr, "SetConsoleInformationUploadFlag"},
{27, nullptr, "GetAutomaticApplicationDownloadFlag"},
{28, nullptr, "SetAutomaticApplicationDownloadFlag"},
{25, C<&ISystemSettingsServer::GetConsoleInformationUploadFlag>, "GetConsoleInformationUploadFlag"},
{26, C<&ISystemSettingsServer::SetConsoleInformationUploadFlag>, "SetConsoleInformationUploadFlag"},
{27, C<&ISystemSettingsServer::GetAutomaticApplicationDownloadFlag>, "GetAutomaticApplicationDownloadFlag"},
{28, C<&ISystemSettingsServer::SetAutomaticApplicationDownloadFlag>, "SetAutomaticApplicationDownloadFlag"},
{29, C<&ISystemSettingsServer::GetNotificationSettings>, "GetNotificationSettings"},
{30, C<&ISystemSettingsServer::SetNotificationSettings>, "SetNotificationSettings"},
{31, C<&ISystemSettingsServer::GetAccountNotificationSettings>, "GetAccountNotificationSettings"},
@ -160,8 +160,8 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
{42, nullptr, "SetEdid"},
{43, C<&ISystemSettingsServer::GetAudioOutputMode>, "GetAudioOutputMode"},
{44, C<&ISystemSettingsServer::SetAudioOutputMode>, "SetAudioOutputMode"},
{45, C<&ISystemSettingsServer::GetSpeakerAutoMuteFlag> , "GetSpeakerAutoMuteFlag"},
{46, C<&ISystemSettingsServer::SetSpeakerAutoMuteFlag> , "SetSpeakerAutoMuteFlag"},
{45, C<&ISystemSettingsServer::GetSpeakerAutoMuteFlag>, "GetSpeakerAutoMuteFlag"},
{46, C<&ISystemSettingsServer::SetSpeakerAutoMuteFlag>, "SetSpeakerAutoMuteFlag"},
{47, C<&ISystemSettingsServer::GetQuestFlag>, "GetQuestFlag"},
{48, C<&ISystemSettingsServer::SetQuestFlag>, "SetQuestFlag"},
{49, nullptr, "GetDataDeletionSettings"},
@ -180,8 +180,8 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
{62, C<&ISystemSettingsServer::GetDebugModeFlag>, "GetDebugModeFlag"},
{63, C<&ISystemSettingsServer::GetPrimaryAlbumStorage>, "GetPrimaryAlbumStorage"},
{64, C<&ISystemSettingsServer::SetPrimaryAlbumStorage>, "SetPrimaryAlbumStorage"},
{65, nullptr, "GetUsb30EnableFlag"},
{66, nullptr, "SetUsb30EnableFlag"},
{65, C<&ISystemSettingsServer::GetUsb30EnableFlag>, "GetUsb30EnableFlag"},
{66, C<&ISystemSettingsServer::SetUsb30EnableFlag>, "SetUsb30EnableFlag"},
{67, C<&ISystemSettingsServer::GetBatteryLot>, "GetBatteryLot"},
{68, C<&ISystemSettingsServer::GetSerialNumber>, "GetSerialNumber"},
{69, C<&ISystemSettingsServer::GetNfcEnableFlag>, "GetNfcEnableFlag"},
@ -1074,6 +1074,45 @@ Result ISystemSettingsServer::SetNfcEnableFlag(bool nfc_enable_flag) {
R_SUCCEED();
}
Result ISystemSettingsServer::GetConsoleInformationUploadFlag(Out<bool> out_flag) {
LOG_INFO(Service_SET, "called {}", m_system_settings.console_information_upload_flag);
*out_flag = m_system_settings.console_information_upload_flag;
R_SUCCEED();
}
Result ISystemSettingsServer::SetConsoleInformationUploadFlag(bool flag) {
LOG_INFO(Service_SET, "called {}", flag);
m_system_settings.usb_30_enable_flag = flag;
SetSaveNeeded();
R_SUCCEED();
}
Result ISystemSettingsServer::GetAutomaticApplicationDownloadFlag(Out<bool> out_flag) {
LOG_INFO(Service_SET, "called {}", m_system_settings.usb_30_enable_flag);
*out_flag = m_system_settings.automatic_application_download_flag;
R_SUCCEED();
}
Result ISystemSettingsServer::SetAutomaticApplicationDownloadFlag(bool flag) {
LOG_INFO(Service_SET, "called {}", flag);
m_system_settings.automatic_application_download_flag = flag;
SetSaveNeeded();
R_SUCCEED();
}
Result ISystemSettingsServer::GetUsb30EnableFlag(Out<bool> out_usb30_enable_flag) {
LOG_INFO(Service_SET, "called, usb30_enable_flag={}", m_system_settings.usb_30_enable_flag);
*out_usb30_enable_flag = m_system_settings.usb_30_enable_flag;
R_SUCCEED();
}
Result ISystemSettingsServer::SetUsb30EnableFlag(bool usb30_enable_flag) {
LOG_INFO(Service_SET, "called, usb30_enable_flag={}", usb30_enable_flag);
m_system_settings.usb_30_enable_flag = usb30_enable_flag;
SetSaveNeeded();
R_SUCCEED();
}
Result ISystemSettingsServer::GetSleepSettings(Out<SleepSettings> out_sleep_settings) {
LOG_INFO(Service_SET, "called, flags={}, handheld_sleep_plan={}, console_sleep_plan={}",
m_system_settings.sleep_settings.flags.raw,

View file

@ -109,6 +109,12 @@ public:
Result SetPrimaryAlbumStorage(PrimaryAlbumStorage primary_album_storage);
Result GetBatteryLot(Out<BatteryLot> out_battery_lot);
Result GetSerialNumber(Out<SerialNumber> out_console_serial);
Result GetConsoleInformationUploadFlag(Out<bool> out_flag);
Result SetConsoleInformationUploadFlag(bool flag);
Result GetAutomaticApplicationDownloadFlag(Out<bool> out_flag);
Result SetAutomaticApplicationDownloadFlag(bool flag);
Result GetUsb30EnableFlag(Out<bool> out_usb30_enable_flag);
Result SetUsb30EnableFlag(bool usb30_enable_flag);
Result GetNfcEnableFlag(Out<bool> out_nfc_enable_flag);
Result SetNfcEnableFlag(bool nfc_enable_flag);
Result GetSleepSettings(Out<SleepSettings> out_sleep_settings);

View file

@ -71,9 +71,10 @@ struct PatchCollection {
std::array<s32, 13> module_patcher_indices{};
};
AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile file_,
bool override_update_)
: AppLoader(std::move(file_)), override_update(override_update_), is_hbl(false) {
AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile file_, bool override_update_)
: AppLoader(std::move(file_))
, override_update(override_update_)
{
const auto file_dir = file->GetContainingDirectory();
// Title ID
@ -124,9 +125,11 @@ AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys
}
AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(
FileSys::VirtualDir directory, bool override_update_, bool is_hbl_)
: AppLoader(directory->GetFile("main")), dir(std::move(directory)),
override_update(override_update_), is_hbl(is_hbl_) {}
FileSys::VirtualDir directory, bool override_update_)
: AppLoader(directory->GetFile("main"))
, dir(std::move(directory))
, override_update(override_update_)
{}
FileType AppLoader_DeconstructedRomDirectory::IdentifyType(const FileSys::VirtualFile& dir_file) {
if (FileSys::IsDirectoryExeFS(dir_file->GetContainingDirectory())) {
@ -232,7 +235,7 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
? ::Settings::values.rng_seed.GetValue() : Common::Random::Random64(0)) << 12) & 0xfff000;
// Setup the process code layout
if (process.LoadFromMetadata(metadata, code_size, fastmem_base, aslr_offset, is_hbl).IsError()) {
if (process.LoadFromMetadata(metadata, code_size, fastmem_base, aslr_offset).IsError()) {
return {ResultStatus::ErrorUnableToParseKernelMetadata, {}};
}

View file

@ -1,3 +1,6 @@
// 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
@ -22,13 +25,9 @@ namespace Loader {
*/
class AppLoader_DeconstructedRomDirectory final : public AppLoader {
public:
explicit AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile main_file,
bool override_update_ = false);
explicit AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile main_file, bool override_update_ = false);
// Overload to accept exefs directory. Must contain 'main' and 'main.npdm'
explicit AppLoader_DeconstructedRomDirectory(FileSys::VirtualDir directory,
bool override_update_ = false,
bool is_hbl_ = false);
explicit AppLoader_DeconstructedRomDirectory(FileSys::VirtualDir directory, bool override_update_ = false);
/**
* Identifies whether or not the given file is a deconstructed ROM directory.
@ -63,7 +62,6 @@ private:
std::string name;
u64 title_id{};
bool override_update;
bool is_hbl;
Modules modules;
};

View file

@ -93,7 +93,7 @@ AppLoader::LoadResult AppLoader_KIP::Load(Kernel::KProcess& process,
? ::Settings::values.rng_seed.GetValue() : Common::Random::Random64(0)) << 12) & 0xfff000;
// Setup the process code layout
if (process.LoadFromMetadata(FileSys::ProgramMetadata::GetDefault(), codeset.memory.size(), 0, aslr_offset, false).IsError()) {
if (process.LoadFromMetadata(FileSys::ProgramMetadata::GetDefault(), codeset.memory.size(), 0, aslr_offset).IsError()) {
return {ResultStatus::ErrorNotInitialized, {}};
}
const VAddr base_address = GetInteger(process.GetEntryPoint());

View file

@ -247,7 +247,7 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process,
// Setup the process code layout
if (process
.LoadFromMetadata(FileSys::ProgramMetadata::GetDefault(), image_size, fastmem_base, aslr_offset, false)
.LoadFromMetadata(FileSys::ProgramMetadata::GetDefault(), image_size, fastmem_base, aslr_offset)
.IsError()) {
return false;
}

View file

@ -34,8 +34,7 @@ AppLoader_NSP::AppLoader_NSP(FileSys::VirtualFile file_,
}
if (nsp->IsExtractedType()) {
secondary_loader = std::make_unique<AppLoader_DeconstructedRomDirectory>(
nsp->GetExeFS(), false, file->GetName() == "hbl.nsp");
secondary_loader = std::make_unique<AppLoader_DeconstructedRomDirectory>(nsp->GetExeFS(), false);
} else {
const auto control_nca =
nsp->GetNCA(nsp->GetProgramTitleID(), FileSys::ContentRecordType::Control);

View file

@ -712,6 +712,11 @@ bool NPad::SetNpadMode(u64 aruid, Core::HID::NpadIdType& new_npad_id, Core::HID:
}
auto& controller = GetControllerFromNpadIdType(aruid, npad_id);
if (!controller.shared_memory) {
LOG_WARNING(Service_HID, "shared_memory is null for npad_id={}", npad_id);
return false;
}
if (controller.shared_memory->assignment_mode != assignment_mode) {
controller.shared_memory->assignment_mode = assignment_mode;
}

View file

@ -303,26 +303,25 @@ struct GPU::Impl {
free_swap_counters.pop_front();
}
}
const auto wait_fence =
RequestSyncOperation([this, current_request_counter, &layers, &fences, num_fences] {
auto& syncpoint_manager = host1x.GetSyncpointManager();
if (num_fences == 0) {
renderer->Composite(layers);
}
const auto executer = [this, current_request_counter, layers_copy = layers]() {
{
std::unique_lock<std::mutex> lk(request_swap_mutex);
if (--request_swap_counters[current_request_counter] != 0) {
return;
}
free_swap_counters.push_back(current_request_counter);
const auto wait_fence = RequestSyncOperation([this, current_request_counter, &layers, &fences, num_fences] {
auto& syncpoint_manager = host1x.GetSyncpointManager();
if (num_fences == 0) {
renderer->Composite(layers);
}
const auto executer = [this, current_request_counter, layers_copy = layers]() {
{
std::unique_lock<std::mutex> lk(request_swap_mutex);
if (--request_swap_counters[current_request_counter] != 0) {
return;
}
renderer->Composite(layers_copy);
};
for (size_t i = 0; i < num_fences; i++) {
syncpoint_manager.RegisterGuestAction(fences[i].id, fences[i].value, executer);
free_swap_counters.push_back(current_request_counter);
}
});
renderer->Composite(layers_copy);
};
for (size_t i = 0; i < num_fences; i++) {
syncpoint_manager.RegisterGuestAction(fences[i].id, fences[i].value, executer);
}
});
gpu_thread.TickGPU();
WaitForSyncOperation(wait_fence);
}

View file

@ -581,7 +581,7 @@ MainWindow::MainWindow(bool has_broken_vulkan)
} else if (should_launch_hlaunch) {
std::filesystem::path const sd_dir = Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir);
auto const hbl_path = (sd_dir / "atmosphere" / "hbl.nsp").string();
BootGame(QString::fromStdString(hbl_path), ApplicationAppletParameters());
BootGame(QString::fromStdString(hbl_path), LibraryAppletParameters(0x010000000000100Dull, Service::AM::AppletId::QLaunch));
}
}
}

View file

@ -1,6 +1,6 @@
# Tools
Tools for Eden and other subprojects.
Tools for Eden and other subprojects. When adding new scripts please use `#!/bin/sh -e` or `#!/usr/bin/env <interpreter>` (for `.py`, `.rb`, or `.perl`). Keep scripts POSIX compliant (i.e not require hard `bash` to run, just plain old `sh`).
## Third-Party

View file

@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,5 +1,6 @@
#!/usr/bin/perl
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
#!/usr/bin/env perl
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# Basic script to run dtrace sampling over the program (requires Flamegraph)
# Usage is either running as: ./dtrace-tool.sh pid (then input the pid of the process)

4
tools/lanczos-gen.pl Normal file → Executable file
View file

@ -1,5 +1,5 @@
#!/usr/bin/perl
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
#!/usr/bin/env perl
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
use strict;
use warnings;

View file

@ -1,5 +1,6 @@
#!/bin/sh
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# This script basically allows you to "dirtily" use llvmpipe in any configuration

View file

@ -1,6 +1,6 @@
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
which optipng || exit

View file

@ -1,6 +1,6 @@
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
ANDROID=src/android/app/src/main

View file

@ -1,5 +1,5 @@
#!/usr/bin/python3
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
#!/usr/bin/env python3
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
@ -212,7 +212,7 @@ def emit_size_check():
if type != "void":
lines.append(f"static_assert(sizeof({type}) == {size});")
return "\n".join(lines)
return f"\n{lines}"
# Replaces a type with an arch-specific one, if it exists.
@ -423,7 +423,7 @@ def emit_lines(lines, indent=' '):
output_lines.append(line)
first = False
return "\n".join(output_lines)
return f"\n{output_lines}"
# Emit a C++ function to wrap a guest SVC.
@ -601,7 +601,7 @@ def emit_call(bitness, names, suffix):
lines.append(f"{indent}}}")
lines.append("}")
return "\n".join(lines)
return f"\n{lines}"
def build_fn_declaration(return_type, name, arguments):
@ -623,7 +623,7 @@ def build_enum_declarations():
lines.append(f"{indent}{name} = {hex(imm)},")
lines.append("};")
return "\n".join(lines)
return f"\n{lines}"
def main():
@ -665,11 +665,11 @@ def main():
with open("src/core/hle/kernel/svc.h", "w") as f:
f.write(COPYRIGHT)
f.write(PROLOGUE_H)
f.write("\n".join(svc_fw_declarations))
f.write(f"\n{svc_fw_declarations}")
f.write("\n\n")
f.write("\n".join(arch_fw_declarations[BIT_32]))
f.write(f"\n{arch_fw_declarations[BIT_32]}")
f.write("\n\n")
f.write("\n".join(arch_fw_declarations[BIT_64]))
f.write(f"\n{arch_fw_declarations[BIT_64]}")
f.write("\n\n")
f.write(enum_decls)
f.write(EPILOGUE_H)
@ -679,7 +679,7 @@ def main():
f.write(PROLOGUE_CPP)
f.write(emit_size_check())
f.write("\n\n")
f.write("\n\n".join(wrapper_fns))
f.write(f"\n\n{wrapper_fns}")
f.write("\n\n")
f.write(call_32)
f.write("\n\n")

View file

@ -1,6 +1,6 @@
#!/bin/sh
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
SOURCES=$(find src/yuzu src/qt_common -type f \( -name "*.ui" -o -name "*.cpp" -o -name "*.h" -o -name "*.plist" \))

View file

@ -1,6 +1,6 @@
#!/bin/sh
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
command -v tx-cli && COMMAND=tx-cli

View file

@ -1,6 +1,6 @@
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
ANDROID=src/android/app/src/main

View file

@ -1,4 +1,4 @@
#!/usr/bin/sh
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later