Jump to content

Photo

lightpen/"phaser gun"?


19 replies to this topic

#1 notwhoyouthink OFFLINE  

notwhoyouthink

    Space Invader

  • 38 posts

Posted Wed Jul 12, 2017 5:51 PM

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?



#2 --- Ω --- OFFLINE  

--- Ω ---

    --- Ω ---

  • 10,176 posts
  • TI-99/4A Fanatic
  • Location:In the den playing with my FinalGROM 99!

Posted Wed Jul 12, 2017 10:49 PM

There was a light pen project out there.  In fact Vorticon made a great video that you might want to view...

 

It's my understanding that you'll need a legacy (CRT) monitor for them to work though...


  • RXB likes this

#3 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,375 posts
  • Location:Castaic, California

Posted Wed Jul 12, 2017 11:28 PM

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

#4 LASooner OFFLINE  

LASooner

    Chopper Commander

  • 105 posts

Posted Thu Jul 13, 2017 1:01 AM

Yes, I suffer everyday with my Wacom Cintiq, wishing I had a flickering monitor with a light pen. :)


Edited by LASooner, Thu Jul 13, 2017 1:01 AM.


#5 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,667 posts
  • Location:Eagan, MN, USA

Posted Fri Jul 14, 2017 7:07 AM

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.



#6 RXB OFFLINE  

RXB

    River Patroller

  • 2,634 posts
  • Location:Vancouver, Washington, USA

Posted Fri Jul 14, 2017 7:20 AM

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.



#7 mizapf ONLINE  

mizapf

    River Patroller

  • 2,424 posts
  • Location:Germany

Posted Fri Jul 14, 2017 11:32 AM

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

 

 

Don't you get a VDP interrupt at every Vsync instance?



#8 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,375 posts
  • Location:Castaic, California

Posted Fri Jul 14, 2017 11:56 AM

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! :-)



#9 Shift838 OFFLINE  

Shift838

    Stargunner

  • 1,876 posts
  • SHIFT838
  • Location:Texas

Posted Sat Jul 15, 2017 3:05 PM

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.



#10 Sinphaltimus ONLINE  

Sinphaltimus

    Stargunner

  • 1,750 posts
  • Distracted at the Keyboard
  • Location:Poconos, PA

Posted Sat Jul 15, 2017 3:20 PM

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.



#11 sparkdrummer OFFLINE  

sparkdrummer

    Dragonstomper

  • 645 posts
  • Status? I don't need no stinkin' status!
  • Location:Phoenix,Arizona

Posted Sun Jul 16, 2017 3:38 AM

For those who want to fart around with this, here you go:

 

Attached File  Lightpen.pdf   35.19KB   6 downloads

 

Attached File  Lightpen.dsk   90KB   5 downloads

 

 



#12 Sinphaltimus ONLINE  

Sinphaltimus

    Stargunner

  • 1,750 posts
  • Distracted at the Keyboard
  • Location:Poconos, PA

Posted Sun Jul 16, 2017 6:38 AM

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, Sun Jul 16, 2017 6:54 AM.


#13 sparkdrummer OFFLINE  

sparkdrummer

    Dragonstomper

  • 645 posts
  • Status? I don't need no stinkin' status!
  • Location:Phoenix,Arizona

Posted Sun Jul 16, 2017 7:08 AM

Actually the build requires 2 cds cells, so you'd have enough for 7.5 lightpens.

#14 Sinphaltimus ONLINE  

Sinphaltimus

    Stargunner

  • 1,750 posts
  • Distracted at the Keyboard
  • Location:Poconos, PA

Posted Sun Jul 16, 2017 9:30 AM

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.



#15 Shift838 OFFLINE  

Shift838

    Stargunner

  • 1,876 posts
  • SHIFT838
  • Location:Texas

Posted Sun Jul 16, 2017 11:35 AM

For those who want to fart around with this, here you go:

 

attachicon.gifLightpen.pdf

 

attachicon.gifLightpen.dsk

 

 

 

Yup this is the exact one I did...

 

Not sure if it will work with the modern LCDs.



#16 Sinphaltimus ONLINE  

Sinphaltimus

    Stargunner

  • 1,750 posts
  • Distracted at the Keyboard
  • Location:Poconos, PA

Posted Sun Jul 16, 2017 11:56 AM

 

Yup this is the exact one I did...

 

Not sure if it will work with the modern LCDs.

 

 

Well, when I get around to it, I'll be sure to test it on both a CRT and an LCD just to check.



#17 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,673 posts
  • Location:BUR

Posted Sun Jul 16, 2017 8:34 PM

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.

#18 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,667 posts
  • Location:Eagan, MN, USA

Posted Mon Jul 17, 2017 6:57 AM

Is there any documentation on accessing vsync via software?



#19 mizapf ONLINE  

mizapf

    River Patroller

  • 2,424 posts
  • Location:Germany

Posted Mon Jul 17, 2017 8:40 AM

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.



#20 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,667 posts
  • Location:Eagan, MN, USA

Posted Tue Jul 18, 2017 6:49 PM

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.

 

Thank you :) 






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users