mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 01:29:41 +01:00
Minor stuff: Fake-implement sceKernelReferThreadProfiler, make sure GPU frame dump logging gets output by not sending it to G3D.
This commit is contained in:
1 parent
bf23c6f5e1
commit
d4603136f0
4 files changed
+19
-9
No files matched your search
+13
-7
@@ -524,20 +524,26 @@ struct SystemStatus {
|
||||
SceUInt perfcounter3;
|
||||
};
|
||||
|
||||
u32 sceKernelReferSystemStatus(u32 statusPtr)
|
||||
{
|
||||
int sceKernelReferSystemStatus(u32 statusPtr) {
|
||||
DEBUG_LOG(HLE, "sceKernelReferSystemStatus(%08x)", statusPtr);
|
||||
if (Memory::IsValidAddress(statusPtr)) {
|
||||
SystemStatus status;
|
||||
memset(&status, 0, sizeof(SystemStatus));
|
||||
status.size = sizeof(SystemStatus);
|
||||
// TODO: Fill in the struct!
|
||||
Memory::WriteStruct(statusPtr, &status);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sceKernelReferGlobalProfiler(u32 statusPtr) {
|
||||
DEBUG_LOG(HLE, "sceKernelReferGlobalProfiler(%08x)", statusPtr);
|
||||
int sceKernelReferThreadProfiler(u32 statusPtr) {
|
||||
ERROR_LOG(HLE, "UNIMPL sceKernelReferThreadProfiler(%08x)", statusPtr);
|
||||
// Ignore for now
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceKernelReferGlobalProfiler(u32 statusPtr) {
|
||||
DEBUG_LOG(HLE, "UNIMPL sceKernelReferGlobalProfiler(%08x)", statusPtr);
|
||||
// Ignore for now
|
||||
return 0;
|
||||
}
|
||||
@@ -615,9 +621,9 @@ const HLEFunction ThreadManForUser[] =
|
||||
{0xdb738f35,WrapI_U<sceKernelGetSystemTime>,"sceKernelGetSystemTime"},
|
||||
{0x369ed59d,WrapU_V<sceKernelGetSystemTimeLow>,"sceKernelGetSystemTimeLow"},
|
||||
|
||||
{0x8218B4DD,&WrapU_U<sceKernelReferGlobalProfiler>,"sceKernelReferGlobalProfiler"},
|
||||
{0x627E6F3A,&WrapU_U<sceKernelReferSystemStatus>,"sceKernelReferSystemStatus"},
|
||||
{0x64D4540E,0,"sceKernelReferThreadProfiler"},
|
||||
{0x8218B4DD,WrapI_U<sceKernelReferGlobalProfiler>,"sceKernelReferGlobalProfiler"},
|
||||
{0x627E6F3A,WrapI_U<sceKernelReferSystemStatus>,"sceKernelReferSystemStatus"},
|
||||
{0x64D4540E,WrapI_U<sceKernelReferThreadProfiler>,"sceKernelReferThreadProfiler"},
|
||||
|
||||
//Fifa Street 2 uses alarms
|
||||
{0x6652b8ca,WrapI_UUU<sceKernelSetAlarm>,"sceKernelSetAlarm"},
|
||||
|
||||
@@ -199,15 +199,19 @@ void PPGeBegin()
|
||||
dataWritePtr = dataPtr;
|
||||
|
||||
// Set up the correct states for UI drawing
|
||||
WriteCmd(GE_CMD_OFFSETADDR, 0);
|
||||
WriteCmd(GE_CMD_ALPHABLENDENABLE, 1);
|
||||
WriteCmd(GE_CMD_BLENDMODE, 2 | (3 << 4));
|
||||
WriteCmd(GE_CMD_ALPHATESTENABLE, 0);
|
||||
WriteCmd(GE_CMD_COLORTESTENABLE, 0);
|
||||
WriteCmd(GE_CMD_ZTESTENABLE, 0);
|
||||
WriteCmd(GE_CMD_LIGHTINGENABLE, 0);
|
||||
WriteCmd(GE_CMD_FOGENABLE, 0);
|
||||
WriteCmd(GE_CMD_STENCILTESTENABLE, 0);
|
||||
WriteCmd(GE_CMD_CULLFACEENABLE, 0);
|
||||
WriteCmd(GE_CMD_CLEARMODE, 0); // Normal mode
|
||||
WriteCmd(GE_CMD_MASKRGB, 0);
|
||||
WriteCmd(GE_CMD_MASKALPHA, 0);
|
||||
|
||||
PPGeSetDefaultTexture();
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ void GLES_GPU::PreExecuteOp(u32 op, u32 diff) {
|
||||
if (flushBeforeCommand_[cmd] == 1 || (diff && flushBeforeCommand_[cmd] == 2))
|
||||
{
|
||||
if (dumpThisFrame_) {
|
||||
NOTICE_LOG(G3D, "================ FLUSH ================");
|
||||
NOTICE_LOG(HLE, "================ FLUSH ================");
|
||||
}
|
||||
transformDraw_.Flush();
|
||||
}
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ bool GPUCommon::InterpretList(DisplayList &list)
|
||||
if (dumpThisFrame_) {
|
||||
char temp[256];
|
||||
GeDisassembleOp(list.pc, op, prev, temp);
|
||||
NOTICE_LOG(G3D, "%s", temp);
|
||||
NOTICE_LOG(HLE, "%s", temp);
|
||||
}
|
||||
gstate.cmdmem[cmd] = op; // crashes if I try to put the whole op there??
|
||||
|
||||
|
||||
Reference in new issue
Block a user