mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
. .dsk / .nib images . ProDOS format / DOS 3.3 init . authentic / enhanced disk access speed For zero-length files, resize to the complete file size when first opened (#506) . Support both .dsk and .nib Created a new class FormatTrack to encapsulate the new track formatting logic Improved precision of 'authentic' drive mode's spin emulation (#125) Save-state: (save-state DiskII unit v2) . support Format Track state . save DiskLastCycle DenibblizeTrack(): added some debug asserts and comments Updated for VS2008/VS2013/2015/2017 projs & remove dependency on ddraw.lib for VS2013/2015 Updated disk logging: . Moved all LOG_DISK_xx macros to new DiskLog.h (since shared by Disk.cpp and DiskFormatTrack.cpp) . For write nibble: option to log cycle count & sync byte count . For written track: option to log gap1/2/3 and track size . For disk latch r/w: option to log when D5AA96 detected Other: . Debugger: Fix CD cmd to support absolute paths (#505)
This commit is contained in:
+36
-12
@@ -4109,6 +4109,9 @@ static TCHAR g_sMemoryLoadSaveFileName[ MAX_PATH ] = TEXT("");
|
||||
//===========================================================================
|
||||
Update_t CmdConfigGetDebugDir (int nArgs)
|
||||
{
|
||||
if( nArgs != 0 )
|
||||
return Help_Arg_1( CMD_CONFIG_GET_DEBUG_DIR );
|
||||
|
||||
TCHAR sPath[ MAX_PATH + 8 ];
|
||||
// TODO: debugger dir has no ` CONSOLE_COLOR_ESCAPE_CHAR ?!?!
|
||||
ConsoleBufferPushFormat( sPath, "Path: %s", g_sCurrentDir );
|
||||
@@ -4120,27 +4123,48 @@ Update_t CmdConfigGetDebugDir (int nArgs)
|
||||
//===========================================================================
|
||||
Update_t CmdConfigSetDebugDir (int nArgs)
|
||||
{
|
||||
//if( nArgs > 2 )
|
||||
// return;
|
||||
if ( nArgs > 1 )
|
||||
return Help_Arg_1( CMD_CONFIG_SET_DEBUG_DIR );
|
||||
|
||||
if ( nArgs == 0 )
|
||||
return CmdConfigGetDebugDir(0);
|
||||
|
||||
// PWD directory
|
||||
#if _WIN32
|
||||
// http://msdn.microsoft.com/en-us/library/aa365530(VS.85).aspx
|
||||
TCHAR sPath[ MAX_PATH + 1 ];
|
||||
_tcscpy( sPath, g_sCurrentDir ); // TODO: debugger dir has no ` CONSOLE_COLOR_ESCAPE_CHAR ?!?!
|
||||
_tcscat( sPath, g_aArgs[ 1 ].sArg );
|
||||
|
||||
if( SetCurrentImageDir( sPath ) )
|
||||
// TODO: Support paths prefixed with "\\?\" (for long/unicode pathnames)
|
||||
if (strncmp("\\\\?\\", g_aArgs[1].sArg, 4) == 0)
|
||||
return Help_Arg_1( CMD_CONFIG_SET_DEBUG_DIR );
|
||||
|
||||
TCHAR sPath[ MAX_PATH + 1 ];
|
||||
|
||||
if (g_aArgs[1].sArg[1] == ':') // Absolute
|
||||
{
|
||||
_tcscpy( sPath, g_aArgs[1].sArg );
|
||||
}
|
||||
else if (g_aArgs[1].sArg[0] == '\\') // Absolute
|
||||
{
|
||||
if (g_sCurrentDir[1] == ':')
|
||||
{
|
||||
_tcsncpy( sPath, g_sCurrentDir, 2 ); // Prefix with drive letter & colon
|
||||
sPath[2] = 0;
|
||||
}
|
||||
_tcscat( sPath, g_aArgs[1].sArg );
|
||||
}
|
||||
else // Relative
|
||||
{
|
||||
// TODO: Support ".." - currently just appends (which still works)
|
||||
_tcscpy( sPath, g_sCurrentDir ); // TODO: debugger dir has no ` CONSOLE_COLOR_ESCAPE_CHAR ?!?!
|
||||
_tcscat( sPath, g_aArgs[1].sArg );
|
||||
}
|
||||
|
||||
if ( SetCurrentImageDir( sPath ) )
|
||||
nArgs = 0; // intentional fall into
|
||||
#else
|
||||
#error "Need chdir() implemented"
|
||||
#endif
|
||||
|
||||
// PWD
|
||||
if( nArgs == 0 )
|
||||
return CmdConfigGetDebugDir(0);
|
||||
|
||||
return ConsoleUpdate();
|
||||
return CmdConfigGetDebugDir(0); // Show the new PWD
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user