Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Docs update.

  • Loading branch information...
commit e84a9ad903879551fec12bb3e776ce0c1ecefcdb 1 parent 4f0997d
@redline6561 authored
Showing with 22 additions and 679 deletions.
  1. +0 −658 docs/6502-cpu.html
  2. +22 −20 docs/cl-6502.html
  3. +0 −1  gen-docs.sh
View
658 docs/6502-cpu.html
@@ -1,658 +0,0 @@
-
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>API for 6502-CPU</title>
-<style type="text/css" media="all">
-body {margin: 0 2em .5em 2em;font-family: Verdana,Arial,sans-serif;}
-.package {background: #efefef;
- padding: 1.5em 0 1em 0;
- text-align: center;
- font-size: x-large;}
-.definition {background: #efefef; padding: .3em 1em;}
-a.symbolname, a:visited.symbolname {font-weight: bold;}
-.initargs {font-size: small;}
-.slots {font-size: small;}
-div.label {border-bottom: 1px solid #efefef; margin-bottom: .5em}
-.symboldecl, .footer {margin: 0 2em 2em 2em;}
-.symbolname {font-weight: bold; color: gray;}
-.symboltype {font-style: italic;margin-left: 1.5em; font-size: smaller;}
-.documentation {color: gray; font-family: Fixed,monospace;margin: 0 0 1.5em 0.5em;}
-.packagedocumentation {color: gray;
- font-family: Fixed,monospace;
- margin: 0 0 1.5em 0;
- border: 1px solid #efefef;
- padding-left: 1.5em;}
-.symbolcomments span {font-weight: bold;}
-.footer {font-size: x-small; text-align: right; margin-top: 2em; padding-top: 1em; border-top: 1px solid gray;}
-.undocumented {color: red; font-weight: bold;}
-a, a:visited {font-weight: bold; color: gray; text-decoration: none; font-weight: normal;}
-a:hover {border-bottom: 1px solid gray; }
-.label {font-weight: bold; font-style: italic;color: gray;}
-.labeltitle {font-weight: bold; font-style: italic;color: gray; border: 1px solid #efefef; padding: .25em;margin-bottom: .5em}
-.frame {marin-top: 1.5em}
-.expander {border: 2px solid #efefef; color: gray;
- font-weight: bold;
- font-family: Fixed,monospace;
- margin-right: .25em; padding: 0 .25em;cursor: pointer;}
-</style>
-<script type="text/javascript">
-function expand (expander, id) {
-var text = expander.innerHTML;
-if (text == '-')
-{
- expander.innerHTML = '+';
- document.getElementById(id).style.display = 'none';
-}
-else
-{
- expander.innerHTML = '-';
- document.getElementById(id).style.display = '';
-}
-}</script></head>
-<body>
-<div class="package">
-<div class="definition">API for package:
-<a class="symbolname" name="6502-cpu_package" href="#6502-cpu_package">6502-cpu</a></div></div>
-<div class="packagedocumentation">
-<pre>:undocumented</pre></div>
-<div class="frame">
-<div class="labeltitle">
-<span class="expander" onclick="expand(this, 'vars');">-</span>Variables</div>
-<div id="vars">
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="*cpu*_vars" href="#*cpu*_vars">*cpu*</a>:
-<span class="value">#S(6502-CPU:CPU :PC 65532 :SP 255 :SR 48 :XR 0 :YR 0 :AR 0 :CC 0)</span>
-<span class="symboltype">variable</span></div>
-<div class="documentation">
-<pre>The 6502 instance used by opcodes in the package.</pre></div></div></div></div>
-<div class="frame">
-<div class="labeltitle">
-<span class="expander" onclick="expand(this, 'conditions');">-</span>Conditions</div>
-<div id="conditions">
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu_class" href="#cpu_class">cpu</a>
-<span class="lambdalist">(structure-object)</span>
-<span class="symboltype">class</span></div>
-<div class="documentation">
-<pre>A 6502 CPU with an extra slot for tracking the cycle count/clock ticks.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="illegal-opcode_class" href="#illegal-opcode_class">illegal-opcode</a>
-<span class="lambdalist">(6502-error)</span>
-<span class="symboltype">class</span></div>
-<div class="documentation">
-<pre>Illegal opcodes are not currently implemented.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="invalid-mode_class" href="#invalid-mode_class">invalid-mode</a>
-<span class="lambdalist">(6502-error)</span>
-<span class="symboltype">class</span></div>
-<div class="documentation">
-<pre>Only the 6502 addressing modes have readers and printers.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="invalid-syntax_class" href="#invalid-syntax_class">invalid-syntax</a>
-<span class="lambdalist">(6502-error)</span>
-<span class="symboltype">class</span></div>
-<div class="documentation">
-<pre>Assembly must conform to the syntax in the README.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="status-bit-error_class" href="#status-bit-error_class">status-bit-error</a>
-<span class="lambdalist">(6502-error)</span>
-<span class="symboltype">class</span></div>
-<div class="documentation">
-<pre>An invalid status-register value was provided.</pre></div></div></div></div>
-<div class="frame">
-<div class="labeltitle">
-<span class="expander" onclick="expand(this, 'functions');">-</span>Functions</div>
-<div id="functions">
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="absolute_func" href="#absolute_func">absolute</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf absolute)_func" href="#(setf absolute)_func">(setf absolute)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="absolute-x_func" href="#absolute-x_func">absolute-x</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf absolute-x)_func" href="#(setf absolute-x)_func">(setf absolute-x)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="absolute-y_func" href="#absolute-y_func">absolute-y</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf absolute-y)_func" href="#(setf absolute-y)_func">(setf absolute-y)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="accumulator_func" href="#accumulator_func">accumulator</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf accumulator)_func" href="#(setf accumulator)_func">(setf accumulator)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="asm_func" href="#asm_func">asm</a>
-<span class="lambdalist">source</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Assemble SOURCE string into a bytevector and return it.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="branch-if_func" href="#branch-if_func">branch-if</a>
-<span class="lambdalist">predicate cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Take a Relative branch if PREDICATE is true, otherwise increment the PC.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu-ar_func" href="#cpu-ar_func">cpu-ar</a>
-<span class="lambdalist">instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return whether debug-block represents elsewhere code.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf cpu-ar)_func" href="#(setf cpu-ar)_func">(setf cpu-ar)</a>
-<span class="lambdalist">new-value instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu-cc_func" href="#cpu-cc_func">cpu-cc</a>
-<span class="lambdalist">instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return whether debug-block represents elsewhere code.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf cpu-cc)_func" href="#(setf cpu-cc)_func">(setf cpu-cc)</a>
-<span class="lambdalist">new-value instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu-pc_func" href="#cpu-pc_func">cpu-pc</a>
-<span class="lambdalist">instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return whether debug-block represents elsewhere code.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf cpu-pc)_func" href="#(setf cpu-pc)_func">(setf cpu-pc)</a>
-<span class="lambdalist">new-value instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu-sp_func" href="#cpu-sp_func">cpu-sp</a>
-<span class="lambdalist">instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return whether debug-block represents elsewhere code.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf cpu-sp)_func" href="#(setf cpu-sp)_func">(setf cpu-sp)</a>
-<span class="lambdalist">new-value instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu-sr_func" href="#cpu-sr_func">cpu-sr</a>
-<span class="lambdalist">instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return whether debug-block represents elsewhere code.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf cpu-sr)_func" href="#(setf cpu-sr)_func">(setf cpu-sr)</a>
-<span class="lambdalist">new-value instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu-xr_func" href="#cpu-xr_func">cpu-xr</a>
-<span class="lambdalist">instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return whether debug-block represents elsewhere code.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf cpu-xr)_func" href="#(setf cpu-xr)_func">(setf cpu-xr)</a>
-<span class="lambdalist">new-value instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="cpu-yr_func" href="#cpu-yr_func">cpu-yr</a>
-<span class="lambdalist">instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return whether debug-block represents elsewhere code.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf cpu-yr)_func" href="#(setf cpu-yr)_func">(setf cpu-yr)</a>
-<span class="lambdalist">new-value instance</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="defins_func" href="#defins_func">defins</a>
-<span class="lambdalist">(name opcode cycle-count byte-count mode) (&key setf-form (track-pc t)) &body body</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Define an EQL-Specialized method on OPCODE named NAME. MODE must return an
-address or byte at an address if funcalled with a cpu. SETF-FORM is a lambda
-that may be funcalled with a value to set the address computed by MODE. If
-TRACK-PC is t, the default, the program counter will be incremented to just
-past the instruction's operands. Otherwise, BODY is responsible for the PC.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="defopcode_func" href="#defopcode_func">defopcode</a>
-<span class="lambdalist">name (&key (docs ) raw (track-pc t)) modes &body body</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Define a Generic Function NAME with DOCS if provided and instructions,
-i.e. methods, via DEFINS for each addressing mode listed in MODES. If RAW is
-non-nil, MODE can be funcalled with a cpu in BODY to retrieve the byte at MODE's
-address. Otherwise, funcalling MODE will return the computed address itself.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="disasm_func" href="#disasm_func">disasm</a>
-<span class="lambdalist">start end &optional storage</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Disassemble memory from START to END. The byte at START is assumed to be an
-instruction and not an operand. If STORAGE is non-nil, it is assumed to be a
-bytevector to be diassembled in lieu of *ram*.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="disasm-to-str_func" href="#disasm-to-str_func">disasm-to-str</a>
-<span class="lambdalist">start end &optional bytes</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Call DISASM with the provided args and return its output as a string.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="get-byte_func" href="#get-byte_func">get-byte</a>
-<span class="lambdalist">address</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Get a byte from RAM at the given address.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf get-byte)_func" href="#(setf get-byte)_func">(setf get-byte)</a>
-<span class="lambdalist">new-val address</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Set ADDRESS in *ram* to NEW-VAL.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="get-instruction_func" href="#get-instruction_func">get-instruction</a>
-<span class="lambdalist">opcode</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Get the mnemonic for OPCODE. Returns a symbol to be funcalled or nil.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="get-range_func" href="#get-range_func">get-range</a>
-<span class="lambdalist">start &optional end</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Get a range of bytes from RAM, starting from START and stopping at END if
-provided.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf get-range)_func" href="#(setf get-range)_func">(setf get-range)</a>
-<span class="lambdalist">bytevector start</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Replace the contents of RAM, starting from START with BYTEVECTOR.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="get-word_func" href="#get-word_func">get-word</a>
-<span class="lambdalist">address &optional wrap-p</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Get a word from RAM starting at the given address.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf get-word)_func" href="#(setf get-word)_func">(setf get-word)</a>
-<span class="lambdalist">new-val address</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Set ADDRESS and (1+ ADDRESS) in *ram* to NEW-VAL, little endian ordering.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="immediate_func" href="#immediate_func">immediate</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf immediate)_func" href="#(setf immediate)_func">(setf immediate)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="implied_func" href="#implied_func">implied</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf implied)_func" href="#(setf implied)_func">(setf implied)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="indirect_func" href="#indirect_func">indirect</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf indirect)_func" href="#(setf indirect)_func">(setf indirect)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="indirect-x_func" href="#indirect-x_func">indirect-x</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf indirect-x)_func" href="#(setf indirect-x)_func">(setf indirect-x)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="indirect-y_func" href="#indirect-y_func">indirect-y</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf indirect-y)_func" href="#(setf indirect-y)_func">(setf indirect-y)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="load-image_func" href="#load-image_func">load-image</a>
-<span class="lambdalist">&key (cpu (make-cpu)) (ram (make-array 65536 element-type '(unsigned-byte 8)))</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Set *CPU* and *RAM* to CPU and RAM.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="make-cpu_func" href="#make-cpu_func">make-cpu</a>
-<span class="lambdalist">&key ((pc dum0) 65532) ((sp dum1) 255) ((sr dum2) 48) ((xr dum3) 0) ((yr dum4)
- 0) ((ar
- dum5)
- 0) ((cc
- dum6)
- 0)</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="maybe-update-cycle-count_func" href="#maybe-update-cycle-count_func">maybe-update-cycle-count</a>
-<span class="lambdalist">cpu address &optional start</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>If ADDRESS crosses a page boundary, add an extra cycle to CPU's count. If
-START is provided, test that against ADDRESS. Otherwise, use (absolute cpu).</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="relative_func" href="#relative_func">relative</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf relative)_func" href="#(setf relative)_func">(setf relative)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="reset_func" href="#reset_func">reset</a>
-<span class="lambdalist"></span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Reset the virtual machine to an initial state.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="rotate-byte_func" href="#rotate-byte_func">rotate-byte</a>
-<span class="lambdalist">integer &optional (count 1) (size 8)</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Rotate the bits of INTEGER by COUNT. If COUNT is negative, rotate right
-instead of left. SIZE specifies the bitlength of the integer being rotated.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="save-image_func" href="#save-image_func">save-image</a>
-<span class="lambdalist"></span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Return a list containing the current *CPU* and *RAM*.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="set-flags-if_func" href="#set-flags-if_func">set-flags-if</a>
-<span class="lambdalist">cpu &rest flag-preds</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Takes any even number of arguments where the first is a keyword denoting a
-status bit and the second is a funcallable predicate that takes no arguments.
-It will set each flag to 1 if its predicate is true, otherwise 0.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="set-flags-nz_func" href="#set-flags-nz_func">set-flags-nz</a>
-<span class="lambdalist">cpu value</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Set the zero and negative bits of CPU's staus-register based on VALUE.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="stack-pop_func" href="#stack-pop_func">stack-pop</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Pop the value pointed to by the SP and increment the SP.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="stack-pop-word_func" href="#stack-pop-word_func">stack-pop-word</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Pop a 16-bit word off the stack.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="stack-push_func" href="#stack-push_func">stack-push</a>
-<span class="lambdalist">value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Push the given VALUE on the stack and decrement the SP.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="stack-push-word_func" href="#stack-push-word_func">stack-push-word</a>
-<span class="lambdalist">value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Push the 16-bit word VALUE onto the stack.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="status-bit_func" href="#status-bit_func">status-bit</a>
-<span class="lambdalist">key cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Retrieve bit KEY from the status register of CPU. KEY should be a keyword.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf status-bit)_func" href="#(setf status-bit)_func">(setf status-bit)</a>
-<span class="lambdalist">new-val key cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Set bit KEY in the status reg of CPU to NEW-VAL. KEY should be a keyword.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="wrap-byte_func" href="#wrap-byte_func">wrap-byte</a>
-<span class="lambdalist">val</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Wrap the given value to ensure it conforms to (typep val '(unsigned-byte 8)),
-e.g. a Stack Pointer or general purpose register.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="wrap-page_func" href="#wrap-page_func">wrap-page</a>
-<span class="lambdalist">address</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Wrap the given ADDRESS, ensuring that we don't cross a page boundary.
-e.g. When the last two bytes of ADDRESS are #xff.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="wrap-stack_func" href="#wrap-stack_func">wrap-stack</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre>:undocumented</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="wrap-word_func" href="#wrap-word_func">wrap-word</a>
-<span class="lambdalist">val</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Wrap the given value to ensure it conforms to (typep val '(unsigned-byte 16)),
-e.g. a Program Counter address.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="zero-page_func" href="#zero-page_func">zero-page</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf zero-page)_func" href="#(setf zero-page)_func">(setf zero-page)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="zero-page-x_func" href="#zero-page-x_func">zero-page-x</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf zero-page-x)_func" href="#(setf zero-page-x)_func">(setf zero-page-x)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="zero-page-y_func" href="#zero-page-y_func">zero-page-y</a>
-<span class="lambdalist">cpu</span>
-<span class="symboltype">standard-generic-function</span></div>
-<div class="documentation">
-<pre></pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="(setf zero-page-y)_func" href="#(setf zero-page-y)_func">(setf zero-page-y)</a>
-<span class="lambdalist">new-value cpu</span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre></pre></div></div></div></div>
-<div class="frame">
-<div class="labeltitle">
-<span class="expander" onclick="expand(this, 'macros');">-</span>Macros</div>
-<div id="macros">
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="defins_macro" href="#defins_macro">defins</a>
-<span class="lambdalist">(name opcode cycle-count byte-count mode) (&key setf-form (track-pc t)) &body body</span>
-<span class="symboltype">macro</span></div>
-<div class="documentation">
-<pre>Define an EQL-Specialized method on OPCODE named NAME. MODE must return an
-address or byte at an address if funcalled with a cpu. SETF-FORM is a lambda
-that may be funcalled with a value to set the address computed by MODE. If
-TRACK-PC is t, the default, the program counter will be incremented to just
-past the instruction's operands. Otherwise, BODY is responsible for the PC.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="defopcode_macro" href="#defopcode_macro">defopcode</a>
-<span class="lambdalist">name (&key (docs ) raw (track-pc t)) modes &body body</span>
-<span class="symboltype">macro</span></div>
-<div class="documentation">
-<pre>Define a Generic Function NAME with DOCS if provided and instructions,
-i.e. methods, via DEFINS for each addressing mode listed in MODES. If RAW is
-non-nil, MODE can be funcalled with a cpu in BODY to retrieve the byte at MODE's
-address. Otherwise, funcalling MODE will return the computed address itself.</pre></div></div></div></div>
-<div class="footer">Generated by:
-<a href="http://common-lisp.net/project/cl-api">CL-API</a></div></body></html>
View
42 docs/cl-6502.html
@@ -63,12 +63,23 @@
<div class="symboldecl">
<div class="definition">
<a class="symbolname" name="*cpu*_vars" href="#*cpu*_vars">*cpu*</a>:
-<span class="value">#S(6502-CPU:CPU :PC 65532 :SP 255 :SR 48 :XR 0 :YR 0 :AR 0 :CC 0)</span>
+<span class="value">#S(|6502|:CPU :PC 65532 :SP 253 :SR 36 :XR 0 :YR 0 :AR 0 :CC 0)</span>
<span class="symboltype">variable</span></div>
<div class="documentation">
<pre>The 6502 instance used by opcodes in the package.</pre></div></div></div></div>
<div class="frame">
<div class="labeltitle">
+<span class="expander" onclick="expand(this, 'conditions');">-</span>Conditions</div>
+<div id="conditions">
+<div class="symboldecl">
+<div class="definition">
+<a class="symbolname" name="cpu_class" href="#cpu_class">cpu</a>
+<span class="lambdalist">(structure-object)</span>
+<span class="symboltype">class</span></div>
+<div class="documentation">
+<pre>A 6502 CPU with an extra slot for tracking the cycle count/clock ticks.</pre></div></div></div></div>
+<div class="frame">
+<div class="labeltitle">
<span class="expander" onclick="expand(this, 'functions');">-</span>Functions</div>
<div id="functions">
<div class="symboldecl">
@@ -89,16 +100,14 @@
<div class="symboldecl">
<div class="definition">
<a class="symbolname" name="disasm_func" href="#disasm_func">disasm</a>
-<span class="lambdalist">start end &optional storage</span>
+<span class="lambdalist">start end</span>
<span class="symboltype">function</span></div>
<div class="documentation">
-<pre>Disassemble memory from START to END. The byte at START is assumed to be an
-instruction and not an operand. If STORAGE is non-nil, it is assumed to be a
-bytevector to be diassembled in lieu of *ram*.</pre></div></div>
+<pre>Disassemble memory from START to END.</pre></div></div>
<div class="symboldecl">
<div class="definition">
<a class="symbolname" name="disasm-to-str_func" href="#disasm-to-str_func">disasm-to-str</a>
-<span class="lambdalist">start end &optional bytes</span>
+<span class="lambdalist">start end</span>
<span class="symboltype">function</span></div>
<div class="documentation">
<pre>Call DISASM with the provided args and return its output as a string.</pre></div></div>
@@ -155,24 +164,17 @@
<pre>Set ADDRESS and (1+ ADDRESS) in *ram* to NEW-VAL, little endian ordering.</pre></div></div>
<div class="symboldecl">
<div class="definition">
-<a class="symbolname" name="load-image_func" href="#load-image_func">load-image</a>
-<span class="lambdalist">&key (cpu (make-cpu)) (ram (make-array 65536 element-type '(unsigned-byte 8)))</span>
-<span class="symboltype">function</span></div>
+<a class="symbolname" name="nmi_func" href="#nmi_func">nmi</a>
+<span class="lambdalist">obj</span>
+<span class="symboltype">standard-generic-function</span></div>
<div class="documentation">
-<pre>Set *CPU* and *RAM* to CPU and RAM.</pre></div></div>
+<pre>Generate a non-maskable interrupt. Used for vblanking in NES.</pre></div></div>
<div class="symboldecl">
<div class="definition">
<a class="symbolname" name="reset_func" href="#reset_func">reset</a>
-<span class="lambdalist"></span>
-<span class="symboltype">function</span></div>
-<div class="documentation">
-<pre>Reset the virtual machine to an initial state.</pre></div></div>
-<div class="symboldecl">
-<div class="definition">
-<a class="symbolname" name="save-image_func" href="#save-image_func">save-image</a>
-<span class="lambdalist"></span>
-<span class="symboltype">function</span></div>
+<span class="lambdalist">obj</span>
+<span class="symboltype">standard-generic-function</span></div>
<div class="documentation">
-<pre>Return a list containing the current *CPU* and *RAM*.</pre></div></div></div></div>
+<pre>Reset the OBJ to an initial state.</pre></div></div></div></div>
<div class="footer">Generated by:
<a href="http://common-lisp.net/project/cl-api">CL-API</a></div></body></html>
View
1  gen-docs.sh
@@ -1,5 +1,4 @@
#!/bin/sh
sbcl --eval "(ql:quickload '(cl-6502 sb-introspect cl-api))" \
--eval "(cl-api:api-gen :cl-6502 \"docs/cl-6502.html\")" \
- --eval "(cl-api:api-gen :6502-cpu \"docs/6502-cpu.html\")" \
--eval "(progn (terpri) (sb-ext:quit))"
Please sign in to comment.
Something went wrong with that request. Please try again.