Building an IBM 3270 terminal controller

The IBM 3270 type terminal is a mainframe computer terminal. I've long been fascinated by these terminals and wanted to connect one to the Hercules emulator, but couldn't find a working IBM 3174 controller. So I decided to build my own and learn a little in the process.