Work around for strange idling issue, various fixes

This commit is contained in:
Henrik Rydgard committed 2012-12-17 23:33:24 +01:00
1 parent 5ff2bf84ef
commit 3bd5cfed73
4 files changed
+28 -6

No files matched your search

+2
View File
@@ -504,6 +504,8 @@ void Idle(int maxIdle)
idledCycles += cyclesDown;
downcount -= cyclesDown;
if (downcount == 0)
downcount = -1;
}
std::string GetScheduledEventsSummary()
+9 -4
View File
@@ -359,13 +359,18 @@ void sceDisplayWaitVblankStartMultiCB()
__KernelWaitCurThread(WAITTYPE_VBLANK, 0, 0, 0, true);
}
void sceDisplayGetVcount()
u32 sceDisplayGetVcount()
{
// Too spammy
// DEBUG_LOG(HLE,"%i=sceDisplayGetVcount()", vCount);
// Games like Puyo Puyo call this in a tight loop at end-of-frame. We could have it consume some time from CoreTiming?
// Puyo Puyo Fever polls this as a substitute for waiting vblank.
// As a result, the game never gets to reschedule so it doesn't mix audio and things break.
// I added this as a workaround until we figure out what call actually does reschedule - it doesn't call much though...
CoreTiming::Idle(1000000);
RETURN(vCount);
__KernelReSchedule(); // Puyo puyo hack?
return vCount;
}
void sceDisplayGetCurrentHcount()
@@ -403,7 +408,7 @@ const HLEFunction sceDisplay[] =
{0xdba6c4c4,WrapF_V<sceDisplayGetFramePerSec>,"sceDisplayGetFramePerSec"},
{0x773dd3a3,sceDisplayGetCurrentHcount,"sceDisplayGetCurrentHcount"},
{0x210eab3a,sceDisplayGetAccumulatedHcount,"sceDisplayGetAccumulatedHcount"},
{0x9C6EAAD7,sceDisplayGetVcount,"sceDisplayGetVcount"},
{0x9C6EAAD7,WrapU_V<sceDisplayGetVcount>,"sceDisplayGetVcount"},
{0xDEA197D4,0,"sceDisplayGetMode"},
{0x7ED59BC4,0,"sceDisplaySetHoldMode"},
{0xA544C486,0,"sceDisplaySetResumeMode"},
+15 -1
View File
@@ -300,6 +300,19 @@ u32 sceUmdGetErrorStat()
return umdErrorStat;
}
u32 sceUmdReplaceProhibit()
{
DEBUG_LOG(HLE,"sceUmdReplaceProhibit()");
return 0;
}
u32 sceUmdReplacePermit()
{
DEBUG_LOG(HLE,"sceUmdReplacePermit()");
return 0;
}
const HLEFunction sceUmdUser[] =
{
@@ -316,7 +329,8 @@ const HLEFunction sceUmdUser[] =
{0x340B7686,WrapU_U<sceUmdGetDiscInfo>,"sceUmdGetDiscInfo"},
{0xAEE7404D,&WrapU_U<sceUmdRegisterUMDCallBack>,"sceUmdRegisterUMDCallBack"},
{0xBD2BDE07,&WrapU_U<sceUmdUnRegisterUMDCallBack>,"sceUmdUnRegisterUMDCallBack"},
{0x87533940,0,"sceUmdReplaceProhibit"}, // ??? sounds bogus
{0x87533940,WrapU_V<sceUmdReplaceProhibit>,"sceUmdReplaceProhibit"},
{0x87533940,WrapU_V<sceUmdReplacePermit>,"sceUmdReplacePermit"},
};
void Register_sceUmdUser()
+2 -1
View File
@@ -47,7 +47,8 @@ GLES_GPU::GLES_GPU(int renderWidth, int renderHeight)
: interruptsEnabled_(true),
renderWidth_(renderWidth),
renderHeight_(renderHeight),
dlIdGenerator(1)
dlIdGenerator(1),
displayFramebufPtr_(0)
{
renderWidthFactor_ = (float)renderWidth / 480.0f;
renderHeightFactor_ = (float)renderHeight / 272.0f;