diff --git a/docs/Hardware_Config.pdf b/docs/Hardware_Config.pdf deleted file mode 100644 index 1501038..0000000 Binary files a/docs/Hardware_Config.pdf and /dev/null differ diff --git a/docs/index.html b/docs/index.html index 6237e48..d0ff131 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,6 +13,7 @@
The Linux builds of MEMU (documented above) will compile and run on any version of + Raspberry Pi. The original Raspberry Pi build (documented below) had two additional + features:
+The software interfaces used to implement these features have been obsoleted by + recent versions of Raspberry Pi OS, and are not available at all for the Raspberry Pi 5.
+The use of GPIO to connect to real hardware is potentially useful, so this has been + re-implemented as an optional feature of the Linux builds, using standard Linux software + interfaces. To enable this feature, add the following switches to the cmake line + of the Linux build:
+To use GPIO attached hardware, it is necessary to use the switch -hw-config + when starting MEMU to give the name of a file specifying the hardware attached.
+This build is intended to be run from an operating system, typically "Raspberry Pi OS". It does not require a GUI, instead it uses the VideoCore IV GPU to display full screen.
This build must be done on a Raspberry Pi, as the VideoCore libraries are required. @@ -527,9 +558,9 @@
The Raspberry Pi build has one further option to control the use of the GPU:
@@ -1262,5 +1293,111 @@Pressing o takes a new snapshot. Pressing v toggles whether you are looking at the current value, or the value in the snapshot.
+If the optional feature of using GPIO to attach real hardware to MEMU + is enabled, then it is necessary to provide a hardware configuration + file to describe the attachments.
+The hardware configuration file consists of blocks defining a particular + interface, introduced by a name in square brackets, followed by the + definition of that interface.
+Most of the hardware definition file is defining which digital I/O pins + connected to what hardware. These may be built in GPIO pins, or there is + also support for one or more MCP23017 I2C port expanders.
+
These pin definitions take the form:
+
+ GPIO, <gpiochip device>, <GPIO number>
+ MCP23017, <I2C device>, <I2C address>, <MPC pin number>
+
+ Where:
+This block of the configuration file is used to define the connection of a MTX matrix + keyboard or equivalent. It takes the form:
+
+
+ [keyboard]
+ kb0 = <pin definition>
+ :
+ kb9 = <pin definition>
+ dr0 = <pin definition>
+ :
+ dr7 = <pin definition>
+ reset = <pin definition>
+ reset2 = <pin definition>
+ dr_reset = <gnd | dr0-dr7>
+
The lines kb0 – kb9 define the 10 keyboard sense lines, and the lines dr0-dr7 define + the 8 keyboard drive lines.
+For an unmodified MTX keyboard, the reset line defines the I/O pin that one of the + keyboard reset lines is connected to. The other reset line should be connected to ground + (0v). In that case the reset2 and dr_reset lines would be omitted.
+The MTX keyboard may be modified by soldering an additional connection to the track + joining the two reset keys. In that case both the existing keyboard reset lines should + be connected to IO pins, and defined by the reset and reset2 lines. The additional + connection between the reset keys should either be connected to ground (0v) or to one + of the keyboard drive lines. The dr_reset line specifies how this is connected (gnd is + the default).
+If a matrix keyboard is fitted, then Atari style joysticks may be connected to the + drive and sense lines, in parallel with the keyboard, as per the MTX. In that case + no joystick definition is required. Alternately, the separate joystick switches may + be connected to I/O pins, and the common connection to ground, as per earlier versions + of MEMU-Pi. In that case, the joystick connections are defined by a block of the form:
+
+ [joystick_1]
+ left = <pin definition>
+ right = <pin definition>
+ up = <pin definition>
+ down = <pin definition>
+ fire = <pin definition>
+
+ The second joystick, if fitted, is defined similarly in a [joystick_2] block.
+A Centronics style printer port may be provided. It should be noted that the Centronics + connector uses 5v logic, while the Raspberry Pi GPIO connections are only 3.3v and are not + 5v tolerant. Therefore some form of level shifting is required, Probably the simplest + solution is to use an MCP23017 powered from 5v, but the I2C pullup resistors taken to 3.3v. + The printer hardware block takes the form:
+
+ [printer]
+ d0 = <pin definition>
+ :
+ d7 = <pin definition>
+ strobe = <pin definition>
+ busy = <pin definition>
+ error = <pin definition>
+ pe = <pin definition>
+ slct = <pin definition>
+
+ ote that the MTX PIO port is 5v logic while the Raspberry Pi GPIO connections are only 3.3v + tolerant. Also it is not practical to implement the INSTB and OTSTB lines in software. HCT244, + HCT245 or HCT373 are examples of devices that could provide an OTSTB function and 3.3v to 5v + step-up (not HC chips). A HC373 or HCT373 are examples that could provide INSTB, but the + outputs would need resistor dividers to connect to the Raspberry Pi GPIO. The PIO hardware + definition block takes the form:
+
+ [pio]
+ pot0 = <pin definition>
+ :
+ pot0 = <pin definition>
+ pin0 = <pin definition>
+ :
+ pin7 = <pin definition>
+