/* 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 Uart4ForKernel implements HLEModule { @Override public String getName() { return "Uart4ForKernel"; } @Override public void installModule(HLEModuleManager mm, int version) { if (version >= 150) { mm.addFunction(sceKernelUart4InitFunction, 0xD00E3D06); mm.addFunction(sceKernelUart4SetBpsFunction, 0xA68555F7); mm.addFunction(sceKernelUart4PostCharFunction, 0xC703109F); mm.addFunction(sceKernelUart4SendCharFunction, 0xC0BE3133); mm.addFunction(sceKernelUart4SendBytesFunction, 0xD91079E3); mm.addFunction(sceKernelUart4SendCharFixFunction, 0x69BCBEF1); mm.addFunction(sceKernelUart4SendBytesFixFunction, 0x2518C2F3); mm.addFunction(sceKernelUart4ReceiveBytesFixFunction, 0x2FD96F62); } } @Override public void uninstallModule(HLEModuleManager mm, int version) { if (version >= 150) { mm.removeFunction(sceKernelUart4InitFunction); mm.removeFunction(sceKernelUart4SetBpsFunction); mm.removeFunction(sceKernelUart4PostCharFunction); mm.removeFunction(sceKernelUart4SendCharFunction); mm.removeFunction(sceKernelUart4SendBytesFunction); mm.removeFunction(sceKernelUart4SendCharFixFunction); mm.removeFunction(sceKernelUart4SendBytesFixFunction); mm.removeFunction(sceKernelUart4ReceiveBytesFixFunction); } } public void sceKernelUart4Init(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4Init [0xD00E3D06]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelUart4SetBps(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4SetBps [0xA68555F7]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelUart4PostChar(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4PostChar [0xC703109F]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelUart4SendChar(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4SendChar [0xC0BE3133]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelUart4SendBytes(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4SendBytes [0xD91079E3]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelUart4SendCharFix(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4SendCharFix [0x69BCBEF1]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelUart4SendBytesFix(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4SendBytesFix [0x2518C2F3]"); cpu.gpr[2] = 0xDEADC0DE; } public void sceKernelUart4ReceiveBytesFix(Processor processor) { CpuState cpu = processor.cpu; Modules.log.debug("Unimplemented NID function sceKernelUart4ReceiveBytesFix [0x2FD96F62]"); cpu.gpr[2] = 0xDEADC0DE; } public final HLEModuleFunction sceKernelUart4InitFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4Init") { @Override public final void execute(Processor processor) { sceKernelUart4Init(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4Init(processor);"; } }; public final HLEModuleFunction sceKernelUart4SetBpsFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4SetBps") { @Override public final void execute(Processor processor) { sceKernelUart4SetBps(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4SetBps(processor);"; } }; public final HLEModuleFunction sceKernelUart4PostCharFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4PostChar") { @Override public final void execute(Processor processor) { sceKernelUart4PostChar(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4PostChar(processor);"; } }; public final HLEModuleFunction sceKernelUart4SendCharFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4SendChar") { @Override public final void execute(Processor processor) { sceKernelUart4SendChar(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4SendChar(processor);"; } }; public final HLEModuleFunction sceKernelUart4SendBytesFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4SendBytes") { @Override public final void execute(Processor processor) { sceKernelUart4SendBytes(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4SendBytes(processor);"; } }; public final HLEModuleFunction sceKernelUart4SendCharFixFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4SendCharFix") { @Override public final void execute(Processor processor) { sceKernelUart4SendCharFix(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4SendCharFix(processor);"; } }; public final HLEModuleFunction sceKernelUart4SendBytesFixFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4SendBytesFix") { @Override public final void execute(Processor processor) { sceKernelUart4SendBytesFix(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4SendBytesFix(processor);"; } }; public final HLEModuleFunction sceKernelUart4ReceiveBytesFixFunction = new HLEModuleFunction("Uart4ForKernel", "sceKernelUart4ReceiveBytesFix") { @Override public final void execute(Processor processor) { sceKernelUart4ReceiveBytesFix(processor); } @Override public final String compiledString() { return "jpcsp.HLE.Modules.Uart4ForKernelModule.sceKernelUart4ReceiveBytesFix(processor);"; } }; };