From 595e7dc41f9d0df8db6148781b19601de9bef04d Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 12 Nov 2010 18:54:08 +0000 Subject: [PATCH] Some last minute final changes before the 3.3 release. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2188 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/debugger/CartDebug.cxx | 2 +- src/debugger/Debugger.hxx | 8 ++++---- src/debugger/DiStella.cxx | 10 ++++------ src/emucore/System.cxx | 4 ++-- src/emucore/System.hxx | 6 +++--- src/emucore/TIA.cxx | 10 +++++----- 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index eb83eaaa1..a7f2c46b6 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -1011,7 +1011,7 @@ void CartDebug::addressTypeAsString(ostream& buf, uInt16 addr) const } uInt8 directive = myDisDirectives[addr & 0xFFF] & 0xFC, - debugger = myDebugger.getAddressDisasmType(addr) & 0xFC, + debugger = myDebugger.getAccessFlags(addr) & 0xFC, label = myDisLabels[addr & 0xFFF]; string s1 = Debugger::to_bin_8(directive), diff --git a/src/debugger/Debugger.hxx b/src/debugger/Debugger.hxx index f5a38dab1..6dd403452 100644 --- a/src/debugger/Debugger.hxx +++ b/src/debugger/Debugger.hxx @@ -283,10 +283,10 @@ class Debugger : public DialogContainer /* These are now exposed so Expressions can use them. */ int peek(int addr) { return mySystem->peek(addr); } int dpeek(int addr) { return mySystem->peek(addr) | (mySystem->peek(addr+1) << 8); } - inline int getAddressDisasmType(uInt16 addr) - { return mySystem->getAddressDisasmType(addr); } - inline void setAddressDisasmType(uInt16 addr, uInt8 flags) - { mySystem->setAddressDisasmType(addr, flags); } + inline int getAccessFlags(uInt16 addr) + { return mySystem->getAccessFlags(addr); } + inline void setAccessFlags(uInt16 addr, uInt8 flags) + { mySystem->setAccessFlags(addr, flags); } void setBreakPoint(int bp, bool set); diff --git a/src/debugger/DiStella.cxx b/src/debugger/DiStella.cxx index f39f4593b..e0edee776 100644 --- a/src/debugger/DiStella.cxx +++ b/src/debugger/DiStella.cxx @@ -115,7 +115,7 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list, // Therefore, we stop at the first such address encountered for (uInt32 k = myPCBeg; k <= myPCEnd; k++) { - if(Debugger::debugger().getAddressDisasmType(k) & + if(Debugger::debugger().getAccessFlags(k) & (CartDebug::DATA|CartDebug::GFX|CartDebug::PGFX)) { myPCEnd = k - 1; @@ -147,7 +147,6 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list, uInt16 addr = *it; if(!check_bit(addr-myOffset, CartDebug::CODE)) { -//cerr << "(list) marking " << HEX4 << addr << " as CODE\n"; myAddressQueue.push(addr); ++it; break; @@ -160,10 +159,9 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list, // been referenced as CODE while(it == addresses.end() && codeAccessPoint <= myAppData.end) { - if((Debugger::debugger().getAddressDisasmType(codeAccessPoint+myOffset) & CartDebug::CODE) + if((Debugger::debugger().getAccessFlags(codeAccessPoint+myOffset) & CartDebug::CODE) && !(myLabels[codeAccessPoint & myAppData.end] & CartDebug::CODE)) { -//cerr << "(emul) marking " << HEX4 << (codeAccessPoint+myOffset) << " as CODE\n"; myAddressQueue.push(codeAccessPoint+myOffset); ++codeAccessPoint; break; @@ -849,7 +847,7 @@ bool DiStella::check_bit(uInt16 address, uInt8 mask) const uInt8 label = myLabels[address & myAppData.end], lastbits = label & 0x03, directive = myDirectives[address & myAppData.end] & 0xFC, - debugger = Debugger::debugger().getAddressDisasmType(address | myOffset) & 0xFC; + debugger = Debugger::debugger().getAccessFlags(address | myOffset) & 0xFC; // Any address marked by a manual directive always takes priority if(directive) @@ -945,7 +943,7 @@ void DiStella::addEntry(CartDebug::DisasmType type) // but it could also indicate that code will *never* be accessed // Since it is impossible to tell the difference, marking the address // in the disassembly at least tells the user about it - if(!(Debugger::debugger().getAddressDisasmType(tag.address) & CartDebug::CODE) + if(!(Debugger::debugger().getAccessFlags(tag.address) & CartDebug::CODE) && myAppData.length >= 4096) tag.ccount += " *"; break; diff --git a/src/emucore/System.cxx b/src/emucore/System.cxx index 3b10ffd6a..c8522cb45 100644 --- a/src/emucore/System.cxx +++ b/src/emucore/System.cxx @@ -265,7 +265,7 @@ void System::poke(uInt16 addr, uInt8 value) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -uInt8 System::getAddressDisasmType(uInt16 addr) +uInt8 System::getAccessFlags(uInt16 addr) { #ifdef DEBUGGER_SUPPORT PageAccess& access = myPageAccessTable[(addr & myAddressMask) >> myPageShift]; @@ -280,7 +280,7 @@ uInt8 System::getAddressDisasmType(uInt16 addr) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void System::setAddressDisasmType(uInt16 addr, uInt8 flags) +void System::setAccessFlags(uInt16 addr, uInt8 flags) { #ifdef DEBUGGER_SUPPORT PageAccess& access = myPageAccessTable[(addr & myAddressMask) >> myPageShift]; diff --git a/src/emucore/System.hxx b/src/emucore/System.hxx index fca4f3d86..2d788a7db 100644 --- a/src/emucore/System.hxx +++ b/src/emucore/System.hxx @@ -293,10 +293,10 @@ class System : public Serializable /** Access and modify the disassembly type flags for the given address. Note that while any flag can be used, the disassembly - only really acts on SKIP/CODE/GFX/DATA/ROW. + only really acts on SKIP/CODE/GFX/PGFX/DATA/ROW. */ - uInt8 getAddressDisasmType(uInt16 address); - void setAddressDisasmType(uInt16 address, uInt8 flags); + uInt8 getAccessFlags(uInt16 address); + void setAccessFlags(uInt16 address, uInt8 flags); public: /** diff --git a/src/emucore/TIA.cxx b/src/emucore/TIA.cxx index e4e47e581..3e7b00a53 100644 --- a/src/emucore/TIA.cxx +++ b/src/emucore/TIA.cxx @@ -1475,7 +1475,7 @@ bool TIA::poke(uInt16 addr, uInt8 value) #ifdef DEBUGGER_SUPPORT uInt16 dataAddr = mySystem->m6502().lastDataAddressForPoke(); if(dataAddr) - mySystem->setAddressDisasmType(dataAddr, CartDebug::PGFX); + mySystem->setAccessFlags(dataAddr, CartDebug::PGFX); #endif break; } @@ -1492,7 +1492,7 @@ bool TIA::poke(uInt16 addr, uInt8 value) #ifdef DEBUGGER_SUPPORT uInt16 dataAddr = mySystem->m6502().lastDataAddressForPoke(); if(dataAddr) - mySystem->setAddressDisasmType(dataAddr, CartDebug::PGFX); + mySystem->setAccessFlags(dataAddr, CartDebug::PGFX); #endif break; } @@ -1509,7 +1509,7 @@ bool TIA::poke(uInt16 addr, uInt8 value) #ifdef DEBUGGER_SUPPORT uInt16 dataAddr = mySystem->m6502().lastDataAddressForPoke(); if(dataAddr) - mySystem->setAddressDisasmType(dataAddr, CartDebug::PGFX); + mySystem->setAccessFlags(dataAddr, CartDebug::PGFX); #endif break; } @@ -1749,7 +1749,7 @@ bool TIA::poke(uInt16 addr, uInt8 value) #ifdef DEBUGGER_SUPPORT uInt16 dataAddr = mySystem->m6502().lastDataAddressForPoke(); if(dataAddr) - mySystem->setAddressDisasmType(dataAddr, CartDebug::GFX); + mySystem->setAccessFlags(dataAddr, CartDebug::GFX); #endif break; } @@ -1792,7 +1792,7 @@ bool TIA::poke(uInt16 addr, uInt8 value) #ifdef DEBUGGER_SUPPORT uInt16 dataAddr = mySystem->m6502().lastDataAddressForPoke(); if(dataAddr) - mySystem->setAddressDisasmType(dataAddr, CartDebug::GFX); + mySystem->setAccessFlags(dataAddr, CartDebug::GFX); #endif break; }