Joystick hardware
=================
Spirit of A7000/A7000+
----------------------
Joystick 0.22 (as shipped in RISC OS 3.60) included experimental (if non functional) support for an analogue joystick add on that was never subsequently produced by Acorn.

It was intended to be detected by looking at bit 5 and 6 of Morris' (the ARM7500 system on chip) port C lines, one bit to see if it's there at all, and one bit to select between analogue and digital sensors. The hardware was intended to be fitted into the NIC slot (in place of a NIC).

Inspection of the schematic shows that the port C lines were not wired up on the A7000 or A7000+, and since they're open drain lines, would never have been detected anyway. This detection code is switched with
  CanHaveDigital
that also enables some dubious hardwired peeks and pokes, so should be considered unusable.

Reworked implementation
-----------------------
The schematic does however show that product specific pins 1-4 are wired up to the analogue input ports on Morris, following the NIC specification (0472,208 issue 4, in the Risc PC TRM).

As these are analogue inputs, the interface must not be damaged when a NIC is used in the NIC slot, effectively reserving these as no connects or ground pins on NICs. The last page of 0472,208 lists the product specific pin reservations for Risc PC systems too, and shows PSP4 as reserved (PSP4 being analogue BY on the A7000/A7000+).

Inspection of the Risc PC schematic shows this was connected to the DREQ1 line, but a 0 ohm bridging resistor R118 is not fitted - therefore PSP4 is no connect on the Risc PC.

This means it's safe to insert a NIC in a Risc PC or A7000/A7000+ *and*
           it's safe to insert an analogue joystick into either too.

Description
-----------
To make an A7000/A7000+ compatible joystick interface you need
 - Joystick 0.27 or later
 - Two 74HC244's or equivalent
 - One 74HC139 or equivalent
 - A ball of string and a squeezy bottle

The '139 decoder hangs off nNETROMCS and LA2, such that
  LA2 = 0, nNETROMCS = 0 selects one '244
                         this must output the expansion card id, using the
                         simple id allocated to the analogue joystick
  LA2 = 1, nNETROMCS = 0 selects the other '244
                         this reads the fire button(s), up to 4 for each
                         joystick
The X and Y axis, for each of up to 2 joysticks, are then wired to the PSP pins as described in 0472,208. Some ESD protection is recommended too.

When the fire button(s) are read the software reads them twice, this would permit some more fancy latch logic if deemed necessary (the buttons are debounced in software by virtue of sampling them on VSYNC interrupts).

