/* This autogenerated file is part of jpcsp. */
/*
This file is part of jpcsp.
Jpcsp is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Jpcsp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Jpcsp. If not, see <http://www.gnu.org/licenses/>.
*/
package jpcsp.HLE.modules150;
import jpcsp.HLE.Modules;
import jpcsp.HLE.modules.HLEModule;
import jpcsp.HLE.modules.HLEModuleFunction;
import jpcsp.HLE.modules.HLEModuleManager;
import jpcsp.Memory;
import jpcsp.Processor;
import jpcsp.Allegrex.CpuState; // New-Style Processor
public class LoadExecForUser implements HLEModule {
@Override
public String getName() { return "LoadExecForUser"; }
@Override
public void installModule(HLEModuleManager mm, int version) {
if (version >= 150) {
mm.addFunction(sceKernelLoadExecFunction, 0xBD2F1094);
mm.addFunction(sceKernelExitGameWithStatusFunction, 0x2AC9954B);
mm.addFunction(sceKernelExitGameFunction, 0x05572A5F);
mm.addFunction(sceKernelRegisterExitCallbackFunction, 0x4AC57943);
}
}
@Override
public void uninstallModule(HLEModuleManager mm, int version) {
if (version >= 150) {
mm.removeFunction(sceKernelLoadExecFunction);
mm.removeFunction(sceKernelExitGameWithStatusFunction);
mm.removeFunction(sceKernelExitGameFunction);
mm.removeFunction(sceKernelRegisterExitCallbackFunction);
}
}
public void sceKernelLoadExec(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelLoadExec [0xBD2F1094]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelExitGameWithStatus(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelExitGameWithStatus [0x2AC9954B]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelExitGame(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelExitGame [0x05572A5F]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelRegisterExitCallback(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelRegisterExitCallback [0x4AC57943]");
cpu.gpr[2] = 0xDEADC0DE;
}
public final HLEModuleFunction sceKernelLoadExecFunction = new HLEModuleFunction("LoadExecForUser", "sceKernelLoadExec") {
@Override
public final void execute(Processor processor) {
sceKernelLoadExec(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.LoadExecForUserModule.sceKernelLoadExec(processor);";
}
};
public final HLEModuleFunction sceKernelExitGameWithStatusFunction = new HLEModuleFunction("LoadExecForUser", "sceKernelExitGameWithStatus") {
@Override
public final void execute(Processor processor) {
sceKernelExitGameWithStatus(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.LoadExecForUserModule.sceKernelExitGameWithStatus(processor);";
}
};
public final HLEModuleFunction sceKernelExitGameFunction = new HLEModuleFunction("LoadExecForUser", "sceKernelExitGame") {
@Override
public final void execute(Processor processor) {
sceKernelExitGame(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.LoadExecForUserModule.sceKernelExitGame(processor);";
}
};
public final HLEModuleFunction sceKernelRegisterExitCallbackFunction = new HLEModuleFunction("LoadExecForUser", "sceKernelRegisterExitCallback") {
@Override
public final void execute(Processor processor) {
sceKernelRegisterExitCallback(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.LoadExecForUserModule.sceKernelRegisterExitCallback(processor);";
}
};
};