cpu.html

<!DOCTYPE HTML>
<html>
 <head>
  <meta charset="utf-8">
  <title>CPU experiments</title>
  <link href="../css/candy.css" rel="stylesheet">  
  <link href="../style.css" rel="stylesheet">
 </head>
 <body class="candy greasy-green">

  <h1>CPU experiments</h1>

  <script>
    var memory = new Uint8Array(0x10000)

    var C64 = {
        memory: memory
    }
  </script>

  <button onclick="Log.clear()">Clear log</button>
  <button onclick="C64.debugger2.start()">Start</button>
  <button onclick="C64.debugger2.step()">Step</button>

  <table border="1" class="disassembly">
   <caption>Disassembly</caption>
   <thead>
    <tr><th>Address</th><th></th><th>Opcode</th><th>Comment</th></tr>
   </thead>
   <tbody>
   </tbody>
  </table>

  <table border="1" class="cpu-state">
   <caption>CPU state</caption>
   <thead>
    <tr><th>PC</th><th>A</th><th>X</th><th>Y</th><th>SP</th><th>NV-BDIZC</th></tr>
   </thead>
   <tbody>
    <tr class="values"><td></td><td></td><td></td><td></td><td></td><td></td></tr>
   </tbody>
  </table>

  <table border="1" class="call-stack">
   <caption>Call stack</caption>
   <thead>
    <tr><th>PC</th><th>Description</th></tr>
   </thead>
   <tbody>
    <tr class="values"><td></td><td></td></tr>
   </tbody>
  </table>

  <table border="1" class="watches">
   <caption>Watches <button class="add-field">add</button><button class="edit-field">edit</button></caption>
   <thead>
    <tr><th>Name</th><th colspan="2">Value</th></tr>
   </thead>
   <tbody>
    <tr class="values"><td></td><td></td><td><button>delete</button></td></tr>
   </tbody>
  </table>

  <table border="1" class="breakpoints">
   <caption>Breakpoints <button class="add-field">add</button><button class="edit-field">edit</button></caption>
   <thead>
    <tr><th>Address</th><th>Condition</th><th colspan="2">Pass count</th></tr>
   </thead>
   <tbody>
    <tr class="values"><td></td><td></td><td></td><td><button>delete</button></td></tr>
   </tbody>
  </table>

  <table border="1" class="memory">
   <caption>Memory</caption>
   <thead>
    <tr><th colspan="3">Address</th></tr>
   </thead>
   <tbody>
    <tr class="values"><td></td><td></td><td></td></tr>
    <tr class="values"><td></td><td></td><td></td></tr>
    <tr class="values"><td></td><td></td><td></td></tr>
    <tr class="values"><td></td><td></td><td></td></tr>
    <tr class="values"><td></td><td></td><td></td></tr>
    <tr class="values"><td></td><td></td><td></td></tr>
    <tr class="values"><td></td><td></td><td></td></tr>
    <tr class="values"><td></td><td></td><td></td></tr>
   </tbody>
  </table>

  <details open>
   <summary title="Click to open/close">Log messages</summary>
   <pre class="log"><tt></tt></pre>
  </details>

  <script src="log.js"></script>
  <script src="cpu.js"></script>

  <script>
  // TODO load Lorenz test rom

  // TODO detect loops (that's the way the rom indicates an error
  </script>

  </body>
</html>