Small fixes

This commit is contained in:
DH 2014-02-16 10:28:32 +02:00
parent 3fdb50b0ea
commit 01f3763eb4
6 changed files with 24 additions and 23 deletions

View file

@ -1,17 +1,18 @@
#include "stdafx.h"
#include "Emu/SysCalls/SysCalls.h"
int sys_tty_read(s32 ch, u64 buf_addr, u32 len, u64 preadlen_addr)
int sys_tty_read(u32 ch, u64 buf_addr, u32 len, u64 preadlen_addr)
{
ConLog.Warning("sys_tty_read: ch: %d, buf addr: %llx, len: %d", ch, buf_addr, len);
Memory.Write32NN(preadlen_addr, len);
Emu.Pause();
return CELL_OK;
}
int sys_tty_write(s32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr)
int sys_tty_write(u32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr)
{
if(ch < 0 || ch > 15 || (s32)len <= 0) return CELL_EINVAL;
if(ch > 15 || (s32)len <= 0) return CELL_EINVAL;
if(!Memory.IsGoodAddr(buf_addr)) return CELL_EFAULT;
Emu.GetDbgCon().Write(ch, Memory.ReadString(buf_addr, len));