Przeglądaj źródła

www: web control interface for I/O devices

H. Peter Anvin 1 rok temu
rodzic
commit
1796d117f2

+ 2 - 0
common/sysvars.vars

@@ -16,6 +16,8 @@ abc.io.rtc.devsel	uint 54
 abc.io.pun80.enable	bool true
 abc.io.pun80.devsel	uint 60
 abc.hosttype		uint 0
+abc.netserv.host	str
+abc.netserv.port	uint 4680
 abc.reset		bool
 fpga.reset		bool
 hostname		str "max80"

BIN
esp32/output/max80.ino.bin


+ 130 - 3
esp32/www/abcbus.html

@@ -8,7 +8,6 @@
   <body>
     <x-inc src="head.html"></x-inc>
     <h1 class="abcbus">ABC Bus</h1>
-    <div class="wip"><p>This section is a work in progress...</p></div>
     <form id="abcconfig" class="setconfig" action="sys/setconfig" method="post"
 	  onsubmit="uploadform()" data-ref="10" data-ref-url="abcbus.html">
       <fieldset class="abchost">
@@ -41,10 +40,109 @@
 	<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>Network</legend>
+	<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>ABC (PUN80) network server</b>
+	  <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" />
@@ -53,6 +151,35 @@
 	  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>

+ 3 - 0
esp32/www/max80.css

@@ -119,6 +119,9 @@ fieldset span.sep {
 input[type='text'], input[type='password'] {
     flex: 1;
 }
+.iodev input[type='number'] {
+    width: 8ch;
+}
 input.port {
     flex: 0.2;
     width: 8ch;

+ 1 - 1
esp32/www/max80.js

@@ -52,7 +52,7 @@ function valval(ie) {
 
 // Parse a string for a valid boolean truth value
 function cfgbool(str) {
-    return str && !str.match(/^(0*|[fnd].*|of.*)$/i);
+    return !!str && !str.match(/^([0fnd]|of)/i);
 }
 
 // Initialize a form from a map. Checkboxes take a cfgbool string;

+ 3 - 3
fpga/max80.qpf

@@ -19,15 +19,15 @@
 #
 # Quartus Prime
 # Version 22.1std.0 Build 915 10/25/2022 SC Lite Edition
-# Date created = 18:16:12  September 05, 2023
+# Date created = 19:15:33  September 05, 2023
 #
 # -------------------------------------------------------------------------- #
 
 QUARTUS_VERSION = "22.1"
-DATE = "18:16:12  September 05, 2023"
+DATE = "19:15:33  September 05, 2023"
 
 # Revisions
 
-PROJECT_REVISION = "v1"
 PROJECT_REVISION = "v2"
+PROJECT_REVISION = "v1"
 PROJECT_REVISION = "bypass"

BIN
fpga/output/bypass.jic


BIN
fpga/output/max80.fw


BIN
fpga/output/v1.fw


BIN
fpga/output/v1.jic


BIN
fpga/output/v1.sof


BIN
fpga/output/v2.fw


BIN
fpga/output/v2.jic


BIN
fpga/output/v2.sof


+ 1 - 1
rv32/checksum.h

@@ -1,4 +1,4 @@
 #ifndef CHECKSUM_H
 #define CHECKSUM_H
-#define SDRAM_SUM 0xf231d760
+#define SDRAM_SUM 0xc6250815
 #endif