- Improved sc function binder.

- Improved GLGSRender.
This commit is contained in:
DH
2013-06-30 11:46:29 +03:00
parent 3bb7a299ca
commit 5753edf6ef
133 changed files with 13624 additions and 3898 deletions
+5 -15
View File
@@ -1,28 +1,18 @@
#include "stdafx.h"
#include "Emu/SysCalls/SysCalls.h"
int SysCalls::lv2TtyRead(PPUThread& CPU)
int sys_tty_read(u32 ch, u64 buf_addr, u32 len, u64 preadlen_addr)
{
const u32 ch = CPU.GPR[3];
const u64 buf_addr = CPU.GPR[4];
const u32 len = CPU.GPR[5];
const u64 preadlen_addr = CPU.GPR[6];
ConLog.Warning("lv2TtyRead: ch: %d, buf addr: %llx, len: %d", ch, buf_addr, len);
ConLog.Warning("sys_tty_read: ch: %d, buf addr: %llx, len: %d", ch, buf_addr, len);
Memory.Write32NN(preadlen_addr, len);
return CELL_OK;
}
int SysCalls::lv2TtyWrite(PPUThread& CPU)
int sys_tty_write(u32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr)
{
const u32 ch = CPU.GPR[3];
const u64 buf_addr = CPU.GPR[4];
const u32 len = CPU.GPR[5];
const u64 pwritelen_addr = CPU.GPR[6];
//for(uint i=0; i<32; ++i) ConLog.Write("r%d = 0x%llx", i, CPU.GPR[i]);
//ConLog.Warning("lv2TtyWrite: ch: %d, buf addr: %llx, len: %d", ch, buf_addr, len);
if(ch < 0 || ch > 15 || len <= 0) return CELL_EINVAL;
if(!Memory.IsGoodAddr(buf_addr)) return CELL_EINVAL;
if(!Memory.IsGoodAddr(buf_addr)) return CELL_EFAULT;
Emu.GetDbgCon().Write(ch, Memory.ReadString(buf_addr, len));
@@ -31,4 +21,4 @@ int SysCalls::lv2TtyWrite(PPUThread& CPU)
Memory.Write32(pwritelen_addr, len);
return CELL_OK;
}
}