mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-29 20:29:52 +00:00
Merge in CPU/Debugger changed files
This commit is contained in:
parent
a9ed7fa2f5
commit
2daeebcb01
|
@ -44,6 +44,11 @@ static DWORD Cpu6502 (DWORD uTotalCycles)
|
||||||
UINT uExtraCycles = 0;
|
UINT uExtraCycles = 0;
|
||||||
BYTE iOpcode;
|
BYTE iOpcode;
|
||||||
|
|
||||||
|
#ifdef WS_VIDEO
|
||||||
|
ULONG uElapsedCycles;
|
||||||
|
ULONG uPreviousCycles = uExecutedCycles;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SUPPORT_CPM
|
#ifdef SUPPORT_CPM
|
||||||
if (g_ActiveCPU == CPU_Z80)
|
if (g_ActiveCPU == CPU_Z80)
|
||||||
{
|
{
|
||||||
|
@ -317,6 +322,11 @@ static DWORD Cpu6502 (DWORD uTotalCycles)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WS_VIDEO
|
||||||
|
uElapsedCycles = uExecutedCycles - uPreviousCycles;
|
||||||
|
wsVideoUpdate(uElapsedCycles);
|
||||||
|
#endif
|
||||||
|
|
||||||
CheckInterruptSources(uExecutedCycles);
|
CheckInterruptSources(uExecutedCycles);
|
||||||
NMI(uExecutedCycles, uExtraCycles, flagc, flagn, flagv, flagz);
|
NMI(uExecutedCycles, uExtraCycles, flagc, flagn, flagv, flagz);
|
||||||
IRQ(uExecutedCycles, uExtraCycles, flagc, flagn, flagv, flagz);
|
IRQ(uExecutedCycles, uExtraCycles, flagc, flagn, flagv, flagz);
|
||||||
|
|
|
@ -47,6 +47,11 @@ static DWORD Cpu65C02 (DWORD uTotalCycles)
|
||||||
UINT uExtraCycles = 0;
|
UINT uExtraCycles = 0;
|
||||||
BYTE iOpcode;
|
BYTE iOpcode;
|
||||||
|
|
||||||
|
#ifdef WS_VIDEO
|
||||||
|
ULONG uElapsedCycles;
|
||||||
|
ULONG uPreviousCycles = uExecutedCycles;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SUPPORT_CPM
|
#ifdef SUPPORT_CPM
|
||||||
if (g_ActiveCPU == CPU_Z80)
|
if (g_ActiveCPU == CPU_Z80)
|
||||||
{
|
{
|
||||||
|
@ -321,6 +326,10 @@ static DWORD Cpu65C02 (DWORD uTotalCycles)
|
||||||
#undef $
|
#undef $
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WS_VIDEO
|
||||||
|
uElapsedCycles = uExecutedCycles - uPreviousCycles;
|
||||||
|
wsVideoUpdate(uElapsedCycles);
|
||||||
|
#endif
|
||||||
|
|
||||||
CheckInterruptSources(uExecutedCycles);
|
CheckInterruptSources(uExecutedCycles);
|
||||||
NMI(uExecutedCycles, uExtraCycles, flagc, flagn, flagv, flagz);
|
NMI(uExecutedCycles, uExtraCycles, flagc, flagn, flagv, flagz);
|
||||||
|
|
|
@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#define ALLOW_INPUT_LOWERCASE 1
|
#define ALLOW_INPUT_LOWERCASE 1
|
||||||
|
|
||||||
// See /docs/Debugger_Changelog.txt for full details
|
// See /docs/Debugger_Changelog.txt for full details
|
||||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,7,0,8);
|
const int DEBUGGER_VERSION = MAKE_VERSION(2,7,0,7);
|
||||||
|
|
||||||
|
|
||||||
// Public _________________________________________________________________________________________
|
// Public _________________________________________________________________________________________
|
||||||
|
@ -111,8 +111,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
vector<Command_t> g_vSortedCommands;
|
vector<Command_t> g_vSortedCommands;
|
||||||
|
|
||||||
// static const char g_aFlagNames[_6502_NUM_FLAGS+1] = TEXT("CZIDBRVN");// Reversed since arrays are from left-to-right
|
// static const char g_aFlagNames[_6502_NUM_FLAGS+1] = TEXT("CZIDBRVN");// Reversed since arrays are from left-to-right
|
||||||
|
#ifdef WS_VIDEO
|
||||||
|
Command_t g_aCommands[NUM_COMMANDS];
|
||||||
|
Command_t g_aParameters[NUM_COMMANDS];
|
||||||
|
const int NUM_COMMANDS_WITH_ALIASES = sizeof(g_aCommands) / sizeof (Command_t); // Determined at compile-time ;-)
|
||||||
|
void VerifyDebuggerCommandTable () {}
|
||||||
|
#endif
|
||||||
// Cursor (Console Input) _____________________________________________________
|
// Cursor (Console Input) _____________________________________________________
|
||||||
|
|
||||||
// char g_aInputCursor[] = "\|/-";
|
// char g_aInputCursor[] = "\|/-";
|
||||||
|
@ -1940,7 +1944,7 @@ Update_t CmdTraceFile (int nArgs)
|
||||||
|
|
||||||
|
|
||||||
char sFilePath[ MAX_PATH ];
|
char sFilePath[ MAX_PATH ];
|
||||||
strcpy(sFilePath, g_sCurrentDir); // TODO: g_sDebugDir
|
strcpy(sFilePath, g_sCurrentDir); // g_sProgramDir
|
||||||
strcat(sFilePath, sFileName );
|
strcat(sFilePath, sFileName );
|
||||||
|
|
||||||
g_hTraceFile = fopen( sFilePath, "wt" );
|
g_hTraceFile = fopen( sFilePath, "wt" );
|
||||||
|
@ -2304,7 +2308,7 @@ void ConfigSave_PrepareHeader ( const Parameters_e eCategory, const Commands_e e
|
||||||
Update_t CmdConfigSave (int nArgs)
|
Update_t CmdConfigSave (int nArgs)
|
||||||
{
|
{
|
||||||
TCHAR sFilename[ MAX_PATH ];
|
TCHAR sFilename[ MAX_PATH ];
|
||||||
_tcscpy( sFilename, g_sProgramDir ); // TODO: g_sDebugDir
|
_tcscpy( sFilename, g_sProgramDir ); // g_sCurrentDir
|
||||||
_tcscat( sFilename, g_sFileNameConfig );
|
_tcscat( sFilename, g_sFileNameConfig );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3977,22 +3981,6 @@ Update_t CmdMemoryFill (int nArgs)
|
||||||
static TCHAR g_sMemoryLoadSaveFileName[ MAX_PATH ] = TEXT("");
|
static TCHAR g_sMemoryLoadSaveFileName[ MAX_PATH ] = TEXT("");
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
Update_t CmdConfigGetDebugDir (int nArgs)
|
|
||||||
{
|
|
||||||
TCHAR sPath[ MAX_PATH + 8 ] = "Path: ";
|
|
||||||
_tcscat( sPath, g_sCurrentDir ); // TODO: debugger dir has no ` CONSOLE_COLOR_ESCAPE_CHAR ?!?!
|
|
||||||
ConsoleBufferPush( sPath );
|
|
||||||
|
|
||||||
return ConsoleUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
Update_t CmdConfigSetDebugDir (int nArgs)
|
|
||||||
{
|
|
||||||
return ConsoleUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
Update_t CmdMemoryLoad (int nArgs)
|
Update_t CmdMemoryLoad (int nArgs)
|
||||||
{
|
{
|
||||||
|
@ -4036,7 +4024,7 @@ Update_t CmdMemoryLoad (int nArgs)
|
||||||
return Help_Arg_1( CMD_MEMORY_SAVE );
|
return Help_Arg_1( CMD_MEMORY_SAVE );
|
||||||
|
|
||||||
TCHAR sLoadSaveFilePath[ MAX_PATH ];
|
TCHAR sLoadSaveFilePath[ MAX_PATH ];
|
||||||
_tcscpy( sLoadSaveFilePath, g_sCurrentDir ); // TODO: g_sDebugDir
|
_tcscpy( sLoadSaveFilePath, g_sCurrentDir ); // g_sProgramDir
|
||||||
|
|
||||||
WORD nAddressStart;
|
WORD nAddressStart;
|
||||||
WORD nAddress2 = 0;
|
WORD nAddress2 = 0;
|
||||||
|
@ -4100,9 +4088,9 @@ Update_t CmdMemoryLoad (int nArgs)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConsoleBufferPush( TEXT( "ERROR: Bad filename" ) );
|
ConsoleBufferPush( TEXT( "ERROR: Bad filename" ) );
|
||||||
|
TCHAR sPath[ MAX_PATH + 8 ] = "Path: ";
|
||||||
CmdConfigGetDebugDir( 0 );
|
_tcscat( sPath, g_sCurrentDir );
|
||||||
|
ConsoleBufferPush( sPath );
|
||||||
TCHAR sFile[ MAX_PATH + 8 ] = "File: ";
|
TCHAR sFile[ MAX_PATH + 8 ] = "File: ";
|
||||||
_tcscat( sFile, g_sMemoryLoadSaveFileName );
|
_tcscat( sFile, g_sMemoryLoadSaveFileName );
|
||||||
ConsoleBufferPush( sFile );
|
ConsoleBufferPush( sFile );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user