示例#1
0
void Core_EnableStepping(bool step)
{
	if (step)
	{
		//PowerPC::Pause();
		// Sleep(1);
		sleep_ms(1);
#if _DEBUG
		host->SetDebugMode(true);
#endif
		coreState=CORE_STEPPING;
	}
	else
	{
#if _DEBUG
		host->SetDebugMode(false);
#endif
		coreState = CORE_RUNNING;
		//PowerPC::Start();
		///SetEvent(m_hStepEvent); //TODO: pulseevent is flawed and can be lost
		m_hStepEvent.notify_one();

	}

}
示例#2
0
文件: Core.cpp 项目: A671DR218/ppsspp
void Core_EnableStepping(bool step) {
	if (step) {
		sleep_ms(1);
#if defined(_DEBUG)
		host->SetDebugMode(true);
#endif
		m_hStepEvent.reset();
		Core_UpdateState(CORE_STEPPING);
	} else {
#if defined(_DEBUG)
		host->SetDebugMode(false);
#endif
		coreState = CORE_RUNNING;
		coreStatePending = false;
		m_hStepEvent.notify_one();
	}
}
示例#3
0
文件: Core.cpp 项目: A671DR218/ppsspp
void Core_Stop() {
	Core_UpdateState(CORE_POWERDOWN);
	Core_NotifyShutdown();
	m_hStepEvent.notify_one();
}
示例#4
0
文件: Core.cpp 项目: A671DR218/ppsspp
static inline void CoreStateProcessed() {
	if (coreStatePending) {
		coreStatePending = false;
		m_hInactiveEvent.notify_one();
	}
}
示例#5
0
文件: Core.cpp 项目: A671DR218/ppsspp
void Core_UpdateSingleStep() {
	m_hStepEvent.notify_one();
}
示例#6
0
文件: Core.cpp 项目: A671DR218/ppsspp
void Core_DoSingleStep() {
	singleStepPending = true;
	m_hStepEvent.notify_one();
}
示例#7
0
void QtHost::NextGPUStep()
{
	m_hGPUStepEvent.notify_one();
}
示例#8
0
文件: Core.cpp 项目: Bulkman/ppsspp
// Some platforms, like Android, do not call this function but handle things on their own.
void Core_Run()
{
#if defined(_DEBUG)
	host->UpdateDisassembly();
#endif
#if !defined(USING_QT_UI) || defined(USING_GLES2)
	while (true)
#endif
	{
reswitch:
		switch (coreState)
		{
		case CORE_RUNNING:
			//1: enter a fast runloop
			Core_RunLoop();
			break;

		// We should never get here on Android.
		case CORE_STEPPING:
			if (coreStatePending) {
				coreStatePending = false;
				m_hInactiveEvent.notify_one();
			}

			//1: wait for step command..
#if defined(USING_QT_UI) || defined(_DEBUG)
			host->UpdateDisassembly();
			host->UpdateMemView();
			host->SendCoreWait(true);
#endif

			m_hStepEvent.wait(m_hStepMutex);

#if defined(USING_QT_UI) || defined(_DEBUG)
			host->SendCoreWait(false);
#endif
			if (coreState == CORE_POWERDOWN)
				return;
			if (coreState != CORE_STEPPING)
#if defined(USING_QT_UI) && !defined(USING_GLES2)
				return;
#else
				goto reswitch;
#endif

			currentCPU = &mipsr4k;
			Core_SingleStep();
			//4: update disasm dialog
#if defined(USING_QT_UI) || defined(_DEBUG)
			host->UpdateDisassembly();
			host->UpdateMemView();
#endif
			break;

		case CORE_POWERDOWN:
		case CORE_ERROR:
			//1: Exit loop!!
			if (coreStatePending) {
				coreStatePending = false;
				m_hInactiveEvent.notify_one();
			}

			return;

		case CORE_NEXTFRAME:
			return;
		}
	}

}
示例#9
0
文件: Core.cpp 项目: Bulkman/ppsspp
void Core_DoSingleStep()
{
	m_hStepEvent.notify_one();
}
示例#10
0
void Core_Stop()
{
	coreState = CORE_POWERDOWN;
	m_hStepEvent.notify_one();
}
示例#11
0
// Some platforms, like Android, do not call this function but handle things on their own.
void Core_Run()
{
#if defined(_DEBUG)
	host->UpdateDisassembly();
#endif
#if !defined(USING_QT_UI) || defined(USING_GLES2)
	while (true)
#endif
	{
reswitch:
		switch (coreState)
		{
		case CORE_RUNNING:
			// enter a fast runloop
			Core_RunLoop();
			break;

		// We should never get here on Android.
		case CORE_STEPPING:
			singleStepPending = false;
			if (coreStatePending) {
				coreStatePending = false;
				m_hInactiveEvent.notify_one();
			}

			// Check if there's any pending savestate actions.
			SaveState::Process();
			if (coreState == CORE_POWERDOWN) {
				return;
			}

			// wait for step command..
#if defined(USING_QT_UI) || defined(_DEBUG)
			host->UpdateDisassembly();
			host->UpdateMemView();
			host->SendCoreWait(true);
#endif

			m_hStepEvent.wait(m_hStepMutex);

#if defined(USING_QT_UI) || defined(_DEBUG)
			host->SendCoreWait(false);
#endif
#if defined(USING_QT_UI) && !defined(USING_GLES2)
			if (coreState != CORE_STEPPING)
				return;
#endif
			// No step pending?  Let's go back to the wait.
			if (!singleStepPending || coreState != CORE_STEPPING) {
				if (coreState == CORE_POWERDOWN) {
					return;
				}
				goto reswitch;
			}

			currentCPU = &mipsr4k;
			Core_SingleStep();
			// update disasm dialog
#if defined(USING_QT_UI) || defined(_DEBUG)
			host->UpdateDisassembly();
			host->UpdateMemView();
#endif
			break;

		case CORE_POWERDOWN:
		case CORE_ERROR:
			// Exit loop!!
			if (coreStatePending) {
				coreStatePending = false;
				m_hInactiveEvent.notify_one();
			}

			return;

		case CORE_NEXTFRAME:
			return;
		}
	}

}