<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="pretty-atom-feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Blog Title</title>
  <subtitle>This is a longer description about your blog.</subtitle>
  <link href="https://example.com/feed/feed.xml" rel="self" />
  <link href="https://example.com/" />
  <updated>2025-12-07T00:00:00Z</updated>
  <id>https://example.com/</id>
  <author>
    <name>Your Name</name>
  </author>
  <entry>
    <title>What is a Bus Mouse? A Technical History of Early Microsoft Mouse Interfaces</title>
    <link href="https://example.com/blog/what-is-a-bus-mouse/" />
    <updated>2025-12-07T00:00:00Z</updated>
    <id>https://example.com/blog/what-is-a-bus-mouse/</id>
    <content type="html">&lt;blockquote class=&quot;discussion-box&quot;&gt;
&lt;p&gt;Comments and questions about this article are welcome on the &lt;a href=&quot;https://www.stardot.org.uk/forums/viewtopic.php?t=32137&quot;&gt;Stardot Forums thread: What is a bus mouse?&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While researching what kind of mouse I would need to work with my &lt;a href=&quot;https://www.computinghistory.org.uk/det/2817/acorn-bbc-master-compact/&quot;&gt;Acorn BBC Master Compact&lt;/a&gt; (circa 1986), &lt;a href=&quot;https://stardot.org.uk/forums/viewtopic.php?t=24306&quot;&gt;I came across the the term &amp;quot;bus mouse&amp;quot;&lt;/a&gt;. I&#39;m familiar with how 1980s/1990s era electromechanical mouses work, but I&#39;d not encountered this usage before, and never in the context of Acorn computers.&lt;/p&gt;
&lt;p&gt;The term &amp;quot;bus mouse&amp;quot; has a clear origin with Microsoft in the early 1980s, and implies specific connectors and pinouts. Sadly, through compounded misunderstanding, incorrect posts by sellers on sites like eBay, and a proliferation of electrically identical but physically incompatible mouse connectors by different computer manufacturers over the years, not to mention
the existence of electrically incompatible mouses using identical physical connectors, confusion reigns. Even the &lt;a href=&quot;https://web.archive.org/web/20251004033703/https://en.wikipedia.org/wiki/Bus_mouse&quot;&gt;Wikipedia article on the subject&lt;/a&gt; gets off on the wrong foot. (The linked Wikipedia article is a snapshot of how it appeared the time of writing - let&#39;s see what we can do about improving it!)&lt;/p&gt;
&lt;h1 id=&quot;1983---the-microsoft-mouse&quot; tabindex=&quot;-1&quot;&gt;1983 - The Microsoft Mouse&lt;/h1&gt;
&lt;p&gt;The original Microsoft Mouse from May 1983 - retailing at $195 - is often known as the &amp;quot;green eyed mouse&amp;quot; owing to the colour of the two buttons.  With 100 counts-per-inch (CPI) resolution, a massive steel mouse ball, and three small rolling-ball castors to reduce desktop friction, it was well engineered. Though it was the first product to emerge from Microsoft&#39;s new hardware division, production was outsourced to Japanese electronics conglomerate, Alps Electric, and based on their Alps MZ-1X10. Alps are still known today for their pointing devices, notably touch pads.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/KFlvqaOs1f-641.avif 641w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/KFlvqaOs1f-641.webp 641w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/KFlvqaOs1f-641.jpeg&quot; alt=&quot;The New Standard. Microsoft Mouse.&quot; class=&quot;img-70&quot; width=&quot;641&quot; height=&quot;899&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;When launched in May 1983, it was available only as a bus mouse with a &lt;em&gt;male&lt;/em&gt; DE-9 connector. (Note that DE-9 connectors are all-too-often described as DB-9 connectors. This is a &lt;a href=&quot;https://en.wikipedia.org/wiki/D-subminiature#Common_misnomers&quot;&gt;common misnomer&lt;/a&gt;, but there is no such thing. Even the Microsoft Mouse documentation makes this mistake.)&lt;/p&gt;
&lt;figure class=&quot;img-70&quot;&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/uNenBnTqfu-1201.avif 1201w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/uNenBnTqfu-1201.webp 1201w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/uNenBnTqfu-1201.jpeg&quot; alt=&quot;The original Microsoft bus mouse, with male DE-9 connector&quot; width=&quot;1201&quot; height=&quot;649&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;The original Microsoft bus mouse, with male DE-9 connector&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;A serial version with an RS-232 interface and female DB-25 connector on the mouse cable followed in 1984.&lt;/p&gt;
&lt;figure class=&quot;img-70&quot;&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/Ed_kxORdnV-683.avif 683w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/Ed_kxORdnV-683.webp 683w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/Ed_kxORdnV-683.jpeg&quot; alt=&quot;The original Microsoft Mouse with a female DB-25 connector&quot; width=&quot;683&quot; height=&quot;683&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;Not a bus mouse: The Microsoft serial mouse (1984), with female DB-25 connector&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;If you look closely, you&#39;ll see that the DE-9 connector of the bus mouse has two pins omitted. This is a deliberate feature of the connector design. We&#39;ll cover more details of the electrical details of the pinout later.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/iWq-tueWEK-1032.avif 1032w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/iWq-tueWEK-1032.webp 1032w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/iWq-tueWEK-1032.jpeg&quot; alt=&quot;The Microsoft bus mouse male DE-9 connector omits pin 1 and pin 7&quot; width=&quot;1032&quot; height=&quot;593&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;The Microsoft bus mouse male DE-9 connector omits pin 1 and pin 7&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;div class=&quot;aside&quot;&gt;
Why omit the pins?  Was this an electrical protection measure to avoid contact with the Data Carrier Detect (DCD - pin 1) and Request to Send (RTS - pin 7) lines of an RS-232 serial port should the mouse be accidently plugged in via a male-to-female gender adapter? Perhaps not having two conductors was simply a cost-saving measure. If you know, do let me know. 
&lt;/div&gt;
&lt;p&gt;The Microsoft documentation says,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are two operational versions of the Microsoft Mouse: Bus version and Serial version. The versions differ in system requirements and the hardware included in the mouse package. The software is the same for either version.&lt;/p&gt;
&lt;p&gt;The Serial version mouse is for the IBM PC equipped with a serial communications interface board capable of RS-232 standard asynchronous communication. The board must have a 25-pin male connector or a 25-pin male-to-female adapter. Serial version packages include the mouse pointing unit, a connecting cable, and a 25-pin female connector.&lt;/p&gt;
&lt;p&gt;The Bus version mouse includes the mouse pointing unit, connecting cable, a 9-pin female [sic - it&#39;s male, on the cable] connector, and an interface circuit board. The Bus version is for the IBM PC that either doesn&#39;t have a serial communications interface board installed or whose serial communications port is already used for something else.&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;Microsoft Mouse (Serial Version) for the IBM Personal Computer. Installation and Operating Manual&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id=&quot;the-bus-mouse-isa-card&quot; tabindex=&quot;-1&quot;&gt;The Bus Mouse ISA card&lt;/h1&gt;
&lt;p&gt;The interface circuit board referred to above is an 8-bit &lt;a href=&quot;https://en.wikipedia.org/wiki/IBM_Personal_Computer_XT&quot;&gt;IBM PC/XT&lt;/a&gt;-bus &lt;a href=&quot;https://en.wikipedia.org/wiki/Industry_Standard_Architecture&quot;&gt;ISA&lt;/a&gt; card with the required DE-9 female connector.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/qt6GJ0wQ-l-1195.avif 1195w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/qt6GJ0wQ-l-1195.webp 1195w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/qt6GJ0wQ-l-1195.jpeg&quot; alt=&quot;The Microsoft bus mouse ISA card&quot; width=&quot;1195&quot; height=&quot;900&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;The Microsoft bus mouse ISA card&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/onx90kLahr-831.avif 831w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/onx90kLahr-831.webp 831w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/onx90kLahr-831.jpeg&quot; alt=&quot;The Microsoft bus mouse ISA card&quot; width=&quot;831&quot; height=&quot;623&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;The Microsoft bus mouse ISA card&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The female DE-9 connector on the back of the ISA card appears to have all nine conductors present, and with corresponding holes the face of the connector, so the missing pins weren&#39;t used for any kind of mechanical keying.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/E8R0XFuI9U-1440.avif 1440w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/E8R0XFuI9U-1440.webp 1440w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/E8R0XFuI9U-1440.jpeg&quot; alt=&quot;The connector side of the Microsoft bus mouse ISA card, and the plug from a bus mouse&quot; width=&quot;1440&quot; height=&quot;1080&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;A Microsoft bus mouse ISA card female DE-9 with its male DE-9 (7) counterpart on the mouse cable&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The card&#39;s centrepiece is a large 40-pin DIP chip which is an &lt;a href=&quot;https://en.wikipedia.org/wiki/Intel_8255&quot;&gt;Intel 8255 Programmable Peripheral Interface (PPA)&lt;/a&gt;. The 8255 provides 24 parallel I/O lines organised into three 8-bit ports (Port A, Port B and Port C).&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/OaRfUUX7L3-1329.avif 1329w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/OaRfUUX7L3-1329.webp 1329w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/OaRfUUX7L3-1329.png&quot; alt=&quot;A block diagram of the internals of the Intel 8255 PPA&quot; width=&quot;1329&quot; height=&quot;1125&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;Intel 8255A Block Diagram showing the three 8-bit I/O ports, Port A, Port B and Port C - Intel 8255A datasheet&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Some other 74-series logic devices are identifiable, likely performing address decoding and ISA bus buffering. Between the 8255 and the mouse port sits the 64H101 device. According to &lt;a href=&quot;https://www.google.no/books/edition/Input_Devices/yF9TAAAAMAAJ&quot;&gt;Sol Sherr&#39;s 1988 book &lt;em&gt;Input Devices&lt;/em&gt;&lt;/a&gt;, the 64H101 is an Alps Electric quadrature decoder IC which conditions and decodes the four quadrature input signals from the mouse encoders. The chip counts the state transitions to produce parallel output data in the form of four 4-bit nibbles. X/Y and select lines allow the host system to select which counter (X-axis or Y-axis) to read, while an enable line gates the data to the bus buffer and clears the counters. The 64H101 interfaces with standard bus buffer or parallel I/O chips like the 8255, which in turn connects to the ISA bus.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/GcS4EqMp2L-1388.avif 1388w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/GcS4EqMp2L-1388.webp 1388w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/GcS4EqMp2L-1388.png&quot; alt=&quot;Block diagram showing the interface between quadrature decoder and parallel I/O chip&quot; width=&quot;1388&quot; height=&quot;1475&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;Quadrature decoder to parallel I/O interface. The quadrature decoder U1 (the Alps 64H101) conditions and counts the XA, XB, YA, YB signals from the mouse, presenting the counts as parallel data to the bus interface chip U2, an Intel 8255. Adapted from Sol Sherr. (1988) Input Devices. Academic Press.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Sherr refers to these devices as &amp;quot;parallel mice&amp;quot; to distinguish them from the &amp;quot;serial mice&amp;quot; which communicate via RS-232 serial ports. The term &amp;quot;bus mouse&amp;quot; appears to be specific to the Microsoft product line, while &amp;quot;parallel mouse&amp;quot; is an apt description for the entire category of quadrature mice that interface via parallel I/O ports.&lt;/p&gt;
&lt;h1 id=&quot;quadrature-encoding&quot; tabindex=&quot;-1&quot;&gt;Quadrature Encoding&lt;/h1&gt;
&lt;p&gt;So what is the &amp;quot;bus&amp;quot; of the &amp;quot;bus mouse&amp;quot;?&lt;/p&gt;
&lt;p&gt;Inside the mouse, rotation of the steel ball as it rolls across the table top, drives two perpendicular rollers, one for horizontal movement (X) and one for vertical movement (Y). On each roller spindle is a closed contact incremental encoder, an arrangement of two electrical switches which cause each switch to alternately close (make contact) and open (break contact) as the wheel rotates, about 100 times per inch of mouse movement. As the mouse moves, each switch is capable of modulating a square wave pulse train on to an electrical signal. Crucially, the two switches in a single encoder are carefully positioned around the wheel such that, considering rotation in one of the two possible directions, just as one switch is making contact, the other switch is midway between having made contact, and breaking contact again. This means that the two square-waves produced by a single incremental encoder are 90º out of phase.&lt;/p&gt;
&lt;figure&gt;
  &lt;img src=&quot;https://example.com/blog/what-is-a-bus-mouse/LF0uvzJBrC-760.svg&quot; alt=&quot;A block diagram of the internals of the Intel 8255 PPA&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;760&quot; height=&quot;400&quot;&gt;
  &lt;figcaption&gt;Two signals with a 90º phase difference convey direction and velocity. A and B stand for XA and XB in the x-axis, or YA and YB for the y-axis. When A leads B the mouse is moving in one direction, when B leads A it is moving in the opposite direction.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The signal lines pairs XA and XB, and YA and YB convey velocity and direction information to the host computer using a two-bit Gray code. A Gray code is a binary sequence where successive values differ by only one bit. A cycle of four two-bit gray code signals progresses through (0,0) → (1,0) → (1,1) → (0,1) → (0,0) where 0 represents an open switch and 1 represents a closed switch. The key insight is that the 90º phase difference between the two switches on each axis allows the direction of travel to be determined. If XA changes state before XB (we say XA leads XB) we know the mouse is moving right, and if XB leads XA, we know the mouse is moving left. The frequency of either XA or XB alone is sufficient to determine the speed of the mouse. With all four signals, the computer can determine the velocity vector in two dimensions, and numerically integrate to determine pointer position.&lt;/p&gt;
&lt;p&gt;The term &#39;quadrature&#39; derives from the 90° phase offset between the two signals, with &#39;quadrature&#39; meaning &#39;square&#39; or &#39;right angle&#39; in this context. This encoding scheme is also called &#39;2-bit Gray code&#39; or &#39;incremental rotary encoding&#39;, and is widely used in industrial motion sensing beyond computer mice.&lt;/p&gt;
&lt;p&gt;So the Microsoft &amp;quot;bus mouse&amp;quot; models are specific cases of what should more generally be called a &amp;quot;quadrature mouse&amp;quot;.&lt;/p&gt;
&lt;h1 id=&quot;the-microsoft-bus-mouse-pinout&quot; tabindex=&quot;-1&quot;&gt;The Microsoft Bus Mouse Pinout&lt;/h1&gt;
&lt;p&gt;The pinout for the original 1983 bus mouse with the male DE-9 connector is as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://example.com/blog/what-is-a-bus-mouse/DeHtIGHKjH-270.svg&quot; alt=&quot;DE-9 pinout diagram of the Microsoft Bus Mouse ISA card port&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;270&quot; height=&quot;228&quot;&gt;&lt;/p&gt;
&lt;p&gt;In table form, this pinout and other electrical details are as follows:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mouse&lt;/th&gt;
&lt;th&gt;DE-9 male&lt;/th&gt;
&lt;th&gt;DE-9 female&lt;/th&gt;
&lt;th&gt;ISA card&lt;/th&gt;
&lt;th&gt;Pull-up&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;function&lt;/th&gt;
&lt;th&gt;on mouse&lt;/th&gt;
&lt;th&gt;on card&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Resistor&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;(1) Not fitted&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;+ 5 V (probably)&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XA&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;100k&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XB&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;100k&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;YA&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;100k&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;YB&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;100k&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Button 1&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;8255 PA7&lt;/td&gt;
&lt;td&gt;5k6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;(7) Not fitted&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;8255 PA6&lt;/td&gt;
&lt;td&gt;5k6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Button 2&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;8255 PA5&lt;/td&gt;
&lt;td&gt;5k6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ground&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;Ground&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notably, the mouse does not use a positive (&lt;em&gt;e.g.&lt;/em&gt; +5 V) supply, because none is necessary. Since the six mouse sensors are all make or break switches (two in each of the two encoders, plus two buttons, making six) then each switch can connect a digital input line to ground when closed, with the input being pulled high by a pull-up resistor when the switch is open . Each switch is therefore active-low, or so-called negative logic. By tracing tracks on the ISA card we can see that pin 7 of the socket is actually connected to a digital input line on the 8255 in an identical manner to the lines for Buttons 1 and 2. This is a strong indicator that the ISA card was 3-button capable.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/PkLdIQLaIQ-1440.avif 1440w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/PkLdIQLaIQ-1440.webp 1440w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/PkLdIQLaIQ-1440.png&quot; alt=&quot;The correspondence between mouse cable DE-9 pins, ISA card DE-9 socket holes, and 8255 PPA port A pins&quot; width=&quot;1440&quot; height=&quot;1080&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;The correspondence between mouse cable DE-9 pins, ISA card DE-9 socket holes, and 8255 PPA port A pins. Base photo source: &lt;a href=&quot;https://forum.vcfed.org/index.php?threads/microsoft-green-eyed-mouse-serial-version-connector-gender.1255454/post-1478053&quot;&gt;@snuci on the Vintage Computer Federation forum&lt;/a&gt;. Annotations by the author.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;img-30&quot;&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/UPqd7reyBd-586.avif 586w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/UPqd7reyBd-586.webp 586w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/UPqd7reyBd-586.png&quot; alt=&quot;The pinout of the Intel 8255 PPA&quot; width=&quot;586&quot; height=&quot;1118&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;Intel 8255 pinout for correlation with the Bus Mouse ISA card layout&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Moreover, although we can&#39;t tell for certain, it looks highly probably that pin 1 of the socket is connected the the +5 V supply, making the ISA card compatible with other mouse designs that require a positive supply.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/gD8w6kOHZq-1706.avif 1706w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/gD8w6kOHZq-1706.webp 1706w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/gD8w6kOHZq-1706.png&quot; alt=&quot;The front side of the bus mouse ISA card shows how the positive rail is very likely connected to pin 1 of the DE-9 socket&quot; width=&quot;1706&quot; height=&quot;1558&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;The front side of the bus mouse ISA card shows how the positive rail is very likely connected to pin 1 of the DE-9 socket&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h1 id=&quot;1985-the-grey-eyed-mouse&quot; tabindex=&quot;-1&quot;&gt;1985 The Grey-Eyed Mouse&lt;/h1&gt;
&lt;p&gt;Microsoft&#39;s second-generation mouse arrived in 1985, replacing the distinctive green buttons with grey ones. Along with minor ergonomic improvements such the buttons extending on to the upper surface of the mouse, the mouse featured a rubber-coated steel ball, and the resolution was doubled to 200-CPI. Other aspects remained unchanged, and like its predecessor, the mouse used closed-contact mechanical encoders. The mouse was still available in serial and bus versions, the latter using the same DE-9 pinouts and the 8255-based ISA card. The DE-9 bus mouse version seems incredibly rare.&lt;/p&gt;
&lt;h1 id=&quot;1986-the-inport-evolution&quot; tabindex=&quot;-1&quot;&gt;1986 The InPort Evolution&lt;/h1&gt;
&lt;p&gt;In 1986, Microsoft introduced a redesigned bus mouse interface branded &lt;em&gt;InPort&lt;/em&gt;. This represented a significant evolution of the design. The male DE-9 (7) connector gave way to a round Mini-DIN-9 connector, marking a break in physical backwards compatibility. The +5 V supply was now required to facilitate the transition from mechanical switch-based incremental encoders to optical encoders which require power for LEDs. The third-button pin was carried over too, perhaps anticipating future needs, though not one that was ever really taken advantage of by Microsoft themselves. Around this time, the term &amp;quot;bus&amp;quot; mouse appears to have started falling from favour, in Microsoft at least. The InPort required a new ISA card design, this time with a purpose-designed mouse controller IC in favour of the general purpose 8255, allowing for a reduced component count.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/DREOlFiS5--1600.avif 1600w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/DREOlFiS5--1600.webp 1600w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/DREOlFiS5--1600.jpeg&quot; alt=&quot;The front side of the bus mouse InPort ISA card with Mini-DIN-9 connector&quot; width=&quot;1600&quot; height=&quot;1316&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;A Microsoft InPort bus mouse ISA card, with more highly integrated electronics. There were multiple revisions of the InPort ISA card, this evidently being a later one; note the copyright date of 1989.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/12_pjLvv36-1600.avif 1600w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/12_pjLvv36-1600.webp 1600w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/12_pjLvv36-1600.jpeg&quot; alt=&quot;The connector side of the bus mouse InPort ISA card with Mini-DIN-9 connector&quot; width=&quot;1600&quot; height=&quot;971&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;A Microsoft InPort bus mouse ISA card required a mouse with a Mini-DIN-9 connector&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
  &lt;img src=&quot;https://example.com/blog/what-is-a-bus-mouse/86Dozb3KAW-1000.svg&quot; alt=&quot;Mini-DIN-9 pin numbering conventions. 1 to 9 scanning from bottom-left to top-right on the male plug and from bottom-right to top-left on the receptacle&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1000&quot; height=&quot;455&quot;&gt;
  &lt;figcaption&gt;Mini-DIN-9 pin numbering conventions. From 1 to 9 scanning from bottom-left to top-right on the male plug and from bottom-right to top-left on the receptacle. Note that at time of writing the Wikipedia article on Mini-DIN connectors gives an incorrect arrangement for Mini-DIN-9.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The InPort pin assignments are as follows:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mini-DIN-9 pin&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Button 2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Button 3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Ground&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;XB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;YA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;YB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Button 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;+5 V&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;XA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;An adapter from the original DE-9 green-eyed mouse connector, to the new InPort connector was available from Microsoft:&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/9xAxvpBQx_-596.avif 596w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/9xAxvpBQx_-596.webp 596w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/9xAxvpBQx_-596.jpeg&quot; alt=&quot;An adapter cable from female DE-9 to Mini-DIN-9&quot; width=&quot;596&quot; height=&quot;320&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;A Microsoft adapter cable from female DE-9 to InPort Mini-DIN-9&lt;br&gt;-- source: &lt;a href=&quot;https://forum.vcfed.org/index.php?threads/bus-mouse-adapter-will-this-work-with-green-eyed-mouse.37055/post-452650&quot;&gt;Modem7 on vcfed.org&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;div class=&quot;aside&quot;&gt;
Microsoft also continued to offer serial mouses, but these transitioned from the bulky DB-25 connector to a &lt;em&gt;female&lt;/em&gt; DE-9 connector, making them physically as well as electrically incompatible with the &lt;em&gt;male&lt;/em&gt; DE-9 (7) connector of the original Microsoft bus mouse. Offering both bus and serial mouses with DE-9 connectors, albeit of opposite genders, within a short time period has no doubt contributed to sustained confusion around 1980s PC mouse interfaces.
&lt;/div&gt;
&lt;h1 id=&quot;1987-off-the-bus---the-ps%2F2-mouse-standard&quot; tabindex=&quot;-1&quot;&gt;1987 Off the bus - the PS/2 Mouse Standard&lt;/h1&gt;
&lt;p&gt;In 1987, IBM launched the PS/2, it&#39;s second generation PC architecture with a dedicated PS/2 mouse port. The PS/2 interface marked a fundamental departure from the bus mouse paradigm. Instead of parallel quadrature signals requiring an ISA card and 8255 PPI for interpretation, the PS/2 mouse contained its own microcontroller that pre-processed the encoder signals internally. The mouse then communicated with the host via a synchronous serial protocol through a smaller Mini-DIN-6 connector, sending packaged movement and button data rather than raw encoder states.&lt;/p&gt;
&lt;p&gt;By integrating mouse support into the motherboard&#39;s keyboard controller (typically an Intel 8042), IBM eliminated the dedicated ISA card entirely. This freed an expansion slot, reduced cost, and standardized the interface across all PS/2 systems. Though announced in 1987, PS/2 mice coexisted with bus and serial mice through the early 1990s before achieving dominance.&lt;/p&gt;
&lt;h1 id=&quot;the-nec-pc-98-%E2%80%93-pin-compatible-and-8255-based&quot; tabindex=&quot;-1&quot;&gt;The NEC PC-98 – pin compatible and 8255-based&lt;/h1&gt;
&lt;p&gt;The architectural influence of the Microsoft bus mouse extended beyond the world of PC compatibles. The PC-9800 series computers from NEC (usually known as PC-98) were x86-based computers though not IBM PC compatible. This line of machines was dominant in the Japanese market from the mid-1980s and well into the 1990s. The PC-98 mouse interface is identical to that of the original Microsoft bus mouse ISA card, including the +5 V supply on pin 1 and third button support on pin 7. The PC-98 also used an 8255-based design for capturing the quadrature signal states from the mouse and presenting information to the CPU.&lt;/p&gt;
&lt;figure&gt;
  &lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/j2HZXhgVrg-640.avif 640w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/j2HZXhgVrg-640.webp 640w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/j2HZXhgVrg-640.jpeg&quot; alt=&quot;An NEC PC-98 mouse plugged into a PC-98&quot; width=&quot;640&quot; height=&quot;480&quot;&gt;&lt;/picture&gt;
  &lt;figcaption&gt;An NEC PC-98 mouse plugged into a PC-98 -- source: &lt;a href=&quot;https://www.ebay.co.uk/itm/226444920759&quot;&gt;an eBay sale&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h1 id=&quot;quadrature-mice-on-other-platforms&quot; tabindex=&quot;-1&quot;&gt;Quadrature mice on other platforms&lt;/h1&gt;
&lt;p&gt;Outside the PC ecosystem, mouses with electrically similar interfaces to Microsoft&#39;s bus mouse were in use from the mid-1980s. The Atari ST, Commodore Amiga, NeXT, Fujitsu FM11, Acorn BBC Master Compact and Acorn Archimedes all used raw quadrature mouse signals similar to the Microsoft bus mouse, though each employed different connector types and pinouts (various DE-9 pinouts, Mini-DIN variants) and sometimes different signal polarities and quadrature phase relationships. Notably, the Acorn Archimedes and later A-series ARM-based computers also used a Mini-DIN-9 connector like the Microsoft InPort, though with different pin assignments, so they are not compatible.&lt;/p&gt;
&lt;p&gt;This proliferation of electrically similar but physically incompatible designs created the very confusion that sparked this article. The term &#39;bus mouse&#39; became loosely synonymous with &#39;quadrature mouse,&#39; obscuring the fact that Microsoft&#39;s specific DE-9 pinout and 8255-based ISA card defined the true &#39;bus mouse&#39; standard, and InPort the evolution of it on the PC. These cross-platform variations deserve detailed exploration of their own – a topic for a future article, perhaps.&lt;/p&gt;
&lt;h1 id=&quot;if-you-want-your-own-bus-mouse&quot; tabindex=&quot;-1&quot;&gt;If you want your own bus mouse&lt;/h1&gt;
&lt;p&gt;If you want your own &amp;quot;green-eyed&amp;quot; mouse, be prepared to pay. These early mouses are not cheap, and you can expect to pay hundreds of dollars on sites like eBay. Hopefully you won&#39;t have to pay the eye-watering $8190 price achieved by one &lt;a href=&quot;https://onlineonly.christies.com/s/firsts-history-computing-paul-g-allen-collection/microsoft-green-eyed-mouse-142/230080&quot;&gt;notable example&lt;/a&gt; of historical importance from the Paul G. Allen collection, which was auctioned in the 2024 &amp;quot;Firsts: The History of Computing&amp;quot; online auction, by Christies. Retro-hardware is going up in value as those of us who were young at the time now have the financial resources to indulge our nostalgia, but there are limits to how far most of us will go. Still, even at $8190, this luxury retro mouse pales in comparison to Allen&#39;s record-breaking $1.5 billion art collection auction in 2022; wealth accumulated in a large part through the computer revolution that the humble green-eyed mouse helped enable. For most of us, the historical significance lies not in auction prices, but in recognizing how this modest peripheral and its siblings from Apple, Amiga, Atari, Acorn and others helped transform the computer from a command-line device into a graphical, mouse-driven interface we take for granted today.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/KyEQOpJA---2426.avif 2426w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/what-is-a-bus-mouse/KyEQOpJA---2426.webp 2426w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/what-is-a-bus-mouse/KyEQOpJA---2426.png&quot; alt=&quot;The Microsoft Green-Eyed Mouse from the Paul G. Allen Collection&quot; width=&quot;2426&quot; height=&quot;1478&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h1 id=&quot;acknowledgements&quot; tabindex=&quot;-1&quot;&gt;Acknowledgements&lt;/h1&gt;
&lt;p&gt;The good people of &lt;a href=&quot;https://stardot.org.uk&quot;&gt;Stardot&lt;/a&gt; and in particular Bubblewrap for tracking down some information about the Alps 64H101 quadrature decoder and counter IC.&lt;/p&gt;
&lt;p&gt;The folks over at the [Vintage Computer Federation forum], in particular &lt;a href=&quot;https://forum.vcfed.org/index.php?threads/microsoft-green-eyed-mouse-serial-version-connector-gender.1255454/&quot;&gt;&lt;em&gt;snuci&lt;/em&gt; for providing excellent pictures of the bus mouse and its ISA card&lt;/a&gt;, and &lt;a href=&quot;https://example.com/blog/what-is-a-bus-mouse/(https:/forum.vcfed.org/index.php#post-1479405)&quot;&gt;&lt;em&gt;krebizfan&lt;/em&gt; for setting me straight&lt;/a&gt; about the fact that the serial version of the Microsoft mouse was released after the bus mouse.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Acorn BBC Master Compact Joystick</title>
    <link href="https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/" />
    <updated>2025-11-22T00:00:00Z</updated>
    <id>https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/</id>
    <content type="html">&lt;blockquote class=&quot;discussion-box&quot;&gt;
&lt;p&gt;Comments and questions about this article are welcome on the &lt;a href=&quot;https://www.stardot.org.uk/forums/viewtopic.php?t=32057&quot;&gt;Stardot Forums thread: What *CONFIGURE PROPORTIONAL, SWITCHED and STICK actually do on the Master Compact&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.computinghistory.org.uk/det/2817/acorn-bbc-master-compact/&quot;&gt;Acorn BBC Master Compact&lt;/a&gt; was the last in the line of 6502-based 8-bit BBC Microcomputer models, coming after the acquisition of Acorn Computers by Olivetti. While it was the first BBC Micro to include a disc-drive as standard, the computer itself was an exercise in value engineering and size reduction to fit in a case which came from the same mould as the ill-fated Acorn Communicator. Many of the external interfaces which made earlier Beebs so expandable and flexible were omitted. The connectors of some remaining ports such as the disc and printer ports were changed, perhaps to fit the new case design, but breaking compatibility with existing peripherals.&lt;/p&gt;
&lt;p&gt;In particular, the analogue port of the Model A/B and Master 128, which was backed by an NEC µPD7002 analogue to digital converter (ADC) and exposed as a female DA-15 connector (with active-low fire button support provided by PB0 and PB1 from the System VIA) has been deleted. In its place, the Master Compact exposes a male DE-9 connector labelled Joystick / Mouse. Internally, this port is wired to lines PB0 to PB4 of the User VIA (IC7). In addition, User VIA lines CB1 and CB2 are exposed, which together with +5 V power and 0 V ground account for all nine pins. The CB1 and CB2 lines can be used to trigger interrupts and so are useful for interfacing to the rapidly toggling quadrature signals produced by a mouse.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source type=&quot;image/avif&quot; srcset=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/VkSqtfN8UI-1478.avif 1478w&quot;&gt;&lt;source type=&quot;image/webp&quot; srcset=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/VkSqtfN8UI-1478.webp 1478w&quot;&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/VkSqtfN8UI-1478.png&quot; alt=&quot;Circuit diagram showing the Master Compact joystick port connected to User VIA lines PB0-PB4, CB1 and CB2&quot; width=&quot;1478&quot; height=&quot;858&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Physically, the Compact’s Joystick/Mouse connector is wired to be compatible with the Atari Joystick pinout, using pins 1 to 4 for the direction signals and pin 6 for the fire signal. These signals are active-low, so the switches pull the signals down to 0 V when activated. Neither the positive supply line (pin 7) nor the two paddle lines (pins 5 and 9) are used by Atari-compatible switched joysticks.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/aDiVLs815D-528.svg&quot; alt=&quot;DE-9 pinout diagram of the Master Compact Joystick/Mouse port&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;528&quot; height=&quot;228&quot;&gt;&lt;/p&gt;
&lt;p&gt;Atari games paddles (each paddle is a single-axis rotary game controller such as one might use for playing Pong or Breakout – hence ‘paddle’) &lt;a href=&quot;https://www.atariarchives.org/ecp/chapter_4.php&quot;&gt;place one variable resistor for each paddle&lt;/a&gt; (500 kΩ) between the +5 V supply (pin 7) and the respective paddle inputs on pins 5 and 9. The corresponding CB1 and CB2 lines on the Compact are digital lines, so while Atari switched joysticks will work, Atari paddles will not.&lt;/p&gt;
&lt;p&gt;Moreover, while the Master Compact Mouse/Joystick port is an Atari compatible &lt;em&gt;joystick&lt;/em&gt; port, it is not an Atari compatible &lt;em&gt;mouse&lt;/em&gt; port; the Atari mouse pinout, while also a DE-9 connector, is quite different to that needed by the Compact. Use of a mouse on the Master Compact deserves another article, suffice to say that due to overlapping pin allocations, the port on the Compact is &lt;em&gt;either&lt;/em&gt; a joystick port &lt;em&gt;or&lt;/em&gt; a mouse port, and cannot be used for both as the same time with any kind of passive adapter.&lt;/p&gt;
&lt;p&gt;On the software side, there is a lot of new and different code in Acorn MOS 5.x to handle the replacement of an analogue joystick interface connected to the System VIA by a digital joystick interface connected to the User VIA. These changes to the operating syatem make a best effort to maintain compatibility with existing software which uses official APIs, abstracting away the hardware differences.&lt;/p&gt;
&lt;p&gt;There are also new joystick-specific configuration commands like &lt;code&gt;*CONFIGURE PROPORTIONAL&lt;/code&gt;, &lt;code&gt;*CONFIGURE SWITCHED&lt;/code&gt; and &lt;code&gt;*CONFIGURE STICK&lt;/code&gt; which have always been poorly documented; documentation which certainly doesn’t do justice to what lies within. In fact, the documentation is so bad that reviewers of the Master Compact writing for magazines in 1986 often got completely the wrong end of the stick about the meaning of terms like &lt;em&gt;proportional&lt;/em&gt; in this context:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;... for the Compact, Acorn has elected to support the switch-type joystick, along with the mouse and trackerball. This is done by providing an &amp;quot;industry-standard&amp;quot; joystick/mouse port, with a 9-pin D socket — as used by Atari and Commodore, amongst others. The operating system software allows the new port to accept either &amp;quot;switched&amp;quot; (joystick) or &amp;quot;proportional&amp;quot; (mouse) inputs.&lt;/p&gt;
&lt;p&gt;-- Gordon Taylor writing the cover story &lt;a href=&quot;https://chrisacorns.computinghistory.org.uk/docs/Mags/AnB/AnB_Oct86_MasterCompact.pdf&quot;&gt;Master Compact Exposed. Acorns New Machine&lt;/a&gt;. for A&amp;amp;B Computing, October 1986&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Having recently annotated the relevant parts of &lt;a href=&quot;https://github.com/tom-seddon/acorn_mos_disassembly&quot;&gt;Tom Seddon’s disassembly (and reassembly) of the Acorn Master-series MOS&lt;/a&gt; I’m now able to explain how what these options do, how to use them correctly, and to draw back the veil on a &lt;a href=&quot;https://github.com/tom-seddon/acorn_mos_disassembly/blob/5e7344b79a098857ae84e6665146a500453a66c8/src/mos.s65#L8223&quot;&gt;surprisingly sophisticated and yet misunderstood part of Acorn MOS 5.x&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&quot;the-adval-interface&quot; tabindex=&quot;-1&quot;&gt;The ADVAL interface&lt;/h1&gt;
&lt;p&gt;To work with existing software which expects a joystick on the analogue port, MOS 5.x provides new code behind the existing operating system interface for interacting with the analogue subsystem. The most important of these interfaces is OSBYTE &amp;amp;80 (128) &lt;em&gt;Read ADC channel&lt;/em&gt;. The ADVAL function in BBC BASIC is essentially a high-level wrapper around OSBYTE &amp;amp;80. The ADVAL function accepts a channel number, and this is passed to OSBYTE &amp;amp;80 in the X register.&lt;/p&gt;
&lt;p&gt;Despite its name, the Analogue Digital VALue function serves multiple other purposes when passed a non-positive value. For negative channel values ADVAL and OSBYTE &amp;amp;80 obtain the number of items in various operating system buffers, such as the keyboard buffer, RS423 serial buffers, the printer buffer, and the sound channel buffers.&lt;/p&gt;
&lt;h2 id=&quot;reading-joystick-switch-and-button-states&quot; tabindex=&quot;-1&quot;&gt;Reading Joystick Switch and Button States&lt;/h2&gt;
&lt;p&gt;For channel zero, OSBYTE &amp;amp;80 returns two pieces of information. In the X register it returns the state of various switches (buttons is too specific a term) and in the Y register it returns the number of the most recently updated analogue channel. At the BBC BASIC level, the X and Y register values are presented as the lo- and hi-bytes respectively of a single 16-bit integer. The BBC User Guide for the Model B shows how to extract the parts separately using,&lt;/p&gt;
&lt;pre class=&quot;language-bbcbasic&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-bbcbasic&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to mask for the bit 1 and bit 0 to extract the left and right fire button states. Whether these were the fire buttons of separate primary and secondary joysticks wired into the same plug (like the Voltmace Delta 3B Twin), or separate buttons on the same joystick (like the &lt;a href=&quot;https://www.computinghistory.org.uk/det/67639/Voltmace-Delta-3b-quot-Single-quot-Joystick/&quot;&gt;Voltmace Delta 3B Single&lt;/a&gt;) depends entirely on the joystick hardware.&lt;/p&gt;
&lt;p&gt;Note that OSBYTE &amp;amp;80 inverts in software from the active-low hardware signals to positive logic, so a 1 here represents ‘pressed’. Prior to MOS 5.x, OSBYTE &amp;amp;80 also performs AND 3 to mask for bit 1 and bit 0 (the other bits contain state from other internal hardware connected to the System VIA), so extracting the whole lo-byte with,&lt;/p&gt;
&lt;pre class=&quot;language-bbcbasic&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-bbcbasic&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;FF&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;gives the same result.&lt;/p&gt;
&lt;p&gt;The Master Compact is a bit different because the joystick interface supports only a single fire button in bit 0, so,&lt;/p&gt;
&lt;pre class=&quot;language-bbcbasic&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-bbcbasic&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;is sufficient to extract that state.&lt;/p&gt;
&lt;p&gt;In MOS 5.x, OSBYTE &amp;amp;80 does &lt;em&gt;not&lt;/em&gt; perform an AND 3 operation to mask for the lower bits and so returns the whole byte intact. What does it contain? Bits b7 to b4 contain the four direction switch states right, up, down and left (hence my preference for the term ‘switches’ over ‘buttons’ earlier). Bits b3 to b1 are set aside in the documentation for three mouse button states right, middle and left. Other than this tacit allocation, there is no support in MOS 5.x for the mouse or its buttons. I don’t know whether these bits are set by the Master Compact mouse driver or not; I haven’t investigated it yet. So, all the switch states can be extracted with,&lt;/p&gt;
&lt;pre class=&quot;language-bbcbasic&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-bbcbasic&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;%  &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;FF&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then individual joystick switch states with,&lt;/p&gt;
&lt;pre class=&quot;language-bbcbasic&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-bbcbasic&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;right&lt;/span&gt;% &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;80&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;up&lt;/span&gt;%    &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;40&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;down&lt;/span&gt;%  &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;20&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;left&lt;/span&gt;%  &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;10&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;fire&lt;/span&gt;%  &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;buttons&lt;/span&gt;% &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;01&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In versions prior to MOS 5.x, the contents of the Y register returned by OSBYTE &amp;amp;80 – and so the hi-byte of the value returned by ADVAL(0) – contains the number of the last analogue-to-digital converter channel to be read. On the Master Compact the value is always 2 and is essentially a meaningless vestigial value.&lt;/p&gt;
&lt;p&gt;All switched joystick state on the Master Compact can be obtained through channel zero with OSBYTE &amp;amp;80 with X = 0 or ADVAL(0). However, all software written before MOS 5.x expects joystick axis information be obtained through channels one and two for the primary joystick, and channels three and four for the secondary joystick.&lt;/p&gt;
&lt;h1 id=&quot;joystick-deflection%3A-simulating-analogue-values&quot; tabindex=&quot;-1&quot;&gt;Joystick Deflection: Simulating Analogue Values&lt;/h1&gt;
&lt;p&gt;On BBC Micros with real analogue hardware prior to MOS 5.x, the non-negative ADVAL channel assignments are as follows, returning results from the analogue-to-digital converter:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Channel&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Joystick Convention&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Primary joystick x-axis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Primary joystick y-axis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Secondary joystick x-axis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Secondary joystick y-axis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;gt;4&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Always returns max values&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The values from the converter scaled to 16-bit unsigned value in the range 0–65535 with a midpoint at 32767. In hexadecimal these are &amp;amp;0000–&amp;amp;FFFF with the midpoint at &amp;amp;7FFF. It’s important to know the sense of these quantities.&lt;/p&gt;
&lt;p&gt;The x-axis (horizontal) which increases to the left, has the opposite sense to screen coordinate convention:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align:left&quot;&gt;left&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;centre&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;right&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;FFFF&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;7FFF&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;&amp;amp;0000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The y-axis (vertical) has the same sense as screen coordinate convention:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align:left&quot;&gt;down&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;centre&lt;/th&gt;
&lt;th style=&quot;text-align:right&quot;&gt;up&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0000&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;7FFF&lt;/td&gt;
&lt;td style=&quot;text-align:right&quot;&gt;&amp;amp;FFFF&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;switched-joystick-mode&quot; tabindex=&quot;-1&quot;&gt;Switched Joystick Mode&lt;/h2&gt;
&lt;p&gt;On the Master Compact with MOS 5.x and only digital joystick hardware these extreme and centre values are exactly what you get if you set MOS into switched joystick mode using,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;*CONFIGURE SWITCHED
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not that you’d be able to determine this from reading the hopeless &lt;em&gt;Welcome Guide for the Master Compact&lt;/em&gt;. Under its explanation of &lt;code&gt;*CONFIGURE&lt;/code&gt; switched it says,&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;*CONFIGURE SWITCHED&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Configure cursor-key simulation of joysticks to produce limited range of values.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;p&gt;needlessly conflating one MOS feature (cursor key joystick simulation) with another (mapping direction switch states to integer ADVAL values). Moreover, limited range conveys the wrong idea; it results in a limited &lt;em&gt;number&lt;/em&gt; of values over the &lt;em&gt;full&lt;/em&gt; range.&lt;/p&gt;
&lt;p&gt;We’ll return to the topic of cursor key simulation of joysticks later.&lt;/p&gt;
&lt;h2 id=&quot;proportional-joystick-mode&quot; tabindex=&quot;-1&quot;&gt;Proportional Joystick Mode&lt;/h2&gt;
&lt;p&gt;The complement of SWITCHED is apparently PROPORTIONAL. Let’s be generous to the technical writers and not dwell on the fact that the SWITCHED values are also proportional to the stick position, albeit on a very coarse scale.&lt;/p&gt;
&lt;p&gt;So, what does &lt;code&gt;*CONFIGURE PROPORTIONAL&lt;/code&gt; do? How can this possibly make sense on a machine with only hardware support for switched joysticks? For guidance we can turn to the &lt;em&gt;Welcome Guide&lt;/em&gt;, which says,&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;*CONFIGURE PROPORTIONAL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Configure cursor-key simulation of joysticks to produce full range of values.&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;p&gt;Setting aside misdirection regarding the cursor keys, and having established that SWITCHED also produces values across the full range, albeit limited in number, how are we to interpret this? It’s hard to know from the manual alone. After three days analysing and commenting the relevant sections of the disassembly of the Master-series MOS, I was able to figure out the surprisingly sophisticated routine which the Compact uses to convert instantaneous digital switch states into smoothly varying 16-bit ADVAL channel values that simulate analogue joystick deflection. I haven’t seen this described elsewhere and suspect I may be one of very few people other than the original author to understand not only how this feature works internally, but how it behaves at the user level.&lt;/p&gt;
&lt;p&gt;The digital joystick handling routine is polled at 100 Hz. In PROPORTIONAL mode, the code uses an integration algorithm to convert instantaneous digital switch states for the joystick directions into smoothly varying 16-bit ADVAL channel values that simulate analogue joystick deflection. The algorithm implements linear acceleration where, starting from the centre position, the rate of change of the ADVAL value is proportional to the duration of time for which the stick has been pushed in a consistent direction. This rate of change is capped though, so after a certain amount of time the rate of change of ADVAL stays constant. Eventually, the ADVAL value itself reaches its limit at &amp;amp;0000 or &amp;amp;FFFF and there can be no further decrease or increase.&lt;/p&gt;
&lt;p&gt;The rate at which the rate of change of ADVAL grows (&lt;em&gt;i.e.&lt;/em&gt; second derivative with respect to time) is not only a function of how long the stick has been held in a consistent direction, but also the ‘rate’ setting supplied by &lt;code&gt;*CONFIGURE STICK&lt;/code&gt;. Referring to the &lt;em&gt;Welcome Guide&lt;/em&gt; again:&lt;/p&gt;
&lt;blockquote&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;*CONFIGURE STICK n&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Set joystick acceleration rate in PROPORTIONAL mode to &lt;em&gt;n&lt;/em&gt; (0–7)&lt;/dd&gt;
&lt;/dl&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is undoubtedly the most illuminating of the three joystick-related &lt;code&gt;*CONFIGURE&lt;/code&gt; descriptions in the manual. Even so, it contains an inaccuracy (which we will come to shortly) and fails to mention an interesting secondary effect of the &lt;em&gt;rate&lt;/em&gt; value.&lt;/p&gt;
&lt;p&gt;The essence of the analogue joystick emulation is as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Each polling tick increments a counter &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6151em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; while a consistent direction is held. Note that this 8-bit counter saturates at &amp;amp;FF (255) and has code to stop it wrapping to zero.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The channel value increment is calculated as &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6984em;vertical-align:-0.0833em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.888em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.888em;&quot;&gt;&lt;span style=&quot;top:-3.063em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal mtight&quot; style=&quot;margin-right:0.02778em;&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;mbin mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; where &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6151em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; is the elapsed time for which a consistent direction has been held, and &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.02778em;&quot;&gt;r&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; is the rate 1–7.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This produces quadratic growth. The simulated proportional deflection (ADVAL value) increases (or decreases) as the square of elapsed time&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the most-significant byte (MSB) of the increment exceeds the configured rate value, velocity limiting activates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The velocity limit is programmed as &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6667em;vertical-align:-0.0833em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.02778em;&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;256&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt;, producing linear growth thereafter, however long the joystick is held in that direction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Rate 1 can never reach its programmed velocity limit. There isn&#39;t enough time before the counter &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6151em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; saturates at &amp;amp;FF (255). However, counter saturation also has the effect of limiting the velocity, albeit at a lower slightly lower level of &amp;amp;FF (255) than the programmed level &amp;amp;0101 (257).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the stick is returned to the centre position (no direction switches active) the counter &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6151em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; resets. Notably, the ADVAL channel value holds or coasts at its current value, so further joystick input in the opposite direction will be required to return to the centre value. In practice, returning to and staying at the exact centre value of &amp;amp;7FFF is likely to be quite difficult, unlike in SWITCHED mode.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It can be hard to build intuition for how this works from the code or a written description. Some charts should help. The first charts show the response of an ADVAL channel to switched up/down commands. The stepped red line shows the joystick direction input encoded as either up, centre or down. The blue curve shows the response of the ADVAL channel, illustrating how the value changes exponentially as the stick is held in a consistent direction, but coasts at a constant value when the stick is centred. Further stick inputs are required to return the ADVAL channel value to close to the centre value.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/nXy09zeH0t-856.svg&quot; alt=&quot;Chart showing ADVAL channel response to joystick input in proportional mode&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;856&quot; height=&quot;567&quot;&gt;&lt;/p&gt;
&lt;p&gt;The lower chart shows the signed instantaneous increments in green, which are a function of the counter value (pale grey) and the sign of the switch input. The blue curve in the upper chart is the
integral of the green sawtooth in the lower chart. These charts show behaviour that stays within both the limits inherent in the 16-bit ADVAL quantity and the various programmed limits.&lt;/p&gt;
&lt;p&gt;The next chart shows how the various limiting behaviours further modify the ADVAL response. The channel value starts at its minimum of zero, and then when the joystick changes from down to up (effectively instantaneously) the counter is reset and the ADVAL channel enters a domain of quadratic growth caused by the increment added at each time step growing linearly in size each time. At 0.38s after accelerated started, the velocity reaches the rate 7 limit of &amp;amp;0707 (1799) and so the ADVAL channel enters a period of linear growth. At 0.5 seconds after the change in joystick input the maximum channel value of &amp;amp;FFFF (65535) is attained.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/DVJZ4WIPc5-856.svg&quot; alt=&quot;Chart demonstrating velocity limiting behaviour during full-range joystick deflection at rate 7&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;856&quot; height=&quot;708&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-stick-rate-setting&quot; tabindex=&quot;-1&quot;&gt;The Stick Rate Setting&lt;/h2&gt;
&lt;p&gt;In PROPORTIONAL mode, the rate set by &lt;code&gt;*CONFIGURE STICK&lt;/code&gt; controls not only the responsiveness, but also the maximum acceleration rate of the ADVAL value. From an extreme position, at rate 7 (the fastest) maximum simulated deflection to the other extreme will occur in 0.50 seconds. At rate 1 (the slowest) full-scale deflection will occur after 3.84 seconds. Only rates 7, 6 and 5 experience velocity limiting in practice. For rates 4, 3 and 2 the ADVAL channel saturates at &amp;amp;FFFF (65535) before the velocity limits take effect. Rate 1 is again becomes limited to linear growth, but for a quite different reason: After 255 centisecond clock ticks (2.55 s) the one-byte counter saturates at &amp;amp;FF (255) and thereafter the increment can grow no more, rendering the growth of the ADVAL channel value linear.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/3u-dYlglis-856.svg&quot; alt=&quot;Chart comparing full-range deflection times across joystick rates 1 to 7&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;856&quot; height=&quot;567&quot;&gt;&lt;/p&gt;
&lt;p&gt;Ultimately, the rather clever system of rate limits shown below, only takes effect for the fastest three of the seven rates, owing to the other limitations described above.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://example.com/blog/compact-joystick/acorn-bbc-master-compact-joystick/rZwS3QuVRh-856.svg&quot; alt=&quot;Chart showing programmed versus effective velocity limits for joystick rates 1 to 7&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;856&quot; height=&quot;567&quot;&gt;&lt;/p&gt;
&lt;p&gt;Not that you would know from reading the &lt;em&gt;Welcome Guide&lt;/em&gt;, but rate 0 is special, and causes the effective rate to be set to 3. Rates of 8 and above can also be supplied, but these will be clamped back to a rate of 7.&lt;/p&gt;
&lt;h1 id=&quot;multi-modal-inputs-from-joystick-and-keyboard&quot; tabindex=&quot;-1&quot;&gt;Multi-modal inputs from joystick and keyboard&lt;/h1&gt;
&lt;p&gt;As alluded to by the guide for &lt;code&gt;*CONFIGURE SWITCHED&lt;/code&gt; and &lt;code&gt;*CONFIGURE PROPORTIONAL&lt;/code&gt;, and buried in the documentation for the &lt;code&gt;*FX&lt;/code&gt; commands (&lt;em&gt;i.e.&lt;/em&gt; OSBYTE calls) are some other joystick-related features of MOS 5.x.&lt;/p&gt;
&lt;h2 id=&quot;edit-keys-simulating-joystick&quot; tabindex=&quot;-1&quot;&gt;Edit Keys Simulating Joystick&lt;/h2&gt;
&lt;p&gt;The olive-drab coloured edit-keys (cursor keys and COPY key) can be configured to simulate a joystick by issuing a &lt;code&gt;*FX4,3&lt;/code&gt; command. The 3 here is one of the four available cursor editing modes, and the only one unique to MOS 5.x. In this mode, the cursor keys drive the joystick simulation according to the prevailing SWITCHED or PROPORTIONAL setting.&lt;/p&gt;
&lt;p&gt;In SWITCHED mode pressing left cursor key ADVAL(1) immediately jumps to &amp;amp;FFFF. As soon the key is released ADVAL will return to the centre value of &amp;amp;7FFF, giving the same auto-centring response as a real switched joystick.&lt;/p&gt;
&lt;p&gt;In PROPORTIONAL mode when pressing the left cursor key ADVAL(1) begins integrating towards &amp;amp;FFFF according to the configured rate and duration of keypress. The longer you hold, the further it goes, with first quadratic and then, after velocity limiting kicks in, linear growth. Releasing the key holds ADVAL at the current value, and the right cursor key must be used to reduce the value again.&lt;/p&gt;
&lt;p&gt;Interestingly, in &lt;code&gt;*FX4,3&lt;/code&gt; “joykeys” mode, the input from the joystick port is still processed. The result from the keyboard is combined with the result from the joystick using a logical-OR, meaning that both the keyboard and joystick inputs are respected.&lt;/p&gt;
&lt;p&gt;This raises the question of what happens in the event of conflicting signals. The mechanical construction of a switched joystick ensures that activation of opposing direction switches is mutually exclusive, but the cursor keys alone or in combination with the joystick afford no such constraint. In SWITCHED mode left ($FFFF) takes precedence over right (&amp;amp;0000), and down (&amp;amp;0000) takes precedence over up (&amp;amp;FFFF), so if all four directions are activated this is interpreted as the joystick being in the bottom-left position. The difference in sense between the horizontal and vertical axes here seems arbitrary and is controlled by the ordering of an internal table used to convert switch activations to ADVAL values. It seems likely that given the mechanical constraints of real joysticks that this wasn’t given much consideration. On the other hand, bottom-left is the graphics origin and so perhaps it’s a deliberate design decision. Only the original programmer will know how much consideration went into the table ordering.&lt;/p&gt;
&lt;p&gt;In PROPORTIONAL mode conflicting switch or key activations cause the ADVAL value to stay effectively constant as an increment and an immediately following decrement will cancel out, giving the same effect as having no switch activations.&lt;/p&gt;
&lt;p&gt;To disable, “joykeys” mode issue &lt;code&gt;*FX4,0&lt;/code&gt; to restore normal edit-key behaviour.&lt;/p&gt;
&lt;h2 id=&quot;joystick-simulating-edit-keys&quot; tabindex=&quot;-1&quot;&gt;Joystick Simulating Edit Keys&lt;/h2&gt;
&lt;p&gt;As well as being able to use the cursor keys to emulate a joystick, the reverse is also possible: The joystick can be used to emulate the cursor keys. This mode is activated with OSBYTE &amp;amp;BE (190) with X=64, or &lt;code&gt;*FX190,64&lt;/code&gt; at the command line. In this mode the ADVAL(1) and ADVAL(2) values are not updated by the joystick. Instead, the contents of the ADVAL(0) lo-byte which contains the switch status bits are used to drive keyboard-like actions. The joystick direction bits cause simulated key presses of the cursor keys, and the bit 0 fire button becomes the equivalent of pressing the COPY key, making it possible to drive the cursor around the screen and copy text using the joystick alone. Curiously, the activation of bits 1, 2 and 3 of this byte cause COPY, RETURN and DELETE respectively to be ‘typed’. These bits are associated – in the documentation at least – with three mouse or trackball buttons.&lt;/p&gt;
&lt;p&gt;In all cases, the keyboard simulation is pretty faithful to the real thing, including auto-repeat delays, and so on. That said, the joystick simulation of edit keys runs one centisecond tick behind updating of the ADVAL values. The button states read by this routine are those emplaced on the previous tick, so there is an inherent 10 ms delay in the conversion of joystick input to simulated key presses.&lt;/p&gt;
&lt;h2 id=&quot;when-modes-collide&quot; tabindex=&quot;-1&quot;&gt;When Modes Collide&lt;/h2&gt;
&lt;p&gt;You may have noticed that &lt;code&gt;*FX4,3&lt;/code&gt; and &lt;code&gt;*FX190,64&lt;/code&gt; can be set independently, which means they can be set simultaneously. Simultaneous emulation of the joystick by the edit keys &lt;em&gt;and&lt;/em&gt; the emulation of the edit keys by the joystick! What then?! There’s nothing in the MOS 5.x code to prevent this situation, and the design of the joystick routine doesn’t obviously take this scenario into account.&lt;/p&gt;
&lt;p&gt;If both are enabled the joystick hardware and edit keys are scanned and logically OR-ed together as per edit-keys simulate joystick mode. Their combined state ends up in the ADVAL(0) lo-byte. Then the joystick simulates edit-keys routine picks up the ADVAL(0) lo-byte and converts it back to an edit-key press, which goes into the keyboard buffer. Normally, in &lt;code&gt;*FX4,0&lt;/code&gt; mode (the default) putting these codes into the keyboard buffer would initiate edit mode if necessary and move the secondary cursor around. But we’re in &lt;code&gt;*FX4,3&lt;/code&gt; mode, so the edit-key code in keyboard buffer is ignored, preventing a positive feedback loop. The net result is that neither cursor movement not simulated ADVAL analogue channel updates occur. The two modes cancel each other out, rendering both features inactive.&lt;/p&gt;
&lt;h1 id=&quot;analogue-software-and-hardware-extensibility&quot; tabindex=&quot;-1&quot;&gt;Analogue Software and Hardware Extensibility&lt;/h1&gt;
&lt;p&gt;MOS 5.x is unique among the MOS variants in providing an extensibility mechanism specifically for replacing the built-in handling of ADVAL channels, by instead invoking sideways ROM service call &amp;amp;2C. The only part of the joystick system not replaceable by this call is the simulation of edit keys by the joystick; if enabled this will continue to run one tick behind switch state result emplacement, regardless of whether the switch states are set by the built-in joystick routine or a replacement in a service ROM.&lt;/p&gt;
&lt;p&gt;Joystick service call delegation is enabled by setting bit 7 of the OSBYTE &amp;amp;BE (190) parameter X. The most straightforward invocation from the command line is &lt;code&gt;*FX190,128&lt;/code&gt; but this resets all other bits in the ADVAL configuration byte to zero, wiping out the bits which control the built-in MOS ADVAL handling. Use &lt;code&gt;*FX190,128,127&lt;/code&gt; which will set the top bit to enable the service call and preserve the 7 lower bits. To disable the service call and restore built in joystick handling with the prior configuration, use a &lt;code&gt;*FX190,0,127&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;A joystick service ROM needing a few bits for storage of configuration could use bits 3 and 4 of the configuration byte, as these are otherwise unused by MOS 5.x. In principle, a ROM could also repurpose the six bits from bit 0 to bit 5 as these are only used by the built-in joystick routine, though there is the potential for confusion caused by the overloading of semantics and the fact that the *CONFIGURE SWITCHED, PROPORTIONAL and STICK, and their &lt;code&gt;*FX&lt;/code&gt; equivalents will continue to affect these bits.&lt;/p&gt;
&lt;p&gt;Sadly, there is no &lt;code&gt;*CONFIGURE&lt;/code&gt; option for enabling or disabling the joystick ROM service call, though the equivalent bit &lt;em&gt;is&lt;/em&gt; stored in the non-volatile RAM and it could, in principle, be directly manipulated to enable the ROM service call across hard resets and power cycles. By implementing sideways ROM service calls &amp;amp;28 (unknown &lt;code&gt;CONFIGURE&lt;/code&gt;) and &amp;amp;29 (unknown &lt;code&gt;STATUS&lt;/code&gt;) it should be possible to add such a facility along with other persistent configuration pertaining to a custom ADVAL driver.&lt;/p&gt;
&lt;p&gt;The full details of how to implement a Sideways ROM service call are beyond the scope of this article, suffice to say that a routine servicing call &amp;amp;2C will &lt;a href=&quot;https://github.com/tom-seddon/acorn_mos_disassembly/blob/5e7344b79a098857ae84e6665146a500453a66c8/src/mos.s65#L8429&quot;&gt;receive in the Y register the offset into page 2 of the ADVAL workspace&lt;/a&gt;, always &amp;amp;B6, which is to say that the ADVAL workspace is always at address &amp;amp;02B6 in MOS 5.x (and indeed in earlier versions of the Master MOS, though there’s no reason in principle that it couldn’t be elsewhere in page 2). This &lt;a href=&quot;https://github.com/tom-seddon/acorn_mos_disassembly/blob/5e7344b79a098857ae84e6665146a500453a66c8/src/mos.s65#L10128&quot;&gt;workspace comprises 8 bytes&lt;/a&gt; laid out as follows:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Address computation&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Address&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 0&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02B6&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Switch state byte&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 1&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02B7&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;ADVAL(1) LSB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 2&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02B8&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;ADVAL(1) MSB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 3&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02B9&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;ADVAL(2) LSB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 4&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02BA&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;ADVAL(2) MSB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 5&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02BB&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 6&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02BC&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0200 + Y + 7&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;02BD&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;Available&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This workspace layout is specific to MOS 5.x. The arrangement of the first five bytes is mandated by the design of OSBYTE &amp;amp;80 (128) which expects to find the results for channels 0, 1, and 2 laid out like this, so conforming service call implementations must use these workspace entries for the results they want to see returned for these channels. This also means that the service call mechanism does not support extensibility beyond channel 0 for switches and analogue channels 1 and 2.&lt;/p&gt;
&lt;p&gt;MOS 3.x uses a &lt;a href=&quot;https://github.com/tom-seddon/acorn_mos_disassembly/blob/5e7344b79a098857ae84e6665146a500453a66c8/src/mos.s65#L10115&quot;&gt;different layout for the workspace allowing for ADVAL channels 1 to 4&lt;/a&gt;, and in any case does not support service call &amp;amp;2C for analogue system extensibility. In MOS 3.x the ADVAL(0) state is not stored in the workspace – it’s pulled directly from System VIA input register B.&lt;/p&gt;
&lt;p&gt;ROM extensions which wish to accommodate analogue hardware with more channels will need to intercept the BYTEV vector to override the default implementation of OSBYTE &amp;amp;80 allowing you to return ADVAL results in an arbitrary, either reinterpreting the bytes of the workspace to be more like the MOS 3.x layout (see below) or doing something else altogether.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Mertec_CompactComp.html&quot;&gt;Mertec Companion&lt;/a&gt; was a hardware expansion which attached to the 50-way expansion connector of the Master Compact to add variety of interfaces, including a Beeb compatible analogue port. This used a µPD7002 (just like the other Beebs) connected to the system bus through a 68B21 Peripheral Interface Adapter (PIA), a similar device to the 6522 VIAs used in the BBC Micro. As it provided four analogue channels, The Mertec Companion ROM hooked into BYTEV, probably to replace OSBYTE &amp;amp;80.&lt;/p&gt;
&lt;h1 id=&quot;conclusion&quot; tabindex=&quot;-1&quot;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;The Master Compact’s digital joystick system exemplifies the value engineering philosophy of the machine: clever software compensating for cost-reduced hardware while maintaining backwards software compatibility. Eliminating an expensive µPD7002 analogue-to-digital converter chip and supporting circuitry will have reduced parts cost by between £5 to £10 at mid-1980s volume prices. It will have saved space on the printed circuit board helping the Compact fit in the case design it inherited from the Acorn Communicator, and simplified assembly somewhat.&lt;/p&gt;
&lt;p&gt;The sophistication of the proportional mode algorithm with its integration, velocity limiting and smooth quadratic to linear transition is particularly remarkable given how much it was undersold by the accompanying documentation. Acorn programmers made a sterling effort to make digital joysticks feel surprisingly like analogue controls, yet the official documentation failed to explain what it actually did or how to use it effectively.&lt;/p&gt;
&lt;p&gt;The keyboard-to-joystick and joystick-to-keyboard mappings demonstrate thoughtful design improving usability and perhaps making some games accessible to even to those without a joystick or unable to use one. Sadly, their documentation was somewhat scattered through the Welcome Guide, rather than being gathered in the section about adding a joystick.&lt;/p&gt;
&lt;p&gt;Some design choices remain puzzling. The inverted X-axis inherited from earlier MOS versions going back to the Model A/B. Is this just a historical accident arising from the wiring of the first joystick? Then there’s the vestigial “last channel read” value, which is always 2, and the somewhat arbitrary conflict resolution precedence, though the coincidence with the bottom-left graphics origin is intriguing.&lt;/p&gt;
&lt;p&gt;Perhaps little of this matters now beyond its curiosity as an artefact to be studied by us software archaeologists. (As a contributor the inaugural, and to-date only, edition of &lt;a href=&quot;http://chatley.com/posts/02-18-2014/ticosa/&quot;&gt;The International Conference on Software Archaeology&lt;/a&gt; (TICOSA) held in London in 2014, it’s an interest I’ve long held.). Retro-computing enthusiasts delight in understanding the decisions and forces that resulting in their favourite machines, warts and all. The few but talented contemporary 8-bit BBC Micro game developers might be minded to take the Compact’s capabilities into account, but this probably mostly affects &lt;em&gt;players&lt;/em&gt; of games on the Master Compact. The Compact is arguably the most convenient of the real Beebs for those who wish limit the amount of desk space we concede to this hobby and I hope that a better understanding of Acorn MOS support for its joystick system will enable better use to be made of it.&lt;/p&gt;
&lt;p&gt;After nearly four decades of obscurity, the Master Compact’s joystick handling code can finally be appreciated for what it is: a sophisticated piece of systems programming that deserves better than it got from the original documentation.&lt;/p&gt;
&lt;h1 id=&quot;reference&quot; tabindex=&quot;-1&quot;&gt;Reference&lt;/h1&gt;
&lt;p&gt;The following commands persist in the non-volatile RAM and survive reboots. They take effect immediately and set the default state on start-up:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;*CONFIGURE SWITCHED&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Enable switched joystick mode. Direction changes from the joystick (or keyboard, if enabled with &lt;code&gt;*FX4,3&lt;/code&gt;) cause joystick deflection as measured through ADVAL channels 1 and 2 to jump immediately to minimum (&amp;amp;0000), centre (&amp;amp;7FFF) or maximum (&amp;amp;FFFF) values. The values are auto-centring, so in the absence of left/right or up/down input the channel values will revert immediately to their centre values.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;*CONFIGURE PROPORTIONAL&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Enable proportional joystick mode (default). Direction changes from the joystick (or keyboard, if enabled with &lt;code&gt;*FX4,3&lt;/code&gt;) cause simulated joystick deflection as measured through ADVAL channels 1 and 2 to accelerate smoothly in that direction at a rate set by &lt;code&gt;*CONFIGURE STICK&lt;/code&gt; or &lt;code&gt;*FX190,&amp;lt;rate&amp;gt;&lt;/code&gt;. In the absence of directional input, the simulated analogue value channels will hold at their current value.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;*CONFIGURE STICK &amp;lt;n&amp;gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;From 1 to 7 the value of &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; is the rate at which the simulated proportional joystick deflection accelerates. High rates make the system more responsive. Lower rates give better control. For &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; equal to 0, the rate will be set to 3. For &lt;eq&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/eq&gt; above 7, the rate will be clamped to 7. The rate can also be set by &lt;code&gt;*FX190,&amp;lt;rate&amp;gt;&lt;/code&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The following command take effect immediately, but do not persist across hard resets:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CLI&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot; colspan=&quot;3&quot;&gt;OSBYTE&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;A&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;X&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;Y&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*FX190,&amp;lt;rate&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;BE (190)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;rate 0–7&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;0&lt;/td&gt;
&lt;td&gt;Set STICK rate temporarily. Implicitly enables PROPORTIONAL mode (clears bit 5 of X). Values from 8 to 31 will be clamped to rate 7, but also set otherwise unused bit 4.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*FX190,32&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;BE (190)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;20 (32)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;0&lt;/td&gt;
&lt;td&gt;Enable SWITCHED mode (sets bit 5 of X)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*FX190,64&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;BE (190)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;40 (64)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;0&lt;/td&gt;
&lt;td&gt;Enable joystick emulated edit-keys mode. Joystick directions generator cursor key presses and the fire button behaves like the COPY key. The ADVAL(1) and ADVAL(2) channels are not updated in this mode.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*FX190,128,127&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;BE (190)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;80 (128)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;7F (127)&lt;/td&gt;
&lt;td&gt;Enable ROM service call &amp;amp;2C delegation (sets bit 7). All built-in joystick handling is bypassed. Allows sideways ROMs to support drivers for alternative joystick implementations.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*FX190,0,127&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;BE (190)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;7F (127)&lt;/td&gt;
&lt;td&gt;Disable ROM service call &amp;amp;2C delegation (clears bit 7).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The following shows the relation ship between the rate 1–7 set by either &lt;code&gt;*CONFIGURE STICK&lt;/code&gt; or &lt;code&gt;*FX190,&amp;lt;rate&amp;gt;&lt;/code&gt; and the time for the proportional mode simulation to reach maximum deflection from the centre position,&lt;/p&gt;
&lt;p&gt;The following BBC BASIC statements obtain the joystick switch states and simulations of analogue values:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;BBC BASIC&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot; colspan=&quot;4&quot;&gt;OSBYTE&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot; colspan=&quot;2&quot;&gt;Entry&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot; colspan=&quot;2&quot;&gt;Exit&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;A&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;X&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;X&lt;/th&gt;
&lt;th style=&quot;text-align:center&quot;&gt;Y&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;switches% = ADVAL(0)&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;80 (128)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;switches&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;2&lt;/td&gt;
&lt;td&gt;Read switch states&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;x% = ADVAL(1)&lt;/code&gt; or any &lt;code&gt;ADVAL(&amp;lt;odd&amp;gt;)&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;80 (128)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;LSB&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;MSB&lt;/td&gt;
&lt;td&gt;Read horizontal axis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;y% = ADVAL(2)&lt;/code&gt; or any &lt;code&gt;ADVAL(&amp;lt;even&amp;gt;)&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;&amp;amp;80 (128)&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;LSB&lt;/td&gt;
&lt;td style=&quot;text-align:center&quot;&gt;MSB&lt;/td&gt;
&lt;td&gt;Read vertical axis&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Use the following BBC BASIC statement to extract switch state from the &lt;code&gt;ADVAL(0)&lt;/code&gt; value:&lt;/p&gt;
&lt;pre class=&quot;language-bbcbasic&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-bbcbasic&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;REM Read digital switch states:&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;right&lt;/span&gt;%       &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;80&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;up&lt;/span&gt;%          &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;40&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;down&lt;/span&gt;%        &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;20&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;left&lt;/span&gt;%        &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;10&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;mouse_right&lt;/span&gt;% &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;08&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;mouse_mid&lt;/span&gt;%   &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;04&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;mouse_left&lt;/span&gt;%  &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;02&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;fire&lt;/span&gt;%        &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;ADVAL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;token number hexadecimal&quot;&gt;&amp;amp;01&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The following table shows the effect of &lt;code&gt;*CONFIGURE STICK &amp;lt;rate&amp;gt;&lt;/code&gt; or &lt;code&gt;*FX190,&amp;lt;rate&amp;gt;&lt;/code&gt; on the duration taken from one extreme channel value to the other.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align:center&quot;&gt;Rate&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Full-travel Duration (s)&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Programmed Velocity Limit&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Effective Velocity Limit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:center&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;3.84&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0101 (257)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;FF (255)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:center&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;2.56&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0202 (514)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:center&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;1.81&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0303 (771)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:center&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;1.28&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0404 (1028)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:center&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;0.91&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0505 (1285)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0505 (1285)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:center&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;0.67&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0606 (1542)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0606 (1542)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:center&quot;&gt;7&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;0.50&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0707 (1799)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&amp;amp;0707 (1799)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1 id=&quot;acknowledgements&quot; tabindex=&quot;-1&quot;&gt;Acknowledgements&lt;/h1&gt;
&lt;p&gt;Tom Seddon for &lt;a href=&quot;https://www.stardot.org.uk/forums/viewtopic.php?p=469109#p469109&quot;&gt;pointing me at the right parts of the code&lt;/a&gt; in his Master MOS disassembly project, and J.G. Harston for generously sharing &lt;a href=&quot;https://www.stardot.org.uk/forums/viewtopic.php?p=469391#p469391&quot;&gt;his own partially annotated assembly&lt;/a&gt; and for &lt;a href=&quot;https://www.stardot.org.uk/forums/viewtopic.php?p=469448#p469448&quot;&gt;setting me on the right track&lt;/a&gt; when I was confused about the various internal codings used for the edit keys.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>We Are on the Brink of a New Era...</title>
    <link href="https://example.com/blog/firstpost/" />
    <updated>2025-11-11T00:00:00Z</updated>
    <id>https://example.com/blog/firstpost/</id>
    <content type="html">&lt;p&gt;...if only people would start writing independent blogs again. My contribution
will be to resurrect my original blog Sufficiently Small, which was once
hosted on a server somewhere near Cambridge in the UK, but has fallen into
disrepair.&lt;/p&gt;
&lt;p&gt;Over time I&#39;ll migrate the good stuff from the old site, fix broken links with
permanent redirects, and generally restore order to my little corner of the web.&lt;/p&gt;
&lt;p&gt;Once the web was &amp;quot;under construction&amp;quot;. Perhaps it still is. Each of us can
pick up our tools and build something of our own. Our own allotments outside
the walled gardens. A shed in the corner for tinkering and experiments. A small
part of a larger communal effort.&lt;/p&gt;
&lt;p&gt;The Norwegians have a word for this kind of communal effort: &amp;quot;dugnad&amp;quot;. It&#39;s not
a concept that translates easily into the English language, still less into
Anglo culture. It&#39;s voluntary work for the common good, and it&#39;s necessary for a
smoothly-running, pleasant and habitable society.&lt;/p&gt;
</content>
  </entry>
</feed>