From 0d609f6845b3de6ad0134ec35ef998b72686bc4a Mon Sep 17 00:00:00 2001 From: thrust26 Date: Fri, 15 Dec 2017 19:12:46 +0100 Subject: [PATCH] renamed '_cycles' into '_icycles' (fits better) --- Changes.txt | 6 +++--- docs/debugger.html | 2 +- src/debugger/CpuDebug.cxx | 6 +++--- src/debugger/CpuDebug.hxx | 2 +- src/debugger/Debugger.cxx | 2 +- src/emucore/M6502.cxx | 10 +++++----- src/emucore/M6502.hxx | 2 +- src/yacc/YaccParser.cxx | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Changes.txt b/Changes.txt index 4981d09d3..f8f14a0e6 100644 --- a/Changes.txt +++ b/Changes.txt @@ -86,15 +86,15 @@ * Added 'Options...' button to debugger which gives access to the options menu during debugging. - * Added debugger pseudo-register '_cycles', which gives the number of - CPU cycles of the last instruction. - * Added debugger pseudo-register '_cyclesLo' and '_cyclesHi', which give the number of CPU cycles that have occurred since emulation started. * Added debugger pseudo-register '_fcycles', which gives the number of CPU cycles that have occurred since the frame started. + * Added debugger pseudo-register '_icycles', which gives the number of + CPU cycles of the last instruction. + * Extended debugger 'dump' command to take a second argument, indicating the end of the range to dump data. diff --git a/docs/debugger.html b/docs/debugger.html index 08bb9149f..88d3eb3f2 100644 --- a/docs/debugger.html +++ b/docs/debugger.html @@ -738,11 +738,11 @@ that holds 'number of scanlines' on an actual console).

FunctionDescription _bank Currently selected bank _cclocks Color clocks on a scanline - _cycles Number of cycles of last instruction _cycleshi Higher 32 bits of number of cycles since emulation started _cycleslo Lower 32 bits of number of cycles since emulation started _fcount Number of frames since emulation started _fcycles Number of cycles since frame started + _icycles Number of cycles of last instruction _rwport Last address to attempt a read from the cart write port _scan Current scanline count _scycles Number of cycles in current scanline diff --git a/src/debugger/CpuDebug.cxx b/src/debugger/CpuDebug.cxx index 1d1386b62..d90d22c8d 100644 --- a/src/debugger/CpuDebug.cxx +++ b/src/debugger/CpuDebug.cxx @@ -143,9 +143,9 @@ int CpuDebug::c() const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -int CpuDebug::cycles() const +int CpuDebug::icycles() const { - return mySystem.m6502().cycles; + return mySystem.m6502().icycles; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -229,7 +229,7 @@ void CpuDebug::setC(bool on) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void CpuDebug::setCycles(int cycles) { - my6502.cycles = cycles; + my6502.icycles = cycles; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/CpuDebug.hxx b/src/debugger/CpuDebug.hxx index 46889c945..41a0c7991 100644 --- a/src/debugger/CpuDebug.hxx +++ b/src/debugger/CpuDebug.hxx @@ -61,7 +61,7 @@ class CpuDebug : public DebuggerSystem int z() const; int c() const; - int cycles() const; + int icycles() const; void setPC(int pc); void setSP(int sp); diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index 549cd1dcb..308ec73a0 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -802,11 +802,11 @@ Debugger::BuiltinFunction Debugger::ourBuiltinFunctions[NUM_BUILTIN_FUNCS] = { Debugger::PseudoRegister Debugger::ourPseudoRegisters[NUM_PSEUDO_REGS] = { { "_bank", "Currently selected bank" }, { "_cclocks", "Color clocks on current scanline" }, - { "_cycles", "Number of cycles of last instruction" }, { "_cycleshi", "Higher 32 bits of number of cycles since emulation started" }, { "_cycleslo", "Lower 32 bits of number of cycles since emulation started" }, { "_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" }, diff --git a/src/emucore/M6502.cxx b/src/emucore/M6502.cxx index ae16b9f64..21b49c3ed 100644 --- a/src/emucore/M6502.cxx +++ b/src/emucore/M6502.cxx @@ -52,7 +52,7 @@ M6502::M6502(const Settings& settings) mySettings(settings), A(0), X(0), Y(0), SP(0), IR(0), PC(0), N(false), V(false), B(false), D(false), I(false), notZ(false), C(false), - cycles(0), + icycles(0), myNumberOfDistinctAccesses(0), myLastAddress(0), myLastPeekAddress(0), @@ -100,7 +100,7 @@ void M6502::reset() PS(BSPF::containsIgnoreCase(cpurandom, "P") ? mySystem->randGenerator().next() : 0x20); - cycles = 0; + icycles = 0; // Load PC from the reset vector PC = uInt16(mySystem->peek(0xfffc)) | (uInt16(mySystem->peek(0xfffd)) << 8); @@ -127,7 +127,7 @@ inline uInt8 M6502::peek(uInt16 address, uInt8 flags) } //////////////////////////////////////////////// mySystem->incrementCycles(SYSTEM_CYCLES_PER_CPU); - cycles += SYSTEM_CYCLES_PER_CPU; + icycles += SYSTEM_CYCLES_PER_CPU; uInt8 result = mySystem->peek(address, flags); myLastPeekAddress = address; @@ -161,7 +161,7 @@ inline void M6502::poke(uInt16 address, uInt8 value, uInt8 flags) } //////////////////////////////////////////////// mySystem->incrementCycles(SYSTEM_CYCLES_PER_CPU); - cycles += SYSTEM_CYCLES_PER_CPU; + icycles += SYSTEM_CYCLES_PER_CPU; mySystem->poke(address, value, flags); myLastPokeAddress = address; @@ -243,7 +243,7 @@ bool M6502::execute(uInt32 number) // Reset the peek/poke address pointers myLastPeekAddress = myLastPokeAddress = myDataAddressForPoke = 0; - cycles = 0; + icycles = 0; // Fetch instruction at the program counter IR = peek(PC++, DISASM_CODE); // This address represents a code section diff --git a/src/emucore/M6502.hxx b/src/emucore/M6502.hxx index 8a5a38dc3..16feb2459 100644 --- a/src/emucore/M6502.hxx +++ b/src/emucore/M6502.hxx @@ -348,7 +348,7 @@ class M6502 : public Serializable bool notZ; // Z flag complement for processor status register bool C; // C flag for processor status register - uInt8 cycles; // cycles of last instruction + uInt8 icycles; // cycles of last instruction /// Indicates the numer of distinct memory accesses uInt32 myNumberOfDistinctAccesses; diff --git a/src/yacc/YaccParser.cxx b/src/yacc/YaccParser.cxx index 891989d87..dc3f0f921 100644 --- a/src/yacc/YaccParser.cxx +++ b/src/yacc/YaccParser.cxx @@ -219,8 +219,8 @@ CpuMethod getCpuSpecial(char* ch) return &CpuDebug::i; else if(BSPF::equalsIgnoreCase(ch, "b")) return &CpuDebug::b; - else if(BSPF::equalsIgnoreCase(ch, "_cycles")) - return &CpuDebug::cycles; + else if(BSPF::equalsIgnoreCase(ch, "_icycles")) + return &CpuDebug::icycles; else return nullptr; }