#ifdef SUPERMODEL_DEBUGGER #include "Supermodel.h" #include "ConsoleDebugger.h" #include "CPUDebug.h" #include "Label.h" #include #include namespace Debugger { CSupermodelDebugger::CSupermodelDebugger(::CModel3 *model3, ::CInputs *inputs, ::CLogger *logger) : CConsoleDebugger(), m_model3(model3), m_inputs(inputs), m_logger(logger), m_loadEmuState(false), m_saveEmuState(false), m_resetEmu(false) { AddCPU(new CPPCDebug()); #ifdef SUPERMODEL_SOUND AddCPU(new C68KDebug()); #endif } void CSupermodelDebugger::WaitCommand(CCPUDebug *cpu) { m_inputs->GetInputSystem()->UngrabMouse(); CConsoleDebugger::WaitCommand(cpu); m_inputs->GetInputSystem()->GrabMouse(); } bool CSupermodelDebugger::ProcessToken(const char *token, const char *cmd) { // // Emulator // if (CheckToken(token, "les", "loademustate")) // loademustate { // Parse arguments token = strtok(NULL, " "); if (token == NULL) { Print("Missing filename.\n"); return false; } strncpy(m_stateFile, token, 254); m_stateFile[254] = '\0'; m_loadEmuState = true; return true; } else if (CheckToken(token, "ses", "saveemustate")) // saveemustate { // Parse arguments token = strtok(NULL, " "); if (token == NULL) { Print("Missing filename.\n"); return false; } strncpy(m_stateFile, token, 254); m_stateFile[254] = '\0'; m_saveEmuState = true; return true; } else if (CheckToken(token, "res", "resetemu")) // resetemu { m_resetEmu = true; return true; } // // Inputs // else if (CheckToken(token, "lip", "listinputs")) // listinputs { ListInputs(); return false; } else if (CheckToken(token, "pip", "printinput")) // printinput (|