CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Core/HLE/KUBridge.cpp
Views: 1401
// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617// KUBridge seems to be some utility module that comes with some custom firmware for PSP,18// providing the ability to call some kernel-only functions from user mode.19// A few homebrew applications use this. We only simulate a small subset of the functionality for now.2021#include "Core/HLE/HLE.h"22#include "Core/HLE/FunctionWrappers.h"23#include "Core/HLE/KUBridge.h"24#include "Core/HLE/sceKernelModule.h"25#include "Core/Config.h"2627static int kuKernelLoadModule(const char *path, uint32_t flags, uint32_t lmOptionAddr) {28INFO_LOG(Log::sceKernel, "kuKernelLoadModule - forwarding to sceKernelLoadModule");29// Simply forward the call, like JPSCP does.30return sceKernelLoadModule(path, flags, lmOptionAddr);31}3233static int kuKernelGetModel() {34INFO_LOG(Log::sceKernel, "kuKernelGetModel()");35return g_Config.iPSPModel;36}3738const HLEFunction KUBridge[] =39{40{ 0x4C25EA72, &WrapI_CUU<kuKernelLoadModule>, "kuKernelLoadModule", 'i', "sxx" },41{ 0x24331850, &WrapI_V<kuKernelGetModel>, "kuKernelGetModel", 'i', "" },42};4344void Register_KUBridge() {45RegisterModule("KUBridge", ARRAY_SIZE(KUBridge), KUBridge);46}474849