Moved the setDirtyPage call for read from write port from the Cart

class to the CartDebug class, since it's really a debugger feature.

Fixed comments on some of the methods in CartDebug.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1977 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-03-28 04:26:41 +00:00
parent 6fee79ddff
commit 6bea26cd95
3 changed files with 12 additions and 6 deletions

View File

@ -102,6 +102,13 @@ void CartDebug::write(uInt16 addr, uInt8 value)
mySystem.poke(addr, value);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartDebug::triggerReadFromWritePort(uInt16 addr)
{
myRWPortAddress = addr;
mySystem.setDirtyPage(addr);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartDebug::readFromWritePort()
{

View File

@ -72,13 +72,14 @@ class CartDebug : public DebuggerSystem
uInt8 read(uInt16 addr);
void write(uInt16 addr, uInt8 value);
// Indicate that a read from write port has occurred at the specified
// address.
void triggerReadFromWritePort(uInt16 addr);
// Return the address at which an invalid read was performed in a
// write port area.
int readFromWritePort();
// Indicate that a read from write port has occurred.
void triggerReadFromWritePort(uInt16 addr) { myRWPortAddress = addr; }
/**
Let the Cart debugger subsystem treat this area as addressable memory.
@ -114,7 +115,7 @@ class CartDebug : public DebuggerSystem
/**
Determine the line in the disassembly that corresponds to the given
address. A value of zero indicates that no such address exists.
address. A value of -1 indicates that no such address exists.
*/
int addressToLine(uInt16 address) const;

View File

@ -288,8 +288,6 @@ void Cartridge::triggerReadFromWritePort(uInt16 address)
#ifdef DEBUGGER_SUPPORT
if(&Debugger::debugger().cartDebug())
Debugger::debugger().cartDebug().triggerReadFromWritePort(address);
mySystem->setDirtyPage(address);
#endif
}