/* 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 SysMemUserForUser implements HLEModule { @Override public String getName() { return "SysMemUserForUser"; } @Override public void installModule(HLEModuleManager mm, int version) { if (version >= 150) { mm.addFunction(sceKernelMaxFreeMemSizeFunction, 0xA291F107); mm.addFunction(sceKernelTotalFreeMemSizeFunction, 0xF919F628); mm.addFunction(sceKernelAllocPartitionMemoryFunction, 0x237DBD4F); mm.addFunction(sceKernelFreePartitionMemoryFunction, 0xB6D61D02); mm.addFunction(sceKernelGetBlockHeadAddrFunction, 0x9D9A5BA1); mm.addFunction(sceKernelPrintfFunction, 0x13A5ABEF); mm.addFunction(sceKernelDevkitVersionFunction, 0x3FC9AE6A); } } @Override public void uninstallModule(HLEModuleManager mm, int version) { if (version >= 150) { mm.removeFunction(sceKernelMaxFreeMemSizeFunction); mm.removeFunction(sceKernelTotalFreeMemSizeFunction); mm.removeFunction(sceKernelAllocPartitionMemoryFunction); mm.removeFunction(sceKernelFreePartitionMemoryFunction); mm.removeFunction(sceKernelGetBlockHeadAddrFunction); mm.removeFunction(sceKernelPrintfFunction); mm.removeFunction(sceKernelDevkitVersionFunction); } } public void sceKernelMaxFreeMemSize(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelMaxFreeMemSize [0xA291F107]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelTotalFreeMemSize(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelTotalFreeMemSize [0xF919F628]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelAllocPartitionMemory(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelAllocPartitionMemory [0x237DBD4F]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelFreePartitionMemory(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelFreePartitionMemory [0xB6D61D02]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelGetBlockHeadAddr(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelGetBlockHeadAddr [0x9D9A5BA1]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelPrintf(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelPrintf [0x13A5ABEF]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelDevkitVersion(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelDevkitVersion [0x3FC9AE6A]"); cpu.gpr[2] = 0xDEADC0DE; } public final HLEModuleFunction sceKernelMaxFreeMemSizeFunction = new HLEModuleFunction("SysMemUserForUser", "sceKernelMaxFreeMemSize") { @Override public final void execute(Processor processor) { sceKernelMaxFreeMemSize(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.SysMemUserForUserModule.sceKernelMaxFreeMemSize(processor);"; } }; public final HLEModuleFunction sceKernelTotalFreeMemSizeFunction = new HLEModuleFunction("SysMemUserForUser", "sceKernelTotalFreeMemSize") { @Override public final void execute(Processor processor) { sceKernelTotalFreeMemSize(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.SysMemUserForUserModule.sceKernelTotalFreeMemSize(processor);"; } }; public final HLEModuleFunction sceKernelAllocPartitionMemoryFunction = new HLEModuleFunction("SysMemUserForUser", "sceKernelAllocPartitionMemory") { @Override public final void execute(Processor processor) { sceKernelAllocPartitionMemory(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.SysMemUserForUserModule.sceKernelAllocPartitionMemory(processor);"; } }; public final HLEModuleFunction sceKernelFreePartitionMemoryFunction = new HLEModuleFunction("SysMemUserForUser", "sceKernelFreePartitionMemory") { @Override public final void execute(Processor processor) { sceKernelFreePartitionMemory(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.SysMemUserForUserModule.sceKernelFreePartitionMemory(processor);"; } }; public final HLEModuleFunction sceKernelGetBlockHeadAddrFunction = new HLEModuleFunction("SysMemUserForUser", "sceKernelGetBlockHeadAddr") { @Override public final void execute(Processor processor) { sceKernelGetBlockHeadAddr(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.SysMemUserForUserModule.sceKernelGetBlockHeadAddr(processor);"; } }; public final HLEModuleFunction sceKernelPrintfFunction = new HLEModuleFunction("SysMemUserForUser", "sceKernelPrintf") { @Override public final void execute(Processor processor) { sceKernelPrintf(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.SysMemUserForUserModule.sceKernelPrintf(processor);"; } }; public final HLEModuleFunction sceKernelDevkitVersionFunction = new HLEModuleFunction("SysMemUserForUser", "sceKernelDevkitVersion") { @Override public final void execute(Processor processor) { sceKernelDevkitVersion(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.SysMemUserForUserModule.sceKernelDevkitVersion(processor);"; } }; };