fix header files

This commit is contained in:
Ian Curtis 2018-01-22 18:27:51 +00:00
parent 571d1060ee
commit b5bbda67d0
4 changed files with 29 additions and 34 deletions

View file

@ -50,7 +50,7 @@ static IBus *s_Bus = NULL;
#ifdef SUPERMODEL_DEBUGGER
// Debugger
static CMusashi68KDebug *s_Debug = NULL;
static Debugger::CMusashi68KDebug *s_Debug = NULL;
#endif
// IRQ callback

View file

@ -45,7 +45,9 @@
//#endif
#ifdef SUPERMODEL_DEBUGGER
class CMusashi68KDebug;
namespace Debugger {
class CMusashi68KDebug;
}
#endif // SUPERMODEL_DEBUGGER
/******************************************************************************
@ -75,7 +77,7 @@ public:
IBus *Bus; // memory handlers
int (*IRQAck)(int); // IRQ acknowledge callback
#ifdef SUPERMODEL_DEBUGGER
CMusashi68KDebug *Debug; // holds debugger (if attached)
Debugger::CMusashi68KDebug *Debug; // holds debugger (if attached)
#endif // SUPERMODEL_DEBUGGER
SM68KCtx(void)
@ -93,7 +95,7 @@ public:
Bus = NULL;
IRQAck = NULL;
}
} M68KCtx;
} M68KCtx;;
/******************************************************************************

View file

@ -30,8 +30,8 @@
#include <cctype>
#include <string>
//namespace Debugger
//{
namespace Debugger
{
UINT32 CMusashi68KDebug::GetReg(CCPUDebug *cpu, unsigned id)
{
CMusashi68KDebug *m68K = (CMusashi68KDebug*)cpu;
@ -198,6 +198,6 @@
m_bus->Write32(addr, data);
CheckWrite32(addr, data);
}
//}
}
#endif // SUPERMODEL_DEBUGGER

View file

@ -32,10 +32,9 @@
#include "CPU/68K/68K.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
//namespace Debugger
//{
namespace Debugger
{
/*
* CCPUDebug implementation for the Musashi Motorola 68000 emulator.
*/
@ -53,11 +52,25 @@ using namespace Debugger;
::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:
UINT32 GetSP();
@ -99,27 +112,7 @@ using namespace Debugger;
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 // SUPERMODEL_DEBUGGER