Error and reporting for sceGeBreak's second param.

This commit is contained in:
Unknown W. Brackets 2013-09-21 19:07:02 -07:00
parent 6ffbf3964a
commit e10ae1530b
2 changed files with 20 additions and 6 deletions

View file

@ -403,10 +403,24 @@ int sceGeContinue()
return gpu->Continue();
}
int sceGeBreak(u32 mode)
int sceGeBreak(u32 mode, u32 unknownPtr)
{
if (mode > 1)
{
WARN_LOG(SCEGE, "sceGeBreak(mode=%d, unknown=%08x): invalid mode", mode, unknownPtr);
return SCE_KERNEL_ERROR_INVALID_MODE;
}
// Not sure what this is supposed to be for...
if ((int)unknownPtr < 0 || (int)unknownPtr + 16 < 0)
{
WARN_LOG_REPORT(SCEGE, "sceGeBreak(mode=%d, unknown=%08x): invalid ptr", mode, unknownPtr);
return 0x80000023;
}
else if (unknownPtr != 0)
WARN_LOG_REPORT(SCEGE, "sceGeBreak(mode=%d, unknown=%08x): unknown ptr (%s)", mode, unknownPtr, Memory::IsValidAddress(unknownPtr) ? "valid" : "invalid");
//mode => 0 : current dlist 1: all drawing
DEBUG_LOG(SCEGE, "sceGeBreak(mode=%d)", mode);
DEBUG_LOG(SCEGE, "sceGeBreak(mode=%d, unknown=%08x)", mode, unknownPtr);
return gpu->Break(mode);
}
@ -601,7 +615,7 @@ const HLEFunction sceGe_user[] =
{0xE0D68148, WrapI_UU<sceGeListUpdateStallAddr>, "sceGeListUpdateStallAddr"},
{0x03444EB4, WrapI_UU<sceGeListSync>, "sceGeListSync"},
{0xB287BD61, WrapU_U<sceGeDrawSync>, "sceGeDrawSync"},
{0xB448EC0D, WrapI_U<sceGeBreak>, "sceGeBreak"},
{0xB448EC0D, WrapI_UU<sceGeBreak>, "sceGeBreak"},
{0x4C06E472, WrapI_V<sceGeContinue>, "sceGeContinue"},
{0xA4FC06A4, WrapU_U<sceGeSetCallback>, "sceGeSetCallback"},
{0x05DB22CE, WrapI_U<sceGeUnsetCallback>, "sceGeUnsetCallback"},

View file

@ -377,7 +377,7 @@ u32 GPUCommon::Break(int mode) {
return SCE_KERNEL_ERROR_INVALID_MODE;
if (!currentList)
return 0x80000020;
return SCE_KERNEL_ERROR_ALREADY;
if (mode == 1)
{
@ -410,9 +410,9 @@ u32 GPUCommon::Break(int mode) {
ERROR_LOG_REPORT(G3D, "sceGeBreak: can't break signal-pausing list");
}
else
return 0x80000020;
return SCE_KERNEL_ERROR_ALREADY;
}
return 0x80000021;
return SCE_KERNEL_ERROR_BUSY;
}
if (currentList->state == PSP_GE_DL_STATE_QUEUED)