mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 07:35:40 +00:00
e8e02ba685
- updated debugger classes to compile again with all recent changes. - improved debugger classes to allow them to work in multi-threaded emulator and be able to handle CPUs on different threads. - added debug classes for new Z80 and Musashi 68K CPU cores. - added logging of cycle counts and frames. - moved all Supermodel specific code & configuration to CSupermodelDebugger. - added all Model 3 CPUs (PPC, sound board 68K, DSB 68K/Z80 and drive board Z80) to CSupermodelDebugger. - added persisting of custom entry points in saved debug state to CCodeAnalyser. - fixed bug with listing I/O ports in CConsoleDebugger and added displaying of cycle counts and CPU speeds when listing CPUs.
77 lines
1.5 KiB
C++
77 lines
1.5 KiB
C++
#ifdef SUPERMODEL_DEBUGGER
|
|
#ifndef INCLUDED_SUPERMODELDEBUGGER_H
|
|
#define INCLUDED_SUPERMODELDEBUGGER_H
|
|
|
|
#include "ConsoleDebugger.h"
|
|
|
|
#include <stdarg.h>
|
|
|
|
#define MODEL3_STATEFILE_VERSION 0
|
|
|
|
class CModel3;
|
|
class CInputs;
|
|
class CInput;
|
|
|
|
namespace Debugger
|
|
{
|
|
class CCPUDebug;
|
|
|
|
/*
|
|
* Console-based debugger used by Supermodel.
|
|
*/
|
|
class CSupermodelDebugger : public CConsoleDebugger
|
|
{
|
|
private:
|
|
::CModel3 *m_model3;
|
|
::CInputs *m_inputs;
|
|
::CLogger *m_logger;
|
|
|
|
bool m_loadEmuState;
|
|
bool m_saveEmuState;
|
|
bool m_resetEmu;
|
|
char m_stateFile[255];
|
|
|
|
bool InputIsValid(CInput *input);
|
|
|
|
void ListInputs();
|
|
|
|
protected:
|
|
void AddCPUs();
|
|
|
|
void WaitCommand(CCPUDebug *cpu);
|
|
|
|
bool ProcessToken(const char *token, const char *cmd);
|
|
|
|
void Attached();
|
|
|
|
void Detaching();
|
|
|
|
public:
|
|
static CCPUDebug *CreateMainBoardCPUDebug(::CModel3 *model3);
|
|
|
|
static CCPUDebug *CreateSoundBoardCPUDebug(::CModel3 *model3);
|
|
|
|
static CCPUDebug *CreateDSBCPUDebug(::CModel3 *model3);
|
|
|
|
static CCPUDebug *CreateDriveBoardCPUDebug(::CModel3 *model3);
|
|
|
|
CSupermodelDebugger(::CModel3 *model3, ::CInputs *inputs, ::CLogger *logger);
|
|
|
|
void Poll();
|
|
|
|
bool LoadModel3State(const char *fileName);
|
|
|
|
bool SaveModel3State(const char *fileName);
|
|
|
|
void ResetModel3();
|
|
|
|
void DebugLog(const char *fmt, va_list vl);
|
|
|
|
void InfoLog(const char *fmt, va_list vl);
|
|
|
|
void ErrorLog(const char *fmt, va_list vl);
|
|
};
|
|
}
|
|
|
|
#endif // INCLUDED_SUPERMODELDEBUGGER_H
|
|
#endif // SUPERMODEL_DEBUGGER
|