[PD] Nintendo gun with Pd ?
reduzierer at yahoo.de
Sat Dec 4 04:04:53 CET 2004
stupid i am. i didn't follow the links below. they explain that quite
i think i shall go to bed ;)
----- Original Message -----
From: "Mathieu Bouchard" <matju at sympatico.ca>
To: "Alexandre Quessy" <listes at sourcelibre.com>
Cc: <pd-list at iem.at>
Sent: Friday, December 03, 2004 11:36 PM
Subject: Re: [PD] Nintendo gun with Pd ?
On Fri, 3 Dec 2004, Alexandre Quessy wrote:
> Pd is quite amazing, and we can do just about anything. It's
> interesting to offer something else than keyboards to interact with
> electronic art. What about a Nintendo or SEGA gun ?
AFAIK, the way the Nintendo gun works is that it is a simple photosensor
that is made very directional by usage of both a lens and a thin cannon.
Therefore, for using it, when a click is detected, the program usually
blanks the screen except for a few targets, and then figures out whether
the gun detects a target.
I don't know how it differentiates between two targets; maybe it uses a
sequence of black frames containing one white region each, and then does
some tight realtime figuring out the exact frame that the gun detected.
It's also possible to figure out in one frame the vertical position on
screen using sub-millisecond timings and a lot of sync; but to
differentiate two regions at the same height you'd need two frames
i'm missing some trick)
I found this:
And from what i can guess,
/ o| 1
5 |o o| 2
6 |o o| 3
7 |o o| 4
1 is ground,
2,3,4 is a serial port for the 8 buttons not in the gun,
5 is +5 volts
6 is a bit (not an analog signal) for the lightgun value
7 is a bit (inverted) for the trigger of the gun
You could use one of the three available parallel port externals as a
to connect to pd. Then you plug nintendo pins 5,6,7 into, say, pins
2,10,13 of the parport. Then you send the 255 byte so that pins 2-9
provide +5V. I hope there is enough amperage in pin 2 for the gun to
but if you need more, try several pins at once (or maybe it doesn't do
Note: If using linux lp driver, you have to ground pins 12,13 (onto,
pin 25) to be able to send anything, else it blocks. Marc Lavallée's
parport external avoids this issue but requires root access to run.
It would also be possible to use the db15 joystick port for that, if
that's easier. See
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
PD-list at iem.at mailing list
UNSUBSCRIBE and account-management ->
More information about the Pd-list