**********************************************************************

 README.TXT for the Windows CE .Net 5.0  Touch Panel Driver

 Copyright(C) 2005 Fujitsu Component Limited.  All rights reserved.

**********************************************************************

1. Introduction

  This driver works on Windows CE .Net5.0(x86).
  This driver supports Fujitsu Component PS/2 interface Touch Panel devices.  
  PS/2 I/F Controller : N010-0559-V041,42,43,51


2. Installation
  This driver (Fidrtpce.dll and FidpsceJ.dll) is with the PS/2 keyboard driver.
  Change a standard PS/2 keyboard mouse driver when you install it. 
  This driver is the following type. 
        "The keyboard mouse (IBM layout) of 8042 Japanese 2" 
  Refer to "3, The preparation of the driver" when you use the keyboard that a type is wrong. 
  Then, make a FidpsceJ.dll file. Install a driver after that.


    (1) Modify "platform.reg" and "platform.bib" files in your project on 
        Windows CE Platform Builder.

        A) "platform.reg"
          Search for the registry key [HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH].
          Delete all lines (and other references) in this key , then add the following lines.

          [For  NC41120-0004]
          "DriverName"="Fidrtpce.dll"
          "SpinTop"=dword:0
          "XYConvert"=dword:0
 
           ## Details of parameter ##
           1) SpinTop
              The coordinates are rotated by the following values.
              Set up 0 in the parameter when the coordinates are not rotated.
                0 : The coordinates are not rotated.
                1 : The coordinates are rotated right 90 degrees.
                2 : The coordinates are rotated right 180 degrees.
                3 : The coordinates are rotated right 270 degrees.

           2) XYConvert
              X and Y coordinates (The reversal of origin coordinate and maximum coordinate) 
              are changed by the following values.
              Set up 0 in the parameter when the coordinates are not changed.
                0 : X and Y coordinates are not changed.
                1 : X coordinate is reversed.
                2 : Y coordinate is reversed.

        B)"platform.bib"
           Remove the setup place (The place where the following kbdmouse.dll is set up ) 
           of the keyboard mouse driver of "platform.bib". 
                 .
                 .
                 .
                 .
    kbdmouse.dll     $(_FLATRELEASEDIR)\KbdNopXTMsEngUs1.dll  NK  SH
                 .
                 .
    kbdmouse.dll     $(_FLATRELEASEDIR)\Kbd8042XTMsEngUs1.dll NK  SH
                 .
                 .
                 .
                 .

           Then, add the following setup to before and behind the place of deleted  keyboard mouse driver 
           is included setup. 


      Fidrtpce.dll    $(_FLATRELEASEDIR)\Fidrtpce.dll        NK  SH
      kbdmouse.dll    $(_FLATRELEASEDIR)\FidpsceJ.dll        NK  SH

           The following is the example of the position where a setup mentions it.
                 .
                 .
        ; @CESYSGEN IF CE_MODULES_KEYBD || CE_MODULES_POINTER
        #if ! (defined BSP_NOKEYBD && defined BSP_NOMOUSE)

                 kbdmouse.dll     $(_FLATRELEASEDIR)\FidpsceJ.dll	NK  SH
                 Fidrtpce.dll     $(_FLATRELEASEDIR)\Fidrtpce.dll	NK  SH

        IF LOCALE=0411 !
        IF LOCALE=0412 !
                 .
                 .

    (2) Build platform on Windows CE Platform Builder. At this time, five error messages are indicated 
        because there is no DLL of this driver to include to make an image. 
        Ignore this message, and proceed in the next process. 

    (3) Copy "Fidrtpce.dll" and "Fidusbce.dll" to the Build-Release directory.
        Normally this directory would be located in 
        "WINCE500\PBWorkspaces\%MyProjectName%\RelDir\CEPC_X86_Release".
        %MyProjectName% should specify an actual project name. 
  
    (4) Create image on Windows CE Platform Builder. (default nk.bin)
        At this time, two warning messages are indicated to include this driver not 
        which is being made this time. Ignore this message, and proceed in the next 
        process. 

    (5) Transfer the WindowsCE image file which included Touch Panel driver to
        the target system.


3, The preparation of the driver
   PS/2 pointing driver is with the keyboard driver. You must make "FidpsceJ.dll" 
   of this driver again by the keyboard type. That way of making it is written 
   in the following. 

    (1) There is a keyboard mouse driver in the following folder.Copy a folder 
        with the driver of a keyboard type to use on the same folder after you 
        go through name change.  

             "%WINCE500%\PUBLIC\COMMON\OAK\DRIVERS\KEYBD\DLL"

        * %WINCE500% is the installation place of Operating System of WindowsCE. 

    (2) Copy "Fid_PS2_8042_KbdCommon.lib" and "fid_ps2_8042_kbdcommon.pdb" on 
        the copied folder. 

    (3) Remove the LIBRAY preparation part of "sources". Change TARGETNAME 
       (a driver name to make). 
       Delete "PS2_8042_KbdCommon.lib" with SOURCELIBS (a library to include). 
       Then, try to include this driver Libray "Fid_PS2_8042_KbdCommon.lib". 
       Delete "VIGUID" and "VSGUID". A concrete instance is shown in the following. 

  Before changing it:
    (Case of KBD8042XTMSJPN2)

                 .
                 .
                 .
                 .
 		DOSYSGEN=1

		SYNCHRONIZE_DRAIN=1

		DEFFILE=$(_COMMONOAKROOT)\inc\KbdJpn2.def

		!IFDEF DOSYSGEN

		TARGETNAME=Kbd8042Jpn2_lib
		TARGETTYPE=LIBRARY
		TARGETDEFNAME=Kbd8042Jpn2

		WINCETARGETFILE0=$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\$(TARGETDEFNAME).def

		!ELSE

		TARGETNAME=Kbd8042Jpn2
		TARGETTYPE=DYNLINK
		DLLENTRY=DllMain
		TARGETLIBS= \
		    $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
		    $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib

		!ENDIF

		SOURCELIBS=\
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\PS2_8042_KbdCommon.lib	\
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\LayoutManager.lib	\
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\KeybdIst.lib	\
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\PS2_AT_00000411.lib \
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\NumPadRmp.lib \
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\InputLang_0411.lib \


		WINCETARGETFILES=dummy

		SOURCES=\
		    PDDList.cpp \

  After change it:
                 .
                 .
                 .
                 .
		DOSYSGEN=1

		SYNCHRONIZE_DRAIN=1

		DEFFILE=$(_COMMONOAKROOT)\inc\KbdJpn2.def

		TARGETNAME=FidpsceJ
		TARGETTYPE=DYNLINK
		DLLENTRY=DllMain
		TARGETLIBS= \
		    $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
		    $(_SYSGENOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib

		SOURCELIBS=\
		    Fid_PS2_8042_KbdCommon.lib	\
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\LayoutManager.lib	\
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\KeybdIst.lib	\
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\PS2_AT_00000411.lib \
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\NumPadRmp.lib \
		    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\InputLang_0411.lib \


		WINCETARGETFILES=dummy

		SOURCES=\
		    PDDList.cpp \


    (4) Compile changed "sources" with Windows CE Platform Builder. 

    (5) A driver is made in the following folder. 

              "%WINCE500%\PUBLIC\COMMON\OAK\TARGET\X86\RETAIL"

        * %WINCE500% is the installation place of Operating System of WindowsCE.


4. Calibration
   The adjustment of touch position uses the standard calibration software included
   in Windows CE.  Please refer to help of the stylus properties. 

   ## Attention ##
     *Add the following lines to the registry key [HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH]
      of PROJECT.REG or PLATFORM.REG when the effective range of the Cailbration Point is small. 

     "MaxCalError"=dword:12

     ## Details of parameter ##
     1) MaxCalError
        The effective range becomes wide as much as this value is big. 

     *Write it in the registry key [HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH] of PROJECT.REG 
      or PLATFORM.REG as "CalibrationData" when you input an initial Calibration point value. 
 
5. Limitations
  (1)The touch panel driver communicates with the touch panel by way of the i8042 keyboard controller. 
     Therefore, this driver cannot work with the system into which the transmitted command 
     is changed, and the touch panel data is converted. 

  (2)The touch panel driver replaces PS/2 keyboard & mouse driver. 
     The mouse port in the PS/2 interface becomes the control port only for the touch panel. 
     The mouse does not operate normally when the mouse is connected with this PS/2 port. 

  (3)The touch panel calibration data is managed by the standard calibration software of Windows CE
     and the Windows CE. The calibration data is saved on the registry. 
     The calibration data on the registry is clearing when Windows CE is full reset, 
     and it is necessary to calibration the touch panel again. 
