Revision 1.13 – 10th Aug 2009

www.touch-base.com\documentation\general

 

                                Rotate Considerations

 

 

Introduction

Windows

Mac OS X

Linux

Win CE

Utility

Initial rotation

Toolbars

Contact

 

Desktop rotational is sometimes utilised in a touch screen environment.  There are a number of issues relating to rotate when working in a touch environment:

1) Touch screen calibration can cater for rotated desktop

As a minimum the driver and calibration procedure should be able to cater for desktops that are rotated 90°, 180° and 270°.

2) Touch screen calibration is automatically synchronized with the degree of rotation

When rotation takes place with a touch screen it is desirable that the touch screen calibration is automatically synchronised with the degree of orientation. Most users of rotational software rotate the desktop between 0° (landscape) and 90° (portrait) but others may rotate between 0°, 90°, 180° and 270° rotation.

3) The touch screen can be used to initiate rotation rather than the rotate utilities supplied with the rotate software or video chip.

The utilities supplied to perform rotation may not be appropriate for a touch interface and therefore it may be more desirable to initiate rotate via a touch control.

This document describes the rotation support offered by UPDD in the main operating systems. 

Calibration synchronisation

Windows

UPDD automatically handles the common usage of rotation between landscape and portrait. In UPDD version 3.8.x and above the UPDD Windows daemon task hooks Windows display resolution change messages and calls the UPDD rotate API calls when the display switches between landscape (0°) and portrait (90°). This mechanism is disabled if the daemon process receives specific rotate calls (either the Portrait or UPDD rotation Windows message as described below).

Although UPDD has specific rotational API calls it should not be necessary for end users to make these calls as they are handled by the UPDD daemon process when the desktop resolution changes from portrait to landscape or a support rotate message is received.

Therefore, when using a system that rotates the desktop, three options are available.

1.      Automatic Detection
The system rotates from landscape (0
°) to portrait (90°). The UPDD daemon process automatically sees the desktop resolution change (Y becomes > X, e.g. 1024 x 768 becomes 768 x 1024) and adjusts the calibration accordingly via a UPDD API call. However, if the portrait mode is actually 270° the UPDD setting PortraitAngle should be created as follows:

UPDD V3.x.x
DWORD registry entry.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TBUPDD\Parameters\{....guid....}\PortraitAngle

or

UPDD V4.x.x
TBUPDD.INI file entry
Section: [updd/parameters], ProtraitAngle

should be set to 270

In some circumstances it may be desirable to disable automatic detection by setting the UPDD global setting “NoAutoRotate” = 1 in UPDD setting file tbupdd.ini
i.e
[updd]
noautorotate=0x00000001

Stop tbupddwu process (net stop tbupddwu) before editing this file and start (net start tbupddwu) afterward. If required we can provide an installer with this as the default.

This may be required if using a vertical span tool to switch to an extended desktop across 2 monitors such that the Y resolution is > than the X resolution, e.g. 1280x2048.

This automatic detection method is permanently disabled if methods 2 or 3 below are employed.

2.      Application broadcasting rotate messages

The application that performs the video rotation should send a Windows registered broadcast message WM_UPDDRotateEvent with lParam=nnn where nnn=desired rotate angle. If this message is seen the UPDD automatic rotation detection is disabled (see important note below) and so the user must send messages each time the rotation changes This option is recommended when more modes are supported – e.g. 0 / 90 / 180 / 270 / 360.  Some commercial rotate software, see below, sends these messages that UPDD hooks (see UPDD aware rotational software section below)

To register your app to use WM_UPDDRotateEvent

UINT upddrotatemsg = ::RegisterWindowMessage("WM_UPDDRotateEvent");

To set the screen rotation angle

::PostMessage(HWND_BROADCAST, upddrotatemsg,0,N);

where n is the angle (0, 90, 180, 270)

e.g. to indicate screen is inverted.

::PostMessage(HWND_BROADCAST, upddrotatemsg,0,180);

The driver retains the rotation information across a reboot and therefore it is necessary for the application to send a WM_UPDDRotateEvent, stating the startup rotate angle, if rotate is not maintained over a reboot (i.e the system starts in landscape mode). Further, if the application is uninstalled and no longer used to rotate but another method is employed to rotate between landscape and portrait then UPDD must be reinstalled to reset rotate method flag settings.

3.      Utilise an existing rotation method that is recognized by UPDD, as described below:

·         Pivot from Portrait Displays

One of the most common software rotational products ‘Pivot’, is developed by Portrait Displays Inc and available on the web at www.portrait.com.

 

Pivot version 6.04 and above

UPDD version 3.4.x and above

OS – ALL Windows OS

Since version 6.04 the Pivot software sends out a Windows message when rotation takes place. This message is intercepted by the UPDD daemon task and calls the UPDD rotate API calls as appropriate.

·         iRotate from EnTech Taiwan

One of the most common hardware rotational products ‘iRotate’, is developed by EnTech Taiwan and available for free on the web at www.entechtaiwan.net/util/irotate.shtm.

 

iRotate version 1.04 and above

UPDD version 3.4.x and above

OS – Windows 98 thro XP with appropriate video chipsets and drivers (i.e ATI, nVidia, Intel, S3, XGI and others)

Since version 1.04 the iRotate software sends out a Windows message when rotation takes place. This message is intercepted by the UPDD daemon task and calls the UPDD rotate API calls as appropriate.

 

With this utility rotate is supported on all monitors. However, in our latest tests (Oct 2008) we have seen that with the 2nd and subsequent monitors the tracking is inaccurate and we will investigate this as and when required

·         Silicon Motion Graphics

Starting with UPDD version 3.8.42 integral support for the Silicon Motion Graphics chipset is provided. The UPDD software automatically recognizes the presence of this chipset and enables the interface so no user action is required other than to select the rotation mode using the standard SM interface. This interface is understood to work with all current SM chipsets including the SM712, SM722, SM731, SM500 and Lynx (including Lynx EM) products; however we have only verified this with the Lynx chipset.

·         ATI video chipsets

Latest ATI video chips, with rotation capabilities are supported.

·         Mobile Intel Rotate enabled Chipset Family

Starting with UPDD version 4.0.2 integral support for the Intel rotate enabled chipset is provided. The UPDD software automatically recognizes the presence of this chipset (via an undocumented method, which may be subject to change) and enables the interface so no user action is required other than to select the rotation mode using the standard Intel interface Note that the UPDD rotate interface requires the Intel rotate software to be present, which may not always be the case. It is possible that the recognition method will also recognize other Intel chipsets, however we have only verified that this method of recognition identifies the 915GM/GMS, 910GML, 855GME and Extreme Graphics 2 (Ver. 6.14.10.4497) chipset but it may recognise others.

·         DisplayLink USB video software interface

Starting with UPDD version 4.1.6, build 1099, integral support for the DisplayLink USB video software interface is provided. The UPDD software automatically recognizes the presence of this software and enables the interface so no user action is required other than to select the rotation mode using the standard DisplayLink rotate utility.

Rotate Method Identification

To identify rotate methods that are supported by UPDD and exist on the system, UPDD performs the following:

 

Rotation method

Identification

Portrait

[windows]\system32\wpfb.dll

iRotate

HKLM\SOFTWARE\EnTech\iRotate

Silicon Motion Cougar

[windows]\ system32\3drapi.dll

Silicon Motion Lynx

[windows]\ system32\smhook.dll

ATI chips

[windows]\ system32\atipdlxx.dll

Intel chipset

HKLM\SYSTEM\CurrentControlSet\Services\ialmdevice0

DisplayLink USB video

HKLM\Software\DisplayLink\Core

 

Important Notes

 

1)    Please note, that for automatic calibration adjustment to work correctly it is important that the initial calibration made on a monitor that can rotate is performed when the monitor is in landscape mode (i.e. not rotated)

2)    UPDD supports automatic rotate recognition on all connected monitors for the Intel video graphics chipset, iRotate and DisplayLink. In all other interfaces rotate is only supported on the primary monitor.

3)    Direct video chipset support may be dependent on the correct video driver being installed. We have had situations where a newer driver has broken our direct video chipset support and we have had to make changes to cater for the differences introduced with the new driver. To this end we recommend the usage of the software utility irotate which offers our software a common interface to a rotate utility that is responsible for the video chipset rotation process.  We believe that irotate is kept current with any driver changes and therefore offers a future proof rotate solution.

Last time we looked (Aug 2007), irotate supported; ATI Radeon, Intel Extreme Graphics, Matrox Parhelia, Nvidia GeForce, S3 DeltaChrome, VIA Unichrome, XGI Volari, Some Rage128 Mobility and SiS drivers.

4)    On systems that have both hardware and software UPDD supported rotate options then the software interface (i.e iRotate or Pivot) will take priority.

5)    iRotate and pivot are mutually exclusive and only one should be used.

Supported Rotate method display

A number of UPDD extensions are built into the UPDD Console and the Video rotation extension shows if any of the supported auto-calibration or touch initiation rotation methods have been found on the system.

 

 

This dialog also handles the UPDD rotate system tray settings and quick method of creating a toolbar to activate rotation if required, see Rotate Utility below.

Mac OS X

Mac OS/X version 10.4 (Tiger) introduced video rotation where the video hardware supports it. UPDD version 4 will work with rotated video in 2 scenarios.

 

1) Automatic when switching between landscape and a defined portrait mode.

 

Important note: No longer supported with UPDD version 4.1.x. Will be reinstated if required.

 

Where the system is switched between landscape and portrait modes UPDD will switch between these modes without requiring calibration. Switching between landscape and portrait mode requires two settings to be changed in the System Preferences, Display dialog. First you need to select the degree of portrait rotation angle, either 90° or 270°. This will rotate the screen – at this point the screen will not be calibrated.  Next it is important to select the corresponding portrait resolution. For example if landscape mode is 1024x768, portrait mode will need to be set to 768x1024 – at this point the screen will be calibrated. The OS/X preferences utility does not adjust the screen size automatically, as one might reasonably expect, and the dialog below is used after rotation has occurred to select the appropriate portrait resolution, in this case 768 x 1024.


 

Unfortunately, we have not found a way to programmatically determine the degree of rotation selected for portrait but have found a way to determine that the resolution has been switched to ‘portrait’, e.g. in the above example when 1024 x 768 becomes 768 x 1024 and it is the change of resolution that triggers the automated calibration adjustment.   Because we cannot determine the rotation angle it has to be manually set in UPDD Console, Properties dialog, Portrait Rotate option

 

to inform the driver what rotation angle is being used in Portrait mode.  This restricts automatic calibration working to one defined portrait angle.

 

2) Manual when using any rotation angle


Any combination of any video rotation and screen size can be used so long as:

 

1.      4 or more points are used for calibration

 

2.      The screen is recalibrated after the video display preferences are changed. Note that the UPDD Console, Properties, "Portrait" setting is irrelevant in this situation.

 

UPDD only supports rotate on the primary monitor in Mac OS X.

Linux

Under Linux you can rotate the video in a number of ways, such as predefined in the X configuration file using the X directive Option “Rotate” “[rotate]”, using the xrandr command or using the rotate request in the display console – should one exist.

 

e.g. Option “Rotate” “CCW” or /usr/bin/xrandr –o left

 

UPDD supports these rotation methods as discussed below:

Manual calibration adjustment

This requires that calibration is performed every time the system is rotated to a different rotation.

 

If using Option “Rotate” “[rotate]”  check whether your card is supported then look at the appropriate release notes found at http://xfree86.org or http://www.x.org respectively. If your card supports the “Rotate” option as mentioned in the release notes then it is compatible with UPDD. Supported rotations in X-Windows are 90 and 270 degrees. As mentioned in the documentation for your video card, the device section in the X config file should be either configured for Option “Rotate” “CW” (clockwise) or Option “Rotate” “CCW” (counter-clockwise).  An example of a Device section set up for rotation is below:-

Section “Device”

Identifier “VideoCard0”
Driver “nv”
VendorName “Videocard vendor”
BoardName “VESA driver (generic)”
Option “Rotate” “CCW”

EndSection

 

Automatic calibration adjustment

Calibration is automatically adjusted to take into account the degree of rotation.

 

Since UPDD 4.1.1, April 2009, the driver automatically caters for rotated desktops rotated via the Ubuntu display control panel. This has only been tested under the Ubuntu distribution but in theory should work on any distribution using the Gnome desktop. It will potentially work on other GNOME systems that store desktop details in a file called $HOME/.config/monitors.xml.

 

Since UPDD 4.1.1, Aug 2009, the driver automatically caters for rotated desktops rotated via the Debian screen resolution control panel.

 

Automatic support will be expanded to other distributions as and when required

 

UPDD only supports rotate on the primary monitor in Linux.

Win CE

UPDD has been updated for specific devices to support rotate in CE but this will be implementation specific.  Please contact us to discuss your requirements.

Rotate utility - Invoke video rotation via touch

This utility is currently only available for Windows systems and only invokes rotation on the primary monitor.

 

Using rotate services offered by software rotate utilities or rotate enabled video chips, desktops can be rotated through various rotation angles, normally 0° to 90°/270° (Landscape to Portrait) or 0° to 180° for systems that can be viewed from top or bottom. Software is often supplied that can be used to switch to the desired degree of rotation and the method employed does not always lend itself to quick selection in a touch only environment.

 

The section describes how we have implemented a touch method to perform graphical rotation that uses a toolbar and system tray utility to initiate rotation.

 

Please note - these touch rotation methods can only be employed if UPDD detects a rotation method that it supports to initiate rotate. At the time of writing UPDD Rotate initiation will only work with iRotate and Silicon Motion chip sets as shown in the UPDD Extension, Video Rotation dialog, Touch Control column; e.g.

 

 

Unless there is a green tick in the Touch Control column UPDD rotate utilities cannot be used to rotate the video!

Toolbar

In UPDD Version 4 toolbars can be associated with UPDD specific functions which include a rotate action. To create a rotate toolbar you can use the standard toolbar dialog and associate a rotate function, as shown below:

 

 

In this Windows example a toolbar, Rotate, has been created with the ‘Add a new toolbar’ function. Using the ‘Change cell options’ a the UPDD Rotate Action has been associated with the toolbar to rotate between 0° and 90°.  Thereafter the ‘Calibrate toolbar’ is used to calibrate the toolbar on the touch screen.  The toolbar can also be associated with a Toolbar image if required so that the user can have a visual reference to the rotate toolbar.  The UPDD rotate action can be used to rotate through any combination of degrees of rotation or associated to one specific rotation angle by only enabling the checkbox next to the required rotation angle.

 

Once the Rotate toolbar is created and calibrated, touching the rotate toolbar on the touch screen will rotate the display using one of the supported rotate methods which caters for external rotation requests.

 

The UPDD Extension, Video Rotation dialog offers a quick link to create and calibrate a rotate toolbar used to initiate rotation, as shown:

 

 

By default this rotate toolbar will rotate between 0° and 90° but can be changed as required. If more than one method is found then rotation could cause an issue.  In this situation, if you have a supported hardware chip consider uninstalling the software methods.

System Tray rotate utility

When a rotate interface is identified that can support rotate requests from UPDD, as shown in the UPDD Extension, Video Rotation dialog and if the system tray rotate utility is enabled then a UPDD Rotate system tray icon will be shown  that can also be used to rotate the screen though the enabled Rotate states.

 

Rotate confirmation

If either the rotate system tray utility or the rotate toolbar is set to confirm before rotation the following dialog is shown:

Initial Rotation Mode

At system startup most systems will power up in landscape mode (0° rotation) although some can power up in the previous rotated mode. For calibration accuracy it is important that the driver knows the initial rotation mode. If, prior to reboot, the previous Windows session was rotated using Pivot software, one of the supported video chipsets, or the WM_UPDDRotateEvent message it is important that the driver is informed of the initial rotate state at start up using the same method. Automatic detection is deliberately disabled in the assumption that one of these methods will be used at startup to inform of the start up rotation angle and to ensure there is no conflict between one of these methods (which can identify and inform of all 4 rotation angles and auto-detection that can only identify 2 rotation angles).

If none of the above methods were used to perform rotation the UPDD daemon process will auto-detect rotation but only be able to inform the driver of landscape (0°) or Portrait (90°/270°) initial rotation (depending on the UPDD PortraitAngle registry setting **).

It is important that correct orientation settings (swap X/Y) are set if the system is starting in a rotated mode.  If the number of calibration points is 4 or more then the calibration procedure will automatically calculate the orientation and therefore it is highly recommended that in this environment 4 calibration points or more are used.  If this is not the case and orientation is incorrectly set the calibration may be incorrect when starting with a rotated desktop.

Toolbar Considerations

UPDD Toolbars are described in the Toolbar document. Toolbars are either associated with a physical area on the pointer device or associated with a position on the desktop. Toolbars can also have associated images that are displayed on the desktop at the position of the toolbar. When a display rotates the position of the toolbar is recalculated if the toolbar is associated with the desktop. If the toolbar is associated to a physical area on the pointer device and has an associated image then the image position is recalculated.

Contact

For further information or technical assistance please email the technical support team at technical@touch-base.com