diff --git a/Docs/content/_index.md b/Docs/content/_index.md index cebfcac2..eacea9a8 100644 --- a/Docs/content/_index.md +++ b/Docs/content/_index.md @@ -24,12 +24,15 @@ toc: false * [Video Recorder](/tools.html#video-recorder) * [Log Window](/tools.html#log-window) 4. [Debugging Tools](/debugging.html) - * [Debugger](/debugging/debugger.html) - * [PPU Viewer](/debugging/ppuviewer.html) - * [Memory Tools](/debugging/memorytools.html) - * [Trace Logger](/debugging/tracelogger.html) * [Assembler](/debugging/assembler.html) + * [Debugger](/debugging/debugger.html) + * [Event Viewer](/debugging/eventviewer.html) + * [Memory Tools](/debugging/memorytools.html) + * [Performance Profiler](/debugging/performanceprofiler.html) + * [PPU Viewer](/debugging/ppuviewer.html) * [Script Window](/debugging/scriptwindow.html) + * [Text Hooker](/debugging/texthooker.html) + * [Trace Logger](/debugging/tracelogger.html) * [Integration with CC65/ASM6](/debugging/debuggerintegration.html) 5. [HD Packs](/hdpacks.html) 6. [Lua API reference](/apireference.html) \ No newline at end of file diff --git a/Docs/content/debugging/Debugger.md b/Docs/content/debugging/Debugger.md index 4a0577f9..76d88639 100644 --- a/Docs/content/debugging/Debugger.md +++ b/Docs/content/debugging/Debugger.md @@ -120,27 +120,41 @@ The watch window allows you to evaluate expression and see their value. Mesen su ### Syntax ### -The used syntax is identical to C/C++ syntax (e.g && for and, || for or, etc.) and should have the same operator precedence as C/C++. +The used syntax is identical to C/C++ syntax (e.g && for and, || for or, etc.) and have the same operator precedence as C/C++. **Note:** Use the $ prefix to denote hexadecimal values. -**Special values** -```text -A/X/Y/PS/SP: Value of corresponding registers -PC: Program Counter -OpPC: Address of the current instruction's first byte -Irq/Nmi: True if the Irq/Nmi flags are set -Cycle/Scanline: Current cycle (0-340)/scanline(-1 to 260) of the PPU -Frame: PPU frame number (since power on/reset) -Value: Current value being read/written from/to memory -IsRead: True if the CPU is reading from a memory address -IsWrite: True if the CPU is writing to a memory address -Address: Current CPU memory address being read/written -RomAddress: Current ROM address being read/written -[
]: (Byte) Memory value at (CPU) -{}: (Word) Memory value at (CPU) -``` -**Examples** +#### Special values #### + +The following "variables" can be used in both the watch window and contional breakpoints to check the state of specific portions of the emulation core. + +**Numeric values** + +* **A/X/Y/PS/SP**: Value of corresponding registers +* **PC**: Program Counter +* **OpPC**: Address of the current instruction's first byte +* **PreviousOpPC**: Address of the previous instruction's first byte +* **Cycle/Scanline**: Current cycle (0-340)/scanline(-1 to 260) of the PPU +* **Frame**: PPU frame number (since power on/reset) +* **Value**: Current value being read/written from/to memory +* **Address**: Current CPU memory address being read/written +* **RomAddress**: Current ROM address being read/written +* **[<address>]**: (Byte) Memory value at <address> (CPU) +* **{<address>}**: (Word) Memory value at <address> (CPU) + +**Flags** + +* **Branched**: true if the current instruction was reached by a branch/jump instruction +* **IsRead**: true if the CPU is reading from a memory address +* **IsWrite**: true if the CPU is writing to a memory address +* **IRQ**: true if the IRQ flag is set +* **NMI**: true if the NMI flag is set +* **Sprite0Hit**: true if the PPU's "Sprite 0 Hit" flag is set +* **SpriteOverflow**: true if the PPU's "Sprite Overflow" flag is set +* **VerticalBlank**: true if the PPU's "Vertical Blank" flag is set + + +#### Usage Examples #### ``` [$10] //Displays the value of memory at address $10 (CPU) a == 10 || x == $23 diff --git a/Docs/content/debugging/DebuggerIntegration.md b/Docs/content/debugging/DebuggerIntegration.md index 26977882..a23b3337 100644 --- a/Docs/content/debugging/DebuggerIntegration.md +++ b/Docs/content/debugging/DebuggerIntegration.md @@ -1,6 +1,6 @@ --- title: Integration with compilers -weight: 18 +weight: 40 pre: "" chapter: false --- diff --git a/Docs/content/debugging/MemoryTools.md b/Docs/content/debugging/MemoryTools.md index 06dbbca5..fc464f04 100644 --- a/Docs/content/debugging/MemoryTools.md +++ b/Docs/content/debugging/MemoryTools.md @@ -120,25 +120,3 @@ Use the `Sort By` option to sort the list based on different criteria. The `Reset` button allows you to reset all counters back to 0 -- this is useful when you are trying to gather data for a specific portion of the execution. Use the `Highlight uninitialized memory reads` option to track down any reads done to RAM memory before the RAM memory has been initialized after a power cycle -- reading from uninitialized memory can produce random behavior, which is usually unwanted. - -## Profiler ## - -