fceux/web/help/TraceLogger.html

297 lines
14 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="generator" content="HelpNDoc Personal Edition 7.9.1.631">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="favicon.ico"/>
<title>Trace Logger</title>
<meta name="description" content="" />
<meta name="keywords" content="Trace Logger">
<!-- Twitter Card data -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Trace Logger">
<meta name="twitter:description" content="">
<!-- Open Graph data -->
<meta property="og:title" content="Trace Logger" />
<meta property="og:type" content="article" />
<meta property="og:description" content="" />
<meta property="og:site_name" content="FCEUX Help" />
<!-- Bootstrap core CSS -->
<link href="vendors/bootstrap-3.4.1/css/bootstrap.min.css" rel="stylesheet"/>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="vendors/bootstrap-3.4.1/css/ie10-viewport-bug-workaround.css" rel="stylesheet"/>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="vendors/html5shiv-3.7.3/html5shiv.min.js"></script>
<script src="vendors/respond-1.4.2/respond.min.js"></script>
<![endif]-->
<!-- JsTree styles -->
<link href="vendors/jstree-3.3.10/themes/default/style.min.css" rel="stylesheet"/>
<!-- Hnd styles -->
<link href="css/layout.min.css" rel="stylesheet" />
<link href="css/effects.min.css" rel="stylesheet" />
<link href="css/theme-light-blue.min.css" rel="stylesheet" />
<link href="css/print.min.css" rel="stylesheet" media="print" />
<style type="text/css">nav { width: 250px} @media screen and (min-width:769px) { body.md-nav-expanded div#main { margin-left: 250px} body.md-nav-expanded header { padding-left: 264px} }</style>
<style type="text/css">.navigation #inline-toc { width: auto !important}</style>
<!-- Content style -->
<link href="css/hnd.content.css" rel="stylesheet" />
</head>
<body class="md-nav-expanded">
<div id="skip-link">
<a href="#main-content" class="element-invisible">Skip to main content</a>
</div>
<header class="headroom">
<button class="hnd-toggle btn btn-default">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button>
<h1>FCEUX Help</h1>
</header>
<nav id="panel-left" class="md-nav-expanded">
<!-- Nav tabs -->
<ul class="tab-tabs nav nav-tabs" role="tablist">
<li id="nav-close">
<button class="hnd-toggle btn btn-default">
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
</button>
</li>
<li role="presentation" class="tab active">
<a href="#contents" id="tab-contents" aria-controls="contents" role="tab" data-toggle="tab">
<i class="glyphicon glyphicon-list"></i>
Contents
</a>
</li>
<li role="presentation" class="tab">
<a href="#index" id="tab-index" aria-controls="index" role="tab" data-toggle="tab">
<i class="glyphicon glyphicon-asterisk"></i>
Index
</a>
</li>
<li role="presentation" class="tab">
<a href="#search" id="tab-search" aria-controls="search" role="tab" data-toggle="tab">
<i class="glyphicon glyphicon-search"></i>
Search
</a>
</li>
</ul> <!-- /Nav tabs -->
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="contents">
<div id="toc" class="tree-container unselectable"
data-url="_toc.json"
data-openlvl="1"
>
</div>
</div> <!-- /contents-->
<div role="tabpanel" class="tab-pane" id="index">
<div id="keywords" class="tree-container unselectable"
data-url="_keywords.json"
data-openlvl="1"
>
</div>
</div> <!-- /index-->
<div role="tabpanel" class="tab-pane" id="search">
<div class="search-content">
<div class="search-input">
<form id="search-form">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" id="input-search" name="input-search" placeholder="Search..." />
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</button>
</span>
</div>
</div>
</form>
</div> <!-- /search-input -->
<div class="search-result">
<div id="search-info"></div>
<div class="tree-container unselectable" id="search-tree"></div>
</div> <!-- /search-result -->
</div> <!-- /search-content -->
</div> <!-- /search-->
</div> <!-- /Tab panes -->
</nav>
<div id="main">
<article>
<div id="topic-content" class="container-fluid"
data-hnd-id="TraceLogger"
data-hnd-context="38"
data-hnd-title="Trace Logger"
>
<div class="navigation">
<ol class="breadcrumb">
<li><a href="Debug.html">Debug</a></li>
</ol>
<div class="nav-arrows">
<div class="btn-group btn-group" role="group"><a class="btn btn-default" href="Debug.html" title="Debug" role="button"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span></a><a class="btn btn-default" href="HexEditor.html" title="Hex Editor" role="button"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span></a><a class="btn btn-default" href="CodeDataLogger.html" title="Code/Data Logger" role="button"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></a></div>
</div>
</div>
<a id="main-content"></a>
<h2>Trace Logger</h2>
<div class="main-content">
<p class="rvps2"><span class="rvts93">Trace Logger</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts21">Introduction</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">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.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts21">Using the Trace Logger</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">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.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">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.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">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="rvts94" href="Debugger.html">Debugger</a><span class="rvts6"> window at this address. Right-clicking any address allows you to label the address (see Symbolic Debug).</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">You can customize the format of text output in the log:</span></p>
<ul style="text-indent: 0px; padding: 0; margin: 0 0 0 24px; list-style-position: outside; list-style-type: disc;">
<li class="rvps2"><span class="rvts6">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)</span></li>
<li class="rvps2"><span class="rvts6">whether to log current frame number, cycles counter, instructions counter</span></li>
<li class="rvps2"><span class="rvts6">whether to log emulator messages (such as "State 1 loaded")</span></li>
<li class="rvps2"><span class="rvts6">whether to log Breakpoint Hits (when you use debugger while tracing)</span></li>
<li class="rvps2"><span class="rvts6">whether to apply Symbolic Debug names when logging. See </span><a class="rvts94" href="Debugger.html">Debugger</a><span class="rvts6"> section for details</span></li>
</ul>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">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.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">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.</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6">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).</span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6"><br/></span></p>
<p class="rvps2"><span class="rvts6"></span><span class="rvts6"></span></p>
<p class="rvps4" style="clear: both;"><span class="rvts18">Created with the Personal Edition of HelpNDoc: </span><a class="rvts19" href="https://www.helpndoc.com/create-epub-ebooks">Full-featured EPub generator</a></p>
</div>
<div id="topic_footer"><div id="topic_footer_content">2020</div></div>
</div> <!-- /#topic-content -->
</article>
<footer></footer>
</div> <!-- /#main -->
<div class="mask" data-toggle="sm-nav-expanded"></div>
<!-- Modal -->
<div class="modal fade" id="hndModal" tabindex="-1" role="dialog" aria-labelledby="hndModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="hndModalLabel"></h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary modal-btn-close" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Splitter -->
<div id="hnd-splitter" style="left: 250px"></div>
<!-- Scripts -->
<script src="vendors/jquery-3.5.1/jquery.min.js"></script>
<script src="vendors/bootstrap-3.4.1/js/bootstrap.min.js"></script>
<script src="vendors/bootstrap-3.4.1/js/ie10-viewport-bug-workaround.js"></script>
<script src="vendors/markjs-8.11.1/jquery.mark.min.js"></script>
<script src="vendors/uri-1.19.2/uri.min.js"></script>
<script src="vendors/imageMapResizer-1.0.10/imageMapResizer.min.js"></script>
<script src="vendors/headroom-0.11.0/headroom.min.js"></script>
<script src="vendors/jstree-3.3.10/jstree.min.js"></script>
<script src="vendors/interactjs-1.9.22/interact.min.js"></script>
<!-- HelpNDoc scripts -->
<script src="js/polyfill.object.min.js"></script>
<script src="_translations.js"></script>
<script src="js/hndsd.min.js"></script>
<script src="js/hndse.min.js"></script>
<script src="js/app.min.js"></script>
<!-- Init script -->
<script>
$(function() {
// Create the app
var app = new Hnd.App({
searchEngineMinChars: 3
});
// Update translations
hnd_ut(app);
// Instanciate imageMapResizer
imageMapResize();
// Custom JS
// Boot the app
app.Boot();
});
</script>
</body>
</html>