/* 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 InitForKernel implements HLEModule {
@Override
public String getName() { return "InitForKernel"; }
@Override
public void installModule(HLEModuleManager mm, int version) {
if (version >= 150) {
mm.addFunction(sceKernelGetChunkFunction, 0x2C6E9FE9);
mm.addFunction(sceKernelRegisterChunkFunction, 0x1D3256BA);
mm.addFunction(sceKernelReleaseChunkFunction, 0xCE88E870);
mm.addFunction(sceKernelInitApitypeFunction, 0x7A2333AD);
mm.addFunction(sceKernelBootFromFunction, 0x27932388);
mm.addFunction(sceKernelInitFileNameFunction, 0xA6E71B93);
mm.addFunction(sceKernelSetInitCallbackFunction, 0x9F9AE99C);
}
}
@Override
public void uninstallModule(HLEModuleManager mm, int version) {
if (version >= 150) {
mm.removeFunction(sceKernelGetChunkFunction);
mm.removeFunction(sceKernelRegisterChunkFunction);
mm.removeFunction(sceKernelReleaseChunkFunction);
mm.removeFunction(sceKernelInitApitypeFunction);
mm.removeFunction(sceKernelBootFromFunction);
mm.removeFunction(sceKernelInitFileNameFunction);
mm.removeFunction(sceKernelSetInitCallbackFunction);
}
}
public void sceKernelGetChunk(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelGetChunk [0x2C6E9FE9]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelRegisterChunk(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelRegisterChunk [0x1D3256BA]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelReleaseChunk(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelReleaseChunk [0xCE88E870]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelInitApitype(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelInitApitype [0x7A2333AD]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelBootFrom(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelBootFrom [0x27932388]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelInitFileName(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelInitFileName [0xA6E71B93]");
cpu.gpr[2] = 0xDEADC0DE;
}
public void sceKernelSetInitCallback(Processor processor) {
CpuState cpu = processor.cpu;
Modules.log.debug("Unimplemented NID function sceKernelSetInitCallback [0x9F9AE99C]");
cpu.gpr[2] = 0xDEADC0DE;
}
public final HLEModuleFunction sceKernelGetChunkFunction = new HLEModuleFunction("InitForKernel", "sceKernelGetChunk") {
@Override
public final void execute(Processor processor) {
sceKernelGetChunk(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.InitForKernelModule.sceKernelGetChunk(processor);";
}
};
public final HLEModuleFunction sceKernelRegisterChunkFunction = new HLEModuleFunction("InitForKernel", "sceKernelRegisterChunk") {
@Override
public final void execute(Processor processor) {
sceKernelRegisterChunk(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.InitForKernelModule.sceKernelRegisterChunk(processor);";
}
};
public final HLEModuleFunction sceKernelReleaseChunkFunction = new HLEModuleFunction("InitForKernel", "sceKernelReleaseChunk") {
@Override
public final void execute(Processor processor) {
sceKernelReleaseChunk(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.InitForKernelModule.sceKernelReleaseChunk(processor);";
}
};
public final HLEModuleFunction sceKernelInitApitypeFunction = new HLEModuleFunction("InitForKernel", "sceKernelInitApitype") {
@Override
public final void execute(Processor processor) {
sceKernelInitApitype(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.InitForKernelModule.sceKernelInitApitype(processor);";
}
};
public final HLEModuleFunction sceKernelBootFromFunction = new HLEModuleFunction("InitForKernel", "sceKernelBootFrom") {
@Override
public final void execute(Processor processor) {
sceKernelBootFrom(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.InitForKernelModule.sceKernelBootFrom(processor);";
}
};
public final HLEModuleFunction sceKernelInitFileNameFunction = new HLEModuleFunction("InitForKernel", "sceKernelInitFileName") {
@Override
public final void execute(Processor processor) {
sceKernelInitFileName(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.InitForKernelModule.sceKernelInitFileName(processor);";
}
};
public final HLEModuleFunction sceKernelSetInitCallbackFunction = new HLEModuleFunction("InitForKernel", "sceKernelSetInitCallback") {
@Override
public final void execute(Processor processor) {
sceKernelSetInitCallback(processor);
}
@Override
public final String compiledString() {
return "jpcsp.HLE.Modules.InitForKernelModule.sceKernelSetInitCallback(processor);";
}
};
};