Issue 33: July 2003
Features
- | Foreword
- | JagFest UK 2003
- | Atari Preservation Project 2003
- | Tip of the day
- | Brain Wave Lab
- | Error In Line 3
- | The Greatest Sequencer Known To Man
JagFest highlights
- | Rotary Controller
- | Nuon Experience
- | How to Win
- | My Atari Moments
- | Nuon be Good?
- | Jaguar Lightgun
- | WarBalls
- | JagStick Interface
Reviews
- | Enter the Matrix
- | Manga Puzzle 1.1
- | Atari Anniversary Edition
| JagStick Interface Shiuming Lai interviews Steve Moss By the time the Jaguar came to market, joypads had long replaced joysticks as the controller type bundled with game consoles. Even Atari's previous console effort, the XE Game System of six years earlier, was behind the trend with its smart colour-coded incarnation of the venerable CX40 joystick. Joypads may be fine for certain games but there are good reasons why arcade machines still use sticks, and third-party arcade-style sticks are available for modern consoles. One person determined to change the situation for the Jaguar is Steve Moss, who demonstrated at JagFest UK a prototype of his JagStick adapter for interfacing a common PC joystick controller to the Jaguar. Shiuming: Let's start with your personal Atari history... Steve: That's difficult, I guess first came across Atari in the arcades during the late seventies while on holiday although I spent most of the time playing the bandits I used to take time off to play the Atari Star Wars game, especially the Star Wars with big sit-down cabinet plus classics like Space Invaders and Defender. Then in my early teens (the early eighties) a cousin's boyfriend had a VCS (one of the old six-switch wood panel ones) that he used to leave with them upon which I spent most of the day playing while visiting them, the VCS eventually passed into my hands and upon its death was replaced with one of the black plastic slimline (Darth Vader) models. I ended up with a reasonable collection of about 50 games for it, then once I started working and had some money I purchased my 520STFM in 1990. Following a long period of non-use and a shortage of space I sold the VCS, something I now regret. Over the years I upgraded the ST first to 1 MB then to 2.5 MB and added an 80 MB external hard drive, then with a view to using an Atari on-line I purchased a 4 MB Falcon around 1997 and it was at this time that I also purchased my first Jaguar. About a year later I purchased a second hand 7800 with a few games although I don't use it much as the sound has a lot of noise on it. In 2001 I finally decided to purchase a Jaguar CD unit plus a second Jag to go with it. The reason for purchasing the second Jaguar was that I had heard some games did not function very well via the CD unit and so I decided to set one up with a permanently attached CD unit and use the other mostly for cartridge games thus preventing me from having to keep plugging the CD unit in and out should I ever encounter and want to play an incompatible game. Shiuming: What was the inspiration behind your adapter and what were the development processes and milestones? Steve: Inspiration: There were several reasons why I created this I thought that some games, especially the flight type games, may be better to play with a joystick. I found that it was difficult to find the buttons on some games (such as the Option button for firing mini-rockets in Skyhammer, why use that one?) and thought that it may be easier to select various weapons/change shield configurations or whatever on some games that use the phone pad if I could use one hand to do that on the phone pad while retaining control of my character/object with the joystick. I though this may be particularly useful for BattleSphere owners. If you look closely at the photo of me on page three of your JagFest report you should just be able to see that I am using the Jagpad to select the different weapons and turn the advanced control on/off. Since someone, possibly Dark Knight Games stopped making Jaguar joysticks the only methods of using a joystick were various hardware hacks posted on the internet, unfortunately these are real hatchet jobs that require you to drill holes in your Jagpad for cables and cut the connectors off your joystick cable which ruins both devices. I thought that's mad, there has to be a way of doing it that does not require damaging both items. Development: Obviously the first stage of development is to list the device specifications (everything you want it to do) then decide how to do that. One of the first things to do was find a circuit diagram of the Jagpad controller as this would not only show me how it worked but also provide me with the all important pin connections. I had decided to use a PC analogue joystick because these are easily available and so the next problem was how to convert this to digital, having considered several options I decided to use a PIC microcontroller (a single chip 8-bit computer with on-board NVRAM for program storage) as it was virtually a one-chip solution that took up little space, although the prospect that I might have to try and learn assembler and the 220-page data sheet for the PIC were a little daunting. The next task was to consider how to intergrate the PIC's 8-bit output with that of the Jagpad, it did not take long to decide that the best approach was to use tri-state buffers controlled by the same strobe lines used to select the Jagpad's switch banks for routing the appropriate bits to the Jaguar. With all this done the next task was to draw the circuit diagram, it took a few minutes to draw a block diagram and about an hour to complete a working full circuit diagram that I could use to create the PCB layout, the actual IC pin numbers/assignments were not fixed until completion of the PCB to allow maximum flexibility in signal routing. It took about a week to complete the PCB layout, with the IC pin assignments fixed I now knew which bits of the PIC's output were doing what and could start on writing the program. Although the acutal program only took about a week to write and check I kept messing about with little bits as I had found some compiler software that would let me write my program in BASIC, but it took eight weeks to arrive from only eight miles away due to a big administration cock-up. This was very frustrating as I had the idea for this shortly after the release and my purchase of a copy of Skyhammer, but the impetus for getting off my backside and actually making it was to show it at the JagFest, the delay resulted in the original version being completed and tested during the last week in May as opposed to the more leisurely end of April it would have been otherwise. I considered the original board too big to be practical but the software delay left me very short on time, thus I was stripping down my original board for the components and assembling the new, smaller (2.75 x 3.75 inches) double-decker board presented at the JagFest, on the 11th of June! Good job there was only one minor error on the new PCB otherwise it may never have made it. When it came to testing the electronics the original PCB worked perfectly first time as well it should except that I had forgotten the need to use pull-up resistors for the joystick's fire buttons, an easy fix. Between the PIC's data sheet and the compiler's not-too-clear-in-places fifty-page manual and even less clear example programs, I actually managed to put together enough information that I had a reasonable idea of what was going on, consequently there were only a couple of glitches in the software that stopped it from working. The first of these were two lines of code used to check the status of the A to D conversion, although the compiler did not throw this up as an error it stopped the whole program from running, I had to strip down the program and test it a section at a time in order to find the error. The defective code was quickly replaced with a delay loop. Now I knew the whole program was running as the joystick button outputs were now operating, although the direction outputs were not responding as well if at all. After checking my calculations for the ADC timings and adding a couple of hundered nanoseconds to each delay just to be on the safe side the unit was working correctly, although I later had to reduce the resolution of the sensitivity control to ensure that all directions became inactive as the joystick was returned to its centre position. Shiuming: What are the present and planned features? Steve: Present features: Allows the connection and use of both an analogue joystick (mandatory) and Jagpad (optional) to a single input port on a Jaguar, Falcon, TT, STE and ST (Note: Connection via a standard 9-pin joystick port such as those on the ST will only accept directional and fire controls. Joystick and joypad can be used either individually or at the same time. No external power source is required as power is taken from the host system Planned features: I think it's pretty much perfect in that it does what I designed it to do, I was hoping that it would a universal adapter that could be used on the majority of Atari systems although all the information I have managed to find so far shows that the VCS does not have a 5 V connection on its joystick port and I am unsure about the 8-bit computers. With this in mind the addition of an external power socket is one alteration I may make. Obviously being able to use a USB joystick would be nice but don't hold your breath for this, unfortunately investigations into USB compatible microcontrollers show that at present they can only be used as slave devices, not host devices. Making the adapter was easy, all I had to do was see how the Jagpad worked and make it compatible with that, the big problem is that although there are plenty of things that I could have implemented how could I be sure they worked if there is no compatible software, equally how can the software developer be sure their software works without the hardware to test it on? It's catch 22, unless there is an Atari specification to follow we (hardware and software developers) have to discuss and define a specification before work is started, this would require a level of collaboration (not general help) that I believe does not currently exist in the Atari community. For a start how would you contact all the relevant parties? If there was just one place on the internet where every Jaguar user/developer hung out there would not be a problem - one post and all parties would see it, however it appears that lately the number of potential places to communicate in the form of Atari web forums and MSN/Yahoo groups seems to be growing steadily never mind the existing news groups while somewhat ironically the number of Atari users is probably diminishing. Anyone remember the old maxim "United we stand, divided we fall"? Could we be any more divided, why should we have to post to and check half a dozen different Jaguar sites when we could just do it once at one site? Why are we making things difficult for ourselves? It seems like lunacy to me although I would be more than happy if someone could prove me wrong on this. Another factor against making any other additions/improvments is one of time, the longer I delay while working on additions the more invasive the USB joystick will become until I can no longer find D-type game port joysticks to use with the adapter. It's really do it now while I can still get the joysticks or possibly next year/never depending on if I can ever understand enough about USB, circuits - I'm a god but USB is mostly software. Shiuming: How does your design cope with the differences in Jaguars with respect to the analogue input method? This is something I was only recently made aware of, by Tyrant. Basically the early Jaguars, the K series, had built in ADCs (Analog to Digital Converters) to read analog inputs, but Atari removed them in a cost-cutting move when they made the M series, although I have heard that some later numbered K series models also lack the ADCs. Atari specified the data should be converted to digital in the controller itself. Only one game, BattleSphere (and BattleSphere Gold), currently supports analog inputs, but it uses the original method, which will only work on Jaguars with the on-board converters, the K series, or ones which have been modified to include the parts Atari didn't include. Matthias Domin has made a guide to add the ADC's to M series jaguars, located at http://home.t-online.de/home/Matthias.Domin/janalog.html Tyrant Steve: Although I provided the analogue outputs my only reason for doing was so that I could try using them with my Falcon, it was only while talking to Tyrant at the JagFest that I learned of the Jaguar having analogue inputs. The analogue signal currently provided is compatible with the ADCs originally fitted in the Jaguar, as for this magic format Atari recommends for use with Jaguars not fitted with ADCs I'm looking into it. Having said that it probably won't come to anything for two reasons: first, I am already using three quarters of the PIC's program memory and there may not be any room to fit the additional commands - second, even if I could it might require significant changes to the circuit which could lead to the delay problems mentioned earlier and finally not to mention most importantly is that it's catch 22 again. If someone really wanted to try using analogue inputs and is prepared to pay for it I could create a custom unit for them to test it on, however I doubt that it is economically viable. Shiuming: The versions you showed at JagFest were prototypes, what about further integration of the circuitry? Single board? Multi-layer? Steve: Not at the moment, although using surface mount components and multi-layer PCBs would help reduce the size it would probably triple the cost to a point where both I would not be happy selling and many would not be happy buying it. Using a multi-layer board with standard components would not improve anything. I could not make a single board smaller than the current double-decker model, in fact as you may have noticed the current version is nearly two inches shorter than the original single board version (Shown above - Ed). Having said that, should a USB version arrive I may go to a single board version and include some features I decided were unfeasible in the current version. It's a question of space, one of my aims was to make it as small as possible considering that it may have to find space on a desk along with a monitor, computer and other external devices such as CD drives, modems and a mouse not to mention the joystick itself and possibly a Jagpad. While standing it upright on its side would save space it will also place a strain on any attached cable as well as being unstable, a single board would require a larger case and a logical size for this would be roughly 12 x 12 inches (the size of a Jaguar) as this would allow a Jaguar/VCS to sit on top of it thus saving space, you could also place an ST or Falcon on top of it which should be relatively stable although not ideal as there would be some overhang plus the additional height may increase tendon and wrist strain while typing for long periods. Shiuming: You mentioned a case, this was to by my next question. What did you have in mind, specifically? Steve: If/when it goes into production it will be cased, although I think it looks quite good as it is, not encasing it would be very amateurish and fall far below my personal quality standard as well as increasing the risk of either physical or electrical damage, not just to it but more importantly to the host machine also it would eventually look grubby and become full of dust. It is a question of how and cost, encapsulation may prove cheaper than having a custom case made but would be impossible to repair, not that anything I've built has ever needed it. Shiuming: Is there anything else you'd like to tell us? Steve: These may be of interest from a technical viewpoint... Although it would have been nice to be able to retain the use of the joystick for the PC it was necessary to add some additional wiring to make its outputs Jaguar-compatible, this is due to the fact that the ADCs in the PIC and those originally fitted to the Jaguar are different types to those used by the PC - life's never that easy is it! As the Jaguar and PIC use seperate clock sources one of my major concerns was that of timing issues, in other words what happens if the PIC updates its output as the Jaguar is reading it? Would the Jaguar read part of the old output and part of the new, inderterminate values as it caught them on the change or would either update so fast that the change would go unnoticed and either the old or new data would be read? The only possible way of avoiding this was to use the fourth Jagpad strobe line (which is unrelated to any of the joystick outputs) as a control line so that the PIC would only update its output when this line went low, however information I found concerning these ports on the Falcon suggested that the strobe lines were under software control. If that was the case it leads to the possibility of it either not being activated at all or less frequently than those for fire and direction, resulting in a slow, unresponsive stick, after all you don't need to check the Option button as often as fire and directions. This has recently been confirmed by Carl Forhan (Songbird Productions) - thanks, Carl. Ninety percent of all designs end up as compromises, either one thing has to be sacrificed to allow another or something has to be implemented in a less than ideal way and this was no different. While I did try this approach I did so in a less than ideal way using a spare ADC channel which proved unreliable as I thought it might because the strobe time on the test game was barely equal to the minimum ADC conversion time. Using a digital input may have produced better results but I was unprepared to sacrifice ST compatibility and board size by using a bigger PIC unless I was sure that there would be a problem. Thankfully it does not appear to be causing any noticeable problems, if there are any it is likely to result in an over-responsiveness so just put it down and pick up the conveniently attached Jagpad.
Steve Moss, 32, is an electronics laboratory technician at Cambridge University, England. This is very convenient for his JagStick project. I work at the Department of Engineering, I don't do much in this respect any more which is why I have time to mess about working on personal projects like this. Officially I'm a lab technician and just shunt equipment around although in reality I still do more than that, before internal power struggles shut us down I used to be part of a small team producing one-off equipment for research students and it was during this time that I learned to use CAD software for producing schematic (circuit) diagrams and PCB/panel layouts which was the bulk of my work for the group and was in addition to my technician duties. Occasionally when they were really pushed I used to receive the schematic with the instruction "build this" and from there did everything involved in producing a cased working unit including the actual manufacturing of the PCB (exposing it to the artwork, etching away the unwanted copper and tin-plating the tracks to improve soldering). I no longer get involved in the actual etching of the PCBs as following an incident where someone melted through the etching tank, use of the equipment was restircted so now I just provide the PCB material and a file on a floppy and pick up a hopefully useable board the next day.
Shiuming: Steve, thank you for your this interview, it's been truly fascinating to learn what went into that little PCB you showed us. shiuming@myatari.net
[ Top of page ] | MyAtari magazine - JagFest highlight 8, July 2003
Copyright 2003 MyAtari magazine