mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-12 11:29:29 +00:00
Enabled debugger BSAVE with bank support:
. BSAVE [file,][bank:]<range>
This commit is contained in:
parent
2683b83bdb
commit
d5ae003e56
|
@ -4178,7 +4178,7 @@ Update_t CmdMemoryMove (int nArgs)
|
|||
|
||||
|
||||
//===========================================================================
|
||||
#if 1 // Original
|
||||
#if 0 // Original
|
||||
Update_t CmdMemorySave (int nArgs)
|
||||
{
|
||||
// BSAVE ["Filename"] , addr , len
|
||||
|
|
|
@ -1169,21 +1169,22 @@ Update_t CmdHelpSpecific (int nArgs)
|
|||
case CMD_MEMORY_SAVE:
|
||||
if (iCommand == CMD_MEMORY_LOAD)
|
||||
{
|
||||
sprintf( sTemp, " Usage: [\"Filename\"],address[,length]" );
|
||||
sprintf( sTemp, " Usage: [\"Filename\",]address[,length]" );
|
||||
Colorize( sText, sTemp );
|
||||
ConsolePrint( sText );
|
||||
sprintf( sTemp, " Usage: [\"Filename\"],range" );
|
||||
sprintf( sTemp, " Usage: [\"Filename\",]range" );
|
||||
Colorize( sText, sTemp );
|
||||
ConsolePrint( sText );
|
||||
Help_Range();
|
||||
ConsoleBufferPush( " Notes: If no filename specified, defaults to the last filename (if possible)" );
|
||||
ConsoleBufferPush( " Optional bank not supported for BLOAD" );
|
||||
}
|
||||
if (iCommand == CMD_MEMORY_SAVE)
|
||||
{
|
||||
sprintf( sTemp, " Usage: [\"Filename\"],address,length" );
|
||||
sprintf( sTemp, " Usage: [\"Filename\",][bank:]address,length" );
|
||||
Colorize( sText, sTemp );
|
||||
ConsolePrint( sText );
|
||||
sprintf( sTemp, " Usage: [\"Filename\"],range" );
|
||||
sprintf( sTemp, " Usage: [\"Filename\",][bank:]range" );
|
||||
Colorize( sText, sTemp );
|
||||
ConsolePrint( sText );
|
||||
Help_Range();
|
||||
|
@ -1197,6 +1198,8 @@ Update_t CmdHelpSpecific (int nArgs)
|
|||
sprintf( sText, "%s BLOAD \"test\",2000:2010" , CHC_EXAMPLE ); ConsolePrint( sText );
|
||||
sprintf( sText, "%s BSAVE \"test\",F000:FFFF" , CHC_EXAMPLE ); ConsolePrint( sText );
|
||||
sprintf( sText, "%s BLOAD \"test\",4000" , CHC_EXAMPLE ); ConsolePrint( sText );
|
||||
sprintf( sText, "%s BSAVE \"test\",0:2000,2000" , CHC_EXAMPLE ); ConsolePrint( sText );
|
||||
sprintf( sText, "%s BSAVE \"test\",1:2000:3FFF" , CHC_EXAMPLE ); ConsolePrint( sText );
|
||||
break;
|
||||
case CMD_MEMORY_SEARCH:
|
||||
Colorize( sText, " Usage: range <\"ASCII text\" | 'apple text' | hex>" );
|
||||
|
|
|
@ -751,17 +751,16 @@ static bool IsCardInSlot(const UINT uSlot)
|
|||
|
||||
//===========================================================================
|
||||
|
||||
//// Only called by MemSetFastPaging()
|
||||
//static void BackMainImage ()
|
||||
//{
|
||||
// for (UINT loop = 0; loop < 256; loop++)
|
||||
// {
|
||||
// if (memshadow[loop] && ((*(memdirty+loop) & 1) || (loop <= 1)))
|
||||
// CopyMemory(memshadow[loop],memimage+(loop << 8),256);
|
||||
//
|
||||
// *(memdirty+loop) &= ~1;
|
||||
// }
|
||||
//}
|
||||
static void BackMainImage(void)
|
||||
{
|
||||
for (UINT loop = 0; loop < 256; loop++)
|
||||
{
|
||||
if (memshadow[loop] && ((*(memdirty+loop) & 1) || (loop <= 1)))
|
||||
CopyMemory(memshadow[loop], memimage+(loop << 8), 256);
|
||||
|
||||
*(memdirty+loop) &= ~1;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
|
@ -1117,13 +1116,21 @@ LPBYTE MemGetMainPtr(const WORD offset)
|
|||
|
||||
LPBYTE MemGetBankPtr(const UINT nBank)
|
||||
{
|
||||
if (nBank == 0)
|
||||
return mem;
|
||||
BackMainImage(); // Flush any dirty pages to back-buffer
|
||||
|
||||
#ifdef RAMWORKS
|
||||
if (nBank > g_uMaxExPages)
|
||||
return NULL;
|
||||
|
||||
if (nBank == 0)
|
||||
return memmain;
|
||||
|
||||
return RWpages[nBank-1];
|
||||
#else
|
||||
return (nBank == 0) ? memmain :
|
||||
(nBank == 1) ? memaux :
|
||||
NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in New Issue
Block a user