Silicon ChipA PC Games Port Tester - June 2001 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Silicon Chip: on the upward path
  4. Feature: A PC To Die For - And You Can Build It For Yourself by Greg Swain
  5. Feature: Weird & Wonderful: New Generation Pilotless Aircraft by Bob Young
  6. Feature: Win Two Uniden Mini 2-Way Radios by Silicon Chip
  7. Project: A Fast Universal Battery Charger by John Clarke
  8. Project: Phonome: Call, Listen In & Switch Devices On & Off by Leon Williams
  9. Book Store
  10. Feature: Using Linux To Share An Internet Connection; Pt.2 by Greg Swain
  11. Project: Li'l Snooper: A Low Cost Camera Switcher by Jim Rowe
  12. Project: A PC Games Port Tester by Trent Jackson
  13. Order Form
  14. Product Showcase
  15. Back Issues
  16. Vintage Radio: The miniature STC A-141 mantel radio by Rodney Champness
  17. Notes & Errata: PowerPack, AA-cell White LED Torch, LP Doctor, 4-digit Counter
  18. Market Centre
  19. Advertising Index
  20. Outer Back Cover

This is only a preview of the June 2001 issue of Silicon Chip.

You can view 33 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • A PC To Die For - And You Can Build It For Yourself (June 2001)
  • A PC To Die For - And You Can Build It For Yourself (June 2001)
  • A PC To Die For; Pt.2 - You Can Build It Yourself (July 2001)
  • A PC To Die For; Pt.2 - You Can Build It Yourself (July 2001)
  • A PC To Die For; Pt.3 - You Can Build It Yourself (August 2001)
  • A PC To Die For; Pt.3 - You Can Build It Yourself (August 2001)
Articles in this series:
  • Unmanned Air Vehicles: A Force To Be Reckoned With (April 2001)
  • Unmanned Air Vehicles: A Force To Be Reckoned With (April 2001)
  • Global Hawk: America's Advanced Unmanned Aircraft (May 2001)
  • Global Hawk: America's Advanced Unmanned Aircraft (May 2001)
  • Weird & Wonderful: New Generation Pilotless Aircraft (June 2001)
  • Weird & Wonderful: New Generation Pilotless Aircraft (June 2001)
Items relevant to "A Fast Universal Battery Charger":
  • ETD29 transformer components (AUD $15.00)
  • Wiring diagram for the Multi-Purpose Fast Battery Charger II (Software, Free)
  • Multi-Purpose Fast Battery Charger II PCB patterns (PDF download) [14106011, 14302982] (Free)
  • Panel artwork for the Multi-Purpose Fast Battery Charger II (PDF download) (Free)
Articles in this series:
  • A Fast Universal Battery Charger (June 2001)
  • A Fast Universal Battery Charger (June 2001)
  • A Fast Universal Battery Charger; Pt.2 (July 2001)
  • A Fast Universal Battery Charger; Pt.2 (July 2001)
Items relevant to "Phonome: Call, Listen In & Switch Devices On & Off":
  • PIC16F84(A)-04/P programmed for the Phonome [DIALUP.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F84 firmware and source code for the Phonome [DIALUP.HEX] (Software, Free)
  • Phonome PCB pattern (PDF download) [12106011] (Free)
  • Panel artwork for the Phonome (PDF download) (Free)
Items relevant to "Using Linux To Share An Internet Connection; Pt.2":
  • Linux script files for Internet Connection Sharing (Software, Free)
Articles in this series:
  • Using Linux To Share An Internet Connection; Pt.1 (May 2001)
  • Using Linux To Share An Internet Connection; Pt.1 (May 2001)
  • Using Linux To Share An Internet Connection; Pt.2 (June 2001)
  • Using Linux To Share An Internet Connection; Pt.2 (June 2001)
  • Using Linux To Share An Internet Connection; Pt.3 (August 2001)
  • Using Linux To Share An Internet Connection; Pt.3 (August 2001)
  • Using Linux To Share An Internet Connection; Pt.4 (September 2001)
  • Using Linux To Share An Internet Connection; Pt.4 (September 2001)
Items relevant to "Li'l Snooper: A Low Cost Camera Switcher":
  • Li'l Snooper PCB pattern (PDF download) [02106011] (Free)
  • Panel artwork for the Li'l Snooper (PDF download) (Free)
Items relevant to "A PC Games Port Tester":
  • Games Port Tester software and labels (Free)

Purchase a printed copy of this issue for $10.00.

When you plug a game controller or joystick into the games port on your PC and fire away, something should happen! But if it doesn’t, what’s to blame: the games port, the games controller/joystick or perhaps even the software? This simple Games Port Tester will at least tell you whether the port itself is OK. It’s simple to make, simple to use and will cost next-to-nothing to build. Design by Trent Jackson T his Games Port Tester, or GPT, is arguably the simplest possible way to check to see if the games port is functioning correctly. Initially, the project was created to test and experiment with the quality and accuracy of the games ports on various low-cost sound cards. But it is just as happy testing the games ports 80  Silicon Chip which are fitted to most PCs. It will test both sides of the port – Player 1’s “X” and “Y” axes and fire buttons and similarly Player 2’s “X” and “Y” axes and fire buttons. This is accomplished by simply flicking a switch. The software written to suit this project features an auto calibration control and toggle control between both players, along with smooth, sprite-free graphic movement on the 100K and 200K systems. What’s in a games port? The games port is more or less just a resistance-measuring device. Normally, a joystick is connected to the games port. Inside the joystick are two potentiometers, or variable resistors, which adjust as the joystick is moved. One pot is assigned to the X (horizontal) axis and the other to the Y (vertical) axis. Change the resistance in the X-axis (by moving the joystick back and forth) and the cursor (if there is one) moves across the screen. Change it in the Y-axis and the cursor moves up and down the screen. Change both at the same time and the cursor moves at an angle across the screen. The games port interprets the X- and Y-axis movement, the speed and the distance. It then feeds this information to the software being used at the time and the software makes use of this information as it requires. The other part of the joystick is the “fire” button which, as you have probably guessed, simply closes a switch. Again, the games port detects this and causes an action within the software running at the time (not surprisingly, usually some sort of weapon firing!).   Games Port Tester – Block Diagram The GPT move to the left, again in proportion to the initial value. The same applies to the Y-axis, except that movement will occur in the vertical direction – up and down the Because a games port is such a simple device, a games port tester can also be very simple. All you need are two variable resistors to check the X- and Y-axes and a pair of push-button (momentary action) switches to check the firing. In addition, we include a DPDT, centre-off switch which is used to toggle between Player 1 input and Player 2 inputs. So as you can see the GPT is a very simple device, at least hardware-wise. The software is a slightly different story. It has to be able to detect the varying resistances in each axis as well as the push-button positions. Let’s assume that the variable resistor which controls the X-axis is rotated clockwise. This will cause the resistance value being seen by the games port to increase, thus causing the software to move the circle on the grid to the right, in proportion to the to the initial value of the resistance. Now if that same resistor is rotated anti-clockwise, the resistance value being returned to the port will decrease. Thus the circle on the grid will screen, as the resistance is increased and decreased. Testing the games port then involves comparing the X and Y-axes values that the software prints on the screen A look inside the Games Port Tester. All wiring is point-to-point; that is, no PC board or other support is required. June 2001  81 Three switches, four diodes and two pots make up the games port tester. and checking to see how stable the circle graphic is in movement by rotating the X and Y knobs on the GPT. The value shown on the screen is directly proportional to the value of resistance, within a tolerance of about 10%. Construction All wiring is point-to-point due to the minimal number of components involved. Start by drilling the holes in the jiffy box for the two pots and three switches. The pots mount on the lid of the box, the two pushbuttons on each side and the toggle (changeover) switch on the end. At the opposite end of the box you’ll need a 10mm hole for the 2m long, 9-conductor cable which connects to the D-15 plug. It’s a good idea to strip this cable and fit it before fitting anything else, as everything basically wires to this cable. Strip off around 200mm of outer insulation and fit a cable tie to the cable at the point it exits the box to make it captive. A grommet fitted to the cable prevents wear and tear. If you don’t have a short length of red wire to connect the two “hot” ends of the pots together, you might have to strip off, say, another 60mm and sacrifice the other colours. By the way, when we say 9-conductor cable there are actually ten conductors, one being the braid or shield (earth). 9-conductor shielded cable may not be all that easy to obtain – Altronics have it (Cat W-2712), as do Jaycar (Cat WB-1578). But if you have to, you could use 12-core and ignore three. If you use similar-sized push buttons to those used in the prototype you will find that they nearly touch when fitted. This makes them a handy mounting point for the four diodes, which connect between the switches and the D-15 wiring, in all cases with the cathodes (striped end) towards the switches. The anode ends solder direct to the wires with nothing else to support them. A link connects one pole of each pushbutton switch, with the shield of the cable (earth) also connected to this link. If there is any danger of the shield shorting to another wire or component, fit a short length of insulation over it first. The same comments apply at the other end of the cable (ie, at the D-15 plug). Parts List Games Port Tester 1 Jiffy box, 68 x 130 x 43mm 1 label to suit 2 SPST momentary-action (push on) push button switches 1 DPDT centre off miniature toggle switch 2 metres 9-core shielded cable 1 D-15 male connector 1 D-15 backshell 2 large knobs (25 to 30mm diameter) with flat surfaces 2 knob labels, “X” and “Y” 1 grommet 3 small cable clamps 2 10mm lengths spaghetti insulation or heatshrink tubing Semiconductors 4 1N914 small signal silicon diodes A close-up of the “business end” of the tester, showing the four diodes soldered directly to the pushbutton switches and the wiring back to the D-15 plug soldered to these. The big red thing is a piece of insulation over the cable braid. 82  Silicon Chip Resistors 2 100kΩ linear potentiometers Follow this wiring diagram and you shouldn’t have any problems building the tester. The numbers refer to the pin numbers of the D-15 plug. At right are the four labels you’ll need to glue to the box and knobs. The label at top is for a floppy disk if you want it. It’s best to photocopy these! Using the wiring diagram as a guide, solder the various components and wires in place. Cut the various wires to appropriate lengths and bare only the last 5mm or so to minimise the likelihood of shorts. Be especially careful around the changeover switch. A couple of cable ties can hold the various conductors together and make for a neater job. After checking that your wiring is OK, fit the lid to the box and glue the label in place. It covers over the Here’s the almost-assembled D-15 plug. All that remains is to fit the top cover and screw the two halves together. The cable clamp is the metal fitting immediately before the cable exits the backshell. Also note the insulation (heatshrink) fitted to the earth braid. screw holes - hopefully you won’t have to open the box up again. By the way, we use 3M “repositional spray adhesive” to fix paper labels to boxes. Fit the large knobs and the internal assembly is complete. The D-15 plug If we said be careful soldering to the changeover switch, be doubly careful with the D-15 plug. There is very little space between the pins and it’s easy to have one strand of copper bridge out two pins. This will not only stop your GPT working; it could actually damage your computer. And you wouldn’t want that, would you! Again, follow the wiring diagram very carefully to ensure that you have the right colour wire going to the right colour pin. As we mentioned before, you should slip a length of insulation over the earth braid to make sure it cannot short to other pins. When you have completed wiring the plug - and double checked that you haven’t any shorted pins - it’s time to assemble it into its “backshell”. First of all, fit the cable clamp June 2001  83 Even if you don’t understand BASIC, you can get a good idea of how the software works by following this flowchart and comparing it with the relevant lines of code in the listing. You can download the BASIC from www.siliconchip.com.au Testing as shown in the photograph - it does nothing except provide strain relief for the cable. Then drop the plug into one half of the backshell, pushing it down into its position so that the lip on the front of the backshell holds it in place. The strain-relief clamp you fitted before occupies a place near where the cable emerges from the shell. There are two “captive” screws which are used to hold the plug in the PC socket. These are sometimes a pain to fit because one wants to fall out as you fit the other one! The trick is to fit the other half of the backshell, then open each side up again just slightly while you push the screws through into place. You will note that each half of the backshell is identical with a round hole and a hex hole. This means that one of the backshell securing screws goes in from one side, with its hex nut on the other side, and the other screw goes the opposite way around. Actually that hex hole is handy because it holds the nut without pliers or a nut driver - all you need is a screwdriver. 84  Silicon Chip Assuming you have checked everything twice, plug the GPT into the games port on the computer and turn your computer on. Of course, you’ll need to run the software (joytest1. exe). When you do, you should see a red circle somewhere on a green grid. Now you need to calibrate the software to your hardware by centring the circle to the cross on the grid. Adjust the two pots to the centre position, then press any key to finish the calibration process. With proper calibration, the red circle should be very close to the centre cross on the grid. If not, repeat the calibration. Now assuming that all is well, you should be able to rotate the X and Y knobs and be presented with a moving circle across the grid, in proportion to the movement of the knobs. If the games port is operational you should be able to move the circle to all four corners of the grid by combining the X and Y co-ordinates. On-screen in- structions explain all the various key functions so use should be reasonably straightforward. The software The software is written in BASIC language and, as such, it is quite easy to follow. To assist you further, most of the lines have remarks to explain their function. Both the source code (.BAS) and executable (.exe) files can be downloaded from the SILICON CHIP website (www.siliconchip.com.au), As well as checking out the games port, reading through the BASIC file is an excellent way to learn a little about the BASIC language and how to move graphics in the BASIC language with minimal flicker and without the need to create and use sprite graphics. It’s also an great way to learn more about the various features and functionality of the games port on your PC, a port which often gets little use and is even less understood. Who knows, you could develop an SC even better way to use it! To learn more about PC Games Ports, refer to the series of articles "Experiment with Games Ports”published in SILICON CHIP between January 1992 and November 1994 (not in every issue!) Most of 1992 issues are now sold out but reprints can be supplied. Refer to the index pages of the SILICON CHIP website for months of appearance.