Input/Output Device Driver Reference/Mouse (DOS) Device Driver Test Tool

This chapter explains how to use the mouse (DOS) Device Driver Test Tool.

Overview
The mouse Functional Verification Tests (FVTs) exercise the Int86 DOS interface for mouse functions. The tests are implemented with a special variation of the Device Driver Test Tool (called DOSMOUSE), which uses much of the Device Driver Test Tool code; however, DOSMOUSE does not use the multithread capability. Specific mouse function code is included in the DOSMOUSE.EXE, not in a DLL, as is it done for the DDTT running in OS/2.

These tests run in a DOS window. Each test is defined in a script file and these files can be modified using a text editor to create additional, specialized test cases. The test scripts give the user a repeatable set of tests that demonstrate mouse functions.

Test cases log all information to a log file, clearly indicating the actual execution sequence.

Mouse Test Architecture
DOSMOUSE uses the DDTT common front-end parser code for test case scripts. DOSMOUSE is specific to test mouse functions. The mouse grammar file is required: The following required, common component of the DDTT allows use of the DDTT's common test functions such as SET, LOOP, and PAUSE:
 * DOSMOUSE.EXE
 * MOUSE.GRA.
 * GLOBAL.GRA

Installation
The mouse test files reside on the IBM Developer Connection Device Driver Kit for OS/2 CD-ROM disc. These files utilize the test suites in the TESTCERT substructure, which also contain the executables and test cases.

The following procedure describes the installation process for running test cases:

1. Copy the executable and mouse test case files from the IBM Developer Connection Device Driver Kit for OS/2 CD-ROM disc to the hard drive. The executable (DOSMOUSE.EXE) files can reside in one directory (for example, \MOUSE). Test case script and command files can also be placed in this directory on the hard disk. If the target directory is C:\MOUSE and the E drive contains the information from the IBM Developer Connection Device Driver Kit for OS/2 CD-ROM disc, then use the following commands to copy the mouse test suite: [C:\]md mouse [C:\]cd mouse [C:\mouse]copy e:\ddk_x86\testcert\inputout\function\mouse\* [C:\mouse]copy e:\ddk_x86\testcert\general\ddtt\GLOBAL.GRA

Test Case Execution
To run one script file at a time, refer to for a description of each script file. Then, after determining which script file to run, type in DOSMOUSE followed by the script file name: [C:\MOUSE]DOSMOUSE ALL.SCR After the script has finished executing, control will transfer back to the DOS window. Results are logged in the file identified following the @THREAD line.

DDTT Mouse Test Grammar Function Calls
The following is a list of the DDTT Parallel Port Test Grammar Function Calls:
 * MOUSE_RESETANDSTATUS
 * MOUSE_SHOWCURSOR
 * MOUSE_HIDECURSOR
 * MOUSE_GETBUTTONMPOS
 * MOUSE_SETCURPOS
 * MOUSE_GETBPRESS
 * MOUSE_GETBRELEASE
 * MOUSE_SETMINMAXHCPOS
 * MOUSE_SETMINMAXVCPOS
 * MOUSE_READMCOUNT
 * MOUSE_GETDRVVERTYPIRQ
 * MOUSE_GETGENINFO
 * MOUSE_GETMAXVCOOR
 * MOUSE_GETCURMSKMCNT
 * MOUSE_GETCURHSPT
 * MOUSE_HDWRESET
 * MOUSE_SETGETBPT
 * MOUSE_GETMINMAX
 * MOUSE_GETADVFCN
 * MOUSE_GETSWSET

MOUSE_RESETANDSTATUS
Mouse Function 0

This function returns the current status of the mouse hardware and software.

M2% Number of buttons (if mouse found and reset = 2)
 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.
 * Logged Data:M1% Mouse status (found and reset = -1, otherwise = 0)

MOUSE_SHOWCURSOR
Mouse Function 1

This function increments the internal cursor flag and if the value of the flag is 0, displays the cursor on the screen.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.
 * Logged Data:None.

MOUSE_HIDECURSOR
Mouse Function 2

This function removes the cursor from the screen, decrements the internal cursor flag, and hides the cursor. The mouse driver continues to track the motion of the mouse, changing the cursor's position as the mouse changes position.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.
 * Logged Data:None.

MOUSE_GETBUTTONMPOS
Mouse Function 3

This function returns the state of the left-hand and right-hand mouse buttons and also returns the state of the cursor's horizontal and vertical virtual screen coordinates.

Horizontal cursor coordinates Vertical cursor coordinates
 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.
 * Logged Data:Button status

MOUSE_SETCURPOS
Mouse Function 4

This function sets the cursor position at the location of the specified horizontal vertical virtual coordinates.


 * Input Parameter Keywords


 * Output Parameter Keywords:None.
 * Logged Data:None.

MOUSE_GETBPRESS
Mouse Function 5

This function returns the current status of both buttons, counts the number of times the specified button was pressed since the last call to this function, and reports the cursor's horizontal and vertical coordinates the last time the specified button was pressed.


 * Input Parameter Keywords:


 * Output Parameter Keywords:None.


 * Logged Data:Button status
 * Number of button presses
 * Horizontal coordinate
 * Vertical coordinate

MOUSE_GETBRELEASE
Mouse Function 6

This function returns the current status of both buttons, counts the number of times the specified button was released since the last call to this function, and reports the cursor's horizontal and vertical coordinates the last time the specified button was released.


 * Input Parameter Keywords:


 * Output Parameter Keywords:None.


 * Logged Data:Button status Button releases
 * Horizontal coordinate
 * Vertical coordinate

MOUSE_SETMINMAXHCPOS
Mouse Function 7

This function sets the position of the minimum and maximum horizontal cursor coordinates on the screen.


 * Input Parameter Keywords:


 * Output Parameter Keywords:None.


 * Logged Data:None.

MOUSE_SETMINMAXVCPOS
Mouse Function 8

This function sets the position of the minimum and maximum vertical cursor coordinates on the screen.


 * Input Parameter Keywords:


 * Output Parameter Keywords:None.


 * Logged Data:None.

MOUSE_READMCOUNT
Mouse Function 11

This function returns the horizontal and vertical mickey counts since the last call of this function.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Horizontal mickey count
 * Vertical mickey count

MOUSE_GETDRVVERTYPIRQ
Mouse Function 36

This function returns the version number of the mouse driver, reports the type of mouse the driver requires, and returns the number of the interrupt request type (IRQ).


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Major version
 * Minor version
 * Mouse type
 * IRQ number

MOUSE_GETGENINFO
Mouse Function 37

This function returns general information about the mouse.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:General information
 * fCursorLock
 * fInMouseCode
 * fMouseBusy

MOUSE_GETMAXVCOOR
Mouse Function 38

This function returns a flag indicating whether the mouse driver is disabled and indicates maximum virtual coordinates.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Mouse-disabled flag
 * Maximum virtual x
 * Maximum virtual y

MOUSE_GETCURMSKMCNT
Mouse Function 39

This function returns cursor information and accumulated raw mickey counts.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Screen-mask or Scan-line start
 * Cursor-mask or Scan-line stop
 * Horizontal mickey count
 * Vertical mickey count

MOUSE_GETCURHSPT
Mouse Function 42

This function returns the cursor hot-spot location, reports the type of mouse in use, and returns the internal counter that controls cursor visibility.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:fCursor
 * Horizontal cursor hot spot
 * Vertical cursor hot spot
 * Type of mouse

MOUSE_HDWRESET
Mouse Function 47

This function returns cursor information and accumulated raw mickey counts


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Success flag

MOUSE_SETGETBPT
Mouse Function 48

This function sets or returns cursor ballpoint-orientation and buttonmask information.


 * Input Parameter Keywords:


 * Output Parameter Keywords:None.


 * Logged Data:Status
 * Rotation angle
 * Button mask

MOUSE_GETMINMAX
Mouse Function 49

This function returns the minimum and maximum horizontal and vertical coordinates for the current video mode.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Status
 * Virtual xminimum
 * Virtual yminimum
 * Virtual xmaximum
 * Virtual ymaximum

MOUSE_GETADVFCN
Mouse Function 50

This function returns the flags that indicate active advanced functions.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Active function flags

MOUSE_GETSWSET
Mouse Function 51

This function returns the current settings of switch values that can be passed to the mouse driver.


 * Input Parameter Keywords:None.
 * Output Parameter Keywords:None.


 * Logged Data:Mouse type
 * Mouse port
 * Language
 * Horizontal sensitivity
 * Vertical sensitivity
 * Double threshold
 * Ballistic curve
 * Interrupt rate
 * Cursor Override Mask
 * Laptop adjustment
 * Memory type
 * Super VGA support
 * Rotation angle
 * Primary button
 * Secondary button
 * Clip lock enabled
 * Acceleration curve data

Description of Test Cases
Each of the mouse test cases can be executed individually as previously described. The test scripts are described below. The user can create additional tests or combine tests into test cases after becoming familiar with DOSMOUSE and the MOUSE grammar file.
 * ALL.SCR:This runs all the mouse functions.
 * BUTTON.SCR:This tests button press and release functions.

Evaluation of Test Case Results
Unless otherwise stated in the test case descriptions, all test cases are expected to succeed. If a test case fails in a mode detectable by DOSMOUSE, then the token "ERROR" will be written to the corresponding log file.