Jump to content
IGNORED

Lightguns


Matthias

Recommended Posts

Hello,

 

i would like to add lightgun-support to one of my homebrew-games.

To do that, i have just acquired a Sega Light Phaser and

a Sinclair Spectrum Magnum (there was no Atari lightgun listed on eBay).

I've seen some description on adapting a Sega-lightgun for use with

Atari 8-bit computers, but i have no informations about the Sinclair-item.

Does anyone here have made experiences with one of them?

 

Looking at the 9pin-DSub-connector both seem to use the same pins:

5 x x x x

x 8 7 6

 

 

Thanks in advance

Matthias

Link to comment
Share on other sites

Hello,

 

i would like to add lightgun-support to one of my homebrew-games.

To do that, i have just acquired a Sega Light Phaser and  

a Sinclair Spectrum Magnum (there was no Atari lightgun listed on eBay).

I've seen some description on adapting a Sega-lightgun for use with

Atari 8-bit computers, but i have no informations about the Sinclair-item.

Does anyone here have made experiences with one of them?

 

Looking at the 9pin-DSub-connector both seem to use the same pins:

5 x x x x

x 8 7 6

 

 

Thanks in advance

Matthias

 

I'd look for a way to adapt the Sega gun because Sinclair items are much harder to find. Sega and Nintendo accessories are much more common.

Link to comment
Share on other sites

I'd look for a way to adapt the Sega gun because Sinclair items are much harder to find. Sega and Nintendo accessories are much more common.

 

But the Sinclair was much cheaper (0.50 british pound to 1.99 british pound) ;-)

 

Ok, meanwhile i've built a first prototype-adapter:

jagltgun.gif

 

I've tested it with my TEAMTAP.JAG-utility (the updated version which

also shows the B0/B2-values) and it seems to work:

The firebutton closes to GND, so for the Jaguar no need to alter the

internal microswitch as it is described for the Atari 8-bitters.

When the lightgun detects a bright area (like the white characters)

the values for B0/B2 change from 1 to 0. This is shown by highlighting

either the PAUSE-button or the C1,C2,C3 table-values.

 

Does any commercial game support lightguns?

 

Cheers

Matthias

Link to comment
Share on other sites

Update:

 

Seems that an inverter for the lightbeam-signal is necessary.

Currently the LPH and LPV-registers are latched when i enter

a dark area. But that fits to what i thought when i read

"A TTL rising edge on LP signal causes the light pen registers

to be latched" in the manual. As written in my last reply, the

SEGA lightgun sends a 0 = GND signal when it detects a bright

area and falls back to 1 = +5V when entering a dark area.

 

Also it seems that the screen is split into two parts horizontally,

the highest value i got for the left part was 1874, in the 11 bits

of the register would fit up to 2047.

 

Matthias

Link to comment
Share on other sites

New update:

 

Here is a small test-program for the lightgun-adapter:

http://home.t-online.de/home/Matthias.Domi...in/lightgun.zip

 

It presents a white border and a black rectangle and prints out

the LP-register values. These will change as long as the lightgun

is directed to the white border and will be stable when you

enter the black rectangle.

For example, the ypos value for the upper edge is about 88,

and for the lower edge of the rectangle about 408.

The left edge is about 1500, the right edge about 600.

 

Matthias

Link to comment
Share on other sites

Disappointing news:

 

I've added an inverter to the adapter, so that the lightbeam-signal

from the lightgun is inverted. Although my TEAMTAP.JAG utility

shows that the signal is inverted, my lightgun-test-program

hasn't changed its reaction, it still detects dark areas instead

of bright areas :(

 

Matthias

Link to comment
Share on other sites

  • 2 months later...
Hi,

 

still wondering how i have to turn the LPV and LPH values into something like pixel-values. The LPV-values are basically scanlines, but what do

i need to do with the LPH values? These seem to be video-clock-cycles.

 

Any idea what to do with them?

 

Matthias

 

 

I think you have been reading it incorrectly Matthias. LPH is the Horizontal Light-Pen Value and LPV is the Vertical Light-Pen Value.

 

LPV is the vertical position measured in Half Lines.

 

LPH is the Horizontal position in Pixels.

Link to comment
Share on other sites

Hi,

 

still wondering how i have to turn the LPV and LPH values into something like pixel-values. The LPV-values are basically scanlines, but what do

i need to do with the LPH values? These seem to be video-clock-cycles.

 

Any idea what to do with them?

 

Matthias

 

 

I think you have been reading it incorrectly Matthias. LPH is the Horizontal Light-Pen Value and LPV is the Vertical Light-Pen Value.

 

LPV is the vertical position measured in Half Lines.

 

LPH is the Horizontal position in Pixels.

 

 

That's what they say in the doc, but from my experience it's not that easy:

 

 

Here is what the Techref V8 says about HC/VC and LPH/LPV:

 

From the Joypad-section:

The LP signals are light-gun inputs, a high level on these

inputs transfers the current horizontal and vertical counts to the

light-pen registers.

 

From the Memory-map:

HC Horizontal Count F00004 RWThis register comprises of a ten bit counter which counts from zero up to the value in the horizontal period

register twice per video line. An eleventh bit determines which half of the display is being generated. The

counter is incremented by the pixel clock. The vertical counter is incremented every half line in order to support

interlaced displays. This register is only for ASIC test purposes.

 

VC Vertical Count F00006 RWThis register comprises of an eleven bit counter which counts from zero up to the value in the vertical period

register once per field. A twelfth bit determines which field (odd/even) is being generated. The counter is

incremented every half line. This register can be read to do beam synchronous operations. It is only written to

for ASIC test purposes.

 

LPH Horizontal Light-pen F00008 ROThis read only eleven bit register gives the horizontal position in pixels of the light-pen.

 

LPV Vertical Light-pen F0000A ROThe low eleven bits of this register gives the vertical position of the light-pen in half lines.

 

 

From my experience, the latched values are the current values of HC and VC, which are not "pixel"-values.

 

Matthias

Link to comment
Share on other sites

Hi!

 

Hi!

 

I have got Atari light gun yesterday. Will it work with your test program? What do you think?

 

You'll have to make an adaptor, and because i don't have an Atari Lightgun, i can't tell you if my adaptor (shown above) will work with yours

( i doubt it). Nick Stone has made another adaptor for a Sega Saturn lightgun, so it looks like each lightgun-type will need a different type of adaptor.

 

Matthias

Link to comment
Share on other sites

That should be Nick (Stone) ;) Stone is my handle, not my name.

 

My Saturn gun is converted, not using an adaptor. It's a fairly complicated process (though reasonably do-able with some skill and/or experience); I made some docs to accompany this - if anyone's interested I can post them here.

 

Basically, as long as the light-sensor is connected to pin6 of the Jag port and the polarity used is the same, it should work. The extra work I did on mine was to make the gun respond to single buttons rather than columns - the trigger acts as FireB and the 'start' button as FireA. Just using a pin-to-pin adaptor like Matthias's would require the trigger to act as a whole row and the startbutton as a whole row, for example pressing the trigger would make the Jag think A,B,C and Option were pressed together, and pressing the 'start' button would make DPad3, 1,2 and 3 active.

 

Whether this is a better solution is up to the individual coders - personally I think a little extra work in making the buttons individually 'pressable' will help them out a lot, as they can then use common joypad-reading code as far as detecting button-presses is concerned.

 

I know for a fact that my Saturn gun is the nicest solution from the looks point of view ;-) It's also fairly comfortable and has a nice trigger action.

 

Matthias: testing your program last night, I noticed that with the gun *absolutely* still (I tripod-mounted it) the horizontal value seems to 'count' up (very fast) and keep resetting to one base value. It made me wonder if the word 'pixel-clock' in the dev manual implied that your code needs to synchronise the signal from the lightun-registers with the display generation. I have no clue how this would be done though, sorry.

Maybe adding the facility to slow down your program (use the MOD-player! lol) and displaying the register values in binary could help us track this down.

 

Stone

Link to comment
Share on other sites

From my experience, the latched values are the current values of HC and VC, which are not "pixel"-values.

 

Matthias

 

I can't imagine why it works for me but doesn't work on yours... perhaps this is an NTSC/PAL issue, or you are running in a different screen resolution. If I get a chance to dig into it I will look at the code and see what I was doing.

Link to comment
Share on other sites

From my experience, the latched values are the current values of HC and VC, which are not "pixel"-values.

 

Matthias

 

I can't imagine why it works for me but doesn't work on yours... perhaps this is an NTSC/PAL issue, or you are running in a different screen resolution. If I get a chance to dig into it I will look at the code and see what I was doing.

 

I'm using VMODE = $4C1, which is pixelwidth = 3 clock-cycles i think.

And i'm using a tv-set connected with RF-cable, always expecting the worst.

 

Matthias

Link to comment
Share on other sites

So if abybody wants to build adapter for Atari XE light gun here is the scheme:

 


Jaguar Atari light gun

(15 pin cannon) (9 pin cannon)

 

lightbeam 6 --------------------- 6

Ucc+5V 7 --------------------- 7

GND 9 --------------------- 8

Fire 10 --------------------- 1

 

Link to comment
Share on other sites

T-bird,

I know they were planning on making it for the jag

(remember back in the old genie days at the dateline atari rtc

I belive I was the one asked about it  :)  )

Dan Iacovelli

 

I just recall it as one of the many hundreds of "announced" titles that never were even started. I could be wrong about it, but I think this was the case with this game.

Link to comment
Share on other sites

I recall chatting with someone on ICQ some time back about the possibility of a Light Gun for the Atari Jaguar and the mention of Mad Dog McCree on CyberRoach.com. Soon after our discussion, (maybe a week went by) someone had posted something about Mad Dog McCree on JI2, if my memory is accurate.

 

:?

 

I thought that someone had stated that a prototype did existed, but no light gun for the Atari Jaguar was ever known to exist. This is not necessarily true... but I thought that was the case.

Link to comment
Share on other sites

I recall chatting with someone on ICQ some time back about the possibility of a Light Gun for the Atari Jaguar and the mention of Mad Dog McCree on CyberRoach.com. Soon after our discussion, (maybe a week went by) someone had posted something about Mad Dog McCree on JI2, if my memory is accurate.  

 

:?  

 

I thought that someone had stated that a prototype did existed, but no light gun for the Atari Jaguar was ever known to exist. This is not necessarily true... but I thought that was the case.

 

 

How could there be a prototype of a game that is 100% lightgun based exist for a console that supposedly has no lightgun. It makes little sense. I really doubt that the title was ever started coding. It was another one of those titles that developers promised to Atari and then they never worked on.

Link to comment
Share on other sites

How could there be a prototype of a game that is 100% lightgun based exist for a console that supposedly has no lightgun.

 

They could have added pad support, or hacked an existing gun like the 5 or so people with Jag guns. It's really quite trivial to do and developers are likely to have someone with enough electronics experience to do it hanging around the office ;)

 

I really doubt that the title was ever started coding. It was another one of those titles that developers promised to Atari and then they never worked on.

Agreed.

 

What was this game like on the PC? I saw it advertised ages ago but never a review...

 

Stone

Link to comment
Share on other sites

My Sega Light Phaser is somewhat old and has screws that were rusted or otherwise damaged. I'm having problems getting a grip on the screws down a shaft on the handle of the gun, where the wires come in the base of the handle.

 

Now, I've done a search for "stripped screw removal" (although I'm not sure these are completely stripped) and I came up with some suggestions. One was to take apoxy glue to the head of the screw and glue something to the screw head, however you risk gluing the head of the screw to the base and may have to heat the glue and start over. The other option is to use a flexible shaft and create a new groove. That option seems rather unlikely with the shaft of the screwhole. Any other suggestions?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...