mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Revert "Wraped some functions, removed some spaces"
This reverts commit 1c62f75a04c39b1bc9568a79a7a8eee18cc56542.
This commit is contained in:
1 parent
062838da8a
commit
ebc669c0f6
3 files changed
+71
-65
No files matched your search
+11
-11
@@ -76,7 +76,7 @@ const HLEFunction UtilsForUser[] =
|
||||
{0x91E4F6A7, WrapU_V<sceKernelLibcClock>, "sceKernelLibcClock"},
|
||||
{0x27CC57F0, WrapU_U<sceKernelLibcTime>, "sceKernelLibcTime"},
|
||||
{0x71EC4271, WrapU_U<sceKernelLibcGettimeofday>, "sceKernelLibcGettimeofday"},
|
||||
{0xBFA98062, WrapI_UI<sceKernelDcacheInvalidateRange>, "sceKernelDcacheInvalidateRange"},
|
||||
{0xBFA98062, WrapI_UI<sceKernelDcacheInvalidateRange>, "sceKernelDcacheInvalidateRange"},
|
||||
{0xC8186A58, 0, "sceKernelUtilsMd5Digest"},
|
||||
{0x9E5C5086, 0, "sceKernelUtilsMd5BlockInit"},
|
||||
{0x61E1E525, 0, "sceKernelUtilsMd5BlockUpdate"},
|
||||
@@ -87,18 +87,18 @@ const HLEFunction UtilsForUser[] =
|
||||
{0x585F1C09, 0, "sceKernelUtilsSha1BlockResult"},
|
||||
{0xE860E75E, 0, "sceKernelUtilsMt19937Init"},
|
||||
{0x06FB8A63, 0, "sceKernelUtilsMt19937UInt"},
|
||||
{0x37FB5C42, WrapU_V<sceKernelGetGPI>, "sceKernelGetGPI"},
|
||||
{0x6AD345D7, WrapV_U<sceKernelSetGPO>, "sceKernelSetGPO"},
|
||||
{0x79D1C3FA, WrapI_V<sceKernelDcacheWritebackAll>, "sceKernelDcacheWritebackAll"},
|
||||
{0xB435DEC5, WrapI_V<sceKernelDcacheWritebackInvalidateAll>, "sceKernelDcacheWritebackInvalidateAll"},
|
||||
{0x3EE30821, WrapI_UI<sceKernelDcacheWritebackRange>, "sceKernelDcacheWritebackRange"},
|
||||
{0x34B9FA9E, WrapI_UI<sceKernelDcacheWritebackInvalidateRange>, "sceKernelDcacheWritebackInvalidateRange"},
|
||||
{0x37FB5C42, WrapU_V<sceKernelGetGPI>, "sceKernelGetGPI"},
|
||||
{0x6AD345D7, WrapV_U<sceKernelSetGPO>, "sceKernelSetGPO"},
|
||||
{0x79D1C3FA, WrapI_V<sceKernelDcacheWritebackAll>, "sceKernelDcacheWritebackAll"},
|
||||
{0xB435DEC5, WrapI_V<sceKernelDcacheWritebackInvalidateAll>, "sceKernelDcacheWritebackInvalidateAll"},
|
||||
{0x3EE30821, WrapI_UI<sceKernelDcacheWritebackRange>, "sceKernelDcacheWritebackRange"},
|
||||
{0x34B9FA9E, WrapI_UI<sceKernelDcacheWritebackInvalidateRange>, "sceKernelDcacheWritebackInvalidateRange"},
|
||||
{0xC2DF770E, 0, "sceKernelIcacheInvalidateRange"},
|
||||
{0x80001C4C, 0, "sceKernelDcacheProbe"},
|
||||
{0x16641D70, 0, "sceKernelDcacheReadTag"},
|
||||
{0x4FD31C9D, 0, "sceKernelIcacheProbe"},
|
||||
{0xFB05FAD0, 0, "sceKernelIcacheReadTag"},
|
||||
{0x920f104a, WrapU_V<sceKernelIcacheInvalidateAll>, "sceKernelIcacheInvalidateAll"}
|
||||
{0x920f104a, WrapU_V<sceKernelIcacheInvalidateAll>, "sceKernelIcacheInvalidateAll"}
|
||||
};
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ const HLEFunction LoadCoreForKernel[] =
|
||||
{0xB4D6FECC, 0, "sceKernelApplyElfRelSection"},
|
||||
{0x54AB2675, 0, "LoadCoreForKernel_54AB2675"},
|
||||
{0x2952F5AC, 0, "sceKernelDcacheWBinvAll"},
|
||||
{0xD8779AC6, WrapU_V<sceKernelIcacheClearAll>, "sceKernelIcacheClearAll"},
|
||||
{0xD8779AC6, WrapU_V<sceKernelIcacheClearAll>, "sceKernelIcacheClearAll"},
|
||||
{0x99A695F0, 0, "sceKernelRegisterLibrary"},
|
||||
{0x5873A31F, 0, "sceKernelRegisterLibraryForUser"},
|
||||
{0x0B464512, 0, "sceKernelReleaseLibrary"},
|
||||
@@ -148,7 +148,7 @@ const HLEFunction LoadCoreForKernel[] =
|
||||
{0xCCE4A157, 0, "sceKernelFindModuleByUID"},
|
||||
{0x82CE54ED, 0, "sceKernelModuleCount"},
|
||||
{0xC0584F0C, 0, "sceKernelGetModuleList"},
|
||||
{0xCF8A41B1, WrapU_V<sceKernelFindModuleByName>,"sceKernelFindModuleByName"},
|
||||
{0xCF8A41B1, WrapU_V<sceKernelFindModuleByName>,"sceKernelFindModuleByName"},
|
||||
};
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ const HLEFunction KDebugForKernel[] =
|
||||
{0x2FF4E9F9, 0, "sceKernelAssert"},
|
||||
{0x9B868276, 0, "sceKernelGetDebugPutchar"},
|
||||
{0xE146606D, 0, "sceKernelRegisterDebugPutchar"},
|
||||
{0x7CEB2C09, WrapU_V<sceKernelRegisterKprintfHandler>, "sceKernelRegisterKprintfHandler"},
|
||||
{0x7CEB2C09, WrapU_V<sceKernelRegisterKprintfHandler>, "sceKernelRegisterKprintfHandler"},
|
||||
{0x84F370BC, 0, "Kprintf"},
|
||||
{0x5CE9838B, 0, "sceKernelDebugWrite"},
|
||||
{0x66253C4E, 0, "sceKernelRegisterDebugWrite"},
|
||||
|
||||
+54
-54
@@ -95,11 +95,11 @@ void hleLeaveVblank(u64 userdata, int cyclesLate);
|
||||
|
||||
void __DisplayInit() {
|
||||
gpuStats.reset();
|
||||
hasSetMode = false;
|
||||
framebufIsLatched = false;
|
||||
hasSetMode = false;
|
||||
framebufIsLatched = false;
|
||||
framebuf.topaddr = 0x04000000;
|
||||
framebuf.pspFramebufFormat = PSP_DISPLAY_PIXEL_FORMAT_8888;
|
||||
framebuf.pspFramebufLinesize = 480; // ??
|
||||
framebuf.pspFramebufLinesize = 480; // ??
|
||||
|
||||
enterVblankEvent = CoreTiming::RegisterEvent("EnterVBlank", &hleEnterVblank);
|
||||
leaveVblankEvent = CoreTiming::RegisterEvent("LeaveVBlank", &hleLeaveVblank);
|
||||
@@ -111,7 +111,7 @@ void __DisplayInit() {
|
||||
hCountTotal = 0;
|
||||
lastFrameTime = 0;
|
||||
|
||||
InitGfxState();
|
||||
InitGfxState();
|
||||
}
|
||||
|
||||
void __DisplayDoState(PointerWrap &p) {
|
||||
@@ -146,7 +146,7 @@ void __DisplayDoState(PointerWrap &p) {
|
||||
gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.pspFramebufLinesize, framebuf.pspFramebufFormat);
|
||||
}
|
||||
|
||||
p.DoMarker("sceDisplay");
|
||||
p.DoMarker("sceDisplay");
|
||||
}
|
||||
|
||||
void __DisplayShutdown() {
|
||||
@@ -256,33 +256,33 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
|
||||
host->EndFrame();
|
||||
|
||||
#ifdef _WIN32
|
||||
static double lastFrameTime = 0.0;
|
||||
// Best place to throttle the frame rate on non vsynced platforms is probably here. Let's try it.
|
||||
time_update();
|
||||
if (lastFrameTime == 0.0)
|
||||
lastFrameTime = time_now_d();
|
||||
if (!GetAsyncKeyState(VK_TAB)) {
|
||||
while (time_now_d() < lastFrameTime + 1.0 / 60.0) {
|
||||
Common::SleepCurrentThread(1);
|
||||
time_update();
|
||||
}
|
||||
// Advance lastFrameTime by a constant amount each frame,
|
||||
// but don't let it get too far behind.
|
||||
lastFrameTime = std::max(lastFrameTime + 1.0 / 60.0, time_now_d() - 1.5 / 60.0);
|
||||
}
|
||||
static double lastFrameTime = 0.0;
|
||||
// Best place to throttle the frame rate on non vsynced platforms is probably here. Let's try it.
|
||||
time_update();
|
||||
if (lastFrameTime == 0.0)
|
||||
lastFrameTime = time_now_d();
|
||||
if (!GetAsyncKeyState(VK_TAB)) {
|
||||
while (time_now_d() < lastFrameTime + 1.0 / 60.0) {
|
||||
Common::SleepCurrentThread(1);
|
||||
time_update();
|
||||
}
|
||||
// Advance lastFrameTime by a constant amount each frame,
|
||||
// but don't let it get too far behind.
|
||||
lastFrameTime = std::max(lastFrameTime + 1.0 / 60.0, time_now_d() - 1.5 / 60.0);
|
||||
}
|
||||
|
||||
// We are going to have to do something about audio timing for platforms that
|
||||
// are vsynced to something that's not exactly 60fps..
|
||||
// We are going to have to do something about audio timing for platforms that
|
||||
// are vsynced to something that's not exactly 60fps..
|
||||
|
||||
#endif
|
||||
|
||||
host->BeginFrame();
|
||||
gpu->BeginFrame();
|
||||
host->BeginFrame();
|
||||
gpu->BeginFrame();
|
||||
|
||||
// Tell the emu core that it's time to stop emulating
|
||||
// Win32 doesn't need this.
|
||||
// Tell the emu core that it's time to stop emulating
|
||||
// Win32 doesn't need this.
|
||||
#ifndef _WIN32
|
||||
coreState = CORE_NEXTFRAME;
|
||||
coreState = CORE_NEXTFRAME;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -312,36 +312,36 @@ u32 sceDisplaySetMode(u32 unknown, u32 xres, u32 yres) {
|
||||
}
|
||||
|
||||
u32 sceDisplaySetFramebuf() {
|
||||
u32 topaddr = PARAM(0);
|
||||
int linesize = PARAM(1);
|
||||
int pixelformat = PARAM(2);
|
||||
int sync = PARAM(3);
|
||||
u32 topaddr = PARAM(0);
|
||||
int linesize = PARAM(1);
|
||||
int pixelformat = PARAM(2);
|
||||
int sync = PARAM(3);
|
||||
|
||||
FrameBufferState fbstate;
|
||||
DEBUG_LOG(HLE,"sceDisplaySetFramebuf(topaddr=%08x,linesize=%d,pixelsize=%d,sync=%d)",topaddr,linesize,pixelformat,sync);
|
||||
if (topaddr == 0) {
|
||||
DEBUG_LOG(HLE,"- screen off");
|
||||
} else {
|
||||
fbstate.topaddr = topaddr;
|
||||
fbstate.pspFramebufFormat = (PspDisplayPixelFormat)3;
|
||||
fbstate.pspFramebufLinesize = linesize;
|
||||
}
|
||||
FrameBufferState fbstate;
|
||||
DEBUG_LOG(HLE,"sceDisplaySetFramebuf(topaddr=%08x,linesize=%d,pixelsize=%d,sync=%d)",topaddr,linesize,pixelformat,sync);
|
||||
if (topaddr == 0) {
|
||||
DEBUG_LOG(HLE,"- screen off");
|
||||
} else {
|
||||
fbstate.topaddr = topaddr;
|
||||
fbstate.pspFramebufFormat = (PspDisplayPixelFormat)pixelformat;
|
||||
fbstate.pspFramebufLinesize = linesize;
|
||||
}
|
||||
|
||||
if (sync == PSP_DISPLAY_SETBUF_IMMEDIATE) {
|
||||
// Write immediately to the current framebuffer parameters
|
||||
if (topaddr != 0)
|
||||
{
|
||||
framebuf = fbstate;
|
||||
gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.pspFramebufLinesize, framebuf.pspFramebufFormat);
|
||||
}
|
||||
else
|
||||
WARN_LOG(HLE, "%s: PSP_DISPLAY_SETBUF_IMMEDIATE without topaddr?", __FUNCTION__);
|
||||
} else if (topaddr != 0) {
|
||||
// Delay the write until vblank
|
||||
latchedFramebuf = fbstate;
|
||||
framebufIsLatched = true;
|
||||
}
|
||||
return 0;
|
||||
if (sync == PSP_DISPLAY_SETBUF_IMMEDIATE) {
|
||||
// Write immediately to the current framebuffer parameters
|
||||
if (topaddr != 0)
|
||||
{
|
||||
framebuf = fbstate;
|
||||
gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.pspFramebufLinesize, framebuf.pspFramebufFormat);
|
||||
}
|
||||
else
|
||||
WARN_LOG(HLE, "%s: PSP_DISPLAY_SETBUF_IMMEDIATE without topaddr?", __FUNCTION__);
|
||||
} else if (topaddr != 0) {
|
||||
// Delay the write until vblank
|
||||
latchedFramebuf = fbstate;
|
||||
framebufIsLatched = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sceDisplayGetFramebuf(u32 topaddrPtr, u32 linesizePtr, u32 pixelFormatPtr, int mode) {
|
||||
|
||||
@@ -1717,6 +1717,7 @@ void sceKernelDelayThreadCB()
|
||||
{
|
||||
u32 usec = PARAM(0);
|
||||
if (usec < 200) usec = 200;
|
||||
DEBUG_LOG(HLE,"sceKernelDelayThreadCB(%i usec)",usec);
|
||||
|
||||
SceUID curThread = __KernelGetCurThread();
|
||||
__KernelScheduleWakeup(curThread, usec);
|
||||
@@ -2205,6 +2206,11 @@ void __KernelSwitchContext(Thread *target, const char *reason)
|
||||
}
|
||||
currentThread = target->GetUID();
|
||||
__KernelLoadContext(&target->context);
|
||||
DEBUG_LOG(HLE,"Context switched: %s -> %s (%s) (%i - pc: %08x -> %i - pc: %08x)",
|
||||
oldName, target->GetName(),
|
||||
reason,
|
||||
oldUID, oldPC, target->GetUID(), currentMIPS->pc);
|
||||
|
||||
// No longer waiting.
|
||||
target->nt.waitType = WAITTYPE_NONE;
|
||||
target->nt.waitID = 0;
|
||||
|
||||
Reference in new issue
Block a user