<!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="max80.css" />
    <title class="abcbus">MAX80: ABC Bus</title>
  <script src="max80.js"></script>
  </head>
  <body>
    <x-inc src="head.html"></x-inc>
    <h1 class="abcbus">ABC Bus</h1>
    <form id="abcconfig" class="setconfig" action="sys/setconfig" method="post"
	  onsubmit="uploadform()" data-ref="10" data-ref-url="abcbus.html">
      <fieldset class="abchost">
	<legend>Host system</legend>
	<div class="radio">
	  <b>Host system type</b>
	  <div>
	    <label class="auto">
	      <input type="radio" name="abc.hosttype" value="0" />
	      <span>Autodetect</span>
	    </label>
	    <label class="abc80">
	      <input type="radio" name="abc.hosttype" value="1" />
	      <span>ABC80</span>
	    </label>
	    <label class="abc80-4680">
	      <input type="radio" name="abc.hosttype" value="2" />
	      <span>ABC80/4680 (expansion box)</span>
	    </label>
	    <label class="abc800">
	      <input type="radio" name="abc.hosttype" value="3" />
	      <span>ABC800C/M</span>
	    </label>
	    <label class="abc802">
	      <input type="radio" name="abc.hosttype" value="4" />
	      <span>ABC802/806</span>
	    </label>
	  </div>
	</div>
	<p class="help">Autodetection can fail in some type
	of expansion boxes, possibly depending on jumpering.</p>
      </fieldset>
      <fieldset class="disk">
	<legend>Emulated disk controllers</legend>
	<div class="mo">
	  <b>MO floppy</b>
	  <div class="iodev">
	    <label class="enabled">
	      <span>Enabled</span>:&nbsp;
	      <input type="checkbox" name="abc.io.mo.enable" value="1" />
	    </label>
	    <label class="devsel">
	      <span>Device select:</span>
	      <input type="number" name="abc.io.mo.devsel" min="0" max="63" value="45" />
	    </label>
	    (45)
	  </div>
	</div>
	<p class="help,mo">40 track floppies (80-320K):
	  ABC830, FD2, FD4, DD80, DD82, DD84, DD52, DD54</p>
	<hr />
	<div class="mf">
	  <b>MF floppy</b>
	  <div class="iodev">
	    <label class="enabled">
	      <span>Enabled</span>:&nbsp;
	      <input type="checkbox" name="abc.io.mf.enable" value="1" />
	    </label>
	    <label class="devsel">
	      <span>Device select:</span>
	      <input type="number" name="abc.io.mf.devsel" min="0" max="63" value="44" />
	    </label>
	    (44)
	  </div>
	</div>
	<p class="help,mf">80 track floppies (640K): ABC832, DD12, DD56</p>
	<hr />
	<div class="sf">
	  <b>SF floppy</b>
	  <div class="iodev">
	    <label class="enabled">
	      <span>Enabled</span>:&nbsp;
	      <input type="checkbox" name="abc.io.sf.enable" value="1" />
	    </label>
	    <label class="devsel">
	      <span>Device select:</span>
	      <input type="number" name="abc.io.sf.devsel" min="0" max="63" value="44" />
	    </label>
	    (44)
	  </div>
	</div>
	<p class="help,sf">8″ floppies: ABC838, DD8, DD88<br />
	  Some older (non-UFD) DOS may need device select 44.</p>
	<hr />
	<div class="hd">
	  <b>HD winchester</b>
	  <div class="iodev">
	    <label class="enabled">
	      <span>Enabled</span>:&nbsp;
	      <input type="checkbox" name="abc.io.hd.enable" value="1" />
	    </label>
	    <label class="devsel">
	      <span>Device select:</span>
	      <input type="number" name="abc.io.hd.devsel" min="0" max="63" value="36" />
	    </label>
	    (36)
	  </div>
	</div>
	<p class="help,hd">15232K emulated winchester drive</p>
	<hr />
	<div class="xd">
	  <b>XD winchester</b>
	  <div class="iodev">
	    <label class="enabled">
	      <span>Enabled</span>:&nbsp;
	      <input type="checkbox" name="abc.io.xd.enable" value="1" />
	    </label>
	    <label class="devsel">
	      <span>Device select:</span>
	      <input type="number" name="abc.io.xd.devsel" min="0" max="63" value="37" />
	    </label>
	    (37)
	  </div>
	</div>
	<p class="help,xd">15232K emulated winchester drive (secondary controller)<br />
	  Requires patched UFD-DOS device table.</p>
      </fieldset>
      <fieldset class="pun80">
	<legend>PUN80 network</legend>
	<div class="busconfig">
	  <b>Bus configuration</b>
	  <div class="iodev">
	    <label class="enabled">
	      <span>Enabled</span>:&nbsp;
	      <input type="checkbox" name="abc.io.pun80.enable" value="1" />
	    </label>
	    <label class="devsel">
	      <span>Device select:</span>
	      <input type="number" name="abc.io.pun80.devsel" min="0" max="63" value="60" />
	    </label>
	    (60)
	  </div>
	</div>
	<label class="serv">
	  <b>Network server</b>
	  <input type="text" class="host" name="abc.netserv.addr" />
	  <span class="sep">:</span>
	  <input type="text" class="port" name="abc.netserv.port" placeholder="4680" />
	</label>
	<p class="help">The network server software is integrated
	  with <a href="https://www.abc80.org/pub/abc80sim/">abc80sim</a>
	  version 3.7.5 or later.</p>
      </fieldset>
      <fieldset class="other">
	<legend>Other devices</legend>
	<div class="rtc">
	  <b>Real time clock</b>
	  <div class="iodev">
	    <label class="enabled">
	      <span>Enabled</span>:&nbsp;
	      <input type="checkbox" name="abc.io.rtc.enable" value="1" />
	    </label>
	    <label class="devsel">
	      <span>Device select:</span>
	      <input type="number" name="abc.io.rtc.devsel" min="0" max="63" value="54" />
	    </label>
	    (54)
	  </div>
	</div>
      </fieldset>
      <fieldset class="reset">
	<legend>Reset when updating configuration</legend>
	<label class="fpga">
	  <b>Reset MAX80</b>
	  <input type="checkbox" name="fpga.reset" value="1" />
	</label>
	<label class="abc">
	  <b>Reset ABC</b>
	  <input type="checkbox" name="abc.reset" value="1" />
	</label>
      </fieldset>

      <button class="submit" type="submit" disabled>Update configuration</button>
    </form>
    <script>loadform('abcconfig','sys/getconfig');</script>
  </body>
</html>