home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / lp4os2.txt < prev    next >
Text File  |  1995-01-14  |  9KB  |  159 lines

  1. LP4OS2.TXT - Light Pen for OS/2
  2.  
  3. This file describes my experience installing a light pen on my OS/2 system.
  4. Since I have tested this only with my own system,...
  5.  
  6. THE INFORMATION CONTAINED IN THIS FILE IS SUPPLIED "AS IS" WITHOUT
  7. WARRANTIES OF ANY KIND INCLUDING WITHOUT LIMITATION ANY IMPLIED
  8. WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  9.  
  10. If you have any additions, changes, comments, or suggestions, please send
  11. them via CompuServe mail to Robert Simpson, CompuServe ID 71520,737.
  12.  
  13. Purpose, Use
  14. ------------
  15. Before considering purchasing a light pen for OS/2, you should determine
  16. whether or not you have a good use for it.  I purchased the light pen because
  17. I thought it might be useful for the OS/2 demos we occasionally do.  At the
  18. Computer and Office Systems Show last September, space in our Team OS/2 booth
  19. was extremely limited, making it somewhat difficult to work with a mouse.
  20.  
  21. One big disadvantage of a light pen is that there is only one button,
  22. activated by pressing the light pen against the monitor screen.  There is no
  23. way to perform actions which require the second mouse button (such as brining
  24. up an object's menu) or both mouse buttons (such as bringing up the Window
  25. list).  I use Shift+F10 to bring up the object menus and I use the Window
  26. list icon on the Lauch Pad to bring up the Window list.  It takes a short
  27. while, but not too long, to get used to double-clicking without moving the
  28. pen between clicks.  On the positive side, opening objects on the Launch 
  29. Pad works nicely with the light pen since it only takes a single click.
  30.  
  31. Hardware - The Light Pen
  32. ------------------------
  33. I saw the "Warp Speed Light Pens" in the OS/2 Express advertisement section
  34. of the December 1994 issue of OS/2 Professional (p. 41).  The light pens were
  35. discounted on closeout, marked down to $50 from $99 in the November issue.
  36. This means you may no longer be able to get the light pens from OS/2 Express.
  37.  
  38. The light pen I purchased was a "Warp Speed Light Pen, OS/2 Version"
  39. manufactured by Warp Speed Light Pens, Inc., 1086 Mechem Drive, Ruidoso, NM,
  40. zip code 88345, telephone number 505/258-5713 8am-5pm Mountain Time.
  41.  
  42. Hardware - Connection to Video Board
  43. ------------------------------------
  44. A ribbon cable from the adapter board connects to the 26-pin feature
  45. connector on the video adapter.  The manual also says "For ISA systems which
  46. use video adapters with an 'edge-card connection', please call Warp Speed and
  47. we will ship you a card made for those connections."
  48.  
  49. Therefore, if you intend to purchase the light pen from OS/2 Express (if 
  50. they have any left), you should make sure that your VGA video adapter has a
  51. 26-pin feature connector.  If it has an edge-card connection, you may be able
  52. to get the appropriate light pen adapter directly from Warp Speed, Inc.
  53.  
  54. Software - Drivers
  55. ------------------
  56. The light pen comes with OS/2, DOS, and Windows drivers.  I have it working
  57. with OS/2 Warp and DOS 6.3.  I was unable to get it working with Win-OS2,
  58. although there are still a few more things I can try.  (Since just about
  59. everything I use runs in native OS/2, and when purchasing games, I select DOS
  60. games over Windows versions, I don't have much need to run Windows.)
  61.  
  62. When you install the OS/2 drivers for the light pen, you provide the source
  63. and target directories, the IRQ number of the adapter, and the video mode.
  64. The IRQ number is stored in LTPEN.INI and the video mode is determined by
  65. which driver file, LTPEN.6 (640x480), LTPEN.8 (800x600), or LTPEN.1
  66. (1024x768), is copied to LTPEN.SYS in the target directory.  Short of editing
  67. the LTPEN.INI binary file, the only way to change the IRQ value is to
  68. re-install the drivers.  I copied the install disk to my hard drive and
  69. changed the "Src" and "Dst" parameters at the beginning of the LPOS2.CMD
  70. command procedure, making it easy to re-install the drivers with different
  71. IRQ numbers.
  72.  
  73. Although the light pen adapter supports IRQ numbers 9, 3, 4, 5, and 7, I was
  74. unable to get it to work at IRQ 9, even though there are no other adapters in
  75. my system which uses IRQ 2/9.  To get it working, I had to change my audio
  76. board from IRQ 5 to IRQ 10 to install the light pen adapter at the default
  77. IRQ 5. There is a note in the manual stating that "IRQ 2/9 is not applicable
  78. for Windows applications", so IRQ 5 seemed the better choice anyway.
  79.  
  80. Also, I was unable to get the light pen and the mouse working at the same 
  81. time.  It would be nice to be able to use both devices, one at a time, but 
  82. it's understandable why the system won't handle this (if anyone knows of a 
  83. way to have two pointing devices active at the same time, please let me 
  84. know).  In order to disable the mouse, I had to remove "SERIAL=COM1" from the
  85. MOUSE.SYS line in CONFIG.SYS, resulting in two lines like this:
  86.    DEVICE=d:\LIGHTPEN\LTPEN.SYS
  87.    DEVICE=d:\OS2\BOOT\MOUSE.SYS TYPE=LTPEN$
  88.  
  89. Software - Command Lines
  90. ------------------------
  91. Light pens can determine the position of the pen on the screen by timing the
  92. light from the monitor entering the pen.  When the pen is in areas of the 
  93. screen which are completely black, such as the OS/2 and DOS command line 
  94. windows, there is no light entering the pen from the screen and it therefore 
  95. cannot determine the location of the pen.  The effect is that the pointer 
  96. cursor stops at the edge of the command line window and then catches up when 
  97. the pen hits the menu bar or the edge of the window.  Besides this effect 
  98. being undesirable, there are times you may want to perform pointer actions 
  99. within the command line window.  For example, I have used the light pen to 
  100. mark and copy data from a command line window.
  101.  
  102. To allow the pen to detect light within command line windows, the background 
  103. color of the command line windows must be changed.  Here is how I have done 
  104. this for the OS/2 and DOS command lines.  The general idea is to change the 
  105. prompt, including ANSI escape codes to change the background color, then 
  106. display the codes at least once and clear the screen.
  107.  
  108. For the OS/2 command line, I replaced the PROMPT command in CONFIG.SYS with
  109. the following line:
  110.    SET PROMPT=$E[36;44m[$P]$E[37;44m
  111. The two "m"s must be lower case.  The system must be rebooted for the changes
  112. to take effect.  Then I created the following REXX command procedure, which I
  113. called AUTOEXEC.CMD and put it in the root directory with AUTOEXEC.BAT:
  114.    /* REXX */
  115.    'cls'
  116.    exit
  117. The command procedure can be executed automatically by changing the 
  118. Program settings on the first page of the Settings notebook for the "OS/2
  119. Window" icon in the "Command Prompts" folder to use the following values:
  120.       Path and file name:     d:\OS2\CMD.EXE
  121.       Parameters:             /K "d:\AUTOEXEC.CMD"
  122.       Working directory:      d:\
  123.  
  124. For the DOS command line, I added the following lines to AUTOEXEC.BAT, just
  125. after the "@ECHO OFF" on the first line of the file:
  126.    ECHO 
  127.    CLS
  128.    PROMPT $E[36;44m$P$G$E[37;44m
  129. The "" character is the Escape character, entered from the keyboard by 
  130. holding down "Alt" and pressing "27", then releasing the "Alt" key.  The "m" 
  131. in the ECHO and PROMPT commands must be lower case.
  132.  
  133. In the above statements, the values "36;44" are for the color of the 
  134. command line prompt, and the values "37;44" are for the rest of the screen. 
  135. The foreground value, "36" or "37", can be changed to any value from "30" 
  136. through "37".  The background color, "44" can be changed to any value from 
  137. "40" through "47". The values given produce white letters on a blue 
  138. background, with a lighter blue prompt.
  139.  
  140. Software - Alternative Configurations
  141. -------------------------------------
  142. Normally I want to use the mouse, and have the light pen available primarily
  143. for demonstrations.  Once I had made the CONFIG.SYS change to get the pen
  144. working, I copied the CONFIG.SYS file to another file named "CONFIG.L" in the
  145. "d:\OS2\BOOT\" directory.  This allows that configuration to be selected by
  146. typing "L" at the "Recovery Choices" menu which is displayed by pressing
  147. "Alt+F1" just after OS/2 Warp begins booting (just after selecting it from
  148. the Boot Manager menu for example).  Note that since this is a new feature in
  149. OS/2 Warp, you shouldn't try it under earlier versions, such as OS/2 2.1.
  150. Then I changed the MOUSE.SYS line in the CONFIG.SYS file in the root ("\") 
  151. directory back to it's original form, and then rebooted, in order to return
  152. control to the mouse.
  153.  
  154. Conclusion
  155. ----------
  156. If you're interested in light pen support for OS/2, I hope this information 
  157. has been useful.
  158.  
  159.