notwhoyouthink Posted July 12, 2017 Share Posted July 12, 2017 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? Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted July 13, 2017 Share Posted July 13, 2017 There was a light pen project out there. In fact Vorticon made a great video that you might want to view... https://www.youtube.com/watch?v=Acn0IbHpPho It's my understanding that you'll need a legacy (CRT) monitor for them to work though... 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted July 13, 2017 Share Posted July 13, 2017 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. )-: 2 Quote Link to comment Share on other sites More sharing options...
LASooner Posted July 13, 2017 Share Posted July 13, 2017 (edited) Yes, I suffer everyday with my Wacom Cintiq, wishing I had a flickering monitor with a light pen. Edited July 13, 2017 by LASooner Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted July 14, 2017 Share Posted July 14, 2017 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. Quote Link to comment Share on other sites More sharing options...
RXB Posted July 14, 2017 Share Posted July 14, 2017 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. Quote Link to comment Share on other sites More sharing options...
+mizapf Posted July 14, 2017 Share Posted July 14, 2017 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? Quote Link to comment Share on other sites More sharing options...
matthew180 Posted July 14, 2017 Share Posted July 14, 2017 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! :-) Quote Link to comment Share on other sites More sharing options...
Shift838 Posted July 15, 2017 Share Posted July 15, 2017 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. Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted July 15, 2017 Share Posted July 15, 2017 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. Quote Link to comment Share on other sites More sharing options...
sparkdrummer Posted July 16, 2017 Share Posted July 16, 2017 For those who want to fart around with this, here you go: Lightpen.pdf Lightpen.dsk Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted July 16, 2017 Share Posted July 16, 2017 (edited) 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. LOLThanks 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 July 16, 2017 by Sinphaltimus Quote Link to comment Share on other sites More sharing options...
sparkdrummer Posted July 16, 2017 Share Posted July 16, 2017 Actually the build requires 2 cds cells, so you'd have enough for 7.5 lightpens. 1 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted July 16, 2017 Share Posted July 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
Shift838 Posted July 16, 2017 Share Posted July 16, 2017 For those who want to fart around with this, here you go: Lightpen.pdf Lightpen.dsk Yup this is the exact one I did... Not sure if it will work with the modern LCDs. Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted July 16, 2017 Share Posted July 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
Tursi Posted July 17, 2017 Share Posted July 17, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted July 17, 2017 Share Posted July 17, 2017 Is there any documentation on accessing vsync via software? Quote Link to comment Share on other sites More sharing options...
+mizapf Posted July 17, 2017 Share Posted July 17, 2017 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. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted July 19, 2017 Share Posted July 19, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.