updated docs

[[Split portion of a mixed commit.]]
This commit is contained in:
ansstuff 2013-09-22 18:54:01 +00:00
parent dae16cd697
commit f1095dc2c3
29 changed files with 1497 additions and 1422 deletions

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@
<a href="Covertfcm.html"><img src="img/arrow_left.png" alt="Previous"/></a> <a href="Covertfcm.html"><img src="img/arrow_left.png" alt="Previous"/></a>
<a href="ExternalInput.html"><img src="img/arrow_right.png" alt="Next"/></a> <a href="TextHooker.html"><img src="img/arrow_right.png" alt="Next"/></a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>

View File

@ -61,35 +61,36 @@
<p><br/></p> <p><br/></p>
<p><span class="rvts16">Introduction</span></p> <p><span class="rvts16">Introduction</span></p>
<p><br/></p> <p><br/></p>
<p>The Code/Data Logger makes it much easier to reverse-engineer NES ROMs. The basic idea behind it is that a normal NES disassembler cannot distinguish between code (which is executed) and data (which is read). The Code/Data logger keeps track of what is executed and what is read while the game is played, and then you can save this information into a .cdl file, which is essentially a mask that tells which bytes in the ROM are code and which are data. The file can be used in conjunction with a suitable disassembler to disassemble only the actual game code, resulting in a much cleaner source code, with code and data properly separated.</p> <p>The Code/Data Logger makes it much easier to reverse-engineer NES ROMs. The basic idea behind it is that a normal NES disassembler cannot distinguish between code (which is executed) and data (which is read). The Code/Data Logger keeps track of what is executed and what is read while the game is played, and then you can save this information into a .cdl file, which is essentially a <span class="rvts32">mask</span> that tells which bytes in the ROM are code and which are data. The file can be used in conjunction with a suitable disassembler to disassemble only the actual game code, resulting in a much cleaner source code where code and data are properly separated.</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts16">Using the Code/Data Logger</span></p> <p><span class="rvts16">Using the Code/Data Logger</span></p>
<p><br/></p> <p><br/></p>
<p>The Code/Data Logger keeps track of every byte in the ROM and records whether it's code (is executed) or data (is read). You can combine this logging feature with other tools to make them much more powerful:</p> <p>The Code/Data Logger keeps track of every byte in the ROM and records whether it's code (is executed) or data (is read).</p>
<p>You can combine this logging feature with other tools to make them much more powerful:</p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>combine with Debugger to see which branches of the game code were executed and which weren't yet</li> <li>combine with <a class="rvts18" href="Debugger.html">Debugger</a> to see which branches of the game code were executed and which weren't yet</li>
<li>combine with Trace Logger to let it log the code selectively</li> <li>combine with <a class="rvts18" href="TraceLogger.html">Trace Logger</a> to let it log the code selectively</li>
<li>combine with Hex Editor to enable smart coloring of bytes (so you can observe which bytes are used by the game and how/when they are used)</li> <li>combine with <a class="rvts18" href="PPUViewer.html">PPU Viewer</a> to let it only display graphics that was drawn on screen at least once</li>
<li>combine with (an external) Tile Viewer to see which graphics was used during the play session, and which was not</li> <li>combine with <a class="rvts18" href="HexEditor.html">Hex Editor</a> to enable smart coloring of bytes (so you can observe which bytes are used by the game and how/when they are used)</li>
<li>combine with (an external) Tile Viewer to see which graphics was used during certain play session, and which was not</li>
<li>combine with (an external) ROM Corruptor to make it only corrupt data, but not code</li> <li>combine with (an external) ROM Corruptor to make it only corrupt data, but not code</li>
<li>combine with (an external) Disassembler to help it separate code from data</li> <li>combine with (an external) Disassembler to help it separate code from data</li>
</ul> </ul>
<p><br/></p> <p><br/></p>
<p>See, it is very useful for finding specific code and data by using it with the <a class="rvts18" href="TraceLogger.html">Trace Logger</a>.</p> <p>See, it is very useful for finding certain types of data or code branches. It also makes debugging work more visual, since you can always see which lines of the disassembled code were executed and which weren't.</p>
<p>It also makes debugging work more visual, since you can always see which lines of the disassembled code were executed and which weren't.</p>
<p><br/></p> <p><br/></p>
<p>Furthermore, while the Code/Data Logger is running, the <a class="rvts18" href="HexEditor.html">Hex Editor</a> will color-code ROM bytes depending on whether they were logged as code or data. </p> <p>Furthermore, while the Code/Data Logger is running, the <a class="rvts18" href="HexEditor.html">Hex Editor</a> will color-code ROM bytes depending on whether they were logged as code or data:</p>
<p><br/></p> <p><br/></p>
<p>For PRG ROM:</p> <p>For PRG ROM:</p>
<p><span class="rvts50">Dark-yellow</span> - the byte is code</p> <p><span class="rvts51">Dark-yellow</span> - the byte is code</p>
<p><span class="rvts51">Blue</span> - the byte is data</p> <p><span class="rvts52">Blue</span> - the byte is data</p>
<p><span class="rvts52">Cyan</span> - the byte is PCM audio data</p> <p><span class="rvts53">Cyan</span> - the byte is PCM audio data</p>
<p><span class="rvts49">Green</span> - the byte is both code and data</p> <p><span class="rvts50">Green</span> - the byte is both code and data</p>
<p><br/></p> <p><br/></p>
<p>For CHR ROM:</p> <p>For CHR ROM:</p>
<p><span class="rvts53">Yellow</span> - the byte was rendered</p> <p><span class="rvts54">Yellow</span> - the byte was rendered</p>
<p><span class="rvts54">Light-blue</span> - the byte was read programmatically</p> <p><span class="rvts55">Light-blue</span> - the byte was read programmatically</p>
<p><span class="rvts55">Light-green</span> - the byte was both rendered and read programmatically</p> <p><span class="rvts56">Light-green</span> - the byte was both rendered and read programmatically</p>
<p><br/></p> <p><br/></p>
<p>The Code/Data Logger can also be used to generate a stripped NES ROM.</p> <p>The Code/Data Logger can also be used to generate a stripped NES ROM.</p>
<p>"Stripped" NES ROM is a ROM in which everything that was not logged by the Code/Data Logger is removed. It can be useful in many ways, for example, you can view the ROM in an external Hex Editor or a Tile Viewer, and you'll see only the parts that were used while playing. Furthermore, you could use it to create a demo ROM by only playing through the parts you would like others to see.</p> <p>"Stripped" NES ROM is a ROM in which everything that was not logged by the Code/Data Logger is removed. It can be useful in many ways, for example, you can view the ROM in an external Hex Editor or a Tile Viewer, and you'll see only the parts that were used while playing. Furthermore, you could use it to create a demo ROM by only playing through the parts you would like others to see.</p>
@ -102,8 +103,7 @@
<p><br/></p> <p><br/></p>
<p>Alternatively, you can save Unused Data (a ROM which is the opposite to the Stripped ROM). For example, you can play through the game, then save Unused Data ROM and watch it in a Tile Viewer to find unused graphics (possibly stumble upon secrets and easter eggs).</p> <p>Alternatively, you can save Unused Data (a ROM which is the opposite to the Stripped ROM). For example, you can play through the game, then save Unused Data ROM and watch it in a Tile Viewer to find unused graphics (possibly stumble upon secrets and easter eggs).</p>
<p><br/></p> <p><br/></p>
<p>Some notes:</p> <p>Note: When you "Load" another .cdl file, it does not clear the current log; instead, it combines ("arithmetical OR") it with the information in the file. This can be useful if you're trying to obtain a complete log of certain game, as multiple people can play through the game and keep own code/data logs, and then the results can be combined into an all-encompassing log. But if you would like to actually clear the code/data log, press the "Reset Log" button.</p>
<p>When you "Load" another .cdl file, it does not clear the current log; instead, it combines it with the information in the file. This can be useful if you're trying to obtain a complete log of certain game, as multiple people can play through the game and keep code/data logs, and then the results can be combined. But if you would like to actually clear the code/data log, press the "Reset Log" button.</p>
<p><br/></p> <p><br/></p>
<hr style="height: 1px; color : #000000; background-color : #000000; border-width : 0px;"/> <hr style="height: 1px; color : #000000; background-color : #000000; border-width : 0px;"/>
<p><br/></p> <p><br/></p>
@ -172,12 +172,13 @@
<p> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(e.g. Argus_(J).nes checks if the bankswitching works by reading the same byte of CHR data before and after switching)</p> <p> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(e.g. Argus_(J).nes checks if the bankswitching works by reading the same byte of CHR data before and after switching)</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp;x = unused.</p> <p> &nbsp; &nbsp; &nbsp; &nbsp;x = unused.</p>
<p><br/></p> <p><br/></p>
<p><br/></p>
<hr style="height: 1px; color : #000000; background-color : #000000; border-width : 0px;"/> <hr style="height: 1px; color : #000000; background-color : #000000; border-width : 0px;"/>
<p><br/></p> <p><br/></p>
<p><br/></p>
<p>CDL files make possible a number of things never done before. First, a PCM data ripper could be created that scans for data that has the 'P' bit set, in order to find/rip/play every PCM sample in a ROM. Also, it is possible for someone to make a more intelligent ROM corruptor that only corrupts data (by checking the 'D' bit). In any case, the Code/Data Logger opens many new possibilities for discovering useful things in games. Another interesting possibility would be to use the Code/Data Logger on an NSF file to create a stripped NSF. Such an NSF would contain nothing but the relevant subroutines and data required by each tune played; this would be helpful to NSF rippers by removing irrelevant information. Thus, an NSF ripper could create a stripped NSF by listening to each track while the Code/Data Logger operates on it, and then saving the stripped NSF. It should be noted that this capability, though tested and working on private builds, is detrimental to the process of fixing broken NSF files. For this reason, data logging is allowed for NSF files, but stripping NSF files of unused data is disabled.</p> <p>CDL files make possible a number of things never done before. First, a PCM data ripper could be created that scans for data that has the 'P' bit set, in order to find/rip/play every PCM sample in a ROM. Also, it is possible for someone to make a more intelligent ROM corruptor that only corrupts data (by checking the 'D' bit). In any case, the Code/Data Logger opens many new possibilities for discovering useful things in games. Another interesting possibility would be to use the Code/Data Logger on an NSF file to create a stripped NSF. Such an NSF would contain nothing but the relevant subroutines and data required by each tune played; this would be helpful to NSF rippers by removing irrelevant information. Thus, an NSF ripper could create a stripped NSF by listening to each track while the Code/Data Logger operates on it, and then saving the stripped NSF. It should be noted that this capability, though tested and working on private builds, is detrimental to the process of fixing broken NSF files. For this reason, data logging is allowed for NSF files, but stripping NSF files of unused data is disabled.</p>
<p><br/></p> <p><br/></p>
<p>The Code/Data Logger becomes the most useful when you need to restore a full source code of a game using e.g. IDA or another disassembler. There you can write a custom IDC script that uses a CDL file and calls MakeCode()/MakeData() functions to help the disassembler distinguish code from data. Making full and working/recompileable disassembly becomes really easy this way.</p> <p>The Code/Data Logger becomes the most useful when you need to restore a full source code of a game using e.g. IDA or another disassembler. There you can write a custom IDC script that uses a CDL file and calls MakeCode()/MakeData() functions to help the disassembler distinguish code from data. Making full and working/reassemblable disassembly becomes really easy this way.</p>
<p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>

View File

@ -58,8 +58,8 @@
<p></p> <p></p>
<p><span class="rvts17">Customizing through the Config File</span></p> <p><span class="rvts17">Customizing through the Config File</span></p>
<p><br/></p> <p><br/></p>
<p>There are some options that can only be done by directly editing the config (fceux.cfg) file. &nbsp;All of those options are documented here.</p>
<p><br/></p> <p><br/></p>
<p>There are some options that can only be done by directly editing the config (fceux.cfg) file. &nbsp;All of those options are documented here.</p>
<p>The .cfg file is a text file and can be opened by any text editor (just as wordpad).</p> <p>The .cfg file is a text file and can be opened by any text editor (just as wordpad).</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
@ -69,12 +69,26 @@
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">When you disable the backgrounds (Config &gt; Display &gt; Graphics: GB), the default color is black. &nbsp;You can change that color by modifying this value. &nbsp;By default it is 255 (black).</span></p> <p><span class="rvts22">When you disable the backgrounds (Config &gt; Display &gt; Graphics: GB), the default color is black. &nbsp;You can change that color by modifying this value. &nbsp;By default it is 255 (black).</span></p>
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts23">Debugger</span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">debuggerFontSize 15</span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">This value determines the size of the "Courier" font used by Debugger and Trace Logger. By default it is 15.</span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts23">Hex Editor</span></p> <p><span class="rvts23">Hex Editor</span></p>
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">hexeditorFontSize 15</span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">This value determines the size of the "Courier" font used by Hex Editor. By default it is 15.</span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">HexRowHeightBorder 0</span></p> <p><span class="rvts22">HexRowHeightBorder 0</span></p>
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">This value determines the number of pixels between each row of values in the Hex Editor. &nbsp;By default it is 0.</span></p> <p><span class="rvts22">This value determines the number of pixels between each row of values in the Hex Editor. &nbsp;By default it is 0.</span></p>
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">HexBackColorR 255</span></p> <p><span class="rvts22">HexBackColorR 255</span></p>
<p><span class="rvts22">HexBackColorG 255</span></p> <p><span class="rvts22">HexBackColorG 255</span></p>
<p><span class="rvts22">HexBackColorB 255</span></p> <p><span class="rvts22">HexBackColorB 255</span></p>
@ -87,7 +101,10 @@
<p><span class="rvts22">HexFreezeColorG 0</span></p> <p><span class="rvts22">HexFreezeColorG 0</span></p>
<p><span class="rvts22">HexFreezeColorB 255</span></p> <p><span class="rvts22">HexFreezeColorB 255</span></p>
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">These values allows are the Hex Editor color scheme values (RGB). &nbsp;The background color is 255,255,255 (white) by default. &nbsp;The foreground color (text) is 0,0,0 (black) by default. &nbsp;When an address is frozen it is 0,0,255 (blue) by default.</span></p> <p><span class="rvts22">These values allows are the Hex Editor color scheme values (RGB). &nbsp;The background color is 255,255,255 (white) by default. &nbsp;The foreground color (text) is 0,0,0 (black) by default. When an address is frozen it is 0,0,255 (blue) by default.</span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p></p> <p></p>
<p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/feature-tour">Easily create HTML Help documents</a></p> <p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/feature-tour">Easily create HTML Help documents</a></p>

View File

@ -64,22 +64,22 @@
<p>The debugger is a tool for inspecting and manipulating machine instructions and their execution. The debugger window has several components:</p> <p>The debugger is a tool for inspecting and manipulating machine instructions and their execution. The debugger window has several components:</p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>Execution - a small set of controls for controlling the execution of code.</li> <li>Execution - a small set of controls for controlling the execution of code.</li>
<li>CPU State - display of registers, flags, the execution stack, and the PPU state.</li> <li>CPU State - display of registers, flags, the stack, cycles and instructions counters, and also the PPU state.</li>
<li>Memory disassembly - displays a disassembly of the bytes currently accessible by the CPU data bus.</li> <li>Memory disassembly - displays a disassembly of the bytes currently accessible by the CPU data bus.</li>
<li>Breakpoints - a list of breakpoints for debugging.</li> <li>Breakpoints - a list of breakpoints for debugging.</li>
<li>Bookmarks - a list of addresses for quick navigation.</li> <li>Bookmarks - a list of bookmarked addresses for quick navigation.</li>
<li>Other - buttons for controlling symbolic debugging, rom patching, etc.</li> <li>Other - buttons for controlling symbolic debugging, rom patching, etc.</li>
</ul> </ul>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts44">Execution and CPU State</span></p> <p><span class="rvts44">Execution and CPU State</span></p>
<p><br/></p> <p><br/></p>
<p>Execution is controlled by a series of buttons at the top-middle of the window. These allow you to break (pause) execution and inspect the current state of the NES.</p> <p>Execution is controlled by the set of buttons at the top-middle of the window. These allow you to break (pause) execution and inspect the current state of the NES.</p>
<p><br/></p> <p><br/></p>
<p>When an NES ROM is opened, it will be normally be running. Most of the debugger window does not update while the game is running. To begin debugging you may click one of the buttons that will break (pause) execution, such as "Step Into", or add a breakpoint.</p> <p>When an NES ROM is opened, it will be normally be running right away (unless you manually pause the emulator before loading). Most of the debugger window does not update while the game is running. To begin debugging you may click one of the buttons that will break (pause) execution, such as "Step Into".</p>
<p><br/></p> <p><br/></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>Run - runs the program continuously until the next breakpoint is hit. The same effect can be achieved by pressing the Pause hotkey which will unpause emulator when it's paused.</li> <li>Run - runs the program continuously until the next breakpoint is hit, or the emulator is paused manually. The same effect can be achieved by pressing the Pause hotkey which will unpause emulator when it's paused.</li>
<li>Step Into - runs one instruction and then breaks.</li> <li>Step Into - runs one instruction and then breaks.</li>
<li>Step Out - attempt to run until the current subroutine ends with an RTS; in some cases will behave the same as Run.</li> <li>Step Out - attempt to run until the current subroutine ends with an RTS; in some cases will behave the same as Run.</li>
<li>Step Over - runs one instruction, unless it is a JSR instruction, which will run until its RTS.</li> <li>Step Over - runs one instruction, unless it is a JSR instruction, which will run until its RTS.</li>
@ -87,52 +87,52 @@
<li>128 Lines - runs 128 scanlines before breaking.</li> <li>128 Lines - runs 128 scanlines before breaking.</li>
</ul> </ul>
<p><br/></p> <p><br/></p>
<p>The Pause hotkey will break execution or resume it. The Frame Advance hotkey will run the emulator for one frame then break.</p> <p>The Pause hotkey will break execution or resume it. The Frame Advance hotkey will run the emulator for one frame and then break.</p>
<p><br/></p> <p><br/></p>
<p>When execution is paused, the disassembly view will begin with the memory at the current program counter location (PC) at the top of the window. You can scroll the disassembly up or down to observe the code. Then you can click "Seek PC" to return to the program counter at any time.</p> <p>When execution is paused, the disassembly view will begin with the memory near the current program counter location (PC). The "&gt;" mark shows the line which will be executed next. You can scroll the disassembly up or down (using scrollbar or mouse wheel) to observe the code. Then you can click "Seek PC" to return to the program counter at any time.</p>
<p><br/></p> <p><br/></p>
<p>You can also use "Seek To" button that will navigate to the specified address. Either type a hexadecimal address to the text field or simply left-click on any address in the Disassembly window.</p> <p>You can also use "Seek To" button that will navigate to the specified address. Either type a hexadecimal address to the text field or simply left-click on any address in the Disassembly window.</p>
<p>When entering the address, these convenient strings may be used instead of the hexadecimal memory address:</p>
<p><br/></p> <p><br/></p>
<p>NES special addresses:</p> <div><table width="100%" border="1" cellpadding="6" cellspacing="2" style="border-color: #000000; border-style: solid;">
<tr valign="top">
<td style="border-color: #000000; border-style: solid; width: 305px; height: 34px;"><p><span class="rvts46">HINT: When entering the address manually, these convenient strings may be used instead of the hexadecimal memory address:</span></p>
<p><span class="rvts46">NES special addresses:</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>NMI/VBL - non-maskable interrupt vector (at FFFA)</li> <li><span class="rvts46">NMI/VBL - non-maskable interrupt vector (at FFFA)</span></li>
<li>RST &nbsp; &nbsp; - reset vector (at FFFC)</li> <li><span class="rvts46">RST &nbsp; &nbsp; - reset vector (at FFFC)</span></li>
<li>IRQ &nbsp; &nbsp; - interrupt vector (at FFFE)</li> <li><span class="rvts46">IRQ &nbsp; &nbsp; - interrupt vector (at FFFE)</span></li>
</ul> </ul>
<p><br/></p> <p><span class="rvts46">FDS special addresses:</span></p>
<p>FDS special addresses:</p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>NMI1 - non-maskable interrupt vector (at DFF6)</li> <li><span class="rvts46">NMI1 - non-maskable interrupt vector (at DFF6)</span></li>
<li>NMI2 - non-maskable interrupt vector (at DFF8)</li> <li><span class="rvts46">NMI2 - non-maskable interrupt vector (at DFF8)</span></li>
<li>NMI3 - non-maskable interrupt vector (at DFFA)</li> <li><span class="rvts46">NMI3 - non-maskable interrupt vector (at DFFA)</span></li>
<li>RST &nbsp;- reset vector (at DFFC)</li> <li><span class="rvts46">RST &nbsp;- reset vector (at DFFC)</span></li>
<li>IRQ &nbsp;- interrupt vector (at DFFE)</li> <li><span class="rvts46">IRQ &nbsp;- interrupt vector (at DFFE)</span></li>
</ul> </ul>
<p><br/></p> <p><span class="rvts46">NSF special addresses:</span></p>
<p>NSF special addresses:</p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>LOAD - NSF LOAD address</li> <li><span class="rvts46">LOAD - NSF LOAD address</span></li>
<li>INIT - NSF INIT address</li> <li><span class="rvts46">INIT - NSF INIT address</span></li>
<li>PLAY - NSF PLAY address</li> <li><span class="rvts46">PLAY - NSF PLAY address</span></li>
</ul> </ul>
<p><br/></p> </td>
<p><br/></p> </tr>
</table>
</div>
<p><span class="rvts38"><br/></span></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>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><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>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><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>The current PPU memory address, sprite memory address, scanline, and rendering pixel are displayed below the stack and status flags. <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><br/></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>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. You can also access the counters via <a class="rvts18" href="LuaFunctionsList.html">Lua</a>.</p>
<p><br/></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><br/></p> <p><br/></p>
<p><span class="rvts44">Disassembly</span></p> <p><span class="rvts44">Disassembly</span></p>
<p><br/></p> <p><br/></p>
<p>This large frame takes up the left side of the debugger window. It displays the current contents of memory accessible by the CPU with an automatic disassembly of that data into assembly instructions. The following memory ranges may contain useful data for inspection:</p> <p>This large frame takes up the left side of the debugger window. It displays the current contents of memory accessible by the CPU with an automatic disassembly of that data into assembly instructions. The following memory ranges may contain useful data for inspection:</p>
<p><br/></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>0000-00FF - zero page (RAM)</li> <li>0000-00FF - zero page (RAM)</li>
<li>0100-01FF - stack (RAM)</li> <li>0100-01FF - stack (RAM)</li>
@ -146,46 +146,60 @@
<p><span class="rvts45">bb:mmmm:dd dd dd &nbsp;iiiiiiiiiiiii...</span></p> <p><span class="rvts45">bb:mmmm:dd dd dd &nbsp;iiiiiiiiiiiii...</span></p>
<p><br/></p> <p><br/></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>bb &nbsp; - 16k iNES bank, designates which 16k bank from the iNES file is mapped here. Note that the number may be not the same as mapper bankswitching current bank.</li> <li>bb - 16k iNES bank, designates which 16k bank from the iNES file is mapped here. Note that the number may be not the same as the actual hardware bank of the mapper.</li>
<li>mmmm - physical address on the NES CPU data bus.</li> <li>mmmm - physical address on the NES CPU data bus.</li>
<li>dd &nbsp; - data bytes belonging to the instruction beginning at this address.</li> <li>dd - data bytes belonging to the instruction beginning at this address.</li>
<li>iiii - assembly description of the instruction.</li> <li>iiii - assembly description of the instruction, possibly with symbolic decoration.</li>
</ul> </ul>
<p><br/></p> <p><br/></p>
<p>When debugging an NSF program, the bank designation will be a 4k NSF bank instead of the 16k iNES bank.</p> <p>When debugging an NSF program, the bank designation will be a 4k NSF bank instead of the 16k iNES bank.</p>
<p><br/></p> <p><br/></p>
<p>A single instruction may be one to three bytes, and will all appear on the line before the assembly code description of that instruction. An instruction with "= #$xx" at the end indicates the value currently in memory at the address referenced by the instruction.</p> <p>A single instruction may be one to three bytes, and will all appear on the line before the assembly code description of that instruction. An instruction with "= #$xx" at the end conveniently indicates the value currently in memory at the address referenced by the instruction.</p>
<p><br/></p> <p><br/></p>
<p>Hovering the mouse over the disassembly will display at the bottom of the window more detailed information about the location of this code in the iNES file.</p> <p>Hovering the mouse over the disassembly will display at the bottom of the window more detailed information about the location of this code in the iNES file.</p>
<p><br/></p> <p><br/></p>
<p>There is narrow column to the left of the Disassembly window. Left clicking on this column will open the Inline Assembler, which allows you to patch the ROM at runtime. Right clicking on this column will open the Hex Editor, which allows you to directly edit the ROM. Middle-clicking on this column will bring up the <a class="rvts18" href="GameGenieEncoderDecoder.html">Game Genie Encoder</a> at that address, so you can easily make Game Genie codes.</p> <p>There is narrow column to the left of the Disassembly window. Left clicking on this column will open the <span class="rvts32">Inline Assembler</span>, which allows you to patch the ROM at runtime. Right clicking on this column will open the <a class="rvts18" href="HexEditor.html">Hex Editor</a>, which allows you to directly edit the ROM. Middle-clicking on this column will bring up the <a class="rvts18" href="GameGenieEncoderDecoder.html">Game Genie Encoder</a> at that address, so you can easily make Game Genie codes.</p>
<p>Also, when <a class="rvts18" href="CodeDataLogger.html">Code/Data Logger</a> is running, this small column displays whether the respective line of the disassembled memory was executed ("c") or it was read as Data ("d"), or it wasn't logged yet. This way you can easily distinguish which branches of the game code were executed and which weren't.</p> <p>Also, when <a class="rvts18" href="CodeDataLogger.html">Code/Data Logger</a> is running, this small column displays whether the respective line of the disassembled memory was executed ("c") or it was read as Data ("d"), or it wasn't logged yet (empty space). This way you can easily distinguish which branches of the game code were executed and which weren't.</p>
<p><br/></p>
<p><br/></p>
<p><span class="rvts44">Symbolic Debugging</span></p>
<p><br/></p>
<p>FCEUX allows you to label any address of RAM or ROM with a human-readable symbolic name.</p>
<p>For example, when you've figured out that at the address $C022 there's a subroutine which refills player HP, you can right-click the address and type a name like "AddHealthpoints". You can also add a comment, which will be seen while browsing the code near this address. From now on, the address will be substituted by the name everywhere - in all instructions referencing this address, in Hex Editor window, in the log produced by Trace Logger. E.g., JSR $C022 will look like JSR AddHealthpoints.</p>
<p><br/></p>
<p>When entering the name, you can use any symbols except #. It's also recommended to avoid whitespaces in names.</p>
<p>To rename an address, just right-click the name.</p>
<p><br/></p>
<p>The data for Symbolic Debugging is stored in <a class="rvts18" href="NLFilesFormat.html">NL files</a> in the same folder as the ROM. You can edit the files in any text editor (to reload all NL files of the currently active ROM file press the "Reload Symbols" button), but it's more convenient to use right-clicks.</p>
<p><br/></p>
<p>You can enable and disable symbolic debugging by clicking the checkbox "Symbolic debug" in the lower right corner. In general, there's no need to disable this feature. If you need to see the actual address which got substituted by a name, you can simply left-click the name and watch its address in the "Seek To" text field. This also works when clicking a name in the Trace Logger window.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts44">Breakpoints</span></p> <p><span class="rvts44">Breakpoints</span></p>
<p><br/></p> <p><br/></p>
<p>Breakpoints will break execution when chosen conditions are met. To create a breakpoint, click the Add button in the BreakPoints frame in the upper right corner of the debugger.</p> <p>Breakpoints will automatically break execution when chosen conditions are met. To create a breakpoint, click the Add button in the Breakpoints frame in the upper right corner of the debugger.</p>
<p><br/></p> <p><br/></p>
<p>Each breakpoint has an address range to watch (use only the left address field if you wish to watch a single byte address). When entering the address of a breakpoint, you can also use convenient strings (such as IRQ) instead of hexadecimal memory addresses.</p> <p>Each breakpoint has an address range to watch. Use only the left address field if you wish to watch a single byte address. When entering the address of a breakpoint, you can also use the aforementioned convenient strings (such as IRQ) instead of hexadecimal memory addresses.</p>
<p><br/></p> <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>Check one or more of the options to watch for Read, Write, or Execute at the given address. Note that fetching of code from an address will not break as a Read; so use the Execute box for this case. Breakpoints can be given a name that will appear in the breakpoints list. The condition field can be used to break only on particular conditions; see "Conditional Breakpoints" below.</p>
<p><br/></p> <p><br/></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>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><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>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> <p><br/></p>
<p>A quicker way to add PC breakpoints is to double click on any address in the Disassembly when you want to set the breakpoint to that address. <span class="rvts15">Example:</span> when you need to quickly advance emulation to a given line of code, double-click on the address part of the line, and the "Add Execute breakpoint here" dialog will appear, click "OK" and then hit "Run", Debugger will break at this line of code.</p> <p>A quicker way to add PC breakpoints is to double click on any address in the Disassembly when you want to set the breakpoint to that address. <span class="rvts15">Example:</span> when you need to quickly advance emulation to a given line of code, double-click on the address part of the line, and the "Add Execute breakpoint here" dialog will appear, just click "OK" and then hit "Run", Debugger will break at this line of code.</p>
<p><br/></p> <p><br/></p>
<p>There is also an option to "Break on Bad Opcode" which will halt execution if a bad instruction opcode is reached.</p> <p>There is also an option to Break on Bad Opcodes, which will halt execution if a bad instruction opcode is reached.</p>
<p><br/></p> <p><br/></p>
<p>Finally, you can make the debugger break after certain number of instructions or CPU cycles.</p> <p>Finally, you can make the debugger break after executing a certain number of instructions or CPU cycles.</p>
<p><br/></p> <p><br/></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>More advanced breakpoints conditions and full 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><br/></p>
<p>Breakpoints are listed in the following form:</p> <p>Breakpoints are listed in the following form:</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts45">aaaa: EmRWXF : nnnn</span></p> <p><span class="rvts45">aaaa EmRWXF nnnn cccc</span></p>
<p><span class="rvts45">aaaa-aaaa: EmRWXF : nnnn</span></p> <p><span class="rvts45">or</span></p>
<p><span class="rvts45">aaaa-aaaa EmRWXF nnnn cccc</span></p>
<p><br/></p> <p><br/></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>aaaa - address of breakpoint</li> <li>aaaa - address of breakpoint</li>
@ -195,7 +209,8 @@
<li>W &nbsp; &nbsp;- write</li> <li>W &nbsp; &nbsp;- write</li>
<li>X &nbsp; &nbsp;- execute</li> <li>X &nbsp; &nbsp;- execute</li>
<li>F &nbsp; &nbsp;- Forbid</li> <li>F &nbsp; &nbsp;- Forbid</li>
<li>nnnn - name of breakpoint</li> <li>nnnn - (optional) name of breakpoint</li>
<li>nnnn - (optional) condition of breakpoint</li>
</ul> </ul>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
@ -220,7 +235,6 @@
<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> <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>
<p><br/></p> <p><br/></p>
<p>Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.</p> <p>Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.</p>
<p><br/></p>
<p>Flags evaluate to 1 if set, 0 if clear.</p> <p>Flags evaluate to 1 if set, 0 if clear.</p>
<p><br/></p> <p><br/></p>
<p>Connecting operators || or &amp;&amp; combine boolean terms. Parentheses dictate order of operations.</p> <p>Connecting operators || or &amp;&amp; combine boolean terms. Parentheses dictate order of operations.</p>
@ -240,13 +254,12 @@
<p><span class="rvts45">T==#2</span></p> <p><span class="rvts45">T==#2</span></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p>
<p><span class="rvts44">Bookmarks</span></p> <p><span class="rvts44">Bookmarks</span></p>
<p><br/></p> <p><br/></p>
<p>A list of bookmark addresses can be kept in the Address Bookmarks frame to make memory navigation easier. Simply type a hexadecimal address (or a convenient string, such as "NMI") and click "Add" to add it to your bookmarks. Alternatively, just click on any address in the Disassembly window, and the address will appear in the Bookmark Add field, so you don't have to type it.</p> <p>A list of bookmarked addresses can be kept in the Address Bookmarks frame to make memory navigation easier. Simply type a hexadecimal address (or a convenient string, such as "NMI") and click "Add" to add it to your bookmarks. Alternatively, just left-click any address in the Disassembly window, and the address will appear in the Bookmark Add field, so you don't have to type it.</p>
<p>Next time you wish to go to this address just double click on the bookmark.</p> <p>Next time you wish to go to this address just double click on the bookmark.</p>
<p>You can also name bookmarks.</p> <p>You can also name bookmarks.</p>
<p>When you exit the emulator, bookmarks are saved in a .deb file. Next time you return to debugging the list of bookmarks will be automatically loaded from the file.</p> <p>When you exit the emulator, bookmarks are saved in a .deb file named after the ROM of the debugged game. Next time you return to debugging the game, the list of bookmarks will be automatically loaded from the file.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts44">Inline Assembler</span></p> <p><span class="rvts44">Inline Assembler</span></p>
@ -258,51 +271,11 @@
<p>Click Apply to apply your patch to the ROM in memory. Click Undo to remove the last assembled line. After applying a patch, clicking Save will allow you to save this patch directly to the ROM file.</p> <p>Click Apply to apply your patch to the ROM in memory. Click Undo to remove the last assembled line. After applying a patch, clicking Save will allow you to save this patch directly to the ROM file.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts44">Symbolic Debugging</span></p>
<p><br/></p>
<p>This feature makes it possible to rename addresses in the disassembly window (e.g. $C022) to easily understandable names (e.g. AddHealthpoints). You can also add comments to lines in the disassembly window. You can enable symbolic debugging by clicking the checkbox "Symbolic debug".</p>
<p><br/></p>
<p>To use this feature, create "name list files" in any text editor like Notepad (Filename should be like this: *.(bank).nl / *.ram.nl, <span class="rvts15">Example:</span> NES Test Cart (PD).nes.0.nl, NES Test Cart (PD).nes.ram.nl) which contain names and comments you wish to display in the disassembly window. These files are simple ASCII text files.</p>
<p><br/></p>
<p><span class="rvts15">Example of contents of a NL file:</span></p>
<p><br/></p>
<p>$C000#NewName1#Comment1</p>
<p>$C002##Comment2</p>
<p>$C004#NewName2#</p>
<p>$C006#NewName3#MultilineComment-Part1</p>
<p>\MultilineComment-Part2</p>
<p>\MultilineComment-Part3</p>
<p>$C008/10#NewName4#</p>
<p><br/></p>
<p>Every line contains two # characters which separate the three parts of one line: The first part (starting with a $ character) is the address to be renamed. Optionally you can add a "/number" part which marks the offsets as a beginning of an array of the given size (the size must be specified in hex form). The second (optional) part is the new name of that address. Whenever the line of that address is shown in the disassembly window an extra line saying "Name: NewName" is shown above it. &nbsp;Instructions referencing this address, for example JSR $C000 are also changed to JSR NewName1 (in that example). &nbsp;The third (optional) part is the comment that's also added above the disassembly line the comment refers to. It works exactly like the additional name line, only the prefix of that line is different. Comment lines start with "Comment: " rather than with "Name: ". &nbsp;Multi-lines comments are possible. Lines starting with a \ character are just appended to the comment of the preceding line. Multi-line comments are also shown in multiple lines in the disassembly window.</p>
<p><br/></p>
<p>In the example above, the first line contains all three parts. Using this NL file all references to the address $C000 are replaced with NewName1 and whenever line $C000 is shown in the disassembly window an additional comment is also visible right above the actual disassembled line. The second example line defines only a comment while the third line defines only a name. Following that there's a multi-line comment definition for address $C006. The last line defines an array called NewName4 of size 0x10 (= 16) bytes starting at offset $C008.</p>
<p><br/></p>
<p>NL files must follow a specific naming convention to account for bank swapping. Each bank needs its own NL file with a hexadecimal bank number. RAM can also be given its own NL file. For instance, an NES file named "mygame.nes" that has 4 banks would have these NL files:</p>
<p><br/></p>
<p>mygame.nes</p>
<p>mygame.nes.ram.nl</p>
<p>mygame.nes.0.nl</p>
<p>mygame.nes.1.nl</p>
<p>mygame.nes.2.nl</p>
<p>mygame.nes.3.nl</p>
<p><br/></p>
<p>All NL files must be in the same directory as the ROM file itself.</p>
<p><br/></p>
<p>In the *.ram.nl file you can name and comment RAM addresses instead of ROM addresses. In this case, you might use a line such as:</p>
<p><br/></p>
<p>$00A5#Mic Test OK#00=Not Passed, 01=Passed</p>
<p><br/></p>
<p>To reload the NL files of the currently active ROM file press the "Reload Symbols" button.</p>
<p><br/></p>
<p>When the "Symbolic debug" option is enabled, both the Debugger and Hex Editor will display symbolic names instead of specified addresses, so the debugging process becomes much easier.</p>
<p><br/></p>
<p><br/></p>
<p><span class="rvts44">Other</span></p> <p><span class="rvts44">Other</span></p>
<p><br/></p> <p><br/></p>
<p>If the ".DEB files" checkbox in the lower right corner of the debugger window is checked, the emulator will automatically save debug settings such as breakpoints and bookmarks in a .deb file alongside the NES ROM, and load these settings next time you open the ROM.</p> <p>If the ".DEB files" checkbox in the lower right corner of the debugger window is checked, the emulator will automatically save debug settings such as breakpoints and bookmarks in a .deb file alongside the NES ROM, and load these settings next time you open the ROM.</p>
<p><br/></p> <p><br/></p>
<p>There is a "Rom Patcher" button that may be used to apply a small patch to a ROM.</p> <p>There is a "Rom Patcher" button that may be used to apply a small patch to a ROM, although <a class="rvts18" href="HexEditor.html">Hex Editor</a> is more convenient in general.</p>
<p><br/></p> <p><br/></p>
<p>The "ROM offsets" option will display ROM offsets instead of CPU addresses in the Disassembly window.</p> <p>The "ROM offsets" option will display ROM offsets instead of CPU addresses in the Disassembly window.</p>
<p><br/></p> <p><br/></p>
@ -313,6 +286,7 @@
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p>
<p></p> <p></p>
<p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/create-epub-ebooks">Full-featured EBook editor</a></p> <p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/create-epub-ebooks">Full-featured EBook editor</a></p>
</div> </div>

View File

@ -1,74 +0,0 @@
<html>
<head>
<title>External Input</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="HelpNDoc Personal Edition 3.9.1.648">
<link type="text/css" rel="stylesheet" media="all" href="css/reset.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/base.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/hnd.css" />
<!--[if lte IE 8]>
<link type="text/css" rel="stylesheet" media="all" href="css/ielte8.css" />
<![endif]-->
<style type="text/css">
#topic_header
{
background-color: #EFEFEF;
}
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/hnd.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
if (top.frames.length == 0)
{
var sTopicUrl = top.location.href.substring(top.location.href.lastIndexOf("/") + 1, top.location.href.length);
top.location.href = "fceux.html?" + sTopicUrl;
}
else if (top && top.FrameTOC && top.FrameTOC.SelectTocItem)
{
top.FrameTOC.SelectTocItem("ExternalInput");
}
});
</script>
</head>
<body>
<div id="topic_header">
<div id="topic_header_content">
<h1>External Input</h1>
<div id="topic_breadcrumb">
<a href="Tools2.html">Tools</a> &rsaquo;&rsaquo; </div>
</div>
<div id="topic_header_nav">
<a href="Tools2.html"><img src="img/arrow_up.png" alt="Parent"/></a>
<a href="AutoFireConfigurations.html"><img src="img/arrow_left.png" alt="Previous"/></a>
<a href="TextHooker.html"><img src="img/arrow_right.png" alt="Next"/></a>
</div>
<div class="clear"></div>
</div>
<div id="topic_content">
<p></p>
<p><span class="rvts17">Use External Input</span></p>
<p><br/></p>
<p>Use External Input release control of FCEU so that an external program (such as a TAS bot) can save/load states, frame advance, and deliver input. &nbsp;This feature was original implemented for older version of <span class="rvts18">Basic bot</span>. </p>
<p></p>
<p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/create-epub-ebooks">Full-featured EPub generator</a></p>
</div>
<div id="topic_footer">
<div id="topic_footer_content">
2013</div>
</div>
</body>
</html>

View File

@ -56,22 +56,22 @@
<p><br/></p> <p><br/></p>
<p>Information regarding various concepts such as TAS, ROM Hacking, RAM Mapping.</p> <p>Information regarding various concepts such as TAS, ROM Hacking, RAM Mapping.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts74" href="ToolAssistedSpeedruns.html">Troubleshooting FAQ</a></p> <p><a class="rvts75" href="ToolAssistedSpeedruns.html">Troubleshooting FAQ</a></p>
<p><br/></p> <p><br/></p>
<p>A guide to common problems people experience, and what to do about them.</p> <p>A guide to common problems people experience, and what to do about them.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><a class="rvts74" href="ToolAssistedSpeedruns.html">Tool Assisted Speedruns (TAS)</a></p> <p><a class="rvts75" href="ToolAssistedSpeedruns.html">Tool Assisted Speedruns (TAS)</a></p>
<p><br/></p> <p><br/></p>
<p>Information regarding Tool Assisted Speedruns and the TAS community.</p> <p>Information regarding Tool Assisted Speedruns and the TAS community.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><a class="rvts74" href="ROMHacking.html">ROM Hacking</a></p> <p><a class="rvts75" href="ROMHacking.html">ROM Hacking</a></p>
<p><br/></p> <p><br/></p>
<p>Information regarding making ROM Hacks and the ROM Hacking community.</p> <p>Information regarding making ROM Hacks and the ROM Hacking community.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><a class="rvts74" href="NESRAMMappingFindingValues.html">NES RAM Mapping</a></p> <p><a class="rvts75" href="NESRAMMappingFindingValues.html">NES RAM Mapping</a></p>
<p><br/></p> <p><br/></p>
<p>A guide to the layout of NES RAM, and how to interpret its contents.</p> <p>A guide to the layout of NES RAM, and how to interpret its contents.</p>
<p><br/></p> <p><br/></p>

View File

@ -98,7 +98,7 @@
<p><br/></p> <p><br/></p>
<p><span class="rvts16">Single Instance Mode</span></p> <p><span class="rvts16">Single Instance Mode</span></p>
<p><br/></p> <p><br/></p>
<p>If enabled, starting a second copy of FCEUX with a path to a game will make FCEUX load the file into the first window, then exit.</p> <p>If enabled, starting a second copy of FCEUX with a path to a game will make FCEUX load the file into the first window, then exit. This will ensure that only one instance of FCEUX is running in your OS.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>

View File

@ -90,19 +90,19 @@
<p><br/></p> <p><br/></p>
<p>The Hex Editor highlights certain bytes with different colors to help you distinguish different data.</p> <p>The Hex Editor highlights certain bytes with different colors to help you distinguish different data.</p>
<p>Usually all bytes are colored black.</p> <p>Usually all bytes are colored black.</p>
<p>Bookmarked RAM addresses are highlighted by <span class="rvts47">green color</span>.</p> <p>Bookmarked RAM addresses are highlighted by <span class="rvts48">green color</span>.</p>
<p>Freezed RAM addresses are highlighted by <span class="rvts46">blue color</span>.</p> <p>Freezed RAM addresses are highlighted by <span class="rvts47">blue color</span>.</p>
<p>Modified ROM bytes are highlighted by <span class="rvts48">red color</span>.</p> <p>Modified ROM bytes are highlighted by <span class="rvts49">red color</span>.</p>
<p>If you have the <a class="rvts18" href="CodeDataLogger.html">Code/Data Logger</a> running, bytes that were logged will be colored:</p> <p>If you have the <a class="rvts18" href="CodeDataLogger.html">Code/Data Logger</a> running, bytes that were logged will be colored:</p>
<p>For PRG ROM segment:</p> <p>For PRG ROM segment:</p>
<p><span class="rvts50">Dark-yellow</span> - the byte is code</p> <p><span class="rvts51">Dark-yellow</span> - the byte is code</p>
<p><span class="rvts51">Blue</span> - the byte is data</p> <p><span class="rvts52">Blue</span> - the byte is data</p>
<p><span class="rvts52">Cyan</span> - the byte is PCM audio data</p> <p><span class="rvts53">Cyan</span> - the byte is PCM audio data</p>
<p><span class="rvts49">Green</span> - the byte is both code and data</p> <p><span class="rvts50">Green</span> - the byte is both code and data</p>
<p>For CHR ROM segment:</p> <p>For CHR ROM segment:</p>
<p><span class="rvts53">Yellow</span> - the byte was rendered</p> <p><span class="rvts54">Yellow</span> - the byte was rendered</p>
<p><span class="rvts54">Light-blue</span> - the byte was read programmatically</p> <p><span class="rvts55">Light-blue</span> - the byte was read programmatically</p>
<p><span class="rvts55">Light-green</span> - the byte was both rendered and read programmatically</p> <p><span class="rvts56">Light-green</span> - the byte was both rendered and read programmatically</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts16">Highlight Activity</span></p> <p><span class="rvts16">Highlight Activity</span></p>
<p><br/></p> <p><br/></p>

View File

@ -61,17 +61,17 @@
<p>The following functions are available in FCEUX, in addition to standard LUA capabilities:</p> <p>The following functions are available in FCEUX, in addition to standard LUA capabilities:</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts60">Emu library</span></p> <p><span class="rvts61">Emu library</span></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts68">emu.poweron()</span></p> <p><span class="rvts69">emu.poweron()</span></p>
<p><span class="rvts67"><br/></span></p> <p><span class="rvts68"><br/></span></p>
<p><span class="rvts67">Executes a power cycle.</span></p> <p><span class="rvts68">Executes a power cycle.</span></p>
<p><span class="rvts67"><br/></span></p> <p><span class="rvts68"><br/></span></p>
<p><span class="rvts68">emu.softreset()</span></p> <p><span class="rvts69">emu.softreset()</span></p>
<p><span class="rvts67"><br/></span></p> <p><span class="rvts68"><br/></span></p>
<p><span class="rvts67">Executes a (soft) reset.</span></p> <p><span class="rvts68">Executes a (soft) reset.</span></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts61">emu.speedmode(string mode)</span></p> <p><span class="rvts62">emu.speedmode(string mode)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Set the emulator to given speed. The mode argument can be one of these:</span></p> <p><span class="rvts37">Set the emulator to given speed. The mode argument can be one of these:</span></p>
<p><span class="rvts37"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts37">- "normal"</span></p> <p><span class="rvts37"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts37">- "normal"</span></p>
@ -79,70 +79,70 @@
<p><span class="rvts37"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts37">- "turbo"</span></p> <p><span class="rvts37"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts37">- "turbo"</span></p>
<p><span class="rvts37"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts37">- "maximum"</span></p> <p><span class="rvts37"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts37">- "maximum"</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.frameadvance()</span></p> <p><span class="rvts62">emu.frameadvance()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Advance the emulator by one frame. It's like pressing the frame advance button once.</span></p> <p><span class="rvts37">Advance the emulator by one frame. It's like pressing the frame advance button once.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Most scripts use this function in their main game loop to advance frames. Note that you can also register functions by various methods that run "dead", returning control to the emulator and letting the emulator advance the frame. &nbsp;For most people, using frame advance in an endless while loop is easier to comprehend so I suggest &nbsp;starting with that. &nbsp;This makes more sense when creating bots. Once you move to creating auxillary libraries, try the register() methods.</span></p> <p><span class="rvts37">Most scripts use this function in their main game loop to advance frames. Note that you can also register functions by various methods that run "dead", returning control to the emulator and letting the emulator advance the frame. &nbsp;For most people, using frame advance in an endless while loop is easier to comprehend so I suggest &nbsp;starting with that. &nbsp;This makes more sense when creating bots. Once you move to creating auxillary libraries, try the register() methods.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.pause()</span></p> <p><span class="rvts62">emu.pause()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Pauses the emulator.</span></p> <p><span class="rvts37">Pauses the emulator.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.unpause()</span></p> <p><span class="rvts62">emu.unpause()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Unpauses the emulator.</span></p> <p><span class="rvts37">Unpauses the emulator.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.exec_count(int count, function func)</span></p> <p><span class="rvts62">emu.exec_count(int count, function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Calls given function, restricting its working time to given number of lua cycles. Using this method you can ensure that some heavy operation (like Lua bot) won't freeze FCEUX.</span></p> <p><span class="rvts37">Calls given function, restricting its working time to given number of lua cycles. Using this method you can ensure that some heavy operation (like Lua bot) won't freeze FCEUX.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">emu.exec_time(int time</span><span class="rvts61">, function func</span><span class="rvts62">)</span></p> <p><span class="rvts63">emu.exec_time(int time</span><span class="rvts62">, function func</span><span class="rvts63">)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Windows-only. Calls given function, restricting its working time to given number of milliseconds (approximate). Using this method you can ensure that some heavy operation (like Lua bot) won't freeze FCEUX.</span></p> <p><span class="rvts37">Windows-only. Calls given function, restricting its working time to given number of milliseconds (approximate). Using this method you can ensure that some heavy operation (like Lua bot) won't freeze FCEUX.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.setrenderplanes(bool sprites, bool background)</span></p> <p><span class="rvts62">emu.setrenderplanes(bool sprites, bool background)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Toggles the drawing of the sprites and background planes. Set to false or nil to disable a pane, anything else will draw them.</span></p> <p><span class="rvts37">Toggles the drawing of the sprites and background planes. Set to false or nil to disable a pane, anything else will draw them.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">emu.message(string message)</span></p> <p><span class="rvts63">emu.message(string message)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Displays given message on screen in the standard messages position. Use gui.text() when you need to position text.</span></p> <p><span class="rvts37">Displays given message on screen in the standard messages position. Use gui.text() when you need to position text.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">int emu.framecount()</span></p> <p><span class="rvts62">int emu.framecount()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the framecount value. The frame counter runs without a movie running so this always returns a value.</span></p> <p><span class="rvts37">Returns the framecount value. The frame counter runs without a movie running so this always returns a value.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">int emu.lagcount()</span></p> <p><span class="rvts62">int emu.lagcount()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the number of lag frames encountered. Lag frames are frames where the game did not poll for input because it missed the vblank. This happens when it has to compute too much within the frame boundary. This returns the number indicated on the lag counter.</span></p> <p><span class="rvts37">Returns the number of lag frames encountered. Lag frames are frames where the game did not poll for input because it missed the vblank. This happens when it has to compute too much within the frame boundary. This returns the number indicated on the lag counter.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool emu.lagged()</span></p> <p><span class="rvts62">bool emu.lagged()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if currently in a lagframe, false otherwise.</span></p> <p><span class="rvts37">Returns true if currently in a lagframe, false otherwise.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.setlagflag(bool value)</span></p> <p><span class="rvts62">emu.setlagflag(bool value)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Sets current value of lag flag.</span></p> <p><span class="rvts37">Sets current value of lag flag.</span></p>
<p><span class="rvts37">Some games poll input even in lag frames, so standard way of detecting lag (used by FCEUX and other emulators) does not work for those games, and you have to determine lag frames manually.</span></p> <p><span class="rvts37">Some games poll input even in lag frames, so standard way of detecting lag (used by FCEUX and other emulators) does not work for those games, and you have to determine lag frames manually.</span></p>
<p><span class="rvts37">First, find RAM addresses that help you distinguish between lag and non-lag frames (e.g. an in-game frame counter that only increments in non-lag frames). Then register memory hooks that will change lag flag when needed.</span></p> <p><span class="rvts37">First, find RAM addresses that help you distinguish between lag and non-lag frames (e.g. an in-game frame counter that only increments in non-lag frames). Then register memory hooks that will change lag flag when needed.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool emu.emulating()</span></p> <p><span class="rvts62">bool emu.emulating()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if emulation has started, or false otherwise. Certain operations such as using savestates are invalid to attempt before emulation has started. You probably won't need to use this function unless you want to make your script extra-robust to being started too early.</span></p> <p><span class="rvts37">Returns true if emulation has started, or false otherwise. Certain operations such as using savestates are invalid to attempt before emulation has started. You probably won't need to use this function unless you want to make your script extra-robust to being started too early.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool emu.paused()</span></p> <p><span class="rvts62">bool emu.paused()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if emulator is paused, false otherwise.</span></p> <p><span class="rvts37">Returns true if emulator is paused, false otherwise.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool emu.readonly()</span></p> <p><span class="rvts62">bool emu.readonly()</span></p>
<p><span class="rvts37">Alias: movie.readonly</span></p> <p><span class="rvts37">Alias: movie.readonly</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns whether the emulator is in read-only state. &nbsp;</span></p> <p><span class="rvts37">Returns whether the emulator is in read-only state. &nbsp;</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p> <p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.setreadonly(bool state)</span></p> <p><span class="rvts62">emu.setreadonly(bool state)</span></p>
<p><span class="rvts37">Alias: movie.setreadonly</span></p> <p><span class="rvts37">Alias: movie.setreadonly</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Sets the read-only status to read-only if argument is true and read+write if false.</span></p> <p><span class="rvts37">Sets the read-only status to read-only if argument is true and read+write if false.</span></p>
@ -150,7 +150,7 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p> <p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.registerbefore(function func)</span></p> <p><span class="rvts62">emu.registerbefore(function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Registers a callback function to run immediately before each frame gets emulated. This runs after the next frame's input is known but before it's used, so this is your only chance to set the next frame's input using the next frame's would-be input. For example, if you want to make a script that filters or modifies ongoing user input, such as making the game think "left" is pressed whenever you press "right", you can do it easily with this.</span></p> <p><span class="rvts37">Registers a callback function to run immediately before each frame gets emulated. This runs after the next frame's input is known but before it's used, so this is your only chance to set the next frame's input using the next frame's would-be input. For example, if you want to make a script that filters or modifies ongoing user input, such as making the game think "left" is pressed whenever you press "right", you can do it easily with this.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -158,11 +158,11 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Like other callback-registering functions provided by FCEUX, there is only one registered callback at a time per registering function per script. If you register two callbacks, the second one will replace the first, and the call to emu.registerbefore will return the old callback. You may register nil instead of a function to clear a previously-registered callback. If a script returns while it still has registered callbacks, FCEUX will keep it alive to call those callbacks when appropriate, until either the script is stopped by the user or all of the callbacks are de-registered.</span></p> <p><span class="rvts37">Like other callback-registering functions provided by FCEUX, there is only one registered callback at a time per registering function per script. If you register two callbacks, the second one will replace the first, and the call to emu.registerbefore will return the old callback. You may register nil instead of a function to clear a previously-registered callback. If a script returns while it still has registered callbacks, FCEUX will keep it alive to call those callbacks when appropriate, until either the script is stopped by the user or all of the callbacks are de-registered.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.registerafter(function func)</span></p> <p><span class="rvts62">emu.registerafter(function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Registers a callback function to run immediately after each frame gets emulated. It runs at a similar time as (and slightly before) gui.register callbacks, except unlike with gui.register it doesn't also get called again whenever the screen gets redrawn. Similar caveats as those mentioned in emu.registerbefore apply.</span></p> <p><span class="rvts37">Registers a callback function to run immediately after each frame gets emulated. It runs at a similar time as (and slightly before) gui.register callbacks, except unlike with gui.register it doesn't also get called again whenever the screen gets redrawn. Similar caveats as those mentioned in emu.registerbefore apply.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.registerexit(function func)</span></p> <p><span class="rvts62">emu.registerexit(function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Registers a callback function that runs when the script stops. Whether the script stops on its own or the user tells it to stop, or even if the script crashes or the user tries to close the emulator, FCEUX will try to run whatever Lua code you put in here first. So if you want to make sure some code runs that cleans up some external resources or saves your progress to a file or just says some last words, you could put it here. (Of course, a forceful termination of the application or a crash from inside the registered exit function will still prevent the code from running.)</span></p> <p><span class="rvts37">Registers a callback function that runs when the script stops. Whether the script stops on its own or the user tells it to stop, or even if the script crashes or the user tries to close the emulator, FCEUX will try to run whatever Lua code you put in here first. So if you want to make sure some code runs that cleans up some external resources or saves your progress to a file or just says some last words, you could put it here. (Of course, a forceful termination of the application or a crash from inside the registered exit function will still prevent the code from running.)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -170,15 +170,15 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Note that restarting a script counts as stopping it and then starting it again, so doing so (either by clicking "Restart" or by editing the script while it is running) will trigger the callback. Note also that returning from a script generally does NOT count as stopping (because your script is still running or waiting to run its callback functions and thus does not stop... see here for more information), even if the exit callback is the only one you have registered. </span></p> <p><span class="rvts37">Note that restarting a script counts as stopping it and then starting it again, so doing so (either by clicking "Restart" or by editing the script while it is running) will trigger the callback. Note also that returning from a script generally does NOT count as stopping (because your script is still running or waiting to run its callback functions and thus does not stop... see here for more information), even if the exit callback is the only one you have registered. </span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool emu.addgamegenie(string str)</span></p> <p><span class="rvts62">bool emu.addgamegenie(string str)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Adds a Game Genie code to the Cheats menu. Returns false and an error message if the code can't be decoded. Returns false if the code couldn't be added. Returns true if the code already existed, or if it was added.</span></p> <p><span class="rvts37">Adds a Game Genie code to the Cheats menu. Returns false and an error message if the code can't be decoded. Returns false if the code couldn't be added. Returns true if the code already existed, or if it was added.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Usage: emu.addgamegenie("NUTANT")</span></p> <p><span class="rvts37">Usage: emu.addgamegenie("NUTANT")</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Note that the Cheats Dialog Box won't show the code unless you close and reopen it.</span></p> <p><span class="rvts37">Note that the Cheats Dialog Box won't show the code unless you close and reopen it.</span></p>
<p><span class="rvts61"><br/></span></p> <p><span class="rvts62"><br/></span></p>
<p><span class="rvts61">bool emu.delgamegenie(string str)</span></p> <p><span class="rvts62">bool emu.delgamegenie(string str)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Removes a Game Genie code from the Cheats menu. Returns false and an error message if the code can't be decoded. Returns false if the code couldn't be deleted. Returns true if the code didn't exist, or if it was deleted.</span></p> <p><span class="rvts37">Removes a Game Genie code from the Cheats menu. Returns false and an error message if the code can't be decoded. Returns false if the code couldn't be deleted. Returns true if the code didn't exist, or if it was deleted.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -186,11 +186,11 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Note that the Cheats Dialog Box won't show the code unless you close and reopen it.</span></p> <p><span class="rvts37">Note that the Cheats Dialog Box won't show the code unless you close and reopen it.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.print(string str)</span></p> <p><span class="rvts62">emu.print(string str)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Puts a message into the Output Console area of the Lua Script control window. Useful for displaying usage instructions to the user when a script gets run.</span></p> <p><span class="rvts37">Puts a message into the Output Console area of the Lua Script control window. Useful for displaying usage instructions to the user when a script gets run.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">emu.getscreenpixel(int x, int y, bool getemuscreen)</span></p> <p><span class="rvts62">emu.getscreenpixel(int x, int y, bool getemuscreen)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the separate RGB components of the given screen pixel, and the palette. Can be 0-255 by 0-239, but NTSC only displays 0-255 x 8-231 of it. If getemuscreen is false, this gets background colors from either the screen pixel or the LUA pixels set, but LUA data may not match the information used to put the data to the screen. If getemuscreen is true, this gets background colors from anything behind an LUA screen element.</span></p> <p><span class="rvts37">Returns the separate RGB components of the given screen pixel, and the palette. Can be 0-255 by 0-239, but NTSC only displays 0-255 x 8-231 of it. If getemuscreen is false, this gets background colors from either the screen pixel or the LUA pixels set, but LUA data may not match the information used to put the data to the screen. If getemuscreen is true, this gets background colors from anything behind an LUA screen element.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -201,54 +201,64 @@
<p><span class="rvts37">You can avoid getting LUA data by putting the data into a function, and feeding the function name to emu.registerbefore.</span></p> <p><span class="rvts37">You can avoid getting LUA data by putting the data into a function, and feeding the function name to emu.registerbefore.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts60">FCEU library</span></p> <p><span class="rvts61">FCEU library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">The FCEU library is the same as the emu library. It is left in for backwards compatibility. However, the emu library is preferred.</span></p> <p><span class="rvts37">The FCEU library is the same as the emu library. It is left in for backwards compatibility. However, the emu library is preferred.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">ROM Library</span></p> <p><span class="rvts71">ROM Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">rom.readbyte(int address)</span></p> <p><span class="rvts62">rom.readbyte(int address)</span></p>
<p><span class="rvts61">rom.readbyteunsigned(int address)</span></p> <p><span class="rvts62">rom.readbyteunsigned(int address)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Get an unsigned byte from the actual ROM file at the given address. &nbsp;</span></p> <p><span class="rvts37">Get an unsigned byte from the actual ROM file at the given address. &nbsp;</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">This includes the header! It's the same as opening the file in a hex-editor.</span></p> <p><span class="rvts37">This includes the header! It's the same as opening the file in a hex-editor.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">rom.readbytesigned(int address)</span></p> <p><span class="rvts62">rom.readbytesigned(int address)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Get a signed byte from the actual ROM file at the given address. Returns a byte that is signed.</span></p> <p><span class="rvts37">Get a signed byte from the actual ROM file at the given address. Returns a byte that is signed.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">This includes the header! It's the same as opening the file in a hex-editor.</span></p> <p><span class="rvts37">This includes the header! It's the same as opening the file in a hex-editor.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Memory Library</span></p> <p><span class="rvts71">Memory Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">memory.readbyte(int address)</span></p> <p><span class="rvts62">memory.readbyte(int address)</span></p>
<p><span class="rvts61">memory.readbyteunsigned(int address)</span></p> <p><span class="rvts62">memory.readbyteunsigned(int address)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Get an unsigned byte from the RAM at the given address. Returns a byte regardless of emulator. The byte will always be positive.</span></p> <p><span class="rvts37">Get an unsigned byte from the RAM at the given address. Returns a byte regardless of emulator. The byte will always be positive.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">memory.readbyterange(int address, int length)</span></p> <p><span class="rvts62">memory.readbyterange(int address, int length)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Get a length bytes starting at the given address and return it as a string. Convert to table to access the individual bytes.</span></p> <p><span class="rvts37">Get a length bytes starting at the given address and return it as a string. Convert to table to access the individual bytes.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">memory.readbytesigned(int address)</span></p> <p><span class="rvts62">memory.readbytesigned(int address)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Get a signed byte from the RAM at the given address. Returns a byte regardless of emulator. The most significant bit will serve as the sign.</span></p> <p><span class="rvts37">Get a signed byte from the RAM at the given address. Returns a byte regardless of emulator. The most significant bit will serve as the sign.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">memory.writebyte(int address, int value)</span></p> <p><span class="rvts62">memory.readword(int addressLow, [int addressHigh])</span></p>
<p><span class="rvts62">memory.readwordunsigned(int addressLow, [int addressHigh])</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Get an unsigned word from the RAM at the given address. Returns a 16-bit value regardless of emulator. The value will always be positive.</span></p>
<p><span class="rvts37">If you only provide a single parameter (addressLow), the function treats it as address of little-endian word. if you provide two parameters, the function reads the low byte from addressLow and the high byte from addressHigh, so you can use it in games which like to store their variables in separate form (a lot of NES games do).</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">memory.readwordsigned(int addressLow, [int addressHigh])</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">The same as above, except the returned value is signed, i.e. its most significant bit will serve as the sign.</span></p>
<p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">memory.writebyte(int address, int value)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Write the value to the RAM at the given address. The value is modded with 256 before writing (so writing 257 will actually write 1). Negative values allowed.</span></p> <p><span class="rvts37">Write the value to the RAM at the given address. The value is modded with 256 before writing (so writing 257 will actually write 1). Negative values allowed.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">int memory.getregister(cpuregistername)</span></p> <p><span class="rvts62">int memory.getregister(cpuregistername)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the current value of the given hardware register.</span></p> <p><span class="rvts37">Returns the current value of the given hardware register.</span></p>
<p><span class="rvts37">For example, memory.getregister("pc") will return the main CPU's current Program Counter.</span></p> <p><span class="rvts37">For example, memory.getregister("pc") will return the main CPU's current Program Counter.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Valid registers are: "a", "x", "y", "s", "p", and "pc".</span></p> <p><span class="rvts37">Valid registers are: "a", "x", "y", "s", "p", and "pc".</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">memory.setregister(string cpuregistername, int value)</span></p> <p><span class="rvts62">memory.setregister(string cpuregistername, int value)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Sets the current value of the given hardware register.</span></p> <p><span class="rvts37">Sets the current value of the given hardware register.</span></p>
<p><span class="rvts37">For example, memory.setregister("pc",0x200) will change the main CPU's current Program Counter to 0x200.</span></p> <p><span class="rvts37">For example, memory.setregister("pc",0x200) will change the main CPU's current Program Counter to 0x200.</span></p>
@ -258,8 +268,8 @@
<p><span class="rvts37">You had better know exactly what you're doing or you're probably just going to crash the game if you try to use this function. That applies to the other memory.write functions as well, but to a lesser extent. </span></p> <p><span class="rvts37">You had better know exactly what you're doing or you're probably just going to crash the game if you try to use this function. That applies to the other memory.write functions as well, but to a lesser extent. </span></p>
<p><a name="LuaBreakpoints"></a> <p><a name="LuaBreakpoints"></a>
<span class="rvts37"><br/></span></p> <span class="rvts37"><br/></span></p>
<p><span class="rvts61">memory.register(int address, [int size,] function func)</span></p> <p><span class="rvts62">memory.register(int address, [int size,] function func)</span></p>
<p><span class="rvts61">memory.registerwrite(int address, [int size,] function func)</span></p> <p><span class="rvts62">memory.registerwrite(int address, [int size,] function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Registers a function to be called immediately whenever the given memory address range is written to.</span></p> <p><span class="rvts37">Registers a function to be called immediately whenever the given memory address range is written to.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -273,9 +283,9 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">If func is nil that means to de-register any memory write callbacks that the current script has already registered on the given range of bytes.</span></p> <p><span class="rvts37">If func is nil that means to de-register any memory write callbacks that the current script has already registered on the given range of bytes.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">memory.registerexec(int address, [int size,] function func)</span></p> <p><span class="rvts62">memory.registerexec(int address, [int size,] function func)</span></p>
<p><span class="rvts61">memory.registerrun(int address, [int size,] function func)</span></p> <p><span class="rvts62">memory.registerrun(int address, [int size,] function func)</span></p>
<p><span class="rvts61">memory.registerexecute(int address, [int size,] function func)</span></p> <p><span class="rvts62">memory.registerexecute(int address, [int size,] function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Registers a function to be called immediately whenever the emulated system runs code located in the given memory address range.</span></p> <p><span class="rvts37">Registers a function to be called immediately whenever the emulated system runs code located in the given memory address range.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -285,7 +295,7 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<div><table width="100%" border="1" cellpadding="1" cellspacing="2" style="border-color: #000000; border-style: solid;"> <div><table width="100%" border="1" cellpadding="1" cellspacing="2" style="border-color: #000000; border-style: solid;">
<tr valign="top"> <tr valign="top">
<td style="border-color: #000000; border-style: solid;"><p><span class="rvts72">Example of custom breakpoint:</span></p> <td style="border-color: #000000; border-style: solid;"><p><span class="rvts73">Example of custom breakpoint:</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">function CounterBreak()</span></p> <p><span class="rvts37">function CounterBreak()</span></p>
<p class="rvps5"><span class="rvts37">ObjCtr = memory.getregister("y")</span></p> <p class="rvps5"><span class="rvts37">ObjCtr = memory.getregister("y")</span></p>
@ -301,33 +311,33 @@
</div> </div>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Debugger Library</span></p> <p><span class="rvts71">Debugger Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">debugger.hitbreakpoint()</span></p> <p><span class="rvts62">debugger.hitbreakpoint()</span></p>
<p><span class="rvts61"><br/></span></p> <p><span class="rvts62"><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">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="rvts37"><br/></span></p>
<p><span class="rvts61">int debugger.getcyclescount()</span></p> <p><span class="rvts62">int debugger.getcyclescount()</span></p>
<p><span class="rvts37"><br/></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">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="rvts37"><br/></span></p>
<p><span class="rvts61">int debugger.getinstructionscount()</span></p> <p><span class="rvts62">int debugger.getinstructionscount()</span></p>
<p><span class="rvts61"><br/></span></p> <p><span class="rvts62"><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">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="rvts37"><br/></span></p>
<p><span class="rvts61">debugger.resetcyclescount()</span></p> <p><span class="rvts62">debugger.resetcyclescount()</span></p>
<p><span class="rvts61"><br/></span></p> <p><span class="rvts62"><br/></span></p>
<p><span class="rvts37">Resets the cycles counter.</span></p> <p><span class="rvts37">Resets the cycles counter.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">debugger.resetinstructionscount()</span></p> <p><span class="rvts62">debugger.resetinstructionscount()</span></p>
<p><span class="rvts61"><br/></span></p> <p><span class="rvts62"><br/></span></p>
<p><span class="rvts37">Resets the instructions counter.</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="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Joypad Library</span></p> <p><span class="rvts71">Joypad Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">table joypad.get(int player)</span></p> <p><span class="rvts62">table joypad.get(int player)</span></p>
<p><span class="rvts62">table joypad.read(</span><span class="rvts61">int player</span><span class="rvts62">)</span></p> <p><span class="rvts63">table joypad.read(</span><span class="rvts62">int player</span><span class="rvts63">)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns a table of every game button, where each entry is true if that button is currently held (as of the last time the emulation checked), or false if it is not held. This takes keyboard inputs, not Lua. The table keys look like this (case sensitive):</span></p> <p><span class="rvts37">Returns a table of every game button, where each entry is true if that button is currently held (as of the last time the emulation checked), or false if it is not held. This takes keyboard inputs, not Lua. The table keys look like this (case sensitive):</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -337,25 +347,25 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">joypad.read left in for backwards compatibility with older versions of FCEU/FCEUX.</span></p> <p><span class="rvts37">joypad.read 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><span class="rvts61">table joypad.getimmediate(int player)</span></p> <p><span class="rvts62">table joypad.getimmediate(int player)</span></p>
<p><span class="rvts62">table joypad.readimmediate(</span><span class="rvts61">int player</span><span class="rvts62">)</span></p> <p><span class="rvts63">table joypad.readimmediate(</span><span class="rvts62">int player</span><span class="rvts63">)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns a table of every game button, where each entry is true if that button is held at the moment of calling the function, or false if it is not held. This function polls keyboard input immediately, allowing Lua to interact with user even when emulator is paused.</span></p> <p><span class="rvts37">Returns a table of every game button, where each entry is true if that button is held at the moment of calling the function, or false if it is not held. This function polls keyboard input immediately, allowing Lua to interact with user even when emulator is paused.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">As of FCEUX 2.2.0, the function only works in Windows. In Linux this function will return nil.</span></p> <p><span class="rvts37">As of FCEUX 2.2.0, the function only works in Windows. In Linux this function will return nil.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">table joypad.getdown(int player)</span></p> <p><span class="rvts62">table joypad.getdown(int player)</span></p>
<p><span class="rvts61">table joypad.readdown(int player)</span></p> <p><span class="rvts62">table joypad.readdown(int player)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns a table of only the game buttons that are currently held. Each entry is true if that button is currently held (as of the last time the emulation checked), or nil if it is not held.</span></p> <p><span class="rvts37">Returns a table of only the game buttons that are currently held. Each entry is true if that button is currently held (as of the last time the emulation checked), or nil if it is not held.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">table joypad.getup(int player)</span></p> <p><span class="rvts62">table joypad.getup(int player)</span></p>
<p><span class="rvts61">table joypad.readup(int player)</span></p> <p><span class="rvts62">table joypad.readup(int player)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns a table of only the game buttons that are not currently held. Each entry is nil if that button is currently held (as of the last time the emulation checked), or false if it is not held.</span></p> <p><span class="rvts37">Returns a table of only the game buttons that are not currently held. Each entry is nil if that button is currently held (as of the last time the emulation checked), or false if it is not held.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">joypad.set(int player, table input)</span></p> <p><span class="rvts62">joypad.set(int player, table input)</span></p>
<p><span class="rvts62">joypad.write(</span><span class="rvts61">int player, table input</span><span class="rvts62">)</span></p> <p><span class="rvts63">joypad.write(</span><span class="rvts62">int player, table input</span><span class="rvts63">)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Set the inputs for the given player. Table keys look like this (case sensitive):</span></p> <p><span class="rvts37">Set the inputs for the given player. Table keys look like this (case sensitive):</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -374,9 +384,9 @@
<p><span class="rvts37">joypad.write left in for backwards compatibility with older versions of FCEU/FCEUX.</span></p> <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><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Zapper Library</span></p> <p><span class="rvts71">Zapper Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">table zapper.read()</span></p> <p><span class="rvts63">table zapper.read()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the zapper data</span></p> <p><span class="rvts37">Returns the zapper data</span></p>
<p><span class="rvts37">When no movie is loaded this input is the same as the internal mouse input (which is used to generate zapper input, as well as the arkanoid paddle).</span></p> <p><span class="rvts37">When no movie is loaded this input is the same as the internal mouse input (which is used to generate zapper input, as well as the arkanoid paddle).</span></p>
@ -389,60 +399,60 @@
<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">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><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Input Library</span></p> <p><span class="rvts71">Input Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">table input.get()</span></p> <p><span class="rvts62">table input.get()</span></p>
<p><span class="rvts61">table input.read()</span></p> <p><span class="rvts62">table input.read()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Reads input from keyboard and mouse. Returns pressed keys and the position of mouse in pixels on game screen. &nbsp;The function returns a table with at least two properties; table.xmouse and table.ymouse. &nbsp;Additionally any of these keys will be set to true if they were held at the time of executing this function:</span></p> <p><span class="rvts37">Reads input from keyboard and mouse. Returns pressed keys and the position of mouse in pixels on game screen. &nbsp;The function returns a table with at least two properties; table.xmouse and table.ymouse. &nbsp;Additionally any of these keys will be set to true if they were held at the time of executing this function:</span></p>
<p><span class="rvts37">leftclick, rightclick, middleclick, capslock, numlock, scrolllock, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, F1, F2, F3, F4, F5, F6, &nbsp;F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, backspace, tab, enter, shift, control, alt, pause, escape, space, pageup, pagedown, end, home, left, up, right, down, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5, numpad6, numpad7, numpad8, numpad9, numpad*, insert, delete, numpad+, numpad-, numpad., numpad/, semicolon, plus, minus, comma, period, slash, backslash, tilde, quote, leftbracket, rightbracket.</span></p> <p><span class="rvts37">leftclick, rightclick, middleclick, capslock, numlock, scrolllock, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, F1, F2, F3, F4, F5, F6, &nbsp;F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, backspace, tab, enter, shift, control, alt, pause, escape, space, pageup, pagedown, end, home, left, up, right, down, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5, numpad6, numpad7, numpad8, numpad9, numpad*, insert, delete, numpad+, numpad-, numpad., numpad/, semicolon, plus, minus, comma, period, slash, backslash, tilde, quote, leftbracket, rightbracket.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">string input.popup</span></p> <p><span class="rvts62">string input.popup</span></p>
<p><span class="rvts37">Alias: gui.popup</span></p> <p><span class="rvts37">Alias: gui.popup</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<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">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><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Savestate Library</span></p> <p><span class="rvts71">Savestate Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">object savestate.object(int slot = nil)</span></p> <p><span class="rvts63">object savestate.object(int slot = nil)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Create a new savestate object. Optionally you can save the current state to one of the predefined slots(1-10) using the range 1-9 for slots 1-9, and 10 for 0, QWERTY style. Using no number will create an "anonymous" savestate.</span></p> <p><span class="rvts37">Create a new savestate object. Optionally you can save the current state to one of the predefined slots(1-10) using the range 1-9 for slots 1-9, and 10 for 0, QWERTY style. Using no number will create an "anonymous" savestate.</span></p>
<p><span class="rvts37">Note that this does not actually save the current state! You need to create this value and pass it on to the load and save functions in order to save it.</span></p> <p><span class="rvts37">Note that this does not actually save the current state! You need to create this value and pass it on to the load and save functions in order to save it.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Anonymous savestates are temporary, memory only states. You can make them persistent by calling memory.persistent(state). Persistent anonymous states are deleted from disk once the script exits.</span></p> <p><span class="rvts37">Anonymous savestates are temporary, memory only states. You can make them persistent by calling memory.persistent(state). Persistent anonymous states are deleted from disk once the script exits.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">object savestate.create(int slot = nil)</span></p> <p><span class="rvts63">object savestate.create(int slot = nil)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">savestate.create is identical to savestate.object, except for the numbering for predefined slots(1-10, 1 refers to slot 0, 2-10 refer to 1-9). It's being left in for compatibility with older scripts, and potentially for platforms with different internal predefined slot numbering.</span></p> <p><span class="rvts37">savestate.create is identical to savestate.object, except for the numbering for predefined slots(1-10, 1 refers to slot 0, 2-10 refer to 1-9). It's being left in for compatibility with older scripts, and potentially for platforms with different internal predefined slot numbering.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">savestate.save(object savestate)</span></p> <p><span class="rvts63">savestate.save(object savestate)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Save the current state object to the given savestate. The argument is the result of savestate.create(). You can load this state back up by calling savestate.load(savestate) on the same object.</span></p> <p><span class="rvts37">Save the current state object to the given savestate. The argument is the result of savestate.create(). You can load this state back up by calling savestate.load(savestate) on the same object.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts62">savestate.load(object savestate)</span></p> <p><span class="rvts63">savestate.load(object savestate)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Load the the given state. The argument is the result of savestate.create() and has been passed to savestate.save() at least once.</span></p> <p><span class="rvts37">Load the the given state. The argument is the result of savestate.create() and has been passed to savestate.save() at least once.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">If this savestate is not persistent and not one of the predefined states, the state will be deleted after loading.</span></p> <p><span class="rvts37">If this savestate is not persistent and not one of the predefined states, the state will be deleted after loading.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">savestate.persist(object savestate)</span></p> <p><span class="rvts62">savestate.persist(object savestate)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Set the given savestate to be persistent. It will not be deleted when you load this state but at the exit of this script instead, unless it's one of the predefined states. &nbsp;If it is one of the predefined savestates it will be saved as a file on disk.</span></p> <p><span class="rvts37">Set the given savestate to be persistent. It will not be deleted when you load this state but at the exit of this script instead, unless it's one of the predefined states. &nbsp;If it is one of the predefined savestates it will be saved as a file on disk.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">savestate.registersave(function func)</span></p> <p><span class="rvts62">savestate.registersave(function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Registers a callback function that runs whenever the user saves a state. This won't actually be called when the script itself makes a savestate, so none of those endless loops due to a misplaced savestate.save.</span></p> <p><span class="rvts37">Registers a callback function that runs whenever the user saves a state. This won't actually be called when the script itself makes a savestate, so none of those endless loops due to a misplaced savestate.save.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">As with other callback-registering functions provided by FCEUX, there is only one registered callback at a time per registering function per script. Upon registering a second callback, the first is kicked out to make room for the second. In this case, it will return the first function instead of nil, letting you know what was kicked out. Registering nil will clear the previously-registered callback.</span></p> <p><span class="rvts37">As with other callback-registering functions provided by FCEUX, there is only one registered callback at a time per registering function per script. Upon registering a second callback, the first is kicked out to make room for the second. In this case, it will return the first function instead of nil, letting you know what was kicked out. Registering nil will clear the previously-registered callback.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">savestate.registerload(function func)</span></p> <p><span class="rvts62">savestate.registerload(function func)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Registers a callback function that runs whenever the user loads a previously saved state. It's not called when the script itself loads a previous state, so don't worry about your script interrupting itself just because it's loading something.</span></p> <p><span class="rvts37">Registers a callback function that runs whenever the user loads a previously saved state. It's not called when the script itself loads a previous state, so don't worry about your script interrupting itself just because it's loading something.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">The state's data is loaded before this function runs, so you can read the RAM immediately after the user loads a state, or check the new framecount. Particularly useful if you want to update lua's display right away instead of showing junk from before the loadstate.</span></p> <p><span class="rvts37">The state's data is loaded before this function runs, so you can read the RAM immediately after the user loads a state, or check the new framecount. Particularly useful if you want to update lua's display right away instead of showing junk from before the loadstate.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">savestate.loadscriptdata(int location)</span></p> <p><span class="rvts62">savestate.loadscriptdata(int location)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Accuracy not yet confirmed.</span></p> <p><span class="rvts37">Accuracy not yet confirmed.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -450,17 +460,17 @@
<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">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><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Movie Library</span></p> <p><span class="rvts71">Movie Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool movie.active()</span></p> <p><span class="rvts62">bool movie.active()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if a movie is currently loaded and false otherwise. &nbsp;(This should be used to guard against Lua errors when attempting to retrieve movie information).</span></p> <p><span class="rvts37">Returns true if a movie is currently loaded and false otherwise. &nbsp;(This should be used to guard against Lua errors when attempting to retrieve movie information).</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">int movie.framecount()</span></p> <p><span class="rvts62">int movie.framecount()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the current frame count. (Has the same affect as emu.framecount)</span></p> <p><span class="rvts37">Returns the current frame count. (Has the same affect as emu.framecount)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">string movie.mode()</span></p> <p><span class="rvts62">string movie.mode()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the current state of movie playback. Returns one of the following:</span></p> <p><span class="rvts37">Returns the current state of movie playback. Returns one of the following:</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -470,41 +480,41 @@
<p><span class="rvts37">- "taseditor"</span></p> <p><span class="rvts37">- "taseditor"</span></p>
<p><span class="rvts37">- nil</span></p> <p><span class="rvts37">- nil</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">movie.rerecordcounting(bool counting)</span></p> <p><span class="rvts62">movie.rerecordcounting(bool counting)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Turn the rerecord counter on or off. Allows you to do some brute forcing without inflating the rerecord count.</span></p> <p><span class="rvts37">Turn the rerecord counter on or off. Allows you to do some brute forcing without inflating the rerecord count.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">movie.stop()</span></p> <p><span class="rvts62">movie.stop()</span></p>
<p><span class="rvts61">movie.close()</span></p> <p><span class="rvts62">movie.close()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Stops movie playback. If no movie is loaded, it throws a Lua error.</span></p> <p><span class="rvts37">Stops movie playback. If no movie is loaded, it throws a Lua error.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">int movie.length()</span></p> <p><span class="rvts62">int movie.length()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the total number of frames of the current movie. Throws a Lua error if no movie is loaded.</span></p> <p><span class="rvts37">Returns the total number of frames of the current movie. Throws a Lua error if no movie is loaded.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">string movie.name()</span></p> <p><span class="rvts62">string movie.name()</span></p>
<p><span class="rvts61">string movie.getname()</span></p> <p><span class="rvts62">string movie.getname()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the filename of the current movie with path. Throws a Lua error if no movie is loaded.</span></p> <p><span class="rvts37">Returns the filename of the current movie with path. Throws a Lua error if no movie is loaded.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">movie.getfilename()</span></p> <p><span class="rvts62">movie.getfilename()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the filename of the current movie with no path. Throws a Lua error if no movie is loaded.</span></p> <p><span class="rvts37">Returns the filename of the current movie with no path. Throws a Lua error if no movie is loaded.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">movie.rerecordcount()</span></p> <p><span class="rvts62">movie.rerecordcount()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the rerecord count of the current movie. Throws a Lua error if no movie is loaded.</span></p> <p><span class="rvts37">Returns the rerecord count of the current movie. Throws a Lua error if no movie is loaded.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">movie.replay()</span></p> <p><span class="rvts62">movie.replay()</span></p>
<p><span class="rvts61">movie.playbeginning()</span></p> <p><span class="rvts62">movie.playbeginning()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Performs the Play from Beginning function. Movie mode is switched to read-only and the movie loaded will begin playback from frame 1.</span></p> <p><span class="rvts37">Performs the Play from Beginning function. Movie mode is switched to read-only and the movie loaded will begin playback from frame 1.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">If no movie is loaded, no error is thrown and no message appears on screen.</span></p> <p><span class="rvts37">If no movie is loaded, no error is thrown and no message appears on screen.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool movie.readonly()</span></p> <p><span class="rvts62">bool movie.readonly()</span></p>
<p><span class="rvts61">bool movie.getreadonly()</span></p> <p><span class="rvts62">bool movie.getreadonly()</span></p>
<p><span class="rvts37">Alias: emu.getreadonly</span></p> <p><span class="rvts37">Alias: emu.getreadonly</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">FCEUX keeps the read-only status even without a movie loaded.</span></p> <p><span class="rvts37">FCEUX keeps the read-only status even without a movie loaded.</span></p>
@ -513,7 +523,7 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p> <p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">movie.setreadonly(bool state)</span></p> <p><span class="rvts62">movie.setreadonly(bool state)</span></p>
<p><span class="rvts37">Alias: emu.setreadonly</span></p> <p><span class="rvts37">Alias: emu.setreadonly</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">FCEUX keeps the read-only status even without a movie loaded.</span></p> <p><span class="rvts37">FCEUX keeps the read-only status even without a movie loaded.</span></p>
@ -523,45 +533,45 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p> <p><span class="rvts37">While this variable only applies to movies, it is stored as a global variable and can be modified even without a movie loaded. &nbsp;Hence, it is in the emu library rather than the movie library.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool movie.recording()</span></p> <p><span class="rvts62">bool movie.recording()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if there is a movie loaded and in record mode.</span></p> <p><span class="rvts37">Returns true if there is a movie loaded and in record mode.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool movie.playing()</span></p> <p><span class="rvts62">bool movie.playing()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if there is a movie loaded and in play mode.</span></p> <p><span class="rvts37">Returns true if there is a movie loaded and in play mode.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool movie.ispoweron()</span></p> <p><span class="rvts62">bool movie.ispoweron()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if the movie recording or loaded started from 'Start'.</span></p> <p><span class="rvts37">Returns true if the movie recording or loaded started from 'Start'.</span></p>
<p><span class="rvts37">Returns false if the movie uses a save state.</span></p> <p><span class="rvts37">Returns false if the movie uses a save state.</span></p>
<p><span class="rvts37">Opposite of movie.isfromsavestate()</span></p> <p><span class="rvts37">Opposite of movie.isfromsavestate()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool movie.isfromsavestate()</span></p> <p><span class="rvts62">bool movie.isfromsavestate()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns true if the movie recording or loaded started from 'Now'.</span></p> <p><span class="rvts37">Returns true if the movie recording or loaded started from 'Now'.</span></p>
<p><span class="rvts37">Returns false if the movie was recorded from a reset.</span></p> <p><span class="rvts37">Returns false if the movie was recorded from a reset.</span></p>
<p><span class="rvts37">Opposite of movie.ispoweron()</span></p> <p><span class="rvts37">Opposite of movie.ispoweron()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">string movie.name()</span></p> <p><span class="rvts62">string movie.name()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">If a movie is loaded it returns the name of the movie, else it throws an error.</span></p> <p><span class="rvts37">If a movie is loaded it returns the name of the movie, else it throws an error.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">bool movie.readonly()</span></p> <p><span class="rvts62">bool movie.readonly()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<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">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><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">GUI Library</span></p> <p><span class="rvts71">GUI Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.pixel(int x, int y, type color)</span></p> <p><span class="rvts62">gui.pixel(int x, int y, type color)</span></p>
<p><span class="rvts61">gui.drawpixel(int x, int y, type color)</span></p> <p><span class="rvts62">gui.drawpixel(int x, int y, type color)</span></p>
<p><span class="rvts61">gui.setpixel(int x, int y, type color)</span></p> <p><span class="rvts62">gui.setpixel(int x, int y, type color)</span></p>
<p><span class="rvts61">gui.writepixel(int x, int y, type color)</span></p> <p><span class="rvts62">gui.writepixel(int x, int y, type color)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Draw one pixel of a given color at the given position on the screen. See drawing notes and color notes at the bottom of the page. &nbsp;</span></p> <p><span class="rvts37">Draw one pixel of a given color at the given position on the screen. See drawing notes and color notes at the bottom of the page. &nbsp;</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.getpixel(int x, int y)</span></p> <p><span class="rvts62">gui.getpixel(int x, int y)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the separate RGBA components of the given pixel set by gui.pixel. This only gets LUA pixels set, not background colors.</span></p> <p><span class="rvts37">Returns the separate RGBA components of the given pixel set by gui.pixel. This only gets LUA pixels set, not background colors.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -569,47 +579,47 @@
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">See emu.getscreenpixel() for an emulator screen variant.</span></p> <p><span class="rvts37">See emu.getscreenpixel() for an emulator screen variant.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.line(int x1, int y1, int x2, int y2 [, color [, skipfirst]])</span></p> <p><span class="rvts62">gui.line(int x1, int y1, int x2, int y2 [, color [, skipfirst]])</span></p>
<p><span class="rvts61">gui.drawline(int x1, int y1, int x2, int y2 [, color [, skipfirst]])</span></p> <p><span class="rvts62">gui.drawline(int x1, int y1, int x2, int y2 [, color [, skipfirst]])</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Draws a line between the two points. The x1,y1 coordinate specifies one end of the line segment, and the x2,y2 coordinate specifies the other end. If skipfirst is true then this function will not draw anything at the pixel x1,y1, otherwise it will. skipfirst is optional and defaults to false. The default color for the line is solid white, but you may optionally override that using a color of your choice. See also drawing notes and color notes at the bottom of the page.</span></p> <p><span class="rvts37">Draws a line between the two points. The x1,y1 coordinate specifies one end of the line segment, and the x2,y2 coordinate specifies the other end. If skipfirst is true then this function will not draw anything at the pixel x1,y1, otherwise it will. skipfirst is optional and defaults to false. The default color for the line is solid white, but you may optionally override that using a color of your choice. See also drawing notes and color notes at the bottom of the page.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.box(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p> <p><span class="rvts62">gui.box(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p>
<p><span class="rvts61">gui.drawbox(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p> <p><span class="rvts62">gui.drawbox(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p>
<p><span class="rvts61">gui.rect(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p> <p><span class="rvts62">gui.rect(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p>
<p><span class="rvts61">gui.drawrect(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p> <p><span class="rvts62">gui.drawrect(int x1, int y1, int x2, int y2 [, fillcolor [, outlinecolor]]))</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Draws a rectangle between the given coordinates of the emulator screen for one frame. The x1,y1 coordinate specifies any corner of the rectangle (preferably the top-left corner), and the x2,y2 coordinate specifies the opposite corner.</span></p> <p><span class="rvts37">Draws a rectangle between the given coordinates of the emulator screen for one frame. The x1,y1 coordinate specifies any corner of the rectangle (preferably the top-left corner), and the x2,y2 coordinate specifies the opposite corner.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">The default color for the box is transparent white with a solid white outline, but you may optionally override those using colors of your choice. Also see drawing notes and color notes.</span></p> <p><span class="rvts37">The default color for the box is transparent white with a solid white outline, but you may optionally override those using colors of your choice. Also see drawing notes and color notes.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.text(int x, int y, string str [, textcolor [, backcolor]])</span></p> <p><span class="rvts62">gui.text(int x, int y, string str [, textcolor [, backcolor]])</span></p>
<p><span class="rvts61">gui.drawtext(int x, int y, string str [, textcolor [, backcolor]])</span></p> <p><span class="rvts62">gui.drawtext(int x, int y, string str [, textcolor [, backcolor]])</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Draws a given string at the given position. textcolor and backcolor are optional. See 'on colors' at the end of this page for information. Using nil as the input or not including an optional field will make it use the default.</span></p> <p><span class="rvts37">Draws a given string at the given position. textcolor and backcolor are optional. See 'on colors' at the end of this page for information. Using nil as the input or not including an optional field will make it use the default.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.parsecolor(color)</span></p> <p><span class="rvts62">gui.parsecolor(color)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns the separate RGBA components of the given color.</span></p> <p><span class="rvts37">Returns the separate RGBA components of the given color.</span></p>
<p><span class="rvts37">For example, you can say local r,g,b,a = gui.parsecolor('orange') to retrieve the red/green/blue values of the preset color orange. (You could also omit the a in cases like this.) This uses the same conversion method that FCEUX uses internally to support the different representations of colors that the GUI library uses. Overriding this function will not change how FCEUX interprets color values, however.</span></p> <p><span class="rvts37">For example, you can say local r,g,b,a = gui.parsecolor('orange') to retrieve the red/green/blue values of the preset color orange. (You could also omit the a in cases like this.) This uses the same conversion method that FCEUX uses internally to support the different representations of colors that the GUI library uses. Overriding this function will not change how FCEUX interprets color values, however.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.savescreenshot()</span></p> <p><span class="rvts62">gui.savescreenshot()</span></p>
<p><span class="rvts37">Makes a screenshot of the FCEUX emulated screen, and saves it to the appropriate folder. Performs identically to pressing the Screenshot hotkey.</span></p> <p><span class="rvts37">Makes a screenshot of the FCEUX emulated screen, and saves it to the appropriate folder. Performs identically to pressing the Screenshot hotkey.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.savescreenshotas(string name)</span></p> <p><span class="rvts62">gui.savescreenshotas(string name)</span></p>
<p><span class="rvts37">Makes a screenshot of the FCEUX emulated screen, and saves it to the appropriate folder. However, this one receives a file name for the screenshot.</span></p> <p><span class="rvts37">Makes a screenshot of the FCEUX emulated screen, and saves it to the appropriate folder. However, this one receives a file name for the screenshot.</span></p>
<p><span class="rvts37"> </span></p> <p><span class="rvts37"> </span></p>
<p><span class="rvts61">string gui.gdscreenshot()</span></p> <p><span class="rvts62">string gui.gdscreenshot()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Takes a screen shot of the image and returns it in the form of a string which can be imported by the gd library using the gd.createFromGdStr() function.</span></p> <p><span class="rvts37">Takes a screen shot of the image and returns it in the form of a string which can be imported by the gd library using the gd.createFromGdStr() function.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">This function is provided so as to allow FCEUX to not carry a copy of the gd library itself. If you want raw RGB32 access, skip the first 11 bytes (header) and then read pixels as Alpha (always 0), Red, Green, Blue, left to right then top to bottom, range is 0-255 for all colors.</span></p> <p><span class="rvts37">This function is provided so as to allow FCEUX to not carry a copy of the gd library itself. If you want raw RGB32 access, skip the first 11 bytes (header) and then read pixels as Alpha (always 0), Red, Green, Blue, left to right then top to bottom, range is 0-255 for all colors.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts66">Warning:</span><span class="rvts37"> Storing screen shots in memory is not recommended. Memory usage will blow up pretty quick. One screen shot string eats around 230 KB of RAM.</span></p> <p><span class="rvts67">Warning:</span><span class="rvts37"> Storing screen shots in memory is not recommended. Memory usage will blow up pretty quick. One screen shot string eats around 230 KB of RAM.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.gdoverlay([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])</span></p> <p><span class="rvts62">gui.gdoverlay([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])</span></p>
<p><span class="rvts61">gui.image([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])</span></p> <p><span class="rvts62">gui.image([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])</span></p>
<p><span class="rvts61">gui.drawimage([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])</span></p> <p><span class="rvts62">gui.drawimage([int dx=0, int dy=0,] string str [, sx=0, sy=0, sw, sh] [, float alphamul=1.0])</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Draws an image on the screen. gdimage must be in truecolor gd string format.</span></p> <p><span class="rvts37">Draws an image on the screen. gdimage must be in truecolor gd string format.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -623,20 +633,20 @@
<p><span class="rvts37">local gdstr = gd.createFromPng("myimage.png"):gdStr()</span></p> <p><span class="rvts37">local gdstr = gd.createFromPng("myimage.png"):gdStr()</span></p>
<p><span class="rvts37">gui.gdoverlay(gdstr) </span></p> <p><span class="rvts37">gui.gdoverlay(gdstr) </span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.opacity(int alpha)</span></p> <p><span class="rvts62">gui.opacity(int alpha)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Scales the transparency of subsequent draw calls. An alpha of 0.0 means completely transparent, and an alpha of 1.0 means completely unchanged (opaque). Non-integer values are supported and meaningful, as are values greater than 1.0. It is not necessary to use this function (or the less-recommended gui.transparency) to perform drawing with transparency, because you can provide an alpha value in the color argument of each draw call. However, it can sometimes be convenient to be able to globally modify the drawing transparency. </span></p> <p><span class="rvts37">Scales the transparency of subsequent draw calls. An alpha of 0.0 means completely transparent, and an alpha of 1.0 means completely unchanged (opaque). Non-integer values are supported and meaningful, as are values greater than 1.0. It is not necessary to use this function (or the less-recommended gui.transparency) to perform drawing with transparency, because you can provide an alpha value in the color argument of each draw call. However, it can sometimes be convenient to be able to globally modify the drawing transparency. </span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">gui.transparency(int trans)</span></p> <p><span class="rvts62">gui.transparency(int trans)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Scales the transparency of subsequent draw calls. Exactly the same as gui.opacity, except the range is different: A trans of 4.0 means completely transparent, and a trans of 0.0 means completely unchanged (opaque). </span></p> <p><span class="rvts37">Scales the transparency of subsequent draw calls. Exactly the same as gui.opacity, except the range is different: A trans of 4.0 means completely transparent, and a trans of 0.0 means completely unchanged (opaque). </span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">function gui.register(function func)</span></p> <p><span class="rvts62">function gui.register(function func)</span></p>
<p><span class="rvts61"><br/></span></p> <p><span class="rvts62"><br/></span></p>
<p><span class="rvts37">Register a function to be called between a frame being prepared for displaying on your screen and it actually happening. Used when that 1 frame delay for rendering is not acceptable.</span></p> <p><span class="rvts37">Register a function to be called between a frame being prepared for displaying on your screen and it actually happening. Used when that 1 frame delay for rendering is not acceptable.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">string gui.popup(string message [, string type = "ok" [, string icon = "message"]])</span></p> <p><span class="rvts62">string gui.popup(string message [, string type = "ok" [, string icon = "message"]])</span></p>
<p><span class="rvts61">string input.popup(string message [, string type = "yesno" [, string icon = "question"]])</span></p> <p><span class="rvts62">string input.popup(string message [, string type = "yesno" [, string icon = "question"]])</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Brings up a modal popup dialog box (everything stops until the user dismisses it). The box displays the message tostring(msg). This function returns the name of the button the user clicked on (as a string).</span></p> <p><span class="rvts37">Brings up a modal popup dialog box (everything stops until the user dismisses it). The box displays the message tostring(msg). This function returns the name of the button the user clicked on (as a string).</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -651,9 +661,9 @@
<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">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><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">Sound Library</span></p> <p><span class="rvts71">Sound Library</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts61">table sound.get()</span></p> <p><span class="rvts62">table sound.get()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns current state of PSG channels in big array.</span></p> <p><span class="rvts37">Returns current state of PSG channels in big array.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -722,59 +732,59 @@
<p><span class="rvts37">}</span></p> <p><span class="rvts37">}</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts70">TAS Editor Library</span></p> <p><span class="rvts71">TAS Editor Library</span></p>
<p><span class="rvts61"><br/></span></p> <p><span class="rvts62"><br/></span></p>
<p><span class="rvts61">taseditor.registerauto(function func)</span></p> <p><span class="rvts62">taseditor.registerauto(function func)</span></p>
<p><span class="rvts61">taseditor.registermanual(function func)</span></p> <p><span class="rvts62">taseditor.registermanual(function func)</span></p>
<p><span class="rvts61">bool taseditor.engaged()</span></p> <p><span class="rvts62">bool taseditor.engaged()</span></p>
<p><span class="rvts61">bool taseditor.markedframe(int frame)</span></p> <p><span class="rvts62">bool taseditor.markedframe(int frame)</span></p>
<p><span class="rvts61">int taseditor.getmarker(int frame)</span></p> <p><span class="rvts62">int taseditor.getmarker(int frame)</span></p>
<p><span class="rvts61">int taseditor.setmarker(int frame)</span></p> <p><span class="rvts62">int taseditor.setmarker(int frame)</span></p>
<p><span class="rvts61">taseditor.clearmarker(int frame)</span></p> <p><span class="rvts62">taseditor.clearmarker(int frame)</span></p>
<p><span class="rvts61">string taseditor.getnote(int index)</span></p> <p><span class="rvts62">string taseditor.getnote(int index)</span></p>
<p><span class="rvts61">taseditor.setnote(int index, string newtext)</span></p> <p><span class="rvts62">taseditor.setnote(int index, string newtext)</span></p>
<p><span class="rvts61">int taseditor.getcurrentbranch()</span></p> <p><span class="rvts62">int taseditor.getcurrentbranch()</span></p>
<p><span class="rvts61">string taseditor.getrecordermode()</span></p> <p><span class="rvts62">string taseditor.getrecordermode()</span></p>
<p><span class="rvts61">int taseditor.getsuperimpose()</span></p> <p><span class="rvts62">int taseditor.getsuperimpose()</span></p>
<p><span class="rvts61">int taseditor.getlostplayback()</span></p> <p><span class="rvts62">int taseditor.getlostplayback()</span></p>
<p><span class="rvts61">int taseditor.getplaybacktarget()</span></p> <p><span class="rvts62">int taseditor.getplaybacktarget()</span></p>
<p><span class="rvts61">taseditor.setplayback(int frame)</span></p> <p><span class="rvts62">taseditor.setplayback(int frame)</span></p>
<p><span class="rvts61">taseditor.stopseeking()</span></p> <p><span class="rvts62">taseditor.stopseeking()</span></p>
<p><span class="rvts61">taseditor.getselection()</span></p> <p><span class="rvts62">taseditor.getselection()</span></p>
<p><span class="rvts61">taseditor.setselection()</span></p> <p><span class="rvts62">taseditor.setselection()</span></p>
<p><span class="rvts61">int taseditor.getinput(int frame, int joypad)</span></p> <p><span class="rvts62">int taseditor.getinput(int frame, int joypad)</span></p>
<p><span class="rvts61">taseditor.submitinputchange(int frame, int joypad, int input)</span></p> <p><span class="rvts62">taseditor.submitinputchange(int frame, int joypad, int input)</span></p>
<p><span class="rvts61">taseditor.submitinsertframes(int frame, int number)</span></p> <p><span class="rvts62">taseditor.submitinsertframes(int frame, int number)</span></p>
<p><span class="rvts61">taseditor.submitdeleteframes(int frame, int number)</span></p> <p><span class="rvts62">taseditor.submitdeleteframes(int frame, int number)</span></p>
<p><span class="rvts61">int taseditor.applyinputchanges([string name])</span></p> <p><span class="rvts62">int taseditor.applyinputchanges([string name])</span></p>
<p><span class="rvts61">taseditor.clearinputchanges()</span></p> <p><span class="rvts62">taseditor.clearinputchanges()</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">For full description of these functions refer to TAS Editor Manual.</span></p> <p><span class="rvts37">For full description of these functions refer to TAS Editor Manual.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts59">Bitwise Operations</span></p> <p><span class="rvts60">Bitwise Operations</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">The following bit functions were added to FCEUX internally to compensate for Lua's lack of them. But it also supports all operations from </span><a class="rvts69" href="http://bitop.luajit.org/api.html">LuaBitOp</a><span class="rvts37"> module, since it is also embedded in FCEUX.</span></p> <p><span class="rvts37">The following bit functions were added to FCEUX internally to compensate for Lua's lack of them. But it also supports all operations from </span><a class="rvts70" href="http://bitop.luajit.org/api.html">LuaBitOp</a><span class="rvts37"> module, since it is also embedded in FCEUX.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts63">int AND(int n1, int n2, ..., int nn)</span></p> <p><span class="rvts64">int AND(int n1, int n2, ..., int nn)</span></p>
<p><span class="rvts63"><br/></span></p> <p><span class="rvts64"><br/></span></p>
<p><span class="rvts37">Binary logical AND of all the given integers.</span></p> <p><span class="rvts37">Binary logical AND of all the given integers.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts63">int OR(int n1, int n2, ..., int nn)</span></p> <p><span class="rvts64">int OR(int n1, int n2, ..., int nn)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Binary logical OR of all the given integers.</span></p> <p><span class="rvts37">Binary logical OR of all the given integers.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts63">int XOR(int n1, int n2, ..., int nn)</span></p> <p><span class="rvts64">int XOR(int n1, int n2, ..., int nn)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Binary logical XOR of all the given integers. </span></p> <p><span class="rvts37">Binary logical XOR of all the given integers. </span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts63">int BIT(int n1, int n2, ..., int nn)</span></p> <p><span class="rvts64">int BIT(int n1, int n2, ..., int nn)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Returns an integer with the given bits turned on. Parameters should be smaller than 31.</span></p> <p><span class="rvts37">Returns an integer with the given bits turned on. Parameters should be smaller than 31.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts64">Appendix</span></p> <p><span class="rvts65">Appendix</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts65">On drawing</span></p> <p><span class="rvts66">On drawing</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">A general warning about drawing is that it is always one frame behind unless you use gui.register. This is because you tell the emulator to paint something but it will actually paint it when generating the image for the next frame. So you see your painting, except it will be on the image of the next frame. You can prevent this with gui.register because it gives you a quick chance to paint before blitting.</span></p> <p><span class="rvts37">A general warning about drawing is that it is always one frame behind unless you use gui.register. This is because you tell the emulator to paint something but it will actually paint it when generating the image for the next frame. So you see your painting, except it will be on the image of the next frame. You can prevent this with gui.register because it gives you a quick chance to paint before blitting.</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
@ -782,7 +792,7 @@
<p><span class="rvts37">--320x239, 8bit color (confirm?)</span></p> <p><span class="rvts37">--320x239, 8bit color (confirm?)</span></p>
<p><span class="rvts37">256x224, 8bit color (confirm?)</span></p> <p><span class="rvts37">256x224, 8bit color (confirm?)</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts65">On colors</span></p> <p><span class="rvts66">On colors</span></p>
<p><span class="rvts37"><br/></span></p> <p><span class="rvts37"><br/></span></p>
<p><span class="rvts37">Colors can be of a few types.</span></p> <p><span class="rvts37">Colors can be of a few types.</span></p>
<p><span class="rvts37">Int: use the a formula to compose the color as a number (depends on color depth)</span></p> <p><span class="rvts37">Int: use the a formula to compose the color as a number (depends on color depth)</span></p>

View File

@ -56,19 +56,19 @@
<div id="topic_content"> <div id="topic_content">
<p></p> <p></p>
<p><span class="rvts58">Using Lua scripting</span></p> <p><span class="rvts59">Using Lua scripting</span></p>
<p><span class="rvts32"><br/></span></p> <p><span class="rvts32"><br/></span></p>
<p>Lua is built into FCEUX as of 2.1.2, and luapack DLL files are no longer needed in this and later versions.</p> <p>Lua is built into FCEUX as of 2.1.2, and luapack DLL files are no longer needed in this and later versions.</p>
<p><br/></p> <p><br/></p>
<p>To run lua scripts in older versions of FCEUX, you will need the lua pack which can be found <a class="rvts18" href="http://fceux.com/luapack">here</a>. The .dll files must be unzipped in the same folder as fceux.exe.</p> <p>To run lua scripts in older versions of FCEUX, you will need the lua pack which can be found <a class="rvts18" href="http://fceux.com/luapack">here</a>. The .dll files must be unzipped in the same folder as fceux.exe.</p>
<p><span class="rvts58"><br/></span></p> <p><span class="rvts59"><br/></span></p>
<p><span class="rvts58">Core Lua Documentation</span></p> <p><span class="rvts59">Core Lua Documentation</span></p>
<p><span class="rvts32"><br/></span></p> <p><span class="rvts32"><br/></span></p>
<p>If you have never programmed, you will probably want to start by learning the basic of Lua, which is too broad for the scope of this help file. &nbsp;Try searching on the Internet for "Lua tutorial". &nbsp;As of this writing, it's official homepage is <a class="rvts18" href="http://www.lua.org/">http://www.lua.org/</a></p> <p>If you have never programmed, you will probably want to start by learning the basic of Lua, which is too broad for the scope of this help file. &nbsp;Try searching on the Internet for "Lua tutorial". &nbsp;As of this writing, it's official homepage is <a class="rvts18" href="http://www.lua.org/">http://www.lua.org/</a></p>
<p><br/></p> <p><br/></p>
<p>If you are familiar with any programming language you will probably not have too much difficulty adjusting to the syntax and structure of Lua. &nbsp;You will probably also find useful information on the Internet.</p> <p>If you are familiar with any programming language you will probably not have too much difficulty adjusting to the syntax and structure of Lua. &nbsp;You will probably also find useful information on the Internet.</p>
<p><span class="rvts58"><br/></span></p> <p><span class="rvts59"><br/></span></p>
<p><span class="rvts58">GUI Frontend</span></p> <p><span class="rvts59">GUI Frontend</span></p>
<p><br/></p> <p><br/></p>
<p>To use a Lua script, you need to create one in a text editor. &nbsp;The name of the file created should end in .lua to indicate that it is a Lua script.</p> <p>To use a Lua script, you need to create one in a text editor. &nbsp;The name of the file created should end in .lua to indicate that it is a Lua script.</p>
<p><br/></p> <p><br/></p>
@ -76,7 +76,7 @@
<p><br/></p> <p><br/></p>
<p>To end a Lua script, choose "Stop Lua Script" ***from where***.</p> <p>To end a Lua script, choose "Stop Lua Script" ***from where***.</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts58">FCEUX Lua Basics</span></p> <p><span class="rvts59">FCEUX Lua Basics</span></p>
<p><br/></p> <p><br/></p>
<p>Your script will be constructed according to the rules of Lua, but you will use FCEUX-specific functions to interact with the emulator. &nbsp;For example, one of the most often-used functions is emu.frameadvance() which will tell the emulator to advance exactly one frame, which is the basic unit of time on an NES.</p> <p>Your script will be constructed according to the rules of Lua, but you will use FCEUX-specific functions to interact with the emulator. &nbsp;For example, one of the most often-used functions is emu.frameadvance() which will tell the emulator to advance exactly one frame, which is the basic unit of time on an NES.</p>
<p><br/></p> <p><br/></p>

View File

@ -58,50 +58,50 @@
<p></p> <p></p>
<p><span class="rvts17">LuaPerks</span></p> <p><span class="rvts17">LuaPerks</span></p>
<p><span class="rvts17"><br/></span></p> <p><span class="rvts17"><br/></span></p>
<p>The following Lua libraries are integrated into FCEUX win32-executable and are available for using in your scripts.</p> <p>The following Lua libraries are integrated into FCEUX win32-executable (statically linked) and are available for using in your scripts. You can also use any other Lua library by placing its .dll files into FCEUX folder.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts60">IUP library</span></p> <p><span class="rvts61">IUP library</span></p>
<p><br/></p> <p><br/></p>
<p>IUP (Portable User Interface) is a toolkit for building graphical user interfaces.</p> <p>IUP (Portable User Interface) is a toolkit for building graphical user interfaces.</p>
<p><br/></p> <p><br/></p>
<p>Usage example: \luaScripts\GUI-iup_example.lua </p> <p>Usage example: \luaScripts\GUI-iup_example.lua </p>
<p><br/></p> <p><br/></p>
<p><a class="rvts73" href="http://www.tecgraf.puc-rio.br/iup/" target="_blank">http://www.tecgraf.puc-rio.br/iup/</a></p> <p><a class="rvts74" href="http://www.tecgraf.puc-rio.br/iup/" target="_blank">http://www.tecgraf.puc-rio.br/iup/</a></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts60">IM library</span></p> <p><span class="rvts61">IM library</span></p>
<p><br/></p> <p><br/></p>
<p>IM is a toolkit for Digital Imaging. The main goal of the library is to provide a simple API and abstraction of images for applications.</p> <p>IM is a toolkit for Digital Imaging. The main goal of the library is to provide a simple API and abstraction of images for applications.</p>
<p>File formats supported: TIFF, BMP, PNG, JPEG, GIF and AVI. Image representation includes scientific data types. About a hundred Image Processing operations are available.</p> <p>File formats supported: TIFF, BMP, PNG, JPEG, GIF and AVI. Image representation includes scientific data types. About a hundred Image Processing operations are available.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts73" href="http://www.tecgraf.puc-rio.br/im/" target="_blank">http://www.tecgraf.puc-rio.br/im/</a></p> <p><a class="rvts74" href="http://www.tecgraf.puc-rio.br/im/" target="_blank">http://www.tecgraf.puc-rio.br/im/</a></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts60">CD library</span></p> <p><span class="rvts61">CD library</span></p>
<p><br/></p> <p><br/></p>
<p>Canvas Draw is a graphics library.</p> <p>Canvas Draw is a graphics library.</p>
<p>The library contains functions to support both vector and image applications, and the visualization surface can be either a window or a more abstract surface, such as Image, Clipboard, Metafile, PS, and so on.</p> <p>The library contains functions to support both vector and image applications, and the visualization surface can be either a window or a more abstract surface, such as Image, Clipboard, Metafile, PS, and so on.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts73" href="http://www.tecgraf.puc-rio.br/cd/" target="_blank">http://www.tecgraf.puc-rio.br/cd/</a></p> <p><a class="rvts74" href="http://www.tecgraf.puc-rio.br/cd/" target="_blank">http://www.tecgraf.puc-rio.br/cd/</a></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts60">LuaSocket library</span></p> <p><span class="rvts61">LuaSocket library</span></p>
<p><br/></p> <p><br/></p>
<p>LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for the SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and downloading files) protocols and other functionality commonly needed by applications that deal with the Internet.</p> <p>LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for the SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and downloading files) protocols and other functionality commonly needed by applications that deal with the Internet.</p>
<p><br/></p> <p><br/></p>
<p>Usage: netplay, local data transmission, accessing Web data.</p> <p>Usage: netplay, local data transmission.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts73" href="http://w3.impa.br/~diego/software/luasocket/home.html" target="_blank">http://w3.impa.br/~diego/software/luasocket/home.html</a></p> <p><a class="rvts74" href="http://w3.impa.br/~diego/software/luasocket/home.html" target="_blank">http://w3.impa.br/~diego/software/luasocket/home.html</a></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts60">WinAPI library</span></p> <p><span class="rvts61">WinAPI library</span></p>
<p><br/></p> <p><br/></p>
<p>This module provides basic tools for working with Windows system resources.</p> <p>This module provides basic tools for working with Windows system resources.</p>
<p><br/></p> <p><br/></p>
<p>Usage example: \luaScripts\JumpingFCEUXWindow.lua</p> <p>Usage example: \luaScripts\JumpingFCEUXWindow.lua</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts73" href="https://github.com/stevedonovan/winapi" target="_blank">https://github.com/stevedonovan/winapi</a></p> <p><a class="rvts74" href="https://github.com/stevedonovan/winapi" target="_blank">https://github.com/stevedonovan/winapi</a></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>

View File

@ -61,23 +61,23 @@
<p>A bit of previous programming knowledge will be useful in taking advantage of this feature, but it is certainly not a requirement. &nbsp;Lua is specifically written with the intention of being easier than most languages for anyone to understand and use.</p> <p>A bit of previous programming knowledge will be useful in taking advantage of this feature, but it is certainly not a requirement. &nbsp;Lua is specifically written with the intention of being easier than most languages for anyone to understand and use.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><a class="rvts57" href="LuaGettingStarted.html">Getting Started</a></p> <p><a class="rvts58" href="LuaGettingStarted.html">Getting Started</a></p>
<p><br/></p> <p><br/></p>
<p>The basics of Lua scripting, its implementation into FCEUX, and how to get started using Lua.</p> <p>The basics of Lua scripting, its implementation into FCEUX, and how to get started using Lua.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts57" href="Commands.html">Using Lua</a></p> <p><a class="rvts58" href="Commands.html">Using Lua</a></p>
<p><br/></p> <p><br/></p>
<p>How to use Lua and basic syntax/commands that are useable under FCEUX.</p> <p>How to use Lua and basic syntax/commands that are useable under FCEUX.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts57" href="LuaFunctionsList.html">Lua Functions List</a></p> <p><a class="rvts58" href="LuaFunctionsList.html">Lua Functions List</a></p>
<p><br/></p> <p><br/></p>
<p>A list of Lua functions available in FCEUX and a brief description of each.</p> <p>A list of Lua functions available in FCEUX and a brief description of each.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts57" href="LuaPerks.html">LuaPerks</a></p> <p><a class="rvts58" href="LuaPerks.html">LuaPerks</a></p>
<p><br/></p> <p><br/></p>
<p>Additional libraries integrated into FCEUX.</p> <p>Additional libraries integrated into FCEUX.</p>
<p><br/></p> <p><br/></p>
<p><a class="rvts57" href="LuaBot.html">Lua Bot</a></p> <p><a class="rvts58" href="LuaBot.html">Lua Bot</a></p>
<p><br/></p> <p><br/></p>
<p>How to use Luau's version of Basic bot.</p> <p>How to use Luau's version of Basic bot.</p>
<p><br/></p> <p><br/></p>

View File

@ -232,7 +232,7 @@
<p>These distinctions are easier to see in a visual example. &nbsp;This is the enemy/player stats as they are mapped in the game <span class="rvts29">Teenage Mutant Ninja Turtles</span>.</p> <p>These distinctions are easier to see in a visual example. &nbsp;This is the enemy/player stats as they are mapped in the game <span class="rvts29">Teenage Mutant Ninja Turtles</span>.</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts32">Block 4</span></p> <p><span class="rvts32">Block 4</span></p>
<p><span class="rvts75"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts75"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts75"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;P &nbsp;W1 W2 W3 E1 E2 E3 E4 E5 E6 E7 E8 X &nbsp;X &nbsp;X &nbsp;X &nbsp;</span></p> <p><span class="rvts76"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts76"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts76"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;P &nbsp;W1 W2 W3 E1 E2 E3 E4 E5 E6 E7 E8 X &nbsp;X &nbsp;X &nbsp;X &nbsp;</span></p>
<p><span class="rvts28">Sprite ID: &nbsp; &nbsp; &nbsp; &nbsp;040x: 09 00 00 00 00 9E 9E 9E 9E 00 00 00 00 00 00 00</span></p> <p><span class="rvts28">Sprite ID: &nbsp; &nbsp; &nbsp; &nbsp;040x: 09 00 00 00 00 9E 9E 9E 9E 00 00 00 00 00 00 00</span></p>
<p><span class="rvts28">ID counter: &nbsp; &nbsp; &nbsp; 041x: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span></p> <p><span class="rvts28">ID counter: &nbsp; &nbsp; &nbsp; 041x: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span></p>
<p><span class="rvts28">Timer/sp change: &nbsp;042x: 02 00 00 00 00 03 03 03 03 00 00 00 00 00 00 00</span></p> <p><span class="rvts28">Timer/sp change: &nbsp;042x: 02 00 00 00 00 03 03 03 03 00 00 00 00 00 00 00</span></p>

View File

@ -48,6 +48,8 @@
<a href="NESScrolling1.html"><img src="img/arrow_left.png" alt="Previous"/></a> <a href="NESScrolling1.html"><img src="img/arrow_left.png" alt="Previous"/></a>
<a href="NLFilesFormat.html"><img src="img/arrow_right.png" alt="Next"/></a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View File

@ -259,18 +259,18 @@
<p>************************</p> <p>************************</p>
<p> This section will describe the internal components making up each individual channel. Each component will then be described in full detail.</p> <p> This section will describe the internal components making up each individual channel. Each component will then be described in full detail.</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts67">Device</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> Triangle Noise &nbsp;Square</span></p> <p><span class="rvts68">Device</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> Triangle Noise &nbsp;Square</span></p>
<p><span class="rvts67">------</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> -------- ------ ------</span></p> <p><span class="rvts68">------</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> -------- ------ ------</span></p>
<p><span class="rvts67">triangle step generator</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67">X</span></p> <p><span class="rvts68">triangle step generator</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68">X</span></p>
<p><span class="rvts67">linear counter</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67">X</span></p> <p><span class="rvts68">linear counter</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68">X</span></p>
<p><span class="rvts67">programmable timer</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67">X &nbsp; &nbsp; &nbsp;X &nbsp; &nbsp; &nbsp;X</span></p> <p><span class="rvts68">programmable timer</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68">X &nbsp; &nbsp; &nbsp;X &nbsp; &nbsp; &nbsp;X</span></p>
<p><span class="rvts67">length counter</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67">X &nbsp; &nbsp; &nbsp;X &nbsp; &nbsp; &nbsp;X</span></p> <p><span class="rvts68">length counter</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68">X &nbsp; &nbsp; &nbsp;X &nbsp; &nbsp; &nbsp;X</span></p>
<p><span class="rvts67">4-bit DAC</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67">X &nbsp; &nbsp; &nbsp;X &nbsp; &nbsp; &nbsp;X</span></p> <p><span class="rvts68">4-bit DAC</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68">X &nbsp; &nbsp; &nbsp;X &nbsp; &nbsp; &nbsp;X</span></p>
<p><span class="rvts67">volume/envelope decay unit</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> X &nbsp; &nbsp; &nbsp;X</span></p> <p><span class="rvts68">volume/envelope decay unit</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> X &nbsp; &nbsp; &nbsp;X</span></p>
<p><span class="rvts67">sweep unit</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp;X</span></p> <p><span class="rvts68">sweep unit</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp;X</span></p>
<p><span class="rvts67">duty cycle generator</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp;X</span></p> <p><span class="rvts68">duty cycle generator</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp;X</span></p>
<p><span class="rvts67">wavelength converter</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> X</span></p> <p><span class="rvts68">wavelength converter</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> X</span></p>
<p><span class="rvts67">random number generator</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts67"> X</span></p> <p><span class="rvts68">random number generator</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="rvts68"> X</span></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p>+-------------------------+</p> <p>+-------------------------+</p>

117
help/NLFilesFormat.html Normal file
View File

@ -0,0 +1,117 @@
<html>
<head>
<title>.nl files format</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="HelpNDoc Personal Edition 3.9.1.648">
<link type="text/css" rel="stylesheet" media="all" href="css/reset.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/base.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/hnd.css" />
<!--[if lte IE 8]>
<link type="text/css" rel="stylesheet" media="all" href="css/ielte8.css" />
<![endif]-->
<style type="text/css">
#topic_header
{
background-color: #EFEFEF;
}
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/hnd.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
if (top.frames.length == 0)
{
var sTopicUrl = top.location.href.substring(top.location.href.lastIndexOf("/") + 1, top.location.href.length);
top.location.href = "fceux.html?" + sTopicUrl;
}
else if (top && top.FrameTOC && top.FrameTOC.SelectTocItem)
{
top.FrameTOC.SelectTocItem("NLFilesFormat");
}
});
</script>
</head>
<body>
<div id="topic_header">
<div id="topic_header_content">
<h1>.nl files format</h1>
<div id="topic_breadcrumb">
<a href="Technicalinformation.html">Technical Information</a> &rsaquo;&rsaquo; </div>
</div>
<div id="topic_header_nav">
<a href="Technicalinformation.html"><img src="img/arrow_up.png" alt="Parent"/></a>
<a href="NESScrolling2.html"><img src="img/arrow_left.png" alt="Previous"/></a>
</div>
<div class="clear"></div>
</div>
<div id="topic_content">
<p></p>
<p><span class="rvts12">.nl files format</span></p>
<p><br/></p>
<p><br/></p>
<p>FCEUX implements Symbolic Debugger which uses "NameList" files to store the data about labels and comments. The needed files are created automatically when user right-clicks an address in Disassembly and enters a symbolic name or a comment for it. The files are stored in the same folder as the debugged ROM, and they inherit the name of the ROM.</p>
<p>These files are simple ASCII text files. You can edit them in any text editor like Notepad.</p>
<p><br/></p>
<p>When reverse-engineering a game for which you don't have a source, you can reconstruct the logic incrementally, by adding labels/comments while debugging (right-clicking addresses).</p>
<p><br/></p>
<p>But if you want to debug your own homebrew game, you can setup your workflow to automatically export all names and comments when building the game using your favourite assembler (e.g. ca65 or ASM6). This way you can use FCEUX as a Source-Level Debugger.</p>
<p><br/></p>
<p><span class="rvts15">Example:</span> for the ROM called "NES Test Cart (PD).nes" the NL files will be named "NES Test Cart (PD).nes.0.nl", "NES Test Cart (PD).nes.ram.nl", etc. </p>
<p><br/></p>
<p><span class="rvts15">Example of contents of a NL file:</span></p>
<p><br/></p>
<p>$C000#NewName1#Comment1</p>
<p>$C002##Comment2</p>
<p>$C004#NewName2#</p>
<p>$C006#NewName3#MultilineComment-Part1</p>
<p>\MultilineComment-Part2</p>
<p>\MultilineComment-Part3</p>
<p>$C008/10#NewName4#</p>
<p><br/></p>
<p>Every line contains two # characters which separate the three parts of one line:</p>
<p>* The first part (starting with a $ character) is the address to be renamed. Optionally you can add a "/number" part which marks the offsets as a beginning of an array of the given size (the size must be specified in hex form).</p>
<p>* The second (optional) part is the new name of that address. Whenever the line of that address is shown in the disassembly window, an extra line saying "NewName1: " is shown above it. &nbsp;Instructions referencing this address, for example JSR $C000 are also changed to JSR NewName1 (in that example).</p>
<p>* The third (optional) part is the comment that's also added above the disassembly line the comment refers to. It works exactly like the additional name line, only the prefix of that line is different. Comment lines start with "; ". &nbsp;Multi-lines comments are possible. Lines in an NL file starting with the \ character are just appended to the comment of the preceding line. Multi-line comments are also shown in multiple lines in the disassembly window.</p>
<p><br/></p>
<p>In the example above, the first line contains all three parts. Using this NL file, all references to the address $C000 are replaced with NewName1, and whenever line $C000 is shown in the disassembly window (or Trace Logger window) an additional comment is also visible right above the actual disassembled line. The second example line defines only a comment while the third line defines only a name. Following that, there's a multi-line comment definition for address $C006. The last line defines an array called NewName4 of size 0x10 (= 16) bytes starting at offset $C008. FCEUX will regard the line like there are 16 lines describing 16 adjacent addresses with names like NewName4[0], NewName4[1], ... NewName4[F].</p>
<p><br/></p>
<p>NL files must follow a specific naming convention to account for bank swapping. Each bank needs its own NL file with a hexadecimal number of the bank.</p>
<p>For instance, an NES file named "mygame.nes" that has 4 banks (i.e. ROM size = 64k) would have these NL files:</p>
<p><br/></p>
<p>mygame.nes.ram.nl</p>
<p>mygame.nes.0.nl</p>
<p>mygame.nes.1.nl</p>
<p>mygame.nes.2.nl</p>
<p>mygame.nes.3.nl</p>
<p><br/></p>
<p>All NL files must be in the same directory as the ROM file itself.</p>
<p><br/></p>
<p>RAM can also be given its own NL file. In the *.ram.nl file you can name and comment RAM addresses (system bus range of 0x0000 - 0x7FFF) instead of ROM addresses. In this case, you might use a line such as:</p>
<p><br/></p>
<p>$00A5#Mic Test OK#00=Not Passed, 01=Passed</p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p></p>
<p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/feature-tour/create-ebooks-for-amazon-kindle">Full-featured Kindle eBooks generator</a></p>
</div>
<div id="topic_footer">
<div id="topic_footer_content">
2013</div>
</div>
</body>
</html>

View File

@ -63,16 +63,28 @@
<p><br/></p> <p><br/></p>
<p>The NES architecture includes a 6502 CPU as well as a custom video controller known as a PPU (Picture Processing Unit). &nbsp;The PPU's video memory is separated from the main CPU memory and can be read/written via special ports (see <a class="rvts18" href="PPU.html">PPU Memory</a>).</p> <p>The NES architecture includes a 6502 CPU as well as a custom video controller known as a PPU (Picture Processing Unit). &nbsp;The PPU's video memory is separated from the main CPU memory and can be read/written via special ports (see <a class="rvts18" href="PPU.html">PPU Memory</a>).</p>
<p><br/></p> <p><br/></p>
<p>The PPU viewer will display the contents of the current PPU memory. &nbsp;(It does not alter game data in anyway). &nbsp;</p> <p>The PPU viewer will only display the contents of the current PPU memory. It does not alter game data in any way.</p>
<p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts16">Using PPU Viewer</span></p> <p><span class="rvts16">Using PPU Viewer</span></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts10">Show on Scanline</span></p> <p><span class="rvts10">Show on Scanline</span></p>
<p>This options makes it show what the PPU looks like when the screen is drawing that scanline. &nbsp;It is useful for games like SMB, that swap pattern </p> <p>This options makes it show what the PPU looks like when the screen is drawing that particular scanline. It is useful for games like SMB, that swap pattern tables mid-frame (e.g. for status bar stuff).</p>
<p>tables mid-frame (status bar stuff).</p> <p><br/></p>
<p>Right clicking on one of the PPU panels will change the palette it is shown with, cycling though pattern palettes and then sprite ones.</p>
<p>Putting the mouse cursor over a tile will display the tile address. Moving cursor over palette color will give palette address.</p>
<p><br/></p>
<p>When <a class="rvts18" href="CodeDataLogger.html">Code/Data Logger</a> is running, you can also use the "Mask unused graphics" feature. Alternatively, you can only mask tiles that were used (drawn or otherwise accessed) and emphasize the tiles that weren't used (e.g. in order to find secret sprites).</p>
<p>Note: this feature only works with games that use CHR ROM, because Code/Data Logger only logs accesses to CHR ROM.</p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<p><br/></p> <p><br/></p>
<p>Right clicking on one of the PPU panels cycles the palettes it is shown with, though pattern palettes and then sprite ones</p>
<p>Putting the mouse cursor over a tile will display the tile address. &nbsp;Moving cursor over palette color will give palette address.</p>
<p></p> <p></p>
<p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/create-epub-ebooks">Produce electronic books easily</a></p> <p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/create-epub-ebooks">Produce electronic books easily</a></p>
</div> </div>

View File

@ -46,7 +46,7 @@
<div id="topic_header_nav"> <div id="topic_header_nav">
<a href="Tools2.html"><img src="img/arrow_up.png" alt="Parent"/></a> <a href="Tools2.html"><img src="img/arrow_up.png" alt="Parent"/></a>
<a href="ExternalInput.html"><img src="img/arrow_left.png" alt="Previous"/></a> <a href="AutoFireConfigurations.html"><img src="img/arrow_left.png" alt="Previous"/></a>
<a href="Debug.html"><img src="img/arrow_right.png" alt="Next"/></a> <a href="Debug.html"><img src="img/arrow_right.png" alt="Next"/></a>

View File

@ -98,7 +98,7 @@
<p><br/></p> <p><br/></p>
<p><span class="rvts27">Frame Adv. - Skip Lag</span></p> <p><span class="rvts27">Frame Adv. - Skip Lag</span></p>
<p><br/></p> <p><br/></p>
<p>This feature, if enabled, will cause the frame advance key (see <a class="rvts18" href="MovieRecording.html">movie recording</a>) to skip over lag frames. &nbsp;It does this by reading the lag counter (see <span class="rvts18">display</span>) and skipping past any frames where the input is not polled. &nbsp;</p> <p>This feature, if enabled, will cause the frame advance key (see <a class="rvts18" href="MovieRecording.html">movie recording</a>) to skip over lag frames. &nbsp;It does this by reading the lag counter and skipping past any frames where input is not polled. &nbsp;</p>
<p><br/></p> <p><br/></p>
<p>For instance, in a 30fps game (such as double dragon), frame advance will advance 2 frames instead of 1.</p> <p>For instance, in a 30fps game (such as double dragon), frame advance will advance 2 frames instead of 1.</p>
<p><br/></p> <p><br/></p>

View File

@ -54,6 +54,7 @@
<p></p> <p></p>
<p><span class="rvts17">Tools</span></p> <p><span class="rvts17">Tools</span></p>
<p><br/></p> <p><br/></p>
<p><br/></p>
<p>Guides for the specific tools and settings under FCEUX's Tools menu.</p> <p>Guides for the specific tools and settings under FCEUX's Tools menu.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
@ -74,7 +75,7 @@
<p><br/></p> <p><br/></p>
<p><a class="rvts41" href="TASEditor.html">TAS Editor</a></p> <p><a class="rvts41" href="TASEditor.html">TAS Editor</a></p>
<p><br/></p> <p><br/></p>
<p>A new tool designed for making TAS movies.</p> <p>A new tool for making TAS movies.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><a class="rvts41" href="Covertfcm.html">Convert fcm</a></p> <p><a class="rvts41" href="Covertfcm.html">Convert fcm</a></p>
@ -87,13 +88,11 @@
<p>A guide for setting auto-fire, auto-fire offset, and alternate A and B options.</p> <p>A guide for setting auto-fire, auto-fire offset, and alternate A and B options.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><a class="rvts41" href="ExternalInput.html">Use External Input</a></p>
<p><br/></p>
<p>Explanation of Use External Input</p>
<p><br/></p>
<p><a class="rvts41" href="TextHooker.html">Text Hooker</a></p> <p><a class="rvts41" href="TextHooker.html">Text Hooker</a></p>
<p><br/></p> <p><br/></p>
<p>A guide for using the text hooking tool.</p> <p>A guide for using the text hooking tool.</p>
<p><br/></p>
<p><br/></p>
<p></p> <p></p>
<p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/feature-tour/create-ebooks-for-amazon-kindle">Free Kindle producer</a></p> <p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/feature-tour/create-ebooks-for-amazon-kindle">Free Kindle producer</a></p>
</div> </div>

View File

@ -56,31 +56,33 @@
<div id="topic_content"> <div id="topic_content">
<p></p> <p></p>
<p><span class="rvts56">Trace Logger</span></p> <p><span class="rvts57">Trace Logger</span></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts16">Introduction</span></p> <p><span class="rvts16">Introduction</span></p>
<p><br/></p> <p><br/></p>
<p>The Trace Logger logs every executed instruction and every byte of ROM accessed to the window, or a file if you prefer. &nbsp;Logging to a file is useful if you just want to dump everything that was executed and then search through it later. &nbsp;Logging to the window is useful when you wish to see the instructions that were executed prior to a breakpoint being hit. &nbsp;Both options produce the same data, but the desire to keep that data for a short amount of time or a long amount of time will determine which is best for you.</p> <p>The Trace Logger logs every executed instruction and every byte of ROM accessed to the window, or a file if you prefer. &nbsp;Logging to a file is useful if you just want to dump everything that was executed and then search through it later. Logging to the window is useful when you wish to see the instructions that were executed prior to a breakpoint being hit. Both options produce the same data, but the desire to keep that data for a short amount of time or a long amount of time will determine which is best for you.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts16">Using the Trace Logger</span></p> <p><span class="rvts16">Using the Trace Logger</span></p>
<p><br/></p> <p><br/></p>
<p>The Trace Logger is a very nice feature which logs each instruction as it is being executed; this log can be output either to a file or the window. &nbsp;If you choose to log to the window, you can set how many lines it will retain before discarding old lines. The higher this setting, the more RAM it will consume, but the more lines you'll have available to work with.</p> <p>The Trace Logger is a very nice feature which logs each instruction as it is being executed. If you choose to log to the window, you can set how many lines it will retain before discarding old lines. The higher this setting, the more RAM it will consume, but the more lines you'll have available to work with.</p>
<p><br/></p> <p><br/></p>
<p>Normally, when logging to a window, the Tracer only shows the log is if you pause emulator by Pause/Frame Advance hotkey or by snapping the Debugger. But there is the option to automatically update the log window while the game runs - this is normally useless unless it is working with the Code/Data Logger to only show newly-executed instructions.</p> <p>Normally, when logging to window, the Tracer only shows the log if you pause emulator by Pause or Frame Advance hotkey, or by snapping the Debugger. But there is the option to automatically update the log window while the game runs - this is normally useless, unless it is working with the Code/Data Logger to only show newly-executed instructions.</p>
<p><br/></p> <p><br/></p>
<p>You can specify the format of output in the log:</p> <p class="rvps3"><span class="rvts20">When the code is logged to window, you can browse it using mouse wheel or vertical scrollbar. Double-clicking any address in this window will bring the </span><a class="rvts18" href="Debugger.html">Debugger</a><span class="rvts20"> window at this address. Right-clicking any address allows you to label the address (see Symbolic Debug).</span></p>
<p><br/></p>
<p>You can customize the format of text output in the log:</p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>whether to log registers state for every instruction, and where to put the data in every text line (to the left or to the right from the code disassembly)</li> <li>whether to log registers state for every instruction, and where to put the data in every text line (to the left or to the right from the code disassembly)</li>
<li>whether to log current frame number</li> <li>whether to log current frame number, cycles counter, instructions counter</li>
<li>whether to log emulator messages (such as "State 1 loaded")</li> <li>whether to log emulator messages (such as "State 1 loaded")</li>
<li>whether to log Breakpoint Hits (when you use debugger while tracing)</li> <li>whether to log Breakpoint Hits (when you use debugger while tracing)</li>
<li>whether to apply Symbolic data from *.nl files. See <a class="rvts18" href="Debugger.html">Debugger</a> section for details</li> <li>whether to apply Symbolic Debug names when logging. See <a class="rvts18" href="Debugger.html">Debugger</a> section for details</li>
</ul> </ul>
<p><br/></p> <p><br/></p>
<p>For nice visualization of JSRs nesting you can use Stack Pointer for lines tabbing. Since NES games mostly use stack for subroutine calls (and rarely store variables in the stack), this option will likely produce a more readable disassembly. With this option you may also want to put registers data to the left from disassembly text, so they won't be tabbed.</p> <p>For nice visualization of JSRs nesting you can use Stack Pointer for lines tabbing. Since NES games mostly use stack for subroutine calls (and rarely store variables in the stack), this option will likely produce a more readable disassembly. With this option you may also want to put registers data to the left from disassembly text, so they won't be tabbed.</p>
<p><br/></p> <p><br/></p>
<p>The Trace Logger has extra options which work with the Code/Data Logger so that it only shows instructions executed for the first time, or those which access data for the first time. This can be quite useful for finding certain key routines or finding otherwise impossible-to-find data in almost any game. &nbsp;The best way to use this feature is in conjunction with the option to automatically update the window while logging. Then, as you play the game, you can watch new results appear at once. If you're searching for something specific, try to get everything (EXCEPT what you're looking for) to execute, then watch closely as what you're looking for executes for the first time.</p> <p>The Trace Logger has extra options which work with the Code/Data Logger so that Tracer only shows instructions executed for the first time, or those which access data for the first time. This can be quite useful for finding certain key routines or finding otherwise impossible-to-find data in almost any game. &nbsp;The best way to use this feature is in conjunction with the option to automatically update the window while logging. Then, as you play the game, you can watch new results appear at once. If you're searching for something specific, first try to get everything (EXCEPT what you're looking for) to execute, then watch closely as what you're looking for executes for the first time.</p>
<p><br/></p> <p><br/></p>
<p>There are two ways to filter what the Code/Data Logger shows. The first filter lets you log only newly-executed code (so that an instruction is not logged again if it has already been logged). The second logs only instructions when they access data which hadn't been accessed before. Note that both filters can be used at once (which shows bytes that pass either filter).</p> <p>There are two ways to filter what the Code/Data Logger shows. The first filter lets you log only newly-executed code (so that an instruction is not logged again if it has already been logged). The second logs only instructions when they access data which hadn't been accessed before. Note that both filters can be used at once (which shows bytes that pass either filter).</p>
<p><br/></p> <p><br/></p>

View File

@ -88,28 +88,26 @@
<p>FCEUX uses the color palette of the old FCEU / FCEUXD branches. Also FCEUX comes pre-packaged with several additional color palettes. For more information see <a class="rvts18" href="Palette.html">Palette config</a> and <a class="rvts18" href="PaletteOptions.html">Palette options</a>.</p> <p>FCEUX uses the color palette of the old FCEU / FCEUXD branches. Also FCEUX comes pre-packaged with several additional color palettes. For more information see <a class="rvts18" href="Palette.html">Palette config</a> and <a class="rvts18" href="PaletteOptions.html">Palette options</a>.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts40">I converted a .fcm file to .fm2 but the .fm2 desyncs</span></p> <p><span class="rvts40">I converted a .fcm file to .fm2, but the .fm2 desyncs</span></p>
<p><br/></p> <p><br/></p>
<p>Depending on what version of FCEU / Game your .fcm was made, there maybe a number of sync issues. &nbsp;These are listed in detail at <a class="rvts18" href="http://tasvideos.org/ConvertFCMtoFM2.html" target="_blank">http://tasvideos.org/ConvertFCMtoFM2.html</a>.</p> <p>Depending on what version of FCEU / Game your .fcm was made, there maybe a number of sync issues. In addition, the .fm2 conversion tool has had some issues on certain operating systems including Vista and Mac. you can try using an external program for movie conversion.</p>
<p><br/></p>
<p>In addition, the .fm2 conversion tool has had some issues on certain operating systems including Vista and Mac.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts40">Can't find FDS Bios image when I attempt to load a .fds game!</span></p> <p><span class="rvts40">Can't find FDS Bios image when I attempt to load a .fds game!</span></p>
<p><br/></p> <p><br/></p>
<p>FCEUX requires the FDS Bios to be named <span class="rvts32">disksys.rom</span>. &nbsp;It must be located in the root directory (where fceux.exe is stored) or in the folder of the FDS Directory override (see <a class="rvts18" href="Directories.html">Directory overrides</a>).</p> <p>FCEUX requires the FDS Bios to be named <span class="rvts32">disksys.rom</span>. It must be located in the root directory (where fceux.exe is stored) or in the folder of the FDS Directory override (see <a class="rvts18" href="Directories.html">Directory overrides</a>).</p>
<p><br/></p> <p><br/></p>
<p>In addition, there are some bad versions of disksys.rom. &nbsp;The one FDS requires is 8192 bytes in size.</p> <p>In addition, there are some bad versions of disksys.rom. The one FDS requires is 8192 bytes in size.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts40">How can I use Netplay / Where can I get FCEU Server?</span></p> <p><span class="rvts40">How can I use Netplay / Where can I get FCEU Server?</span></p>
<p><br/></p> <p><br/></p>
<p>Currently, the WIndows version of FCEUX is not compatible with the FCEU-server code. This is a known issue and will probably be resolved in a future release.</p> <p>Currently, the Windows version of FCEUX is barely compatible with the FCEU-server code. This is a known issue and will probably be resolved in a future release.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts40">I have a Game Genie rom, how can I use it with FCEUX?</span></p> <p><span class="rvts40">I have a Game Genie rom, how can I use it with FCEUX?</span></p>
<p><br/></p> <p><br/></p>
<p>While FCEUX has a <a class="rvts18" href="GameGenieEncoderDecoder.html">Game Genie code converter</a>, you can also use game genie codes with the game genie ROM. &nbsp;It must be named gg.rom and be placed in the root directory (where fceux.exe is stored). &nbsp;You must also check <span class="rvts22">Config-&gt;Enable-&gt;Game Genie ROM</span> in the main menu.</p> <p>While FCEUX has a <a class="rvts18" href="GameGenieEncoderDecoder.html">Game Genie code converter</a>, you can also use game genie codes with an old-school Game Genie ROM. &nbsp;It must be named <span class="rvts32">gg.rom</span> and must be placed in the root directory (where fceux.exe is stored). You must also check <span class="rvts22">Config-&gt;Enable-&gt;Game Genie ROM</span> in the main menu. Then the Game Genie ROM will activate every time you open a ROM, so you can enter GG codes letter-by-letter like they did in the past.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>

View File

@ -95,7 +95,7 @@
<p><br/></p> <p><br/></p>
<p><span class="rvts40">Force Integral Scaling Factors</span></p> <p><span class="rvts40">Force Integral Scaling Factors</span></p>
<p>If checked, FCEUX window can only be stretched by even amounts (1x, 2x, 3x, etc.). &nbsp;If unchecked, it can be stretched by any amount.</p> <p>If checked, FCEUX window can only be stretched by even amounts (1x, 2x, 3x, etc.). &nbsp;If unchecked, it can be stretched by any amount.</p>
<p>When you are resizing FCEUX window by dragging its borders, you can hold Shift to temporarily revert this option.</p> <p>When you are resizing FCEUX window by dragging its borders, you can hold Shift to temporarily invert this option.</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts40">Force Aspect Ratio Correction</span></p> <p><span class="rvts40">Force Aspect Ratio Correction</span></p>
<p>Checking this will only allow the correct aspect ratio while resizing the window.</p> <p>Checking this will only allow the correct aspect ratio while resizing the window.</p>

View File

@ -57,25 +57,26 @@
<p></p> <p></p>
<p><span class="rvts17">What's New? </span><span class="rvts21">2.2.2</span></p> <p><span class="rvts17">What's New? </span><span class="rvts21">2.2.2</span></p>
<p>Released -- ?? ???? 2013</p> <p>Released -- 22 September 2013</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p>The 2.2.2 release fixes a number of emulation bugs and adds many new features, most of which are related to debugging.</p> <p>The 2.2.2 release fixes a number of emulation bugs and adds many new features, most of which are related to debugging and reverse engineering.</p>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts23">Common </span></p> <p><span class="rvts23">Common </span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li class="rvps3"><span class="rvts20">Properly savestate NSF files</span></li>
<li class="rvps3"><span class="rvts20">"Auto-resume old play session" now also works with NSFs</span></li> <li class="rvps3"><span class="rvts20">"Auto-resume old play session" now also works with NSFs</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts24">Emulation</span></p> <p><span class="rvts24">Emulation</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li><span class="rvts22">Fixed mappers 178, 28, 53, 154, 43, 253, 19</span></li> <li><span class="rvts22">Fixed mappers 178, 28, 53, 154, 43, 253, 19, 2</span></li>
<li><span class="rvts20">Fixed UNIF 8157, UNIF T-262</span></li> <li class="rvps3"><span class="rvts20">Mapper 012 - added hardware dip for language select</span></li>
<li class="rvps3"><span class="rvts20">UNIF DANCE2000 - now emulated properly</span></li> <li class="rvps3"><span class="rvts20">UNIF PEC-586 - fixed render, added 512K cartridges suppport</span></li>
<li><span class="rvts20">Fixed UNIF 8157, UNIF T-262, UNIF DANCE2000</span></li>
<li class="rvps3"><span class="rvts20">Palette RAM reading fix for Old PPU</span></li> <li class="rvps3"><span class="rvts20">Palette RAM reading fix for Old PPU</span></li>
<li class="rvps3"><span class="rvts20">Bring some improvements to New PPU from BizHawk, fix vtoggle5/6 back to vtoggle</span></li> <li class="rvps3"><span class="rvts20">Bring some improvements to New PPU from BizHawk, fix vtoggle5/6 back to vtoggle</span></li>
<li class="rvps3"><span class="rvts20">Add missing mmc5 savestate variables</span></li> <li class="rvps3"><span class="rvts20">Fixed mmc5 savestates</span></li>
<li class="rvps3"><span class="rvts20">Properly savestate NSF files</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts24">Lua</span></p> <p><span class="rvts24">Lua</span></p>
@ -85,30 +86,29 @@
<p><span class="rvts22"><br/></span></p> <p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">New Lua functions:</span></p> <p><span class="rvts22">New Lua functions:</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li><span class="rvts22">tobitstring()</span></li>
<li><span class="rvts22">memory.readword()</span></li>
<li><span class="rvts22">memory.readwordsigned()</span></li>
<li><span class="rvts22">debugger.hitbreakpoint()</span></li> <li><span class="rvts22">debugger.hitbreakpoint()</span></li>
<li><span class="rvts22">debugger.getcyclescount()</span></li> <li><span class="rvts22">debugger.getcyclescount()</span></li>
<li><span class="rvts22">debugger.getinstructionscount()</span></li> <li><span class="rvts22">debugger.getinstructionscount()</span></li>
<li><span class="rvts22">debugger.resetcyclescount()</span></li> <li><span class="rvts22">debugger.resetcyclescount()</span></li>
<li><span class="rvts22">debugger.resetinstructionscount(), </span></li> <li><span class="rvts22">debugger.resetinstructionscount(), </span></li>
</ul> </ul>
<p><span class="rvts22"><br/></span></p>
<p><span class="rvts22">New scripts:</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li><span class="rvts22"></span></li>
</ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts24">Win32</span></p> <p><span class="rvts24">Win32</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li class="rvps3"><span class="rvts20">Added "Square pixels" option to Video Config</span></li> <li class="rvps3"><span class="rvts20">Added "Square pixels" option to Video Config</span></li>
<li class="rvps3"><span class="rvts20">Added aspect ratio fields for customizing "TV Aspect" ratio, by default it's 4:3</span></li> <li class="rvps3"><span class="rvts20">"TV Aspect" ratio can be customized, by default it's 4:3</span></li>
<li class="rvps3"><span class="rvts20">Changed "Disable hardware acceleration" checkbox to a drop-down list with 3 options</span></li> <li class="rvps3"><span class="rvts20">Changed "Disable hardware acceleration" checkbox to a drop-down list with 3 options</span></li>
<li class="rvps3"><span class="rvts20">Dynamic link to lua51.dll instead of static linking, because many of external libraries can crash without lua51.dll</span></li>
<li class="rvps3"><span class="rvts20">Updated 7z.dll to v9.22</span></li>
<li class="rvps3"><span class="rvts20">A couple of fixes which deal with "multiple ROMs in a single archive" case</span></li>
<li class="rvps3"><span class="rvts20">When no script is currently running, Shift+L loads the most recent Lua script</span></li>
<li class="rvps3"><span class="rvts20">Movie recording: remember last Author name when creating a new movie</span></li> <li class="rvps3"><span class="rvts20">Movie recording: remember last Author name when creating a new movie</span></li>
<li class="rvps3"><span class="rvts20">Movie recording: added ability to record "Insert coin" command (for VS games)</span></li> <li class="rvps3"><span class="rvts20">Movie recording: added ability to record "Insert coin" command (for VS games)</span></li>
<li class="rvps3"><span class="rvts20">When no script is currently running, Shift+L loads the most recent Lua script</span></li>
<li class="rvps3"><span class="rvts20">Dynamic link to lua51.dll instead of static linking, because some external libraries might crash without lua51.dll</span></li>
<li class="rvps3"><span class="rvts20">Updated 7z.dll to v9.22</span></li>
<li class="rvps3"><span class="rvts20">A couple of fixes which deal with "multiple ROMs in a single archive" case</span></li>
<li class="rvps3"><span class="rvts20">Auto-disable "Game Genie ROM" feature when no "gg.rom" file is found</span></li> <li class="rvps3"><span class="rvts20">Auto-disable "Game Genie ROM" feature when no "gg.rom" file is found</span></li>
<li class="rvps3"><span class="rvts20">Fixed "Single Instance Mode"</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts23">TAS Editor</span></p> <p><span class="rvts23">TAS Editor</span></p>
@ -120,52 +120,65 @@
<p><span class="rvts23">Debugger</span></p> <p><span class="rvts23">Debugger</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li class="rvps3"><span class="rvts20">Smart scrolling up/down by whole instructions - ported from an obscure version of FCEUXD 1.1</span></li> <li class="rvps3"><span class="rvts20">Smart scrolling up/down by whole instructions - ported from an obscure version of FCEUXD 1.1</span></li>
<li class="rvps3"><span class="rvts20">Clever autoscrolling maintains relative position of the "&gt;" pointer inside the Disassembly window</span></li> <li class="rvps3"><span class="rvts20">Scrolling maintains relative position of the "&gt;" pointer inside the Disassembly window</span></li>
<li class="rvps3"><span class="rvts20">Highlight PC pointer line when a breakpoint is hit</span></li> <li class="rvps3"><span class="rvts20">Highlight PC pointer line when a breakpoint is hit</span></li>
<li class="rvps3"><span class="rvts20">debuggerFontSize can be specified in fceux.cfg</span></li>
<li class="rvps3"><span class="rvts20">Fixed storing and loading .deb files when working with archived ROMs</span></li> <li class="rvps3"><span class="rvts20">Fixed storing and loading .deb files when working with archived ROMs</span></li>
<li class="rvps3"><span class="rvts20">Fixed Cycles counter reset when loading an earlier savestate</span></li> <li class="rvps3"><span class="rvts20">Fixed Cycles counter reset when loading an earlier savestate</span></li>
<li class="rvps3"><span class="rvts20">Added CDL data column to the left from Disassembly, to distinguish executed branches of code from not logged code</span></li> <li class="rvps3"><span class="rvts20">Added Symbolic Debug naming by right-clicking any address or name</span></li>
<li class="rvps3"><span class="rvts20">Added 'T' condition (checks the bank of the data accessed), see docs</span></li> <li class="rvps3"><span class="rvts20">Symbolic names behave the same way as usual addresses</span></li>
<li class="rvps3"><span class="rvts20">Newly created Bookmarks inherit existing symbolic name by default</span></li>
<li class="rvps3"><span class="rvts20">Added CDL data column to the left from Disassembly, to distinguish executed branches of code from not executed</span></li>
<li class="rvps3"><span class="rvts20">Added 'T' condition for breakpoints (it checks the bank of the accessed data, see docs)</span></li>
</ul> </ul>
<p><span class="rvts23"><br/></span></p> <p><span class="rvts23"><br/></span></p>
<p><span class="rvts23">Trace Logger</span></p> <p><span class="rvts23">Trace Logger</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li class="rvps3"><span class="rvts20">The dialog window can be resized</span></li>
<li class="rvps3"><span class="rvts20">Added "Log Cycles count" and "Log Instructions count" options</span></li> <li class="rvps3"><span class="rvts20">Added "Log Cycles count" and "Log Instructions count" options</span></li>
<li class="rvps3"><span class="rvts20">Added Symbolic Debug naming by right-clicking any address or name</span></li>
<li class="rvps3"><span class="rvts20">Clicking any address select the address</span></li>
<li class="rvps3"><span class="rvts20">Double-clicking any address brings Debugger at the address</span></li>
<li class="rvps3"><span class="rvts20">Added mouse wheel support</span></li>
<li><span class="rvts22">Only output "from $XXXX" when the subroutine was called by JSR</span></li> <li><span class="rvts22">Only output "from $XXXX" when the subroutine was called by JSR</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts23">PPU Viewer</span></p> <p><span class="rvts23">PPU Viewer</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li><span class="rvts22">When CDLogger is on, display unused graphics in a dim palette</span></li> <li><span class="rvts22">Added "Mask unused graphics" feature (needs Code/Data Logger running)</span></li>
<li><span class="rvts22">Fixed window layout when using big fonts</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts23">Hex Editor</span></p> <p><span class="rvts23">Hex Editor</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li class="rvps3"><span class="rvts20">Added "Highlighting" submenu and "Highlight Activity" feature</span></li> <li class="rvps3"><span class="rvts20">Added "Highlighting" submenu and "Highlight Activity" feature</span></li>
<li class="rvps3"><span class="rvts20">Added Symbolic Debug naming by right-clicking any address</span></li>
<li class="rvps3"><span class="rvts20">Specify Data bank condition when adding a Breakpoint by context menu</span></li> <li class="rvps3"><span class="rvts20">Specify Data bank condition when adding a Breakpoint by context menu</span></li>
<li class="rvps3"><span class="rvts20">Fixed bugs when saving files while working with ROMs in archives</span></li> <li class="rvps3"><span class="rvts20">Fixed bugs when saving files while working with ROMs in archives</span></li>
<li class="rvps3"><span class="rvts20">hexeditorFontSize can be specified in fceux.cfg</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts23">RAM Search/RAM Watch</span></p> <p><span class="rvts23">RAM Search/RAM Watch</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li><span class="rvts22">Added "Hex Editor" button to RAM Search (right-click on an address works as well)</span></li> <li><span class="rvts22">Added "Hex Editor" button to RAM Search (right-clicking an address works as well)</span></li>
<li><span class="rvts22">Fixed RAM Watch bug when contents of old .wch file were mixed with the newly saved data</span></li> <li><span class="rvts22">Fixed RAM Watch bug when contents of old .wch file were mixed with the newly saved data</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts23">Cheats</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li><span class="rvts22"></span></li>
</ul>
<p><span class="rvts24"><br/></span></p>
<p><span class="rvts24">SDL</span></p> <p><span class="rvts24">SDL</span></p>
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li class="rvps3"><span class="rvts20">Fixed bug where fceux would take exclusive grab of input in windowed mode when resuming from pause</span></li> <li class="rvps3"><span class="rvts20">"--periodicsaves" command line option</span></li>
<li class="rvps3"><span class="rvts20"></span></li> <li class="rvps3"><span class="rvts20">"--4buttonexit" command line option</span></li>
<li class="rvps3"><span class="rvts20">"--loadstate X" and "--savestate X" command line options</span></li>
<li class="rvps3"><span class="rvts20">Added Unity desktop support</span></li>
<li class="rvps3"><span class="rvts20">Added otion to use system-provided LUA library instead of statically linked LUA</span></li>
<li class="rvps3"><span class="rvts20">Fix issue where battery backup save was not being saved when using "Quit" hotkey</span></li>
<li class="rvps3"><span class="rvts20">Fixed bug where FCEUX would take exclusive grab of input in windowed mode when resuming from pause</span></li>
</ul> </ul>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts24"><br/></span></p> <p><span class="rvts24"><br/></span></p>
<p><span class="rvts24"><br/></span></p>
<p></p> <p></p>
<p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/create-epub-ebooks">Generate EPub eBooks with ease</a></p> <p class="rvps2"><span class="rvts13">Created with the Personal Edition of HelpNDoc: </span><a class="rvts14" href="http://www.helpndoc.com/create-epub-ebooks">Generate EPub eBooks with ease</a></p>
</div> </div>

View File

@ -237,171 +237,175 @@ span.rvts45
} }
span.rvts46 span.rvts46
{ {
color: #0000ff; font-size: 8pt;
} }
span.rvts47 span.rvts47
{ {
color: #00cc00; color: #0000ff;
} }
span.rvts48 span.rvts48
{ {
color: #ff0000; color: #00cc00;
} }
span.rvts49 span.rvts49
{ {
color: #00be00; color: #ff0000;
} }
span.rvts50 span.rvts50
{ {
color: #a08c00; color: #00be00;
} }
span.rvts51 span.rvts51
{ {
color: #0000c3; color: #a08c00;
} }
span.rvts52 span.rvts52
{ {
color: #0082a0; color: #0000c3;
} }
span.rvts53 span.rvts53
{ {
color: #d2be00; color: #0082a0;
} }
span.rvts54 span.rvts54
{ {
color: #0a0aff; color: #d2be00;
} }
span.rvts55 span.rvts55
{ {
color: #05ff05; color: #0a0aff;
} }
span.rvts56 span.rvts56
{
color: #05ff05;
}
span.rvts57
{ {
font-size: 22pt; font-size: 22pt;
text-decoration: underline; text-decoration: underline;
} }
a.rvts57, span.rvts57 a.rvts58, span.rvts58
{ {
font-size: 12pt; font-size: 12pt;
color: #0000ff; color: #0000ff;
text-decoration: underline; text-decoration: underline;
} }
a.rvts57:hover { color: #0000ff; } a.rvts58:hover { color: #0000ff; }
span.rvts58 span.rvts59
{ {
font-size: 18pt; font-size: 18pt;
font-weight: bold; font-weight: bold;
} }
span.rvts59 span.rvts60
{ {
font-size: 12pt; font-size: 12pt;
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
font-weight: bold; font-weight: bold;
} }
span.rvts60
{
font-size: 14pt;
font-weight: bold;
}
span.rvts61 span.rvts61
{ {
font-size: 12pt; font-size: 14pt;
font-family: 'Courier New', 'Courier', monospace; font-weight: bold;
color: #000080;
} }
span.rvts62 span.rvts62
{ {
font-size: 12pt; font-size: 12pt;
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
color: #333399; color: #000080;
} }
span.rvts63 span.rvts63
{
font-size: 12pt;
font-family: 'Courier New', 'Courier', monospace;
color: #333399;
}
span.rvts64
{ {
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
color: #000080; color: #000080;
} }
span.rvts64 span.rvts65
{ {
font-size: 16pt; font-size: 16pt;
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
font-weight: bold; font-weight: bold;
} }
span.rvts65
{
font-size: 11pt;
font-family: 'Courier New', 'Courier', monospace;
font-weight: bold;
}
span.rvts66 span.rvts66
{ {
font-size: 11pt;
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
font-weight: bold; font-weight: bold;
} }
span.rvts67 span.rvts67
{ {
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
font-weight: bold;
} }
span.rvts68 span.rvts68
{
font-family: 'Courier New', 'Courier', monospace;
}
span.rvts69
{ {
font-size: 12pt; font-size: 12pt;
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
color: #000080; color: #000080;
} }
a.rvts69, span.rvts69 a.rvts70, span.rvts70
{ {
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
color: #0000ff; color: #0000ff;
text-decoration: underline; text-decoration: underline;
} }
a.rvts69:hover { color: #0000ff; } a.rvts70:hover { color: #0000ff; }
span.rvts70 span.rvts71
{ {
font-size: 14pt; font-size: 14pt;
font-weight: bold; font-weight: bold;
} }
span.rvts71 /* Font Style */ span.rvts72 /* Font Style */
{ {
font-size: 14pt; font-size: 14pt;
} }
span.rvts72 span.rvts73
{ {
font-family: 'Courier New', 'Courier', monospace; font-family: 'Courier New', 'Courier', monospace;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
a.rvts73, span.rvts73
{
color: #0000ff;
text-decoration: underline;
}
a.rvts73:hover { color: #0000ff; }
a.rvts74, span.rvts74 a.rvts74, span.rvts74
{
color: #0000ff;
text-decoration: underline;
}
a.rvts74:hover { color: #0000ff; }
a.rvts75, span.rvts75
{ {
font-size: 12pt; font-size: 12pt;
color: #0000ff; color: #0000ff;
text-decoration: underline; text-decoration: underline;
} }
a.rvts74:hover { color: #0000ff; } a.rvts75:hover { color: #0000ff; }
span.rvts75 span.rvts76
{ {
font-family: 'Lucida Console', 'Monaco', monospace; font-family: 'Lucida Console', 'Monaco', monospace;
text-decoration: underline; text-decoration: underline;
} }
span.rvts76 span.rvts77
{ {
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
span.rvts77 span.rvts78
{ {
font-size: 11pt; font-size: 11pt;
text-decoration: underline; text-decoration: underline;
} }
span.rvts78 span.rvts79
{ {
font-size: 5pt; font-size: 5pt;
} }
span.rvts79 span.rvts80
{ {
font-size: 5pt; font-size: 5pt;
font-weight: bold; font-weight: bold;

View File

@ -90,41 +90,41 @@
<p>Integer keys (also used for booleans, with a 1 for true and 0 for false) must have a value that can be stored as int32:</p> <p>Integer keys (also used for booleans, with a 1 for true and 0 for false) must have a value that can be stored as int32:</p>
<p><br/></p> <p><br/></p>
<p> <span class="rvts32">- version</span> (required) - the version of the movie file format; for now it is always 3</p> <p> <span class="rvts32">- version</span> (required) - the version of the movie file format; for now it is always 3</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- emuVersion</span> (required) - the version of the emulator used to produce the movie</p> <p> <span class="rvts32">- emuVersion</span> (required) - the version of the emulator used to produce the movie</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- rerecordCount</span> (optional) - the rerecord count</p> <p> <span class="rvts32">- rerecordCount</span> (optional) - the rerecord count</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> -<span class="rvts32"> palFlag</span> (bool) (optional) - true if the movie uses PAL timing</p> <p> -<span class="rvts32"> palFlag</span> (bool) (optional) - true if the movie uses PAL timing</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> -<span class="rvts32"> NewPPU</span> (bool) (optional) - true if the movie uses New PPU</p> <p> -<span class="rvts32"> NewPPU</span> (bool) (optional) - true if the movie uses New PPU</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- FDS</span> (bool) (optional) - true if movie was recorded on a Famicom Disk System (FDS) game</p> <p> <span class="rvts32">- FDS</span> (bool) (optional) - true if movie was recorded on a Famicom Disk System (FDS) game</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- fourscore</span> (bool) - true if a fourscore was used. If fourscore is not used, then port0 and port1 are required</p> <p> <span class="rvts32">- fourscore</span> (bool) - true if a fourscore was used. If fourscore is not used, then port0 and port1 are required</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- port0 </span>- indicates the type of input device attached to the port 0. Supported values are:</p> <p> <span class="rvts32">- port0 </span>- indicates the type of input device attached to the port 0. Supported values are:</p>
<p> &nbsp; &nbsp; SI_NONE = 0</p> <p> &nbsp; &nbsp; SI_NONE = 0</p>
<p> &nbsp; &nbsp; SI_GAMEPAD = 1</p> <p> &nbsp; &nbsp; SI_GAMEPAD = 1</p>
<p> &nbsp; &nbsp; SI_ZAPPER = 2</p> <p> &nbsp; &nbsp; SI_ZAPPER = 2</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- port1</span> - indicates the type of input device attached to the port 1. Supported values are:</p> <p> <span class="rvts32">- port1</span> - indicates the type of input device attached to the port 1. Supported values are:</p>
<p> &nbsp; &nbsp; SI_NONE = 0</p> <p> &nbsp; &nbsp; SI_NONE = 0</p>
<p> &nbsp; &nbsp; SI_GAMEPAD = 1</p> <p> &nbsp; &nbsp; SI_GAMEPAD = 1</p>
<p> &nbsp; &nbsp; SI_ZAPPER = 2</p> <p> &nbsp; &nbsp; SI_ZAPPER = 2</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p><span class="rvts32"> - port2</span> (required) - indicates the type of the FCExp port device which was attached. Supported values are:</p> <p><span class="rvts32"> - port2</span> (required) - indicates the type of the FCExp port device which was attached. Supported values are:</p>
<p> &nbsp; &nbsp; SIFC_NONE = 0</p> <p> &nbsp; &nbsp; SIFC_NONE = 0</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- binary</span> (bool) (optional) - true if input log is stored in binary format</p> <p> <span class="rvts32">- binary</span> (bool) (optional) - true if input log is stored in binary format</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p> <span class="rvts32">- length</span> (optional) - movie size (number of frames in the input log). If this key is specified and the number is &gt;= 0, the input log ends after specified number of records, and any remaining data should not be parsed. This key is used in <span class="rvts76">fm3</span> format to allow storing extra data after the end of input log</p> <p> <span class="rvts32">- length</span> (optional) - movie size (number of frames in the input log). If this key is specified and the number is &gt;= 0, the input log ends after specified number of records, and any remaining data should not be parsed. This key is used in <span class="rvts77">fm3</span> format to allow storing extra data after the end of input log</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p>String keys have values that consist of the remainder of the key-value pair line. As a consequence, string values cannot contain newlines.</p> <p>String keys have values that consist of the remainder of the key-value pair line. As a consequence, string values cannot contain newlines.</p>
<p><br/></p> <p><br/></p>
<p><span class="rvts32"> - romFilename</span> (required) - the name of the file used to record the movie</p> <p><span class="rvts32"> - romFilename</span> (required) - the name of the file used to record the movie</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p><span class="rvts32"> - comment </span>(optional) - simply a memo</p> <p><span class="rvts32"> - comment </span>(optional) - simply a memo</p>
<ul style="text-indent: 0px; margin-left: 36px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 36px; list-style-position: outside;">
<li>by convention, the first token in the comment value is the subject of the comment</li> <li>by convention, the first token in the comment value is the subject of the comment</li>
@ -135,7 +135,7 @@
<ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 24px; list-style-position: outside;">
<li>comment author adelikat</li> <li>comment author adelikat</li>
</ul> </ul>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p><span class="rvts32"> - subtitle </span>(optional) - a message that will be displayed on screen when movie is played back (unless Subtitles are turned off, see <a class="rvts18" href="MovieOptions.html">Movie options</a>)</p> <p><span class="rvts32"> - subtitle </span>(optional) - a message that will be displayed on screen when movie is played back (unless Subtitles are turned off, see <a class="rvts18" href="MovieOptions.html">Movie options</a>)</p>
<ul style="text-indent: 0px; margin-left: 36px; list-style-position: outside;"> <ul style="text-indent: 0px; margin-left: 36px; list-style-position: outside;">
<li>by convention, subtitles begin with the word "subtitle"</li> <li>by convention, subtitles begin with the word "subtitle"</li>
@ -147,12 +147,12 @@
<li>subtitle 1000 Level Two</li> <li>subtitle 1000 Level Two</li>
</ul> </ul>
<p>At frame 1000 the words "Level Two" will be displayed on the screen</p> <p>At frame 1000 the words "Level Two" will be displayed on the screen</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p><span class="rvts32"> - guid </span>(required) - a unique identifier for a movie, generated when the movie is created, which is used when loading a savestate to make sure it belongs to the current movie</p> <p><span class="rvts32"> - guid </span>(required) - a unique identifier for a movie, generated when the movie is created, which is used when loading a savestate to make sure it belongs to the current movie</p>
<p>GUID keys have a value which is in the standard guide format: 452DE2C3-EF43-2FA9-77AC-0677FC51543B</p> <p>GUID keys have a value which is in the standard guide format: 452DE2C3-EF43-2FA9-77AC-0677FC51543B</p>
<p><span class="rvts79"><br/></span></p> <p><span class="rvts80"><br/></span></p>
<p><span class="rvts32"> - romChecksum </span>(required) - the base64 of the hexified MD5 hash of the ROM which was used to record the movie</p> <p><span class="rvts32"> - romChecksum </span>(required) - the base64 of the hexified MD5 hash of the ROM which was used to record the movie</p>
<p><span class="rvts78"><br/></span></p> <p><span class="rvts79"><br/></span></p>
<p><span class="rvts32"> - savestate </span>(optional) - a <a class="rvts18" href="fcs.html">fcs</a> savestate blob, in case a movie was recorded from savestate &nbsp;</p> <p><span class="rvts32"> - savestate </span>(optional) - a <a class="rvts18" href="fcs.html">fcs</a> savestate blob, in case a movie was recorded from savestate &nbsp;</p>
<p>Hex string keys (used for binary blobs) have a value that is like 0x0123456789ABCDEF...</p> <p>Hex string keys (used for binary blobs) have a value that is like 0x0123456789ABCDEF...</p>
<p><br/></p> <p><br/></p>
@ -162,7 +162,7 @@
<p>The input log section consists of movie records either in the form of text lines or in the form of binary data.</p> <p>The input log section consists of movie records either in the form of text lines or in the form of binary data.</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts77">Text format (default format):</span></p> <p><span class="rvts78">Text format (default format):</span></p>
<p><br/></p> <p><br/></p>
<p>Every frame of the movie is represented by line of text beginning and ending with a | (pipe).</p> <p>Every frame of the movie is represented by line of text beginning and ending with a | (pipe).</p>
<p>The fields in the line are as follows, except when fourscore is used.</p> <p>The fields in the line are as follows, except when fourscore is used.</p>
@ -207,7 +207,7 @@
<p>{commands, player1, player2, player3, player4, port2}</p> <p>{commands, player1, player2, player3, player4, port2}</p>
<p><br/></p> <p><br/></p>
<p><br/></p> <p><br/></p>
<p><span class="rvts77">Binary format:</span></p> <p><span class="rvts78">Binary format:</span></p>
<p><br/></p> <p><br/></p>
<p>Input log section starts with a | (pipe).</p> <p>Input log section starts with a | (pipe).</p>
<p>Every frame of the movie is represented by a record of a fixed length which can be determined by the devices on port0 and port1.</p> <p>Every frame of the movie is represented by a record of a fixed length which can be determined by the devices on port0 and port1.</p>

File diff suppressed because one or more lines are too long

View File

@ -498,12 +498,6 @@
target="FrameMain"> target="FrameMain">
Auto Fire Settings</a> Auto Fire Settings</a>
</li><li class="" id="ExternalInput" data="">
<a
href="ExternalInput.html"
target="FrameMain">
External Input</a>
</li><li class="" id="TextHooker" data=""> </li><li class="" id="TextHooker" data="">
<a <a
href="TextHooker.html" href="TextHooker.html"
@ -708,7 +702,13 @@
target="FrameMain"> target="FrameMain">
NES Scrolling 2</a> NES Scrolling 2</a>
</li></ul></li></ul></li></ul> </li></ul></li><li class="" id="NLFilesFormat" data="">
<a
href="NLFilesFormat.html"
target="FrameMain">
.nl files format</a>
</li></ul></li></ul>
</div> </div>
<div id="tab-keywords"> <div id="tab-keywords">
@ -1426,11 +1426,11 @@
> >
Undo</a> Undo</a>
</li><li class="file" data="click:'[[\'External Input\',\'ExternalInput.html\']]'"> </li><li class="file" data="click:'[[\'\',\'.html\']]'">
<a <a
href="ExternalInput.html" href=".html"
target="FrameMain" target="FrameMain"
onClick="[['External Input','ExternalInput.html']]" onClick="[['','.html']]"
> >
Use External Input</a> Use External Input</a>