void VirtualMachine::Update() { #ifndef FUNK_FINAL if( Input::Get()->DidKeyJustGoDown("F5") ) ResetVM(); #endif HandleErrors(); // run main game only if not debugging if ( !(m_vm->GetDebugMode() && m_debugger.IsDebugging()) ) { Timer gmTimer; gmuint32 delta = (gmuint32)(m_dt*1000.0f); m_numThreads = m_vm->Execute( delta ); m_updateMs = gmTimer.GetTimeMs(); } // update debugger if ( m_vm->GetDebugMode() ) { m_debugger.Update(); } }
void CPS2VM::ReloadExecutable(const char* executablePath, const CPS2OS::ArgumentList& arguments) { ResetVM(); m_ee->m_os->BootFromVirtualPath(executablePath, arguments); }
void CPS2VM::Reset() { assert(m_nStatus == PAUSED); ResetVM(); }
void CPS2VM::CreateVM() { CDROM0_Initialize(); ResetVM(); }
void DeleteVM(VM* vm) { if(vm->pc != -1) { fprintf(stderr, "Attempted to delete a running virtual machine\n"); exit(1); } ResetVM(vm); free(vm); }