Remove '_rwport' from the debugger.

The new way of detecting RWP is superior, and we don't have time to rework _rwport to use it.
This may come back in the future (if required), but I honestly don't see a need for it.
This commit is contained in:
Stephen Anthony 2018-12-18 20:56:19 -03:30
parent d7e9cfc4d0
commit 69fb08e30c
8 changed files with 1 additions and 73 deletions

View File

@ -744,7 +744,6 @@ that holds 'number of scanlines' on an actual console).</p>
<tr><td> _fcount</td><td> Number of frames since emulation started</td></tr>
<tr><td> _fcycles</td><td> Number of cycles since frame started</td></tr>
<tr><td> _icycles</td><td> Number of cycles of last instruction</td></tr>
<tr><td> _rwport</td><td> Last address to attempt a read from the cart write port</td></tr>
<tr><td> _scan</td><td> Current scanline count</td></tr>
<tr><td> _scycles</td><td> Number of cycles in current scanline</td></tr>
<tr><td> _vblank</td><td> Whether vertical blank is enabled (1 or 0)</td></tr>

View File

@ -48,8 +48,6 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem)
myOSystem(osystem),
myDebugWidget(nullptr),
myAddrToLineIsROM(true),
myRWPortAddress(0),
myRWPortTriggersBreak(false),
myLabelLength(8) // longest pre-defined label
{
// Add case sensitive compare for user labels
@ -161,37 +159,6 @@ void CartDebug::saveOldState()
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartDebug::triggerReadFromWritePort(uInt16 addr)
{
myRWPortAddress = addr;
mySystem.setDirtyPage(addr);
if(myRWPortTriggersBreak &&
!mySystem.m6502().lastWasGhostPeek())
{
ostringstream msg;
msg << "RWP[@ $" << Common::Base::HEX4 << addr << "]: ";
EmulationWarning::raise(msg.str());
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartDebug::readFromWritePort()
{
uInt16 addr = myRWPortAddress;
myRWPortAddress = 0;
// A read from the write port occurs when the read is actually in the write
// port address space AND the last access was actually a read (the latter
// differentiates between reads that are normally part of a write cycle vs.
// ones that are illegal)
if(!mySystem.m6502().lastWasGhostPeek())
return addr;
else
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartDebug::lastReadBaseAddress()
{

View File

@ -109,18 +109,6 @@ class CartDebug : public DebuggerSystem
CartDebugWidget* getDebugWidget() const { return myDebugWidget; }
void setDebugWidget(CartDebugWidget* w) { myDebugWidget = w; }
// Called when a read from write port has occurred at the specified address.
// An exception will be thrown, if enabled
void triggerReadFromWritePort(uInt16 address);
// Return the address at which an invalid read was performed in a
// write port area.
int readFromWritePort();
// Determines whether a debugger exception will be thrown when a read from
// the write port happens.
void setReadFromWritePortBreak(bool enable) { myRWPortTriggersBreak = enable; }
// Return the base (= non-mirrored) address of the last CPU read
int lastReadBaseAddress();
// Return the base (= non-mirrored) address of the last CPU write
@ -357,13 +345,6 @@ class CartDebug : public DebuggerSystem
// handled differently
LabelToAddr mySystemAddresses;
// Holds address at which the most recent read from a write port
// occurred
uInt16 myRWPortAddress;
// Whether a read from write port should trigger a debugger exception
bool myRWPortTriggersBreak;
// The maximum length of all labels currently defined
uInt16 myLabelLength;

View File

@ -836,7 +836,6 @@ Debugger::PseudoRegister Debugger::ourPseudoRegisters[NUM_PSEUDO_REGS] = {
{ "_fcount", "Number of frames since emulation started" },
{ "_fcycles", "Number of cycles since frame started" },
{ "_icycles", "Number of cycles of last instruction" },
{ "_rwport", "Address at which a read from a write port occurred" },
{ "_scan", "Current scanline count" },
{ "_scycles", "Number of cycles in current scanline" },
{ "_vblank", "Whether vertical blank is enabled (1 or 0)" },

View File

@ -324,7 +324,7 @@ class Debugger : public DialogContainer
string name, help;
};
static const uInt32 NUM_BUILTIN_FUNCS = 18;
static const uInt32 NUM_PSEUDO_REGS = 12;
static const uInt32 NUM_PSEUDO_REGS = 11;
static BuiltinFunction ourBuiltinFunctions[NUM_BUILTIN_FUNCS];
static PseudoRegister ourPseudoRegisters[NUM_PSEUDO_REGS];

View File

@ -117,15 +117,6 @@ void Cartridge::pokeRAM(uInt8& dest, uInt16 address, uInt8 value)
dest = value;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge::triggerReadFromWritePort(uInt16 address)
{
#ifdef DEBUGGER_SUPPORT
if(!mySystem->autodetectMode())
Debugger::debugger().cartDebug().triggerReadFromWritePort(address);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge::createCodeAccessBase(uInt32 size)
{

View File

@ -232,13 +232,6 @@ class Cartridge : public Device
*/
void pokeRAM(uInt8& dest, uInt16 address, uInt8 value);
/**
Indicate that an illegal read from a write port has occurred.
@param address The address of the illegal read
*/
void triggerReadFromWritePort(uInt16 address);
/**
Create an array that holds code-access information for every byte
of the ROM (indicated by 'size'). Note that this is only used by

View File

@ -181,8 +181,6 @@ CartMethod getCartSpecial(char* ch)
{
if(BSPF::equalsIgnoreCase(ch, "_bank"))
return &CartDebug::getBank;
else if(BSPF::equalsIgnoreCase(ch, "_rwport"))
return &CartDebug::readFromWritePort;
else if(BSPF::equalsIgnoreCase(ch, "__lastread"))
return &CartDebug::lastReadBaseAddress;
else if(BSPF::equalsIgnoreCase(ch, "__lastwrite"))