Theory of operation
We're doing it all backwards. Instead of feeding ground through joystick port pin 8 and reading the directions from joystick port pins 1-4 and 6, we're feeding signals through joystic port pins 1-4 and 6 and reading the result from pin 8 (which is connected to BUSY in LPT port). Ingenious! If you didn't understand any of the above, who cares! Just continue reading, there'll be pretty pictures.
Printer port Joystick port 3 PD0 ------|<------- 1 UP 5 PD1 ------|<------- 2 DOWN 7 PD2 ------|<------- 3 LEFT 9 PD3 ------|<------- 4 RIGHT 11 PD4 ------|<------- 6 BUTTON 21 BUSY -------------- 8 GROUND
Parts and tools
- male sub D9 connector, solder type
- D9 sub connector enclosure
- a few inches of 26-conductor flat cable
- female 26-pole flat cable connector
- 5 1N4148 diodes (any 1N4xxx should work, I had 1N4007s)
- small-diameter heatshrink (or electrical tape)
- a hammer
- soldering iron
- some solder
- wire clippers
- a sharp knife
Anyway, take the hammer, the flat cable and the flat cable connector and connect the two. I think there's an offical tool for getting those flat cable connectors into the flat cable, but I've always used a hammer (I also break half of the connectors I use - super glue to the rescue). Try to fit the cable the right way: imagine plugging the connector into your T and looking at the connectors - the red stripe in the cable should be on the right towards the bar code reader port. If you screwed up, no worries - just have another beer.
Now strip off two conductors from the red stripe side (the BCR port side), and five from the other side (serial port side). These aren't needed and removing them makes the rest of the construction easier as the flat cable is now thinner.
Now is the time to grab another beer. Or third. Fourth. Whatever. Shees, who's counting.
Next we'll be soldering the printer port cable to the diodes. Strip the six remaining conductors of the flat cable so that you have enough copper to solder on. Cut six half-inch pieces off your heat shrink and put them over the conductors. Trust me, this is the right time for heat shrink - not when you're done and it's impossible to get it on to the cables anymore.
Grab another beer.
10 OUT 185,254: PRINT INP(187) AND 4: GOTO 10
That one-liner should respond when you hold your joystick up. If you swap the "254" to 253, 251, 247 and 239 you'll see something happening when the joystick is held down, left, right or when you press the button.
For more complete testing, try this (M100/T102 only - won't work with PC-8201).
10 CLS 20 A$=CHR$(211)+CHR$(185)+CHR$(219)+CHR$(187)+CHR$(119)+CHR$(201) 30 AS=PEEK(VARPTR(A$)+1)+(256*PEEK(VARPTR(A$)+2)) 40 U%=0:D%=0:L%=0:R%=0:B%=0 50 CALL AS,254,VARPTR(U%):U%=U% AND 4 60 CALL AS,253,VARPTR(D%):D%=D% AND 4 70 CALL AS,251,VARPTR(L%):L%=L% AND 4 80 CALL AS,247,VARPTR(R%):R%=R% AND 4 90 CALL AS,239,VARPTR(B%):B%=B% AND 4 100 IF U%=0 THEN PRINT " U" ELSE PRINT " *" 110 IF L%=0 THEN PRINT "L "; ELSE PRINT "* "; 120 IF R%=0 THEN PRINT "R" ELSE PRINT "*" 130 IF D%=0 THEN PRINT " D" ELSE PRINT " *" 140 IF B%=0 THEN PRINT "BTN" ELSE PRINT " * " 150 PRINT CHR$(11); 160 GOTO 50
As of this writing, there are no games which would work with this joystick adapter. Your best bet is to just drink the rest of the beers you bought (you bought plenty, right?).