early-access version 2652
This commit is contained in:
@@ -1337,7 +1337,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_)
|
||||
{200, nullptr, "GetLastApplicationExitReason"},
|
||||
{500, nullptr, "StartContinuousRecordingFlushForDebug"},
|
||||
{1000, nullptr, "CreateMovieMaker"},
|
||||
{1001, nullptr, "PrepareForJit"},
|
||||
{1001, &IApplicationFunctions::PrepareForJit, "PrepareForJit"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -1787,6 +1787,13 @@ void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(Kernel::HLERe
|
||||
rb.PushCopyObjects(health_warning_disappeared_system_event->GetReadableEvent());
|
||||
}
|
||||
|
||||
void IApplicationFunctions::PrepareForJit(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger& nvflinger,
|
||||
Core::System& system) {
|
||||
auto message_queue = std::make_shared<AppletMessageQueue>(system);
|
||||
|
@@ -336,6 +336,7 @@ private:
|
||||
void TryPopFromFriendInvitationStorageChannel(Kernel::HLERequestContext& ctx);
|
||||
void GetNotificationStorageChannelEvent(Kernel::HLERequestContext& ctx);
|
||||
void GetHealthWarningDisappearedSystemEvent(Kernel::HLERequestContext& ctx);
|
||||
void PrepareForJit(Kernel::HLERequestContext& ctx);
|
||||
|
||||
KernelHelpers::ServiceContext service_context;
|
||||
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/service/hid/errors.h"
|
||||
#include "core/hle/service/hid/hid.h"
|
||||
#include "core/hle/service/hid/hidbus.h"
|
||||
#include "core/hle/service/hid/irs.h"
|
||||
#include "core/hle/service/hid/xcd.h"
|
||||
#include "core/memory.h"
|
||||
@@ -2129,6 +2128,32 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class HidBus final : public ServiceFramework<HidBus> {
|
||||
public:
|
||||
explicit HidBus(Core::System& system_) : ServiceFramework{system_, "hidbus"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{1, nullptr, "GetBusHandle"},
|
||||
{2, nullptr, "IsExternalDeviceConnected"},
|
||||
{3, nullptr, "Initialize"},
|
||||
{4, nullptr, "Finalize"},
|
||||
{5, nullptr, "EnableExternalDevice"},
|
||||
{6, nullptr, "GetExternalDeviceId"},
|
||||
{7, nullptr, "SendCommandAsync"},
|
||||
{8, nullptr, "GetSendCommandAsynceResult"},
|
||||
{9, nullptr, "SetEventForSendCommandAsycResult"},
|
||||
{10, nullptr, "GetSharedMemoryHandle"},
|
||||
{11, nullptr, "EnableJoyPollingReceiveMode"},
|
||||
{12, nullptr, "DisableJoyPollingReceiveMode"},
|
||||
{13, nullptr, "GetPollingData"},
|
||||
{14, nullptr, "SetStatusManagerType"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
|
||||
std::make_shared<Hid>(system)->InstallAsService(service_manager);
|
||||
std::make_shared<HidBus>(system)->InstallAsService(service_manager);
|
||||
|
53
src/core/hle/service/jit/jit.cpp
Executable file
53
src/core/hle/service/jit/jit.cpp
Executable file
@@ -0,0 +1,53 @@
|
||||
// Copyright 2022 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/jit/jit.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service::JIT {
|
||||
|
||||
class IJitEnvironment final : public ServiceFramework<IJitEnvironment> {
|
||||
public:
|
||||
explicit IJitEnvironment(Core::System& system_) : ServiceFramework{system_, "IJitEnvironment"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "GenerateCode"},
|
||||
{1, nullptr, "Control"},
|
||||
{1000, nullptr, "LoadPlugin"},
|
||||
{1001, nullptr, "GetCodeAddress"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
};
|
||||
|
||||
class JITU final : public ServiceFramework<JITU> {
|
||||
public:
|
||||
explicit JITU(Core::System& system_) : ServiceFramework{system_, "jit:u"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, &JITU::CreateJitEnvironment, "CreateJitEnvironment"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
void CreateJitEnvironment(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_JIT, "called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<IJitEnvironment>(system);
|
||||
}
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
|
||||
std::make_shared<JITU>(system)->InstallAsService(sm);
|
||||
}
|
||||
|
||||
} // namespace Service::JIT
|
20
src/core/hle/service/jit/jit.h
Executable file
20
src/core/hle/service/jit/jit.h
Executable file
@@ -0,0 +1,20 @@
|
||||
// Copyright 2022 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::SM {
|
||||
class ServiceManager;
|
||||
}
|
||||
|
||||
namespace Service::JIT {
|
||||
|
||||
/// Registers all JIT services with the specified service manager.
|
||||
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
|
||||
|
||||
} // namespace Service::JIT
|
@@ -32,6 +32,7 @@
|
||||
#include "core/hle/service/glue/glue.h"
|
||||
#include "core/hle/service/grc/grc.h"
|
||||
#include "core/hle/service/hid/hid.h"
|
||||
#include "core/hle/service/jit/jit.h"
|
||||
#include "core/hle/service/lbl/lbl.h"
|
||||
#include "core/hle/service/ldn/ldn.h"
|
||||
#include "core/hle/service/ldr/ldr.h"
|
||||
@@ -262,6 +263,7 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system
|
||||
Glue::InstallInterfaces(system);
|
||||
GRC::InstallInterfaces(*sm, system);
|
||||
HID::InstallInterfaces(*sm, system);
|
||||
JIT::InstallInterfaces(*sm, system);
|
||||
LBL::InstallInterfaces(*sm, system);
|
||||
LDN::InstallInterfaces(*sm, system);
|
||||
LDR::InstallInterfaces(*sm, system);
|
||||
|
@@ -153,7 +153,7 @@ ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext&
|
||||
auto& port = port_result.Unwrap();
|
||||
SCOPE_EXIT({ port->GetClientPort().Close(); });
|
||||
|
||||
server_ports.emplace_back(&port->GetServerPort());
|
||||
kernel.RegisterServerObject(&port->GetServerPort());
|
||||
|
||||
// Create a new session.
|
||||
Kernel::KClientSession* session{};
|
||||
@@ -224,10 +224,6 @@ SM::SM(ServiceManager& service_manager_, Core::System& system_)
|
||||
});
|
||||
}
|
||||
|
||||
SM::~SM() {
|
||||
for (auto& server_port : server_ports) {
|
||||
server_port->Close();
|
||||
}
|
||||
}
|
||||
SM::~SM() = default;
|
||||
|
||||
} // namespace Service::SM
|
||||
|
@@ -22,7 +22,6 @@ class KClientPort;
|
||||
class KClientSession;
|
||||
class KernelCore;
|
||||
class KPort;
|
||||
class KServerPort;
|
||||
class SessionRequestHandler;
|
||||
} // namespace Kernel
|
||||
|
||||
@@ -48,7 +47,6 @@ private:
|
||||
ServiceManager& service_manager;
|
||||
bool is_initialized{};
|
||||
Kernel::KernelCore& kernel;
|
||||
std::vector<Kernel::KServerPort*> server_ports;
|
||||
};
|
||||
|
||||
class ServiceManager {
|
||||
|
Reference in New Issue
Block a user