mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-06 03:29:30 +00:00
Debugger 2.8.0.9: BLOAD now recognizes the extensions .hgr or .hgr2 to load to $2000, or $4000 respectfully
This commit is contained in:
parent
0fc6d18139
commit
07be4dfa1d
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
.9 Added: BLOAD now recognizes the extensions .hgr or .hgr2 to load to $2000, or $4000 respectfully
|
||||
.8 Fixed: Showing/hiding the address and/or opcodes will show long symbolic targets without overflowing into the register info pane Bug #227
|
||||
.7 Fixed: ASC #:# with string containing null byte wouldn't show rest of string
|
||||
.6 Added: Print-Screen when in debugger will copy the debugger window as text
|
||||
|
|
|
@ -47,7 +47,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#define ALLOW_INPUT_LOWERCASE 1
|
||||
|
||||
// See /docs/Debugger_Changelog.txt for full details
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,8,0,8);
|
||||
const int DEBUGGER_VERSION = MAKE_VERSION(2,8,0,9);
|
||||
|
||||
|
||||
// Public _________________________________________________________________________________________
|
||||
|
@ -4216,8 +4216,48 @@ Update_t CmdMemoryLoad (int nArgs)
|
|||
bBankSpecified = false;
|
||||
}
|
||||
|
||||
if (g_aArgs[ iArgComma1 ].eToken != TOKEN_COMMA)
|
||||
return Help_Arg_1( CMD_MEMORY_LOAD );
|
||||
struct KnownFileType_t
|
||||
{
|
||||
char *pExtension;
|
||||
int nAddress;
|
||||
int nLength;
|
||||
};
|
||||
|
||||
KnownFileType_t aFileTypes[] =
|
||||
{
|
||||
{ "" , 0, 0 } // n/a
|
||||
,{ ".hgr" , 0x2000, 0x2000 }
|
||||
,{ ".hgr2", 0x4000, 0x2000 }
|
||||
};
|
||||
const int nFileTypes = sizeof( aFileTypes ) / sizeof( KnownFileType_t );
|
||||
KnownFileType_t *pFileType = NULL;
|
||||
|
||||
char *pFileName = g_aArgs[ 1 ].sArg;
|
||||
int nLen = strlen( pFileName );
|
||||
char *pEnd = pFileName + + nLen - 1;
|
||||
while( pEnd > pFileName )
|
||||
{
|
||||
if( *pEnd == '.' )
|
||||
{
|
||||
for( int i = 1; i < nFileTypes; i++ )
|
||||
{
|
||||
if( strcmp( pEnd, aFileTypes[i].pExtension ) == 0 )
|
||||
{
|
||||
pFileType = &aFileTypes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( pFileType )
|
||||
break;
|
||||
|
||||
pEnd--;
|
||||
}
|
||||
|
||||
if( !pFileType )
|
||||
if (g_aArgs[ iArgComma1 ].eToken != TOKEN_COMMA)
|
||||
return Help_Arg_1( CMD_MEMORY_LOAD );
|
||||
|
||||
TCHAR sLoadSaveFilePath[ MAX_PATH ];
|
||||
_tcscpy( sLoadSaveFilePath, g_sCurrentDir ); // TODO: g_sDebugDir
|
||||
|
@ -4229,7 +4269,8 @@ Update_t CmdMemoryLoad (int nArgs)
|
|||
|
||||
RangeType_t eRange;
|
||||
eRange = Range_Get( nAddressStart, nAddress2, iArgAddress );
|
||||
if (nArgs > iArgComma2)
|
||||
|
||||
if( !pFileType && (nArgs > iArgComma2) )
|
||||
{
|
||||
if (eRange == RANGE_MISSING_ARG_2)
|
||||
{
|
||||
|
@ -4243,9 +4284,16 @@ Update_t CmdMemoryLoad (int nArgs)
|
|||
}
|
||||
}
|
||||
|
||||
if( pFileType )
|
||||
{
|
||||
nAddressStart = pFileType->nAddress;
|
||||
nAddressLen = pFileType->nLength;
|
||||
nAddressEnd = pFileType->nLength + nAddressLen;
|
||||
}
|
||||
|
||||
if (bHaveFileName)
|
||||
{
|
||||
_tcscpy( g_sMemoryLoadSaveFileName, g_aArgs[ 1 ].sArg );
|
||||
_tcscpy( g_sMemoryLoadSaveFileName, pFileName );
|
||||
}
|
||||
_tcscat( sLoadSaveFilePath, g_sMemoryLoadSaveFileName );
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user