Addresses marked with certain directives within Distella should not propagate

to the emulation core.  That is, if something is determined to be CODE in
Distella and *not* in the emulation core, then it shouldn't be marked as such.
Note that the disassembly will still show it as CODE; it's just that the core
will not.  This fixes issues with manually specifying directives from the
debugger prompt, whereby setting a directive and later turning it off never
actually turns it off (as it was being permanently set).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2160 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-10-22 20:24:37 +00:00
parent 3c4bcf3900
commit 0af08634a8
3 changed files with 8 additions and 3 deletions

View File

@ -1010,9 +1010,12 @@ void CartDebug::disasmTypeAsString(ostream& buf, DisasmType type) const
case CartDebug::SKIP: buf << "SKIP"; break; case CartDebug::SKIP: buf << "SKIP"; break;
case CartDebug::CODE: buf << "CODE"; break; case CartDebug::CODE: buf << "CODE"; break;
case CartDebug::GFX: buf << "GFX"; break; case CartDebug::GFX: buf << "GFX"; break;
case CartDebug::PGFX: buf << "PGFX"; break;
case CartDebug::DATA: buf << "DATA"; break; case CartDebug::DATA: buf << "DATA"; break;
case CartDebug::ROW: buf << "ROW"; break; case CartDebug::ROW: buf << "ROW"; break;
default: break; case CartDebug::REFERENCED:
case CartDebug::VALID_ENTRY:
case CartDebug::NONE: break;
} }
} }

View File

@ -1017,6 +1017,7 @@ void DebuggerParser::executeHelp()
if(len > clen) clen = len; if(len > clen) clen = len;
} }
commandResult << setfill(' ');
for(int i = 0; i < kNumCommands; ++i) for(int i = 0; i < kNumCommands; ++i)
commandResult << setw(clen) << right << commands[i].cmdString commandResult << setw(clen) << right << commands[i].cmdString
<< " - " << commands[i].description << endl; << " - " << commands[i].description << endl;

View File

@ -695,6 +695,7 @@ void DiStella::disasm(uInt32 distart, int pass)
if (pass == 1) if (pass == 1)
{ {
// RTS/JMP/RTI always indicate the end of a block of CODE
if (!strcmp(ourLookup[op].mnemonic,"RTS") || if (!strcmp(ourLookup[op].mnemonic,"RTS") ||
!strcmp(ourLookup[op].mnemonic,"JMP") || !strcmp(ourLookup[op].mnemonic,"JMP") ||
/* !strcmp(ourLookup[op].mnemonic,"BRK") || */ /* !strcmp(ourLookup[op].mnemonic,"BRK") || */
@ -779,7 +780,7 @@ int DiStella::mark(uInt32 address, uInt8 mask)
if (address >= myOffset && address <= myAppData.end + myOffset) if (address >= myOffset && address <= myAppData.end + myOffset)
{ {
Debugger::debugger().setAddressDisasmType(address | myOffset, mask); // Debugger::debugger().setAddressDisasmType(address | myOffset, mask);
labels[address-myOffset] = labels[address-myOffset] | mask; labels[address-myOffset] = labels[address-myOffset] | mask;
return 1; return 1;
} }
@ -794,7 +795,7 @@ int DiStella::mark(uInt32 address, uInt8 mask)
else if (address > 0x1000) else if (address > 0x1000)
{ {
/* 2K & 4K case */ /* 2K & 4K case */
Debugger::debugger().setAddressDisasmType(address | myOffset, mask); // Debugger::debugger().setAddressDisasmType(address | myOffset, mask);
labels[address & myAppData.end] = labels[address & myAppData.end] | mask; labels[address & myAppData.end] = labels[address & myAppData.end] | mask;
return 4; return 4;
} }