** 1 page regular / 937 words ** You spin me right round... A treat for Jaguar owners, as Xav presents a T2K compatible controller Although the original arcade version of Tempest featured a spinning handwheel, its Jaguar incarnation, Tempest 2000, uses the left and right directions on a joypad to represent clockwise and anti-clockwise movements on screen. The trouble is that, without practice, this is a far from intuitive arrangement. Thankfully Jeff Minter had the foresight to include code for a rotary controller - like an infinitely turnable steering wheel. So how do you detect a rotary movement? The easiest, if all you want is an clockwise/anti-clockwise signal, is to use a rotary switch. In the case of the T2K controller, a third of the positions (1, 4, 7, 10, etc.) appear as a press of the joypad "Left" button, another third of the positions (2, 5, 8, 11, etc.) appear as a press of the "Right" button. The remaining third are not connected at all. If you were to monitor the outputs from such a device whilst turning the controller, you would see the following patterns:- ** NP ** Clockwise: Left, Right, Neither, Left, Right... Anticlockwise: Right, Left, Neither, Right, Left... ** /NP ** If you want to offer the option for a rotary controller in your own software, therefore, you just have to read the EJP using the standard joypad code, and remember the state of the inputs. Each time you read the inputs you simply compare the current value with the last value, work out which of the two sequences the values correspond to, and store the current position in place of the last one. If you want to make your own controller, it's a simple variation of the joypad circuit diagram presented in issue 4 (and still available on the Renegade CD). If it's purely for use with T2K, you might choose to omit the numeric keypad. It can still be handy to have a reset facility, however, and this can be implemented using a single pushbutton which pulls pin 14 on the EJP low. This fools the Jaguar into thinking that the *, # and 0 buttons on a joypad are being pressed simultaneously. ** T2K_BW.GEM here ** ** Caption ** Figure 1: Schematic T2k controller ** /Caption ** This simplified version of the controller is shown in Figure 1. Depending on the switch and wiring, you may need to swap the two wires leading from the switch to the 74HC244, pins 6 & 13. There's no reason why you can't expand on this to add the full numeric keypad back in again, but unless any programmers start to support it, it seems like a wasted effort. If you do write a program which needs additional buttons, however, give the user the option to use the keyboard, or a joypad plugged into one of the other EJPs. Which brings us onto another point. Because the rotary controller is essentially a modified joypad, it can be used in conjunction with a Team Tap. There is no software to support this at present, but it offers great possibilities for a multi-player overhead driving game (in the style of "Indy 500", or "Supercars") using up to 8 players. Possibly the hardest part of this project is obtaining a suitable switch featuring: ** UL ** * Ability to rotate continuously in either direction, without stopping. You may find that you need to physically modify the switch to remove any locking pins, lugs or stops in order to manage this, which may well involve a complete dissection of the switch. * Low resistance to turning: Maplins sell a "clickless" switch (XX45Y, about one pound each) which does the trick - but it does need to be dissected, and a plastic lug cut out. * Must have a single pole which is switched through all the possible locations - that is, one pin which is connected in turn to each of the outputs as you turn the switch. The total number of switch positions needs to be a multiple of 3 (most are), and the more you can manage, the better. ** /UL ** In fact, the number of positions is a real problem. Many switches have 12 positions, but you need to turn the shaft through three of these to get the ship in T2K to move a single segment of the web. This makes it very hard work to play the game, so the controller needs to be accelerated somehow (and programmers should ideally offer a "scaling factor" in their own games). There a three viable options:- ** UL ** * Arrange a mechanical solution using some form of gearing * Use a large handle and flywheel so that the switch continues to spin once it's going - this is most like the arcade version * Use another type of switch ** /UL ** The last suggestion refers particularly to the use of an optical shaft encoder to replace the switch. I'll leave that as a challenge for anyone interested, but some useful information can be found at: http://GoZips.uakron.edu/~sra/jag_rot.htm Finally, you need to activate the rotary controllers in T2K itself. To do this you need to have two controllers plugged in; you then press Pause on both of them whilst at the game options menu. An "Excellent" will confirm your command, and from then on you will be able to choose the controller type from the menu. Note that until you are 100% certain that your controller works, you shouldn't switch both ports to use rotary controllers, because you won't be able to switch them back again without one. Just switch one of them for the testing phase, and use a joypad in the other port to revert to normal if there are any problems.