mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 23:40:39 +00:00
Stub sceIoChstat and an icache invalidate function
This commit is contained in:
parent
a219b33e1e
commit
e20e5f49b9
@ -96,7 +96,7 @@ const HLEFunction UtilsForUser[] =
|
||||
{0xB435DEC5, WrapI_V<sceKernelDcacheWritebackInvalidateAll>, "sceKernelDcacheWritebackInvalidateAll"},
|
||||
{0x3EE30821, WrapI_UI<sceKernelDcacheWritebackRange>, "sceKernelDcacheWritebackRange"},
|
||||
{0x34B9FA9E, WrapI_UI<sceKernelDcacheWritebackInvalidateRange>, "sceKernelDcacheWritebackInvalidateRange"},
|
||||
{0xC2DF770E, 0, "sceKernelIcacheInvalidateRange"},
|
||||
{0xC2DF770E, WrapI_UI<sceKernelIcacheInvalidateRange>, "sceKernelIcacheInvalidateRange"},
|
||||
{0x80001C4C, 0, "sceKernelDcacheProbe"},
|
||||
{0x16641D70, 0, "sceKernelDcacheReadTag"},
|
||||
{0x4FD31C9D, 0, "sceKernelIcacheProbe"},
|
||||
|
@ -84,6 +84,14 @@ umd01: block access - umd
|
||||
#define O_NOWAIT 0x8000
|
||||
#define O_NPDRM 0x40000000
|
||||
|
||||
// chstat
|
||||
#define SCE_CST_MODE 0x0001
|
||||
#define SCE_CST_ATTR 0x0002
|
||||
#define SCE_CST_SIZE 0x0004
|
||||
#define SCE_CST_CT 0x0008
|
||||
#define SCE_CST_AT 0x0010
|
||||
#define SCE_CST_MT 0x0020
|
||||
#define SCE_CST_PRVT 0x0040
|
||||
|
||||
typedef s32 SceMode;
|
||||
typedef s64 SceOff;
|
||||
@ -404,6 +412,25 @@ u32 sceIoGetstat(const char *filename, u32 addr) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 sceIoChstat(const char *filename, u32 iostatptr, u32 changebits) {
|
||||
ERROR_LOG(HLE, "UNIMPL sceIoChstat(%s, %08x, %08x)", filename, iostatptr, changebits);
|
||||
if (changebits & SCE_CST_MODE)
|
||||
ERROR_LOG(HLE, "sceIoChstat: change mode requested");
|
||||
if (changebits & SCE_CST_ATTR)
|
||||
ERROR_LOG(HLE, "sceIoChstat: change attr requested");
|
||||
if (changebits & SCE_CST_SIZE)
|
||||
ERROR_LOG(HLE, "sceIoChstat: change size requested");
|
||||
if (changebits & SCE_CST_CT)
|
||||
ERROR_LOG(HLE, "sceIoChstat: change creation time requested");
|
||||
if (changebits & SCE_CST_AT)
|
||||
ERROR_LOG(HLE, "sceIoChstat: change access time requested");
|
||||
if (changebits & SCE_CST_MT)
|
||||
ERROR_LOG(HLE, "sceIoChstat: change modification time requested");
|
||||
if (changebits & SCE_CST_PRVT)
|
||||
ERROR_LOG(HLE, "sceIoChstat: change private data requested");
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 npdrmRead(FileNode *f, u8 *data, int size) {
|
||||
PGD_DESC *pgd = f->pgdInfo;
|
||||
u32 block, offset;
|
||||
@ -1448,7 +1475,7 @@ const HLEFunction IoFileMgrForUser[] = {
|
||||
{ 0xe95a012b, &WrapU_UUUUUU<sceIoIoctlAsync>, "sceIoIoctlAsync" },
|
||||
{ 0x63632449, &WrapU_UUUUUU<sceIoIoctl>, "sceIoIoctl" },
|
||||
{ 0xace946e8, &WrapU_CU<sceIoGetstat>, "sceIoGetstat" },
|
||||
{ 0xb8a740f4, 0, "sceIoChstat" },
|
||||
{ 0xb8a740f4, &WrapU_CUU<sceIoChstat>, "sceIoChstat" },
|
||||
{ 0x55f4717d, &WrapU_C<sceIoChdir>, "sceIoChdir" },
|
||||
{ 0x08bd7374, &WrapU_I<sceIoGetDevType>, "sceIoGetDevType" },
|
||||
{ 0xB2A628C1, &WrapU_UUUIUI<sceIoAssign>, "sceIoAssign" },
|
||||
|
@ -287,6 +287,13 @@ int sceKernelDcacheInvalidateRange(u32 addr, int size)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceKernelIcacheInvalidateRange(u32 addr, int size) {
|
||||
DEBUG_LOG(HLE,"sceKernelIcacheInvalidateRange(%08x, %i)", addr, size);
|
||||
// TODO: Make the JIT hash and compare the touched blocks.
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceKernelDcacheWritebackAll()
|
||||
{
|
||||
#ifdef LOG_CACHE
|
||||
@ -297,6 +304,7 @@ int sceKernelDcacheWritebackAll()
|
||||
gpu->InvalidateCacheHint(0, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceKernelDcacheWritebackRange(u32 addr, int size)
|
||||
{
|
||||
#ifdef LOG_CACHE
|
||||
|
@ -307,6 +307,7 @@ int sceKernelDcacheWritebackInvalidateAll();
|
||||
void sceKernelGetThreadStackFreeSize();
|
||||
u32 sceKernelIcacheInvalidateAll();
|
||||
u32 sceKernelIcacheClearAll();
|
||||
int sceKernelIcacheInvalidateRange(u32 addr, int size);
|
||||
|
||||
#define KERNELOBJECT_MAX_NAME_LENGTH 31
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user