@@ -9,6 +9,7 @@ using namespace Iop;
99#define FUNCTION_WAITVBLANKSTART " WaitVblankStart"
1010#define FUNCTION_WAITVBLANKEND " WaitVblankEnd"
1111#define FUNCTION_WAITVBLANK " WaitVblank"
12+ #define FUNCTION_WAITNONVBLANK " WaitNonVblank"
1213#define FUNCTION_REGISTERVBLANKHANDLER " RegisterVblankHandler"
1314#define FUNCTION_RELEASEVBLANKHANDLER " ReleaseVblankHandler"
1415
@@ -35,6 +36,9 @@ std::string CVblank::GetFunctionName(unsigned int functionId) const
3536 case 6 :
3637 return FUNCTION_WAITVBLANK;
3738 break ;
39+ case 7 :
40+ return FUNCTION_WAITNONVBLANK;
41+ break ;
3842 case 8 :
3943 return FUNCTION_REGISTERVBLANKHANDLER;
4044 break ;
@@ -60,6 +64,9 @@ void CVblank::Invoke(CMIPS& context, unsigned int functionId)
6064 case 6 :
6165 context.m_State .nGPR [CMIPS::V0].nD0 = WaitVblank ();
6266 break ;
67+ case 7 :
68+ context.m_State .nGPR [CMIPS::V0].nD0 = WaitNonVblank ();
69+ break ;
6370 case 8 :
6471 context.m_State .nGPR [CMIPS::V0].nD0 = RegisterVblankHandler (
6572 context.m_State .nGPR [CMIPS::A0].nV0 ,
@@ -106,6 +113,15 @@ int32 CVblank::WaitVblank()
106113 return 0 ;
107114}
108115
116+ int32 CVblank::WaitNonVblank ()
117+ {
118+ #ifdef _DEBUG
119+ CLog::GetInstance ().Print (LOG_NAME, FUNCTION_WAITNONVBLANK " ();\r\n " );
120+ #endif
121+ m_bios.SleepThreadTillVBlankEnd ();
122+ return 0 ;
123+ }
124+
109125int32 CVblank::RegisterVblankHandler (uint32 startEnd, uint32 priority, uint32 handlerPtr, uint32 handlerParam)
110126{
111127#ifdef _DEBUG
0 commit comments