Hacker News new | ask | show | jobs
by billyhoffman 770 days ago
The game port was amazing. You got 4 ADCs (for the X axis and Y axis of a joystick, 2 joysticks supported) and you got 4 GPIO bins for the "buttons" (2 buttons per joystick, again 2 joysticks supported with 1 port).

If you didn't care about burning CPU, you could bit bang these "button" inputs and interface simple home-brew electronics. The clock line attaches to one "button" pin, the data line attaches to another "button" pin. When button 1 is "pressed" sample the state of button 2! Now you are reading a data stream.

I used this trick to interface magstripe readers directly to computers back in the early 2000s, and even wrote an article for the first issue of O'Reilly's Make Magazine about it. While professional readers/writers were hard to get, cost $100+, interfaced to the parallel or serial port, and used proprietary software, this let me do it for around ~$20 in parts and use my own software. I had quite a lot of fun learning what was stored on the various tracks of the cards I had, like my student id.

https://stripesnoop.sourceforge.net

Fun times of directly accessing hardware.