Merge pull request #542 from raven02/master

Implement sceKernelDevkitVersion()
This commit is contained in:
Henrik Rydgård 2013-01-30 23:49:27 -08:00
commit be5b673c19
3 changed files with 12 additions and 7 deletions

View File

@ -215,11 +215,16 @@ u32 sceKernelRegisterExitCallback(u32 cbId)
return 0;
}
// TODO: What?
void sceKernelDevkitVersion()
u32 sceKernelDevkitVersion()
{
ERROR_LOG(HLE,"unimpl sceKernelDevkitVersion");
RETURN(1);
int firmwareVersion = 150;
int major = firmwareVersion / 100;
int minor = (firmwareVersion / 10) % 10;
int revision = firmwareVersion % 10;
int devkitVersion = (major << 24) | (minor << 16) | (revision << 8) | 0x10;
DEBUG_LOG(HLE,"sceKernelDevkitVersion (%i) ", devkitVersion);
return devkitVersion;
}
u32 sceKernelRegisterKprintfHandler()

View File

@ -286,7 +286,7 @@ void sceKernelExitGame();
void sceKernelSleepThread();
void sceKernelSleepThreadCB();
void sceKernelDevkitVersion();
u32 sceKernelDevkitVersion();
u32 sceKernelRegisterKprintfHandler();
void sceKernelRegisterDefaultExceptionHandler();

View File

@ -1125,9 +1125,9 @@ u32 GetMemoryBlockPtr(u32 uid, u32 addr) {
}
const HLEFunction SysMemUserForUser[] = {
{0xA291F107,sceKernelMaxFreeMemSize, "sceKernelMaxFreeMemSize"},
{0xA291F107,sceKernelMaxFreeMemSize,"sceKernelMaxFreeMemSize"},
{0xF919F628,sceKernelTotalFreeMemSize,"sceKernelTotalFreeMemSize"},
{0x3FC9AE6A,sceKernelDevkitVersion, "sceKernelDevkitVersion"},
{0x3FC9AE6A,WrapU_V<sceKernelDevkitVersion>,"sceKernelDevkitVersion"},
{0x237DBD4F,sceKernelAllocPartitionMemory,"sceKernelAllocPartitionMemory"}, //(int size) ?
{0xB6D61D02,sceKernelFreePartitionMemory,"sceKernelFreePartitionMemory"}, //(void *ptr) ?
{0x9D9A5BA1,sceKernelGetBlockHeadAddr,"sceKernelGetBlockHeadAddr"}, //(void *ptr) ?