Path: utzoo!attcan!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!decwrl!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclkms!ken From: ken@hpclkms.HP.COM (Kenneth Sumrall) Newsgroups: comp.sys.atari.8bit Subject: XF551 Disk drive Message-ID: <1270002@hpclkms.HP.COM> Date: 4 Sep 88 19:26:22 GMT References: <880815-162514-1059@Xerox> Organization: HP NSG/ISD California Language Lab Lines: 50 / hpclkms:comp.sys.atari.8bit / lackey@Alliant.COM (Stan Lackey) / 8:07 am Aug 24, 1988 / >Number 4. Back to Sega. Suppose my widget had an orifice for connecting >the Sega lightgun to the Atari, doing the rewiring internally. I assume >it would be programmed using the light pen facilities already in the Atari. >How many lines does the light pen use? I ask because I need one of the port >wires to control the glasses. > >Fun, fun! -Stan Allow me to quote from the Atari Tech Ref. "When any one of the joystick trigger lines (pin 6) is pulled low, the ANTIC chip takes the current VCOUNT value and stores it in PENV. The horizontal color clock value (0-227 decimal) is stored in PENH. The least significant bit is inaccurate and should be ignored. Since there are a number of delays involved in displaying the data and changing the light pen register, each system must be calibrated. Software which uses the light pen should contain a user-interactive calibration routine. For example, the user could point the light pen at a crosshair in the center of the screen and the program could compute the required horizontal offset. PENH will wrap around from 227 to 0 near the right hand edge of a standard width display because of the delay. The pen will not work if it is pointed at a black area of the screen, since the electron beam is turned off. It is a good idea to read two (or more) values and average them, since the user will probably not hold the pen perfectly steady." End of quote. Now, for your enjoyment pleasure, I shall add some (probably obvious) commentary. In addition to using the trigger line, the gun will also need to use the power and ground lines. There is some limit on the current draw from the joystick, but I can't seem to find it right now. Just exercise caution as you hook up more things to one port. If you really need to now, send me e-mail, and I will try to locate the info. Of course, someone will need to know what locations PENV and PENH and VCOUNT and their shadows live in, so here is the list. NAME LOCATION SHADOW ---- -------- ------ PENH $D40C $234 PENV $D40D $235 VCOUNT $D40B N/A Good luck with the project, and let us know how it turns out. I don't have time to do the project myself, or I would give it a shot. Kenneth Sumrall ken%hpclkms@hplabs.hp.com ...!hplabs!hpclkms!ken