mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-02-18 02:05:39 +00:00
fix header files
This commit is contained in:
parent
571d1060ee
commit
b5bbda67d0
|
@ -50,7 +50,7 @@ static IBus *s_Bus = NULL;
|
||||||
|
|
||||||
#ifdef SUPERMODEL_DEBUGGER
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
// Debugger
|
// Debugger
|
||||||
static CMusashi68KDebug *s_Debug = NULL;
|
static Debugger::CMusashi68KDebug *s_Debug = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// IRQ callback
|
// IRQ callback
|
||||||
|
|
|
@ -45,7 +45,9 @@
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#ifdef SUPERMODEL_DEBUGGER
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
class CMusashi68KDebug;
|
namespace Debugger {
|
||||||
|
class CMusashi68KDebug;
|
||||||
|
}
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -75,7 +77,7 @@ public:
|
||||||
IBus *Bus; // memory handlers
|
IBus *Bus; // memory handlers
|
||||||
int (*IRQAck)(int); // IRQ acknowledge callback
|
int (*IRQAck)(int); // IRQ acknowledge callback
|
||||||
#ifdef SUPERMODEL_DEBUGGER
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
CMusashi68KDebug *Debug; // holds debugger (if attached)
|
Debugger::CMusashi68KDebug *Debug; // holds debugger (if attached)
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
||||||
|
|
||||||
SM68KCtx(void)
|
SM68KCtx(void)
|
||||||
|
@ -93,7 +95,7 @@ public:
|
||||||
Bus = NULL;
|
Bus = NULL;
|
||||||
IRQAck = NULL;
|
IRQAck = NULL;
|
||||||
}
|
}
|
||||||
} M68KCtx;
|
} M68KCtx;;
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
//namespace Debugger
|
namespace Debugger
|
||||||
//{
|
{
|
||||||
UINT32 CMusashi68KDebug::GetReg(CCPUDebug *cpu, unsigned id)
|
UINT32 CMusashi68KDebug::GetReg(CCPUDebug *cpu, unsigned id)
|
||||||
{
|
{
|
||||||
CMusashi68KDebug *m68K = (CMusashi68KDebug*)cpu;
|
CMusashi68KDebug *m68K = (CMusashi68KDebug*)cpu;
|
||||||
|
@ -198,6 +198,6 @@
|
||||||
m_bus->Write32(addr, data);
|
m_bus->Write32(addr, data);
|
||||||
CheckWrite32(addr, data);
|
CheckWrite32(addr, data);
|
||||||
}
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
|
@ -32,10 +32,9 @@
|
||||||
#include "CPU/68K/68K.h"
|
#include "CPU/68K/68K.h"
|
||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
|
|
||||||
using namespace Debugger;
|
|
||||||
// TODO - can't get this namespace to work with 68K.h for some reason - strange Visual Studio errors
|
// TODO - can't get this namespace to work with 68K.h for some reason - strange Visual Studio errors
|
||||||
//namespace Debugger
|
namespace Debugger
|
||||||
//{
|
{
|
||||||
/*
|
/*
|
||||||
* CCPUDebug implementation for the Musashi Motorola 68000 emulator.
|
* CCPUDebug implementation for the Musashi Motorola 68000 emulator.
|
||||||
*/
|
*/
|
||||||
|
@ -53,11 +52,25 @@ using namespace Debugger;
|
||||||
|
|
||||||
::IBus *m_bus;
|
::IBus *m_bus;
|
||||||
|
|
||||||
void SetM68KContext();
|
// Inlined methods
|
||||||
|
|
||||||
void UpdateM68KContext(M68KCtx *ctx);
|
void CMusashi68KDebug::SetM68KContext()
|
||||||
|
{
|
||||||
|
M68KGetContext(&m_savedCtx);
|
||||||
|
if (m_savedCtx.Debug != this)
|
||||||
|
M68KSetContext(m_ctx);
|
||||||
|
}
|
||||||
|
|
||||||
void RestoreM68KContext();
|
void CMusashi68KDebug::UpdateM68KContext(M68KCtx *ctx)
|
||||||
|
{
|
||||||
|
m_ctx = ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMusashi68KDebug::RestoreM68KContext()
|
||||||
|
{
|
||||||
|
if (m_savedCtx.Debug != this)
|
||||||
|
M68KSetContext(&m_savedCtx);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UINT32 GetSP();
|
UINT32 GetSP();
|
||||||
|
@ -99,27 +112,7 @@ using namespace Debugger;
|
||||||
|
|
||||||
void Write32(UINT32 addr, UINT32 data);
|
void Write32(UINT32 addr, UINT32 data);
|
||||||
};
|
};
|
||||||
|
}
|
||||||
// Inlined methods
|
|
||||||
|
|
||||||
inline void CMusashi68KDebug::SetM68KContext()
|
|
||||||
{
|
|
||||||
M68KGetContext(&m_savedCtx);
|
|
||||||
if (m_savedCtx.Debug != this)
|
|
||||||
M68KSetContext(m_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CMusashi68KDebug::UpdateM68KContext(M68KCtx *ctx)
|
|
||||||
{
|
|
||||||
m_ctx = ctx;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CMusashi68KDebug::RestoreM68KContext()
|
|
||||||
{
|
|
||||||
if (m_savedCtx.Debug != this)
|
|
||||||
M68KSetContext(&m_savedCtx);
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
|
|
||||||
#endif // INCLUDED_MUSASHI68KDEBUG_H
|
#endif // INCLUDED_MUSASHI68KDEBUG_H
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
Loading…
Reference in a new issue