On my visit to San Francisco, I made it a point to stop at Anchor Electronics, looking for some interesting projects. Noticed they had some GAL20V8s in their catalogue, and decided "I should build something with them".
I figured a simple parallel card was a good idea because:
* It's a ball of 74xx logic, so some of it could be reasonably compressed into a GAL
* There aren't that many parallel cards in the "solder your own PC clone" ecosystem. I see https://github.com/hkzlab/ISA_DualUARTParport, but that's obviously more functionality than a single parallel port.
I based it largely on the schematics in the PC Technical Reference (page D-34) with the following new ideas:
* The GAL generates the five decodes at the top left of the schematic (RPA/RPB/RPC/WPA/WPC) as well as the DIR signal for the 74LS245.
* The 74LS05s plus pullup are replaced with 74LS04s, which seem to be equivalent except for the pullup being baked in.
* Based on https://forum.vcfed.org/index.php?threads/looking-for-parallel-port-schematic.76112/post-926025 I wired the last line out of the 174 to the 374's output enable, so it should provide PS/2-compatible bidirectional functionality.
* Several places where inversion was done by feeding a signal and its copy into a NOR/NAND/XOR gate were simplified by using more inverters. I assume they were done this way since the original design had gates to spare on those other parts.
Status so far:
* BIOS identifies the existence of a port at 0x378
* DEBUG will let me "o 378,xx" and "i 378" and get the same value back.
I need to await more parts to build loopback plugs for further tests, and find a nice dot-matrix printer at the Goodwill.
Known limitations:
* You could reprogram the GAL easily to have the device activate at a different port, but IRQ7 is hard wired.
* I'm concerned that the "use 74LS04 instead of 74LS05 + pullups" may cause problems in some scenarios. Specifically looking at the note at https://minuszerodegrees.net/misc/Parallel port types.png -- if someone's expecting "heavy duty" pullups, relying on the 74LS04's "returns active high instead of open collector" instead of a real pullup may not be that good of an idea.
Known errata:
* Poor footprint choices: The DB25 socket I chose is unlike most real ones-- the large mounting holes are set back about 2mm. Still worked with the one I bought. and most actual DB25 connectors have the prongs for mounting dead-centre rather than in line with one row of pins. The capacitor footprints are probably too small depending which ones you buy.
* Exact card dimensions need tweaks to have the port fit neatly out the back of the case. My chosen socket was a bit too shallow for that. I suspect this needs a holistic approach-- choose the socket, then adjust the PCB dimensions and footprint to match.
* The decoupling caps are marked 470nf, when the original spec was actually 47nf. You can never have too much decoupling.