mirror of
https://github.com/fadden/6502bench.git
synced 2025-07-24 07:24:06 +00:00
Two main changes: - "Seek nearby targets" is no longer enabled by default. - The application asks the user to save new projects immediately. Various minor edits were also made. A couple of the images are slightly stale, showing ".org" rather than ".addrs", but they're in the advanced section and the difference isn't notable.
154 lines
6.7 KiB
HTML
154 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<!-- START: /incl-head.html -->
|
|
<!-- common head elements -->
|
|
<meta charset="utf-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
|
|
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
<link rel="stylesheet" href="../main.css"/>
|
|
<!-- END: /incl-head.html -->
|
|
|
|
<title>Suggestions - SourceGen Tutorial</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<!-- START: /incl-masthead.html -->
|
|
<div id="masthead">
|
|
<!--<div class="masthead-title" style="background-image: url('images/screenshot-mainwin.png');">-->
|
|
<div class="masthead-title">
|
|
6502bench
|
|
</div>
|
|
</div>
|
|
<!-- END: /incl-masthead.html -->
|
|
|
|
<!-- START: /incl-topnav.html active:#topnav-sgtutorial -->
|
|
<div id="topnav">
|
|
<!-- top navigation bar contents -->
|
|
<nav>
|
|
<a id="topnav-home" href=".././">HOME</a>
|
|
<a id="topnav-sgtutorial" class="active" href="../sgtutorial">SourceGen Tutorial</a>
|
|
<a id="topnav-menuicon" href="javascript:void(0);" class="icon" onclick="toggleSidenav()">
|
|
<i class="fa fa-bars"></i>
|
|
</a>
|
|
</nav>
|
|
<script>
|
|
// Sidenav toggle function.
|
|
//
|
|
// Use a jQuery function to toggle the sidenav bar. The initial state
|
|
// is undefined / inherited, so it will pop in and out as the screen
|
|
// resizes around the "large" breakpoint.
|
|
function toggleSidenav() {
|
|
$("#sidenav").toggle("fast");
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- END: /incl-topnav.html -->
|
|
|
|
<!-- START: incl-sidenav.html active:#sidenav-suggestions -->
|
|
<div id="sidenav">
|
|
<!-- side navigation bar contents -->
|
|
<ul>
|
|
<li id="sidenav-index"><a href="./">Introduction</a></li>
|
|
<li id="sidenav-about-disasm"><a href="about-disasm.html">About Disassembly</a></li>
|
|
<li id="sidenav-using-sourcegen"><a href="using-sourcegen.html">Using SourceGen</a>
|
|
<ul>
|
|
<li id="sidenav-moving-around"><a href="moving-around.html">Moving Around</a></li>
|
|
<li id="sidenav-making-edits"><a href="making-edits.html">Making Edits</a></li>
|
|
<li id="sidenav-labels-symbols"><a href="labels-symbols.html">Labels & Symbols</a></li>
|
|
<li id="sidenav-editing-data"><a href="editing-data.html">Editing Data Operands</a></li>
|
|
<li id="sidenav-generating-code"><a href="generating-code.html">Generating Code</a></li>
|
|
</ul></li>
|
|
<li id="sidenav-digging-deeper"><a href="digging-deeper.html">Digging Deeper</a>
|
|
<ul>
|
|
<li id="sidenav-string-formatting"><a href="string-formatting.html">String Formatting</a></li>
|
|
<li id="sidenav-local-variables"><a href="local-variables.html">Local Variables</a></li>
|
|
<li id="sidenav-inline-data"><a href="inline-data.html">Inline Data</a></li>
|
|
<li id="sidenav-odds-ends"><a href="odds-ends.html">Odds & Ends</a></li>
|
|
</ul></li>
|
|
<li id="sidenav-advanced-topics"><a href="advanced-topics.html">Advanced Topics</a>
|
|
<ul>
|
|
<li id="sidenav-address-tables"><a href="address-tables.html">Address Tables</a></li>
|
|
<li id="sidenav-extension-scripts"><a href="extension-scripts.html">Extension Scripts</a></li>
|
|
<li id="sidenav-visualizations"><a href="visualizations.html">Visualizations</a></li>
|
|
</ul></li>
|
|
<li id="sidenav-suggestions" class="active"><a href="suggestions.html">Suggestions</a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- END: incl-sidenav.html -->
|
|
|
|
<div id="main">
|
|
|
|
<h2>A Few Suggestions</h2>
|
|
|
|
<p>The hardest step in a journey is often the first. Here are a few
|
|
suggestions to help you on your way.</p>
|
|
|
|
<ul>
|
|
<li>Start with a small project (< 1KB). If you haven't
|
|
disassembled code before, this is the time to play with different
|
|
conventions, like whether to use MixedCase or underscore_separated
|
|
or SCREAMING_CAPS for labels.</li>
|
|
<li>Use the program you're disassembling thoroughly before you start.
|
|
Understand all of what it does.</li>
|
|
<li>Start with easily identifiable subroutines. If a chunk of code is
|
|
reading from the keyboard, you can make reasonable guesses about the
|
|
purpose of the code that interacts with it.
|
|
The start of the program is often the hardest place to begin, because it
|
|
usually just initializes a bunch of stuff you haven't identified.
|
|
Work bottom-up.</li>
|
|
<li>Expect to figure out little pieces. Use what you learn from these
|
|
to figure out other little pieces. It's a jigsaw puzzle, not a book.</li>
|
|
<li>Don't get discouraged if there's a ton of code that you can't make
|
|
sense of. It won't make sense at first. Keep chipping away.</li>
|
|
<li>Read <a href="https://6502disassembly.com/on-disassembly.html">On Disassembly</a>
|
|
for additional thoughts.</li>
|
|
</ul>
|
|
|
|
<p>Remember that SourceGen works by tracing through code from marked
|
|
start points, rather than treating everything as code and requiring you
|
|
to mark all the data items.
|
|
Begin each project by finding the code. Identify external
|
|
entry points, format tables of addresses, and find JSRs that are
|
|
followed by inline data. Use an extension script to handle the
|
|
inlines so you won't keep tripping over them. If parts of the program
|
|
are relocated to a different address, create the appropriate address
|
|
regions.</p>
|
|
<p>Code start tags are rarely needed, and code end tags are almost
|
|
never needed. You shouldn't have to spend a lot of time manually
|
|
tagging things. If a piece of code isn't being found, it's usually
|
|
best to figure out why the code that calls it isn't being found,
|
|
instead of trying to tag it and forge ahead from that point. It might
|
|
be dead code that's never called, or it might be called from a table
|
|
that you can format to add code entry tags for multiple addresses with
|
|
a single operation. Taking the time to find the table and format it
|
|
is faster than hand-formatting dozens of little handlers, and it's
|
|
something you'll need to do eventually anyway.</p>
|
|
|
|
</div> <!-- #main -->
|
|
|
|
<div id="prevnext">
|
|
<a href="visualizations.html" class="btn-previous">« Previous</a>
|
|
</div>
|
|
|
|
<!-- START: /incl-footer.html -->
|
|
<div id="footer">
|
|
<hr/>
|
|
<p>Copyright 2021 faddenSoft</p>
|
|
<!-- <p id="screen-size"></p>
|
|
<script>
|
|
var w = window.innerWidth;
|
|
var h = window.innerHeight;
|
|
var x = document.getElementById("screen-size");
|
|
x.innerHTML = "DEBUG: initial window size " + w + "x" + h;
|
|
</script> -->
|
|
</div>
|
|
<!-- END: /incl-footer.html -->
|
|
|
|
</body>
|
|
</html>
|