* Hexeditor: specify Data bank condition when adding a Breakpoint by context menu

* updated docs

[[Split portion of a mixed commit.]]
This commit is contained in:
ansstuff 2013-05-27 15:42:08 +00:00
parent 382995f111
commit f54f56acae
8 changed files with 63 additions and 39 deletions

View File

@ -41,10 +41,10 @@
<h1>AVI Capturing</h1>
<div id="topic_breadcrumb">
<a href="General.html">General</a> &rsaquo;&rsaquo; </div>
<a href="General.html">General</a> &rsaquo;&rsaquo; <a href="FamicomDiskSytem.html">Famicom Disk Sytem</a> &rsaquo;&rsaquo; </div>
</div>
<div id="topic_header_nav">
<a href="General.html"><img src="img/arrow_up.png" alt="Parent"/></a>
<a href="FamicomDiskSytem.html"><img src="img/arrow_up.png" alt="Parent"/></a>
<a href="FamicomDiskSytem.html"><img src="img/arrow_left.png" alt="Previous"/></a>

View File

@ -118,15 +118,15 @@
</ul>
<p><br/></p>
<p><br/></p>
<p>While execution is broken, the program counter (PC) can be edited, as well as the three registers A/X/Y, and the status flags. Normally they should be left as-is, but changing them at runtime can be useful for more advanced debugging.</p>
<p>While execution is broken (emulation is paused), the program counter (PC) can be edited, as well as the three registers A/X/Y, and the status flags. Normally they should be left as-is, but changing them at runtime can be useful for more advanced debugging.</p>
<p><br/></p>
<p>The contents of memory starting at the stack pointer (somewhere in the range $0100-01FF) is displayed in the Stack frame below the A/X/Y registers.</p>
<p><br/></p>
<p>The current PPU memory address, sprite memory address, scanline, and rendering pixel are displayed below the stack and status flags.</p>
<p><br/></p>
<p><span class="rvts15">Examples of Scanline number:</span> -1 it means Prerender time, 240 is Idle scanline, 0-239 are visible scanlines, 241-260/310 are VBlank scanlines.</p>
<p><span class="rvts15">Examples of Scanline number:</span> -1 means Prerender time, 240 is Idle scanline, 0-239 are visible scanlines, 241-260/310 are VBlank scanlines.</p>
<p><br/></p>
<p>To the right from PPU section there's Cycles counter and Instructions counter that keep counting while the game is running. You can use the information for keeping statistics, for code profiling or writing PPU-synchronized code (e.g. raster effects). You can also make the debugger break automatically based on the counters values. The "Reset counters" button resets both counters to 0.</p>
<p>To the right from the PPU section there's Cycles counter and Instructions counter that keep counting while the game is running. You can use the information for keeping statistics, for code profiling or writing PPU-synchronized code (e.g. raster effects). You can also make the debugger break automatically based on the counters values. The "Reset counters" button resets both counters to 0.</p>
<p><br/></p>
<p><br/></p>
<p><span class="rvts44">Disassembly</span></p>
@ -169,7 +169,7 @@
<p><br/></p>
<p>Check one or more of the options to watch for Read, Write, or Execute at an address. Note that fetching of code from an address will not break as a Read; use the Execute box for this. Breakpoints can be given a name that will appear in the breakpoint window. The condition field can be used to break only on particular conditions; see "Conditional Breakpoints" below.</p>
<p><br/></p>
<p>Double click on a breakpoint in the BreakPoints list to quickly disable or enable it. So you don't have to delete breakpoints to stop them from causing the debugger to halt the game.</p>
<p>Double click on a breakpoint in the BreakPoints list to quickly disable or enable this breakpoint. So you don't have to delete breakpoints to stop them from causing the debugger to halt the game.</p>
<p><br/></p>
<p>A special kind of breakpoints with the Forbid option will prevent any breakpoints from occurring within the specified memory address range. This can be enabled and disabled like other breakpoints.</p>
<p><br/></p>
@ -179,7 +179,7 @@
<p><br/></p>
<p>Finally, you can make the debugger break after certain number of instructions or CPU cycles.</p>
<p><br/></p>
<p>More advanced conditions and automation may be achieved through Lua script breakpoints. See the <a class="rvts18" href="LuaFunctionsList.html#LuaBreakpoints">Lua reference</a> for more information.</p>
<p>More advanced breakpoints conditions and automation may be achieved through Lua script breakpoints. See the <a class="rvts18" href="LuaFunctionsList.html#LuaBreakpoints">Lua reference</a> for more information.</p>
<p><br/></p>
<p>Breakpoints are listed in the following form:</p>
<p><br/></p>
@ -203,17 +203,17 @@
<p>Breakpoints may also have a conditional statement that causes them to execute only if that statement evaluates to true. The conditional breakpoint grammar has this form:</p>
<p><br/></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>P &nbsp; &nbsp; &nbsp; &nbsp; -&gt; Connect</li>
<li>Connect &nbsp; -&gt; Compare { ('||' | '&amp;&amp;') Compare }</li>
<li>Compare &nbsp; -&gt; Sum { ('==' | '!=' | '&lt;=' | '&gt;=' | '&lt;' | '&gt;') Sum }</li>
<li>Sum &nbsp; &nbsp; &nbsp; -&gt; Product { ('+' | '-') Product }</li>
<li>Product &nbsp; -&gt; Primitive { ('*' | '/') Primitive }</li>
<li>Primitive -&gt; Number | Address | Register | Flag | PC Bank | '(' Connect ')'</li>
<li>Number &nbsp; &nbsp;-&gt; '#' [1-9A-F]*</li>
<li>Address &nbsp; -&gt; '$' [1-9A-F]* | '$' '[' Connect ']'</li>
<li>Primitive -&gt; Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'</li>
<li>Number &nbsp; &nbsp;-&gt; '#' [0123456789ABCDEF]*</li>
<li>Address &nbsp; -&gt; '$' [0123456789ABCDEF]* | '$' '[' Connect ']'</li>
<li>Register &nbsp;-&gt; 'A' | 'X' | 'Y' | 'P'</li>
<li>Flag &nbsp; &nbsp; &nbsp;-&gt; 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'</li>
<li>PC Bank &nbsp; -&gt; 'K'</li>
<li>Data Bank &nbsp; -&gt; 'T'</li>
</ul>
<p><br/></p>
<p>The parser is very strict. All numbers are hexadecimal. Always prefix a number with # for an immediate value, or $ for a memory address. If a memory address needs to be calculated use $[] with the calculation inside the brackets.</p>
@ -226,18 +226,19 @@
<p><br/></p>
<p><span class="rvts15">Example conditions:</span></p>
<p><br/></p>
<p>Break if register A is less than value at memory address $0005:</p>
<p>Break only if register A is less than value at memory address $0005:</p>
<p><span class="rvts45">A &lt; $0005</span></p>
<p><br/></p>
<p>Break if the program counter is 8123:</p>
<p><span class="rvts45">P == #8123</span></p>
<p><br/></p>
<p>Break if the value at the indirect address on zeropage $10 is not equal to FF:</p>
<p>Break only if the value at the indirect address is not equal to FF:</p>
<p><span class="rvts45">#FF != $[$10+($11*#100)]</span></p>
<p><br/></p>
<p>Break if flag N is clear or A is not equal to 00:</p>
<p>Break only if flag N is clear or A is not equal to 00:</p>
<p><span class="rvts45">(N==#0 || A!=#0)</span></p>
<p><br/></p>
<p>Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):</p>
<p><span class="rvts45">T==#2</span></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><span class="rvts44">Bookmarks</span></p>
<p><br/></p>

View File

@ -58,7 +58,6 @@
<p></p>
<p><span class="rvts17">Hex Editor</span></p>
<p><br/></p>
<p><span class="rvts16">Introduction</span></p>
<p><br/></p>
<p>The Hex Editor is a very powerful memory viewing/editing tool and obsoletes the Memory Viewer tool from the FCE Ultra and FCEU Rerecording branches.</p>
<p><br/></p>
@ -78,12 +77,13 @@
<p>This allows you to directly view and write to PPU memory (VRAM).</p>
<p><br/></p>
<p><span class="rvts32">3. THE ROM FILE</span></p>
<p>This is possibly the coolest part of FCEUXD: &nbsp;It allows you to edit the ROM file in real-time, i.e. while the game is running. If you make a mistake, press Ctrl+Z or Edit-&gt;Undo to undo your change (then load a save-state if the game crashed). &nbsp;If you have the <a class="rvts18" href="CodeDataLogger.html">Code/Data Logger</a> running, then bytes that were logged will be colored.</p>
<p>This allows you to edit the ROM file in real time, i.e. while the game is running. If you make a mistake, press Ctrl+Z or Edit-&gt;Undo to undo your change (then load a save-state if the game crashed). &nbsp;If you have the <a class="rvts18" href="CodeDataLogger.html">Code/Data Logger</a> running, then bytes that were logged will be colored.</p>
<p><br/></p>
<p>The Hex Editor also has support for table files (*.tbl) to map bytes to text. Each line consists of four characters of the form "xx=y", where "xx" is the hex value, and "y" is the character that that value represents. &nbsp;I have also added an extension to represent the Return key: &nbsp;xx=ret whereby pressing the Return key will enter that value into the ROM. &nbsp;You can copy/paste data or text by selecting it and using Ctrl+Z (to copy) and Ctrl+V (to paste). Plus, there is an Edit-&gt;Find feature that you can use to search for data. This feature should be fairly intuitive, so I won't bother to explain it.</p>
<p><br/></p>
<p>When you're done editing, remember to save the ROM file (File-&gt;Save) or your changes will be lost when you close the ROM.</p>
<p><span class="rvts10"><br/></span></p>
<p><span class="rvts10"><br/></span></p>
<p><span class="rvts16">Why can't I edit NES memory beyond $8000?</span></p>
<p><span class="rvts10"><br/></span></p>
<p>NES memory from $8000-$FFFF is where the game's PRG-ROM code is mapped. &nbsp;Whenever you type in a value in the NES memory editor, it effectively writes that value to that address. Many games use mappers, which are usually accessed by writing to $8000-$FFFF (which is read-only)... and if *you* were to do so, it may trigger a bankswitch, which could easily make the game crash. In any event, doing so will not modify the ROM itself. &nbsp;What you *can* do, though, is edit the PRG-ROM itself by right-clicking on the offset you wish to edit, and selecting "Go here in the ROM file", which should take you to that spot in the ROM instead, where you can change the data at instead.</p>

View File

@ -291,7 +291,7 @@
<p class="rvps5"><span class="rvts37">ObjCtr = memory.getregister("y")</span></p>
<p class="rvps5"><span class="rvts37">if ObjCtr &gt; 0x16 then</span></p>
<p class="rvps6"><span class="rvts37">gui.text(1, 9, string.format("%02X",ObjCtr))</span></p>
<p class="rvps6"><span class="rvts37">emu.pause()</span></p>
<p class="rvps6"><span class="rvts37">emu.pause() -- or debugger.hitbreakpoint()</span></p>
<p class="rvps5"><span class="rvts37">end</span></p>
<p><span class="rvts37">end</span></p>
<p><span class="rvts37">memory.registerexecute(0x863C, CounterBreak);</span></p>
@ -301,7 +301,30 @@
</div>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">Joypad Library</span></p>
<p><span class="rvts67">Debugger Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">debugger.hitbreakpoint()</span></p>
<p><span class="rvts58"><br/></span></p>
<p><span class="rvts37">Simulates a breakpoint hit, pauses emulation and brings up the Debugger window. Use this function in your handlers of custom breakpoints.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">int debugger.getcyclescount()</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns an integer value representing the number of CPU cycles elapsed since the poweron or since the last reset of the cycles counter.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">int debugger.getinstructionscount()</span></p>
<p><span class="rvts58"><br/></span></p>
<p><span class="rvts37">Returns an integer value representing the number of CPU instructions executed since the poweron or since the last reset of the instructions counter.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">debugger.resetcyclescount()</span></p>
<p><span class="rvts58"><br/></span></p>
<p><span class="rvts37">Resets the cycles counter.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">debugger.resetinstructionscount()</span></p>
<p><span class="rvts58"><br/></span></p>
<p><span class="rvts37">Resets the instructions counter.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts67">Joypad Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">table joypad.get(int player)</span></p>
<p><span class="rvts59">table joypad.read(</span><span class="rvts58">int player</span><span class="rvts59">)</span></p>
@ -351,7 +374,7 @@
<p><span class="rvts37">joypad.write left in for backwards compatibility with older versions of FCEU/FCEUX.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">Zapper Library</span></p>
<p><span class="rvts67">Zapper Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts59">table zapper.read()</span></p>
<p><span class="rvts37"><br/></span></p>
@ -366,7 +389,7 @@
<p><span class="rvts37">Note: The zapper is always controller 2 on the NES so there is no player argument to this function.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">Input Library</span></p>
<p><span class="rvts67">Input Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">table input.get()</span></p>
<p><span class="rvts58">table input.read()</span></p>
@ -380,7 +403,7 @@
<p><span class="rvts37">Requests input from the user using a multiple-option message box. See gui.popup for complete usage and returns.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">Savestate Library</span></p>
<p><span class="rvts67">Savestate Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts59">object savestate.object(int slot = nil)</span></p>
<p><span class="rvts37"><br/></span></p>
@ -427,7 +450,7 @@
<p><span class="rvts37">Returns the data associated with the given savestate (data that was earlier returned by a registered save callback) without actually loading the rest of that savestate or calling any callbacks. location should be a save slot number.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">Movie Library</span></p>
<p><span class="rvts67">Movie Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">bool movie.active()</span></p>
<p><span class="rvts37"><br/></span></p>
@ -529,7 +552,7 @@
<p><span class="rvts37">Returns the state of read-only. True if in playback mode, false if in record mode.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">GUI Library</span></p>
<p><span class="rvts67">GUI Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">gui.pixel(int x, int y, type color)</span></p>
<p><span class="rvts58">gui.drawpixel(int x, int y, type color)</span></p>
@ -628,7 +651,7 @@
<p><span class="rvts37">Linux users might want to install xmessage to perform the work. Otherwise the dialog will appear on the shell and that's less noticeable.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">Sound Library</span></p>
<p><span class="rvts67">Sound Library</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts58">table sound.get()</span></p>
<p><span class="rvts37"><br/></span></p>
@ -699,7 +722,7 @@
<p><span class="rvts37">}</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p>
<p class="rvps4"><span class="rvts68">TAS Editor Library</span></p>
<p><span class="rvts67">TAS Editor Library</span></p>
<p><span class="rvts58"><br/></span></p>
<p><span class="rvts58">taseditor.registerauto(function func)</span></p>
<p><span class="rvts58">taseditor.registermanual(function func)</span></p>

View File

@ -69,12 +69,12 @@
<p><br/></p>
<p><span class="rvts40">Sound crackle</span></p>
<p><br/></p>
<p>If you enable hardware acceleration and VSync, and your monitor has a framerate different from 60FPS, you may experience minor sound cracle. This is a known issue and will probably be resolved in a future release.</p>
<p>If you enable hardware acceleration and Vsync (Wait for VBlank), and your monitor has a framerate different from 60FPS, you may experience minor sound cracle. This is a known issue and will probably be resolved in a future release.</p>
<p><br/></p>
<p><br/></p>
<p><span class="rvts40">Emulated picture is blurred (similar to the bilinear filter)</span></p>
<p><br/></p>
<p>Enable the "Create surface in system memory" option in the <a class="rvts18" href="Video.html">Video</a> config dialog.</p>
<p>Try choosing different options in the "DirectDraw" list in the <a class="rvts18" href="Video.html">Video</a> config dialog.</p>
<p><br/></p>
<p><br/></p>
<p><span class="rvts40">Slow savestates when recording movies</span></p>

View File

@ -84,8 +84,8 @@
<p><span class="rvts40">Sync Method</span></p>
<p>If the emulator is running poorly, trying out these sync options can help make it run smoother (fix image tearing).</p>
<p><br/></p>
<p><span class="rvts40">Create surface in system memory</span></p>
<p>If full screen is causing problems (for example, the image is blurry), checking this might fix it.</p>
<p><span class="rvts40">DirectDraw</span></p>
<p>If the image is blurry, here you can disable hardware acceleration.</p>
<p><br/></p>
<p><br/></p>
<p><span class="rvts12">Windowed Settings</span></p>
@ -106,9 +106,9 @@
<p><span class="rvts40">Sync Method</span></p>
<p>If the emulator is running poorly, trying out these sync options can help make it run smoother (fix image tearing).</p>
<p><br/></p>
<p><span class="rvts40">Create surface in system memory</span></p>
<p>If the image is blurry, checking this might fix it.</p>
<p><br/></p>
<p><span class="rvts40">DirectDraw</span></p>
<p>If Vsync doesn't work, here you can enable hardware acceleration.</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p><br/></p>
<hr style="height: 1px; color : #000000; background-color : #000000; border-width : 0px;"/>
<p><br/></p>

File diff suppressed because one or more lines are too long

View File

@ -333,19 +333,19 @@
target="FrameMain">
Customizing through the Config File</a>
</li><li class="" id="FamicomDiskSytem" data="">
</li><li class="folder" id="FamicomDiskSytem" data="">
<a
href="FamicomDiskSytem.html"
target="FrameMain">
Famicom Disk Sytem</a>
</li><li class="" id="AVICapturing" data="">
<ul><li class="" id="AVICapturing" data="">
<a
href="AVICapturing.html"
target="FrameMain">
AVI Capturing</a>
</li><li class="" id="MovieRecording" data="">
</li></ul></li><li class="" id="MovieRecording" data="">
<a
href="MovieRecording.html"
target="FrameMain">