home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 14 Text
/
14-Text.zip
/
lp4os2.txt
< prev
next >
Wrap
Text File
|
1995-01-14
|
9KB
|
159 lines
LP4OS2.TXT - Light Pen for OS/2
This file describes my experience installing a light pen on my OS/2 system.
Since I have tested this only with my own system,...
THE INFORMATION CONTAINED IN THIS FILE IS SUPPLIED "AS IS" WITHOUT
WARRANTIES OF ANY KIND INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
If you have any additions, changes, comments, or suggestions, please send
them via CompuServe mail to Robert Simpson, CompuServe ID 71520,737.
Purpose, Use
------------
Before considering purchasing a light pen for OS/2, you should determine
whether or not you have a good use for it. I purchased the light pen because
I thought it might be useful for the OS/2 demos we occasionally do. At the
Computer and Office Systems Show last September, space in our Team OS/2 booth
was extremely limited, making it somewhat difficult to work with a mouse.
One big disadvantage of a light pen is that there is only one button,
activated by pressing the light pen against the monitor screen. There is no
way to perform actions which require the second mouse button (such as brining
up an object's menu) or both mouse buttons (such as bringing up the Window
list). I use Shift+F10 to bring up the object menus and I use the Window
list icon on the Lauch Pad to bring up the Window list. It takes a short
while, but not too long, to get used to double-clicking without moving the
pen between clicks. On the positive side, opening objects on the Launch
Pad works nicely with the light pen since it only takes a single click.
Hardware - The Light Pen
------------------------
I saw the "Warp Speed Light Pens" in the OS/2 Express advertisement section
of the December 1994 issue of OS/2 Professional (p. 41). The light pens were
discounted on closeout, marked down to $50 from $99 in the November issue.
This means you may no longer be able to get the light pens from OS/2 Express.
The light pen I purchased was a "Warp Speed Light Pen, OS/2 Version"
manufactured by Warp Speed Light Pens, Inc., 1086 Mechem Drive, Ruidoso, NM,
zip code 88345, telephone number 505/258-5713 8am-5pm Mountain Time.
Hardware - Connection to Video Board
------------------------------------
A ribbon cable from the adapter board connects to the 26-pin feature
connector on the video adapter. The manual also says "For ISA systems which
use video adapters with an 'edge-card connection', please call Warp Speed and
we will ship you a card made for those connections."
Therefore, if you intend to purchase the light pen from OS/2 Express (if
they have any left), you should make sure that your VGA video adapter has a
26-pin feature connector. If it has an edge-card connection, you may be able
to get the appropriate light pen adapter directly from Warp Speed, Inc.
Software - Drivers
------------------
The light pen comes with OS/2, DOS, and Windows drivers. I have it working
with OS/2 Warp and DOS 6.3. I was unable to get it working with Win-OS2,
although there are still a few more things I can try. (Since just about
everything I use runs in native OS/2, and when purchasing games, I select DOS
games over Windows versions, I don't have much need to run Windows.)
When you install the OS/2 drivers for the light pen, you provide the source
and target directories, the IRQ number of the adapter, and the video mode.
The IRQ number is stored in LTPEN.INI and the video mode is determined by
which driver file, LTPEN.6 (640x480), LTPEN.8 (800x600), or LTPEN.1
(1024x768), is copied to LTPEN.SYS in the target directory. Short of editing
the LTPEN.INI binary file, the only way to change the IRQ value is to
re-install the drivers. I copied the install disk to my hard drive and
changed the "Src" and "Dst" parameters at the beginning of the LPOS2.CMD
command procedure, making it easy to re-install the drivers with different
IRQ numbers.
Although the light pen adapter supports IRQ numbers 9, 3, 4, 5, and 7, I was
unable to get it to work at IRQ 9, even though there are no other adapters in
my system which uses IRQ 2/9. To get it working, I had to change my audio
board from IRQ 5 to IRQ 10 to install the light pen adapter at the default
IRQ 5. There is a note in the manual stating that "IRQ 2/9 is not applicable
for Windows applications", so IRQ 5 seemed the better choice anyway.
Also, I was unable to get the light pen and the mouse working at the same
time. It would be nice to be able to use both devices, one at a time, but
it's understandable why the system won't handle this (if anyone knows of a
way to have two pointing devices active at the same time, please let me
know). In order to disable the mouse, I had to remove "SERIAL=COM1" from the
MOUSE.SYS line in CONFIG.SYS, resulting in two lines like this:
DEVICE=d:\LIGHTPEN\LTPEN.SYS
DEVICE=d:\OS2\BOOT\MOUSE.SYS TYPE=LTPEN$
Software - Command Lines
------------------------
Light pens can determine the position of the pen on the screen by timing the
light from the monitor entering the pen. When the pen is in areas of the
screen which are completely black, such as the OS/2 and DOS command line
windows, there is no light entering the pen from the screen and it therefore
cannot determine the location of the pen. The effect is that the pointer
cursor stops at the edge of the command line window and then catches up when
the pen hits the menu bar or the edge of the window. Besides this effect
being undesirable, there are times you may want to perform pointer actions
within the command line window. For example, I have used the light pen to
mark and copy data from a command line window.
To allow the pen to detect light within command line windows, the background
color of the command line windows must be changed. Here is how I have done
this for the OS/2 and DOS command lines. The general idea is to change the
prompt, including ANSI escape codes to change the background color, then
display the codes at least once and clear the screen.
For the OS/2 command line, I replaced the PROMPT command in CONFIG.SYS with
the following line:
SET PROMPT=$E[36;44m[$P]$E[37;44m
The two "m"s must be lower case. The system must be rebooted for the changes
to take effect. Then I created the following REXX command procedure, which I
called AUTOEXEC.CMD and put it in the root directory with AUTOEXEC.BAT:
/* REXX */
'cls'
exit
The command procedure can be executed automatically by changing the
Program settings on the first page of the Settings notebook for the "OS/2
Window" icon in the "Command Prompts" folder to use the following values:
Path and file name: d:\OS2\CMD.EXE
Parameters: /K "d:\AUTOEXEC.CMD"
Working directory: d:\
For the DOS command line, I added the following lines to AUTOEXEC.BAT, just
after the "@ECHO OFF" on the first line of the file:
ECHO
CLS
PROMPT $E[36;44m$P$G$E[37;44m
The "" character is the Escape character, entered from the keyboard by
holding down "Alt" and pressing "27", then releasing the "Alt" key. The "m"
in the ECHO and PROMPT commands must be lower case.
In the above statements, the values "36;44" are for the color of the
command line prompt, and the values "37;44" are for the rest of the screen.
The foreground value, "36" or "37", can be changed to any value from "30"
through "37". The background color, "44" can be changed to any value from
"40" through "47". The values given produce white letters on a blue
background, with a lighter blue prompt.
Software - Alternative Configurations
-------------------------------------
Normally I want to use the mouse, and have the light pen available primarily
for demonstrations. Once I had made the CONFIG.SYS change to get the pen
working, I copied the CONFIG.SYS file to another file named "CONFIG.L" in the
"d:\OS2\BOOT\" directory. This allows that configuration to be selected by
typing "L" at the "Recovery Choices" menu which is displayed by pressing
"Alt+F1" just after OS/2 Warp begins booting (just after selecting it from
the Boot Manager menu for example). Note that since this is a new feature in
OS/2 Warp, you shouldn't try it under earlier versions, such as OS/2 2.1.
Then I changed the MOUSE.SYS line in the CONFIG.SYS file in the root ("\")
directory back to it's original form, and then rebooted, in order to return
control to the mouse.
Conclusion
----------
If you're interested in light pen support for OS/2, I hope this information
has been useful.