Jump to content
IGNORED

lightpen/"phaser gun"?


Recommended Posts

I know that for the commodre 64 at least, and i am sure other computers of the era, people came up with ways to add a make it yourself lightpen to the system.

Some of these even worked from a slight distance, similar to the guns made for video game systems like duck hunt on nes.

Question i have is, does anyone know of simple plans to make something like that for ti?

Link to comment
Share on other sites

Correct, light pens from back in the day require a CRT. They are very simple, basically a photo detector that can detect the electron beam as it illuminates the phosphorus under the pen. When the vsync signal is detected, a high speed counter starts, and when the electron beam is detected it stops. Since the horizontal and vertical rates are known, you can calculate the screen position.

 

They do not work with modern flat panel screens because there is no electron beam exciting phosphorus. All the pixels on an LED or LCD display are always illuminated and only the color changes.

 

It is sad that going from CRTs to more "modern" display technology that we lose a superior picture and the ability to have light pens. )-:

  • Like 2
Link to comment
Share on other sites

Correct, light pens from back in the day require a CRT. They are very simple, basically a photo detector that can detect the electron beam as it illuminates the phosphorus under the pen. When the vsync signal is detected, a high speed counter starts, and when the electron beam is detected it stops. Since the horizontal and vertical rates are known, you can calculate the screen position.

 

How does one detect vsync on the TI? I had always thought that one needed external circuitry on the TI for that...

My lightpen project was very primitive using just XB and all it did was flash a square at various locations on the screen to be picked up by the photocell. Since the program knew the coordinates of the square at any one time, it could tell where the lightpen was on the screen when the photocell was triggered.

Link to comment
Share on other sites

Well only WHITE squares worked with the Light Pen when I tested one someone in the PUNN group made using XB.

If you had 16 squares on the screen it knew the location of the white one and the pen had a button to turn on pen light sensor.

 

You could get light Yellow to be detected but it took a few tries.

 

Say you had a question with 9 answers and you have to pick one using the light pen.

The XB program would flash a white block next to the number of each one and as it rotated them would know which one you picked.

Link to comment
Share on other sites

I was thinking more in terms of a hardware light pen where the counter was implemented with hardware instead of software. And yes, you would need to have access to the vsync signal for that. Many CTR controllers offer a light pen interface (i.e. 8275, 6845, 6545, etc) because they already contain the video counters (that's how they generate the video to begin with), and know when the vsync happens (since they control that too).

 

For example, the Motorola 6845, which was used in a lot of systems, has a light pen strobe input, and provides two registers for reading the light pen x,y position. However, these days a mouse is probably more practical and useful, but certainly not as cool! :-)

Link to comment
Share on other sites

I remember making one of these from a project guide i read somewhere. I think it had to be around 1984 when I did it. I used on of those old BiC ball point pens for the housing a few other parts like a photocell. all parts bought from radioshack too. it was cheap to make.

Link to comment
Share on other sites

Could you not make one today for use with modern displays?

The description Rich gives is about as fancy as one could get.A photo sensor that can detect levels of brightness (White vs black) on a LCD screen. The interface would feed the TI whatever signal it could use to respond according to the code.

Essentially replicating the functions in that video above but with a modern display. To keep it simple. No X,Y coordinates needed.

Link to comment
Share on other sites

Wow, in order to even think of doing this I have to order a pack of 15 photo cells for $5 including shipping (Amazon) for ti to be cost effective (ordering just one from another source plus shipping = the same amount).

I'm going to make one of these. and have enough parts left over to make 14 more. LOL

Thanks sparkdrummer!

using that bright box scan routine I see other games like "One of these characters is not like the other" or memory games where all cards are shown, then covered and you pick blocks to reveal what's under while trying to match pairs to clear the board.

Edited by Sinphaltimus
Link to comment
Share on other sites

Well, I'm only getting 5 DB9 connectors so I'll only have enough for 3 lightpens. I only need one perhaps I'll make all 3 and sell the other 2 for anyone interested.

I haven't looked at the DSK yet, I'm hopeful it's in either BASIC or XB so I can figured out the code to use the lightpen in my own aps..

We shall see. Not in any rush to do this, I have other projects I need to wrap up first. But this is definitely on the list.

Link to comment
Share on other sites

Could you not make one today for use with modern displays?

 

The description Rich gives is about as fancy as one could get.A photo sensor that can detect levels of brightness (White vs black) on a LCD screen. The interface would feed the TI whatever signal it could use to respond according to the code.

 

Essentially replicating the functions in that video above but with a modern display. To keep it simple. No X,Y coordinates needed.

Even just detecting the level of brightness can have a lot of trouble on modern displays, because they buffer the frames - sometimes by quite a lot. Unless each option is on the screen long enough to overcome the delay and off again long enough, you can get detection from the pen after you've moved on to display the next option.

  • Like 1
Link to comment
Share on other sites

As I recently posted, the VDP raises an interrupt when a frame has been drawn. This is the end of the cycle, but there should be a fixed delay to the start of the cycle (if any). So this means that you would just have to check CRU bit 2.

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...