Hi all,
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 ? Have you heard about an object of a software that could help us make an object out of it ? I guess it would mean to display subtle symbols or sweeps in a Gem window that would be recognized by the gun and transfered to the program so that we get to know the area that was shot. Such a remote control would be interesting for "virtual reality" using Pd.
Thanks,
Alexandre Quessy Montréal, Canada listes@sourcelibre.com
Hallo, Alexandre Quessy hat gesagt: // 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 ? Have you heard about an object of a software that could help us make an object out of it ? I guess it would mean to display subtle symbols or sweeps in a Gem window that would be recognized by the gun and transfered to the program so that we get to know the area that was shot. Such a remote control would be interesting for "virtual reality" using Pd.
There are [hid] and [joystick] objects, but first you need to get support for the hardware into your operating system. I doubt, that these lightguns are supported in major OSses like W,M and L.
Frank Barknecht _ ______footils.org__
This is just a guess, but isn't the nintendo gun just directing an infaread beam? Some computers have an infaread port on them, so maybe it could possibly be detected through that port. I think the IR port is usually used for printers. I am also guessing you could build your own kind of interface for an infaread gun by using a IR reciever that connects to a Keywiz which will translate the signal to a keystroke via a PS/2 port and could easily be interpreted by PD. Of course you would have to build the IR reciever yourself, of modify something exsisting. I know the Keywiz translates very well to PD.
bradon
--- Frank Barknecht fbar@footils.org wrote:
Hallo, Alexandre Quessy hat gesagt: // 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
? Have you heard
about an object of a software that could help us
make an object out of
it ? I guess it would mean to display subtle
symbols or sweeps in a
Gem window that would be recognized by the gun and
transfered to the
program so that we get to know the area that was
shot. Such a remote
control would be interesting for "virtual reality"
using Pd.
There are [hid] and [joystick] objects, but first you need to get support for the hardware into your operating system. I doubt, that these lightguns are supported in major OSses like W,M and L.
Ciao
Frank Barknecht _ ______footils.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
Do you Yahoo!? Send a seasonal email greeting and help others. Do good. http://celebrity.mail.yahoo.com
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 the screen using sub-millisecond timings and a lot of sync; but to differentiate two regions at the same height you'd need two frames (unless i'm missing some trick)
I found this:
http://www.epanorama.net/documents/pc/lightpen.html http://en.wikipedia.org/wiki/Zapper_Light_Gun http://nesdev.parodius.com/zapper_to_famicom.txt
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 way 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 work, but if you need more, try several pins at once (or maybe it doesn't do anything).
Note: If using linux lp driver, you have to ground pins 12,13 (onto, say, 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 http://www.epanorama.net/documents/joystick/pc_joystick.html
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
hi mathieu hi list
i don't really know how this gun works, but i suggest it's slightly different from what you have explained. so have in mind that the following is just a not verified theory. a normal tv-screen (crt) is "scanned" by a electron beam (don't know the correct expression) from top to the bottom in lines probably from left to right. that means in every moment you would see only a point, if your eye would be fast enough. because our eyes are so slow, we have the illusion to see an image, which is redrawed 50 times a second (50 half-frames in PAL). the photosensor of the gun is fast enough to see the point. when you point the target and click, the console detects only at the moment, when the electron beam is drawing the target, if the photosensor detects light or not. if yes, it knows, that you were pointing the target, if no, it knows you were pointing somewhere else. so this also explains, how it works to identify different targets. this works well with a console like nintendo and a crt-screen, because the screen is synchronized to the video-signal from the nintendo. to do something similar with a computer is a little bit more complicated. if my suggestion is right, using a tft-monitor wouldn't work. but even with a crt-monitor you have to conisder different framerates and different resolutions (which means different horizontal line frequencies). how does the gun-interface get a sync-signal? there you come to a few problems to solve.
may it's simpler to follow another approach than the one of the nintendo gun. why not building a gun yourself? maybe colorsensitive, with three photosensors? this means, that your target must have a defined color... other ideas?
roman
----- Original Message ----- From: "Mathieu Bouchard" matju@sympatico.ca To: "Alexandre Quessy" listes@sourcelibre.com Cc: pd-list@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 the screen using sub-millisecond timings and a lot of sync; but to differentiate two regions at the same height you'd need two frames (unless i'm missing some trick)
I found this:
http://www.epanorama.net/documents/pc/lightpen.html http://en.wikipedia.org/wiki/Zapper_Light_Gun http://nesdev.parodius.com/zapper_to_famicom.txt
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 way 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 work, but if you need more, try several pins at once (or maybe it doesn't do anything).
Note: If using linux lp driver, you have to ground pins 12,13 (onto, say, 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 http://www.epanorama.net/documents/joystick/pc_joystick.html
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
hm....
stupid i am. i didn't follow the links below. they explain that quite well
i think i shall go to bed ;)
roman
----- Original Message ----- From: "Mathieu Bouchard" matju@sympatico.ca To: "Alexandre Quessy" listes@sourcelibre.com Cc: pd-list@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 the screen using sub-millisecond timings and a lot of sync; but to differentiate two regions at the same height you'd need two frames (unless i'm missing some trick)
I found this:
http://www.epanorama.net/documents/pc/lightpen.html http://en.wikipedia.org/wiki/Zapper_Light_Gun http://nesdev.parodius.com/zapper_to_famicom.txt
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 way 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 work, but if you need more, try several pins at once (or maybe it doesn't do anything).
Note: If using linux lp driver, you have to ground pins 12,13 (onto, say, 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 http://www.epanorama.net/documents/joystick/pc_joystick.html
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
while on the topic, does anyone know if any of the (few) usb lightguns on the market abstract over all of these low level issues and just appear as a standard HID device?
that would make this all so much simpler ;)
although i like the fact that the nintendo target-frame system would work with a tft (or even better, a projector).
pix.