ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

9 Pages V   1 2 3 > »   
Start a new topic Add Reply
> Alps Glidepoint Driver, And VoodooPS2 as whole
Slice
post Jan 4 2011, 08:58 AM
Post #1
I rewrited VoodooPS2 driver to have SideScrolling and Tapping for my ALPS Trackpad 73,2,a.
Attached File  ALPS.png ( 416.97K ) Number of downloads: 425

As I know the driver is not working for ALPS 73,2,64. The development needed.

There is also keyboard driver with my previous corrections for multimedia keys.
For using you have to remove PS2Nub.kext if any. The functionality is included into the driver.
Two prefPanes included. Apple's one has all needed tuning and saves settings. VoodooPanel seems to be useless.
Attached File  Screen_shot_2011_01_03_at_10.34.56.png ( 58.23K ) Number of downloads: 443


Binaries
Attached File  AlpsPS2.zip ( 1.02MB ) Number of downloads: 851


Sources. Thanks to AnV for initial version that I slightly changed.
Attached File  VoodooPS2_src.zip ( 183.18K ) Number of downloads: 235


Development
Attached File  ALPS_730264_initialization_and_finger_swipes.txt.zip ( 4.39K ) Number of downloads: 238


To enable Trackpad.prefPane you have to correct it's info.plist as follows
CODE
    <key>NSMainNibFile</key>
     <string>OldTrackpadTab</string>
<!--    <key>NSPrefPaneSearchParameters</key>
     <string>Trackpad</string>
     <key>NSPrefPanelIconLabel</key>
     <string>Trackpad</string> -->
     <key>NSPrincipalClass</key>
     <string>Trackpad</string>

15.01.2011
THeKiNG successfully apply Intellimouse mode for the new ALPS. Now scrolling is supported. His driver is included in the new project.
Look into ...../Plugins folder and chose only one driver VoodooPS2Trackpad or ALPSMultitouch for different ALPS models.
Attached File  Screen_shot_2011_01_14_at_23.58.26.png ( 59.06K ) Number of downloads: 461

[attachment=3062:VoodooPS2_wMulti.zip]

25.02.2011
After some correction I made better driver
- for keyboard: button >< now works
- for trackpad:
1. Included model 63,3,c8 appears at Dell Latitude. It is Dual Point but for now Trackstick is not working.
2. Trackpad buttons works again.
3. Side scrolling.
4. Two finger dragging.
Clicking, dragging and scrolling can be switched on/off by vanilla Trackpad.prefPane
There is sources and compiled 32/64 binaries. But I don't like VoodooPS2Controller, I prefer to use ApplePS2Controller instead. At your will.
The version is proposed to work with Synaptics and Sentelic but I not tested.
VoodooPS2.prefPane is useful for them and useless for ALPS.
Attached File  VoodooPS2_wMulti.zip ( 3.68MB ) Number of downloads: 980

You should open the kext and choose only one plugin: PS2Mouse, ALPSMultitouch or PS2Trackpad. Not both!
My choice is PS2Trackpad that works in Dell Inspiron and Dell Latitude.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 4 2011, 10:04 AM
Post #2
I'm on 73 02 64 boat.
i've digged over the Linux community for a fix and found 2 relevant links: http://www.projectosx.com/forum/index.php?...ost&p=11788

Now what I did is to take latest Linux sources, applied the second patch(more elaborated) then I converted all definitions to those used by voodoo driver for better picture. The patch is not complete, but at least it works on linux for side scrolling.
Attached File  730264.zip ( 17.06K ) Number of downloads: 23


I think we should implement hardware model detection as is in Linux, or make a separate c file for this model since it use other stuff and it may conflict with older versions.

Now i'm going to try Windows initialization stuff and see what i get, if any result...

@ Slice I think you should credit Andy for his work on latest VoodooPS2 to avoid any conflicts.
It would be great if you can get same debug from your model so we can compare.

As far I read the debug data first it gets the E6 report then E7 then EC report then no idea yet biggrin.gif
Slice
post Jan 4 2011, 12:35 PM
Post #3
QUOTE (THe KiNG @ Jan 4 2011, 02:04 PM) *
@ Slice I think you should credit Andy for his work on latest VoodooPS2 to avoid any conflicts.
OK
QUOTE
It would be great if you can get same debug from your model so we can compare.

As far I read the debug data first it gets the E6 report then E7 then EC report then no idea yet biggrin.gif

My kernel.log
CODE
Jan 2 21:08:07 MacBook kernel[0]: VoodooPS2SynapticsTouchPad version 0.0 no supported
Jan 2 21:08:08 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] E7: { 0x73, 0x02, 0x0a } E6: { 0x40, 0x00, 0x64 }
Jan 2 21:08:08 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ALPS Device? Yes
Jan 2 21:08:08 MacBook kernel[0]: Acpi brightness levels:8, lowest brightness:12, highest brightness:100
Jan 2 21:08:08 MacBook kernel[0]: ApplePS2Trackpad: ALPS GlidePoint v10.115
Jan 2 21:08:08 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] getStatus(): [25 01 0a]
Jan 2 21:08:08 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Tapping can only be toggled.
Jan 2 21:08:08 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] getStatus(): [21 01 0a]
Jan 2 21:08:08 MacBook kernel[0]: IntelCPUMonitor: Based on code by mercurysquad, superhai ©2008
Jan 2 21:08:08 MacBook kernel[0]: X3100monitor: found 2a00 chip
Jan 2 21:08:08 MacBook kernel[0]: DSMOS has arrived
Jan 2 21:08:08 MacBook kernel[0]: IntelCPUMonitor: CPU family 0x6, model 0x17, stepping 0x6, cores 2, threads 0
Jan 2 21:08:08 MacBook kernel[0]: IntelCPUMonitor: BusClock=200MHz FSB=800MHz
Jan 2 21:08:08 MacBook kernel[0]: IntelCPUMonitor: Platform string M82
Jan 2 21:08:08 MacBook kernel[0]: IntelCPUMonitor: CPU Tjmax 105
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDClickTime Value: 500000000
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDClickSpace Value: ??
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDKeyRepeat Value: 83333333
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDInitialKeyRepeat Value: 500000000
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDScrollAcceleration Value: 20480
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDPointerButtonMode Value: 2
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDF12EjectDelay Value: 250
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDSlowKeysDelay Value: 0
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDStickyKeysDisabled Value: 0
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDStickyKeysOn Value: 0
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDStickyKeysShiftToggles Value: 0
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDMouseKeysOptionToggles Value: 0
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDFKeyMode Value: 0
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDMouseAcceleration Value: 45056
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDMouseScrollAcceleration Value: 20480
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDClickSpace Value: ??
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDClickTime Value: 500000000
Jan 2 21:08:15 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: ect: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: PalmNoAction When Typing Value: 0
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: PalmNoAction Permanent Value: 0
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: TwofingerNoAction Value: 0
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: OutsidezoneNoAction When Typing Value: 0
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: Use Panther Settings for W Value: 0
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: Trackpad Jitter Milliseconds Value: 192
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: USBMouseStopsTrackpad Value: 0
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDPointerButtonMode Value: 2
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDScrollZoomModifierMask Value: 262144
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDInitialKeyRepeat Value: 416666666
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDKeyRepeat Value: 100000000
Jan 2 21:08:17 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Packets: 0xff - 0x04 - 0x1a - 0x28 - 0x66 - 0x40
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Absolute packet: x: 388, y: 358, xpos: 0, ypos: 0, buttons: 0, z: 64, zpos: 0
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Packets: 0xff - 0x05 - 0x1a - 0x28 - 0x67 - 0x4b
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Absolute packet: x: 389, y: 359, xpos: 388, ypos: 358, buttons: 0, z: 75, zpos: 0
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Packets: 0xff - 0x08 - 0x1a - 0x28 - 0x6a - 0x4c
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Absolute packet: x: 392, y: 362, xpos: 389, ypos: 359, buttons: 0, z: 76, zpos: 0
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Packets: 0xff - 0x0c - 0x1a - 0x28 - 0x6c - 0x4c
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Absolute packet: x: 396, y: 364, xpos: 392, ypos: 362, buttons: 0, z: 76, zpos: 0
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Packets: 0xff - 0x0f - 0x1a - 0x28 - 0x6e - 0x4e
Jan 2 21:08:26 MacBook kernel[0]: [ApplePS2ALPSGlidePoint] Absolute packet: x: 399, y: 366, xpos: 396, ypos: 364, buttons: 0, z: 78, zpos: 0

And so on...
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 4 2011, 02:40 PM
Post #4
QUOTE (Slice @ Jan 4 2011, 02:35 PM) *
My kernel.log
...
And so on...

No I mean same dump from Windows.
Slice
post Jan 4 2011, 05:57 PM
Post #5
QUOTE (THe KiNG @ Jan 4 2011, 06:40 PM) *
No I mean same dump from Windows.

I have no.

Some more info
CODE
/*
* Some mice don't ACK commands sent while they are in the middle of
* transmitting motion packet. To avoid delay we use ps2_sendbyte()
* instead of ps2_command() which would wait for 200ms for an ACK
* that may never come.
* As an additional quirk ALPS touchpads may not only forget to ACK
* disable command but will stop reporting taps, so if we see that
* mouse at least once ACKs disable we will do full reconnect if ACK
* is missing.
*/
psmouse->num_resyncs++;

if (ps2_sendbyte(&psmouse->ps2dev, PSMOUSE_CMD_DISABLE, 20)) {
if (psmouse->num_resyncs < 3 || psmouse->acks_disable_command)
failed = 1;
} else
psmouse->acks_disable_command = 1;

And I also found some explanations about windows protocol: what is what
CODE
e8 : fa kDP_SetMouseResolution
00 : fa 0

e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
e9 : fa 00 00 64 kDP_GetMouseInformation //return param[1] != 0 //ps2pp_detect

e8 : fa kDP_SetMouseResolution
03 : fa 03 //we have 0 ?!
/* here must be
e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
e9 : // return param[0] == 0x00 && param[1] == 0x33 && param[2] == 0x55; //genius_detect
*/

//intellimouse_detect
f3 : fa kDP_SetMouseSampleRate
c8 : fa 200
f3 : fa kDP_SetMouseSampleRate
64 : fa 100
f3 : fa kDP_SetMouseSampleRate
50 : fa 80
f2 : fa 00 kDP_GetId //return param[0] == 3; //intellimouse_detect

f3 : fa kDP_SetMouseSampleRate
c8 : fa 0xC8 = 200
f3 : fa kDP_SetMouseSampleRate
c8 : fa 200
f3 : fa kDP_SetMouseSampleRate
50 : fa 80
f2 : fa 00 kDP_GetId //return param[0] == 4; //im_explorer_detect


And more info
QUOTE
{ {0x73, 0x02, 0x64}, dell_e2_setup_intellimouse_mode },

Attached File  RE___Patch___Add_support_for_Intellimouse_Mode_in_ALPS_touchpad_on_Dell_E2_series_Laptops____Linux_Input.html.zip ( 5.7K ) Number of downloads: 9

Here we see that this part is common for linux and windows
CODE
//dell_e2_setup_intellimouse_mode
ea : fa        kDP_SetMouseStreamMode
ec : fa        kDP_MouseResetWrap
ec : fa        kDP_MouseResetWrap
ec : fa        kDP_MouseResetWrap
e9 : fa 88 07 9d    kDP_GetMouseInformation //if (!((param[0] == 0x88) && (param[1] == 0x07)
> +        && ((param[2] == 0x9D) || (param[2] == 0x9B))))
> +        return -1;

But next there is a difference. Linux part has only 10 byte sequence while Windows log much more long.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 4 2011, 08:20 PM
Post #6
QUOTE (Slice @ Jan 4 2011, 07:57 PM) *
I have no.
....But next there is a difference. Linux part has only 10 byte sequence while Windows log much more long.

Maybe when you have some free time you can do one, or I can try to find another machine with ALPS, I have another 2 but both with synatpics sad.gif
Comparing the dumps will help a lot to identify what has changed in protocol...

Back to EC mode, i tried all day to replicate Windows EC report w/o any luck, best I could get was:
QUOTE
Jan 4 22:03:23 HM311 kernel[0]: ApplePS2ALPSGlidePoint E6 Report: { 0, 0, 64}
Jan 4 22:03:23 HM311 kernel[0]: ApplePS2ALPSGlidePoint E7 Report: { 73, 2, 64}
Jan 4 22:03:23 HM311 kernel[0]: ApplePS2Trackpad: ALPS GlidePoint v4.115
Jan 4 22:03:23 HM311 kernel[0]: ApplePS2ALPSGlidePoint getStatus(): [88 7 8a] // Damn close to what it should return 88, 7, 9b or 88, 7, 9d
Jan 4 22:03:23 HM311 kernel[0]: ApplePS2ALPSGlidePoint getStatus(): [ 0 0 7]


I will try more...

BTW Slice I need your help to "translate" how you did for ECMode, alps_ec_nibble and alps_ec_write...
Thanks in advance tongue.gif
Slice
post Jan 5 2011, 09:32 AM
Post #7
QUOTE (THe KiNG @ Jan 5 2011, 12:20 AM) *
I will try more...

BTW Slice I need your help to "translate" how you did for ECMode, alps_ec_nibble and alps_ec_write...
Thanks in advance tongue.gif

Did you make the follow? Here I forget to make EA command

CODE
void ApplePS2ALPSGlidePoint::setECMode() {
    PS2Request * request = _device->allocateRequest();

    if ( !request )
        return;
   ALPSStatus_t *E7
    request->commands[0].command = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[0].inOrOut = kDP_SetMouseStreamMode;            //EA
    
    request->commands[1].command = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[1].inOrOut = kDP_MouseResetWrap;            //EC
    request->commands[2].command = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[2].inOrOut = kDP_MouseResetWrap;            //EC
    request->commands[3].command = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[3].inOrOut = kDP_MouseResetWrap;            //EC
    request->commands[4].command = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[4].inOrOut = kDP_MouseResetWrap;            //EC
    request->commands[5].command = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[5].inOrOut = kDP_GetMouseInformation;                            //E9
    
     request->commands[6].command  = kPS2C_ReadDataPort;
    request->commands[6].inOrOut  = 0;
    request->commands[7].command = kPS2C_ReadDataPort;
    request->commands[7].inOrOut = 0;
    request->commands[8].command = kPS2C_ReadDataPort;
    request->commands[8].inOrOut = 0;
    
    request->commandsCount = 9;
    _device->submitRequestAndBlock(request);

    E7->byte0 = request->commands[6].inOrOut;
    E7->byte1 = request->commands[7].inOrOut;
    E7->byte2 = request->commands[8].inOrOut;
//here you should check for
//Should return 0x88,0x07,0x9b or 0x88,0x07,0x9d
    
    _device->freeRequest(request);
}

And approximately like follows
Attached File  AlpsEC.zip ( 1.91K ) Number of downloads: 7


Look also here (inside getModel)
CODE
    // "E6 report"
    request->commands[0].command  = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[0].inOrOut  = kDP_SetMouseResolution;
    request->commands[1].command = kPS2C_SendMouseCommandAndCompareAck;
    request->commands[1].inOrOut = 0;

In Windows log I see a diff at the same place
CODE
f3 : fa        kDP_SetMouseSampleRate
64 : fa        100
e8 : fa        kDP_SetMouseResolution
03 : fa        03
f4 : fa        kDP_Enable
f5 : fa        kDP_SetDefaultsAndDisable
ff : fa aa 00        kDP_Reset  kPS2C_ReadDataPort  kPS2C_ReadDataPort
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
Slice
post Jan 5 2011, 02:14 PM
Post #8
Very nice exercise is to reverse the windows log. I understand what is what and what is the difference
Linux:
CODE
getModel
SetupECmode
ECwrite(0x0005, 0x01)
kDP_Enable

Windows
CODE
checkPS2mouses
getModel(E7)
SetupECmode
ECwrite(0x001F, 0)        - bad response
ECwrite(0x0008, 0x81) - bad response
getModel(E6, E7)
set(0x84)
SetupECmode
set(0x82)
ECwrite(0x0004, 0x06) - bad response
ECwrite(0x0006, 0x03) - bad response
ECwrite(0x0007, 0x8D) - bad response
ECwrite(0x0144, 0x04) - bad response
ECwrite(0x0159, 0x03) - bad response
ECwrite(0x004B, 0x0) - bad response
ECwrite(0x004D, 0x0) - bad response
ECwrite(0x014E, 0x0) - bad response
ECwrite(0x014D, 0x0) - bad response
ECwrite(0x0163, 0x0) - bad response
ECwrite(0x0163, 0x3) - bad response
ECwrite(0x0162, 0x0) - bad response
ECwrite(0x0162, 0x4) - bad response
ECwrite(0x0008, 0x82) - good response
setStream(8)  -- why not 0x82?
kDP_Enable

Attached File  AlpsEC2.zip ( 6.97K ) Number of downloads: 6
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
Slice
post Jan 5 2011, 03:26 PM
Post #9
One more found
CODE
//getModel2(E6, E7)
ea : fa        kDP_SetMouseStreamMode    
e7 : fa        kDP_SetMouseScaling2To1
e7 : fa        kDP_SetMouseScaling2To1
e7 : fa        kDP_SetMouseScaling2To1
e9 : fa 42 02 14    kDP_GetMouseInformation

look here
CODE
    #define NUM_DUALS 3
    static int duals[NUM_DUALS * 3]={
        0x20,0x2,0xe,
        0x22,0x2,0xa,
        0x22,0x2,0x14};
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 6 2011, 02:55 PM
Post #10
I'm kind of gave up, Simple I can not put it in EC mode in OS X no matter what I do.
If I try the exact sequence from Windows dump I get KP or depending where i put it in the driver, stuck trackpad with a bonus, it break the USB mouse too...
It dosen't like resolution set to 3, and I know for sure is like that from windows registry:
CODE
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\AUI1101\4&97358bf&0\Device Parameters]
"FirmwareIdentified"=dword:00000001
"Migrated"=dword:00000001
"EnableWheelDetection"=dword:00000002
"MouseDataQueueSize"=dword:00000064
"MouseResolution"=dword:00000003
"MouseSynchIn100ns"=dword:01312d00
"SampleRate"=dword:00000064
"WheelDetectionTimeout"=dword:000005dc
"MouseInitializePolled"=dword:00000000
"DriverFunctionFlag"=dword:00000001
"DoubleClkSpeed"=dword:00000008
"Tapping"=dword:00000001
"TapSettings"=dword:00000009
"Controls"=dword:00000003
"Swap"=dword:00000000
"M_Assign"=dword:00000003
"Acceleration"=dword:00000004
"HorizSensitivity"=dword:00000020
"VertSensitivity"=dword:00000020
"Rotation"=dword:00000000
"EasyScroll"=dword:7a980014
"AutoTime"=dword:000001f4
"LockAreaSet"=dword:00000001
"XOffset"=dword:00000080
"YOffset"=dword:00000080
"XResolution"=dword:00000420
"YResolution"=dword:00000320
"EasyX"=dword:00000000
"CornerTapOffsetX"=dword:00000096
"CornerTapOffsetY"=dword:00000096
"EnableWheel"=dword:0000000b
"RightBtnEmulation"=dword:00000000
"ButtonFunction"=dword:cd5485ef
"MouseSynchIn100nsForMultiDevice"=dword:00000000
"LR_Timelag"=dword:0000000a
"TapTyping"=dword:00000000
"TapTypingDelay"=dword:00000002
"AutoRelease"=dword:00000001
"EnableFB"=dword:00000000
"EnableFB_Type"=dword:00000001
"SelectDevice"=dword:0000003f
"SPTapping"=dword:00000000
"SPTapSettings"=dword:00000001
"SPFunction"=dword:00548000
"SPScroll"=dword:00000000
"ScrollCancelThreshold_X"=dword:00000005
"ScrollCancelThreshold_Y"=dword:00000005
"PM_Resume"=dword:00000000
"UseIMECap"=dword:00000000
"DragLock_TR_Emulation"=dword:00000001
"ScrollLock_Enable"=dword:00000001
"ScrollLock_Period"=dword:00000064
"EnableTouchSensitivity"=dword:00000001
"EnableRawMode"=dword:00000001
"ZThresholdMode"=dword:00000003
"SetToBTN3_DEV"=dword:00000001
"DataModeSwitchTime"=dword:00000064
"EnableAreaSwitch"=dword:00000001
"SP_WebAssist_B_Shreshold"=dword:fffffed4
"SP_WebAssist_F_Shreshold"=dword:0000012c
"SP_ReviseBallisticCurve_Enable"=dword:00000001
"SP_ReviseBallisticCurve_Pram_1"=dword:07000078
"SP_ReviseBallisticCurve_Pram_2"=dword:13000021
"SP_ReviseBallisticCurve_Pram_3"=dword:ff000021
"SP_BrakeCursor_Enable"=dword:00000001
"SP_BrakeCursor_DeltaTime"=dword:00000020
"SP_BrakeCursor_Buffer_N"=dword:00000003
"SP_BrakeCursor_Threshold_Min"=dword:00000003
"SP_BrakeCursor_Threshold_Max"=dword:00000020
"SP_BrakeCursor_Percent"=dword:0000000d
"SP_NoSpeedAccThreshold"=dword:00000001
"WatchDog_Flag"=dword:00000001
"WatchDog_Timeout"=dword:00000fa0
"ChangeAccelCurve_Enable"=dword:00000001
"CursorSpeedScale_Enable"=dword:00000001
"GP_WebAssistEx_Cancel_Threshold"=dword:00000005
"Emulate5swGPby4swGP"=dword:00000000
"NotifiedPnPIDNumber"=dword:00000202
"KBCSyncSolution"=dword:00000000
"OfficeScrollSrc"=dword:00000001
"PegasusMonitorModeFlags"=dword:00000028
"MaxDistanceForDrag"=dword:000000b4
"MT_RecogStopDist"=dword:02800380
"Mercury_TrackFlags3"=dword:00000400
"PinnacleAG_enable_filter"=dword:00000000
"RawModeFilterLevel"=dword:fff56514

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\AUI1101\4&97358bf&0\Device Parameters\Interrupt Management]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\AUI1101\4&97358bf&0\Device Parameters\Interrupt Management\Affinity Policy]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\AUI1101\4&97358bf&0\Device Parameters\Interrupt Management\Affinity Policy - Temporal]
"TargetGroup"=dword:00000000
"TargetSet"=dword:00000003

Slice
post Jan 6 2011, 04:31 PM
Post #11
QUOTE (THe KiNG @ Jan 6 2011, 06:55 PM) *
I'm kind of gave up, Simple I can not put it in EC mode in OS X no matter what I do.
If I try the exact sequence from Windows dump I get KP or depending where i put it in the driver, stuck trackpad with a bonus, it break the USB mouse too...
It dosen't like resolution set to 3, and I know for sure is like that from windows registry:

May be you upload here your beta sources for me to check. I can't test with real hardware b/c my ALPS has no EC mode but I can look sources.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 6 2011, 08:24 PM
Post #12
QUOTE (Slice @ Jan 6 2011, 06:31 PM) *
May be you upload here your beta sources for me to check. I can't test with real hardware b/c my ALPS has no EC mode but I can look sources.

Hard to do that since I have a mess here biggrin.gif
I will put stuff in order then upload.
Until then here is what i understand from Windows dump:
CODE
1. ALPS "73 02 64" Multitouch/Dualpoint Initialization Sequence
2. xxd /dev/serio_raw0 (left to right across the middle)
3. xxd /dev/serio_raw0 (top to bottom across the middle)
4. xxd /dev/serio_raw0 (top to bottom across the right edge scroll area)

---------------------------------------------------------------
1. ALPS "73 02 64" Multitouch/Dualpoint Initialization Sequence
---------------------------------------------------------------

This is a transcript of the device initialization sequence performed
by the Windows driver. In the following sections, I include event data
for three different finger swipes, in whatever protocol is activated
by this initialization.

"Request : Response"
Request = Octets written to the port by the driver
Response = Octets returned by touchpad device

// Note there is no Absolute mode in this dump!

// Init sequence, 2 reset and get id
ff : fa aa 00 kDP_Reset
ff : fa aa 00 kDP_Reset
f2 : fa 00 kDP_GetId // standard PS/2 mouse

// "E6 report"
e8 : fa kDP_SetMouseResolution
00 : fa
// 3X set mouse scaling 1 to 1
e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
e9 : fa 00 00 64 kDP_GetMouseInformation // E6 Report, Sample Rate is 100

e8 : fa kDP_SetMouseResolution
03 : fa 03 // 8 counts/mm

// Attempt to Enter Microsoft Scrolling Mouse mode
f3 : fa kDP_SetMouseSampleRate
c8 : fa 200
f3 : fa kDP_SetMouseSampleRate
64 : fa 100
f3 : fa kDP_SetMouseSampleRate
50 : fa 80
f2 : fa 00 kDP_GetId // not 3, standard PS/2 mouse, move on

// Attempt to Enter Microsoft 5-button Scrolling Mouse mode
f3 : fa kDP_SetMouseSampleRate
c8 : fa 0xC8 = 200
f3 : fa kDP_SetMouseSampleRate
c8 : fa 200
f3 : fa kDP_SetMouseSampleRate
50 : fa 80
f2 : fa 00 kDP_GetId // not 4, standard PS/2 mouse, move on

// setSampleRateAndResolution
f3 : fa kDP_SetMouseSampleRate
64 : fa 100
e8 : fa kDP_SetMouseResolution
03 : fa 03 // 8 counts/mm
f4 : fa kDP_Enable
f5 : fa kDP_SetDefaultsAndDisable
ff : fa aa 00 kDP_Reset

// "E7 report"
e7 : fa kDP_SetMouseScaling2To1
e7 : fa kDP_SetMouseScaling2To1
e7 : fa kDP_SetMouseScaling2To1
e9 : fa 73 02 64 kDP_GetMouseInformation // E7 Report
// E7 Report in detail:
-73:
Bit 0->Right Btn = 1 button pressed
Bit 1->Middle Btn = 1 button pressed
Bit 2->Left Btn = 0 button is not pressed
Bit 3 Always 0
Bit 4->Scaling = 1 scaling is 2:1
Bit 5->Enable = 1 data reporting is enabled
Bit 6->Mode = 1 remote mode is enabled
Bit 7 Always 0
-02: Resolution is 4 count/mm
-64: Sample Rate is 100 decimal

// Set EC mode?
ea : fa kDP_SetMouseStreamMode // 0xEA (Set Stream Mode) - The mouse responds with "acknowledge" (0xFA) then resets its movement counters and enters stream mode.
ec : fa kDP_MouseResetWrap // 0xEC (Reset Wrap Mode) - The mouse responds with "acknowledge" (0xFA)
ec : fa kDP_MouseResetWrap // then resets its movement counters and enters the mode it was in prior to wrap mode
ec : fa kDP_MouseResetWrap // (stream mode or remote mode)
e9 : fa 88 07 9d kDP_GetMouseInformation // EC Report, good this match Linux code but what means?

// From here till end no idea
ec : fa kDP_MouseResetWrap // 0xEC (Reset Wrap Mode)
f0 : fa kDP_SetMousePoll // 0xF0 (Set Remote Mode) The mouse responds with "acknowledge" (0xFA)
f0 : fa kDP_SetMousePoll // then resets its movement counters and enters remote mode, why 2 time?
f6 : fa kDP_SetDefaults // 0xF6 (Set Defaults) - The mouse responds with "acknowledge" (0xFA) then loads
// the following values: Sampling rate = 100, resolution = 4 counts/mm, Scaling = 1:1,
// data reporting = disabled. The mouse then resets its movement counters and enters stream mode
e6 : fa kDP_SetMouseScaling1To1 // 0xE6 (Set Scaling 1:1) - The mouse responds with "acknowledge" (0xFA) then
// enables 1:1 scaling
e9 : fa 00 1f 02 kDP_GetMouseInformation

ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
64 : fa 100
e9 : fa 00 08 80 kDP_GetMouseInformation

f3 : fa kDP_SetMouseSampleRate
64 : fa 100
f6 : fa kDP_SetDefaults
ea : fa kDP_SetMouseStreamMode
e7 : fa kDP_SetMouseScaling2To1
e7 : fa kDP_SetMouseScaling2To1
e7 : fa kDP_SetMouseScaling2To1
e9 : fa 42 02 14 kDP_GetMouseInformation

e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
e6 : fa kDP_SetMouseScaling1To1
f3 : fa kDP_SetMouseSampleRate
c8 : fa 100
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
ea : fa kDP_SetMouseStreamMode
ec : fa kDP_MouseResetWrap
ec : fa kDP_MouseResetWrap
ec : fa kDP_MouseResetWrap
e9 : fa 88 07 9d kDP_GetMouseInformation // EC Report again?

f3 : fa kDP_SetMouseSampleRate
64 : fa 100
e7 : fa kDP_SetMouseScaling2To1
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
e9 : fa 00 04 00 kDP_GetMouseInformation

f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
3c : fa 60
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
3c : fa 60
e9 : fa 00 06 01 kDP_GetMouseInformation

f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
0a : fa 10
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
50 : fa 80
e9 : fa 00 07 8c kDP_GetMouseInformation

f3 : fa kDP_SetMouseSampleRate
64 : fa 100
e8 : fa kDP_SetMouseResolution
02 : fa 2
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
e9 : fa 01 44 06 kDP_GetMouseInformation

f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
28 : fa 40
f3 : fa kDP_SetMouseSampleRate
c8 : fa 200
e9 : fa 01 59 08 kDP_GetMouseInformation

f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
0a : fa 10
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
e8 : fa kDP_SetMouseResolution
00 : fa 0
e9 : fa 00 4b 01 kDP_GetMouseInformation

ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
e8 : fa kDP_SetMouseResolution
02 : fa 2
e9 : fa 00 4d 20 kDP_GetMouseInformation

ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
e8 : fa kDP_SetMouseResolution
03 : fa 3
e9 : fa 01 4e 03 kDP_GetMouseInformation

ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
e8 : fa kDP_SetMouseResolution
02 : fa 2
e9 : fa 01 4d 04 kDP_GetMouseInformation

ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
3c : fa 60
f3 : fa kDP_SetMouseSampleRate
0a : fa 10
e9 : fa 01 63 04 kDP_GetMouseInformation

ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
3c : fa 60
f3 : fa kDP_SetMouseSampleRate
0a : fa 10
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
0a : fa 10
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
3c : fa 60
e7 : fa kDP_SetMouseScaling2To1
e9 : fa 01 62 05 kDP_GetMouseInformation

ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f6 : fa kDP_SetDefaults
f3 : fa kDP_SetMouseSampleRate
3c : fa 60
e7 : fa kDP_SetMouseScaling2To1
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
14 : fa 20
ec : fa kDP_MouseResetWrap
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f0 : fa kDP_SetMousePoll
f3 : fa kDP_SetMouseSampleRate
64 : fa 100
e9 : fa 00 08 82 kDP_GetMouseInformation

f3 : fa kDP_SetMouseSampleRate
64 : fa 100
e7 : fa kDP_SetMouseScaling2To1
ea : fa kDP_SetMouseStreamMode
f3 : fa kDP_SetMouseSampleRate
64 : fa 100
f4 : fa kDP_Enable

--------------------------------------------------------
2. xxd /dev/serio_raw0 (left to right across the middle)
--------------------------------------------------------

0000000: 8f06 2c08 1e0d af05 2c08 380f bf05 2c08 ..,.....,.8...,.
0000010: 2712 bf05 2c08 2414 bf05 2c08 2259 9f05 '...,.$...,."Y..
0000020: 2c08 345b bf05 2c08 3060 8f06 2c08 1464 ,.4[..,.0`..,..d
0000030: af06 2c08 2467 bf07 2c08 046a 9f07 2c08 ..,.$g..,..j..,.
0000040: 346d 9f08 2c08 276f af09 2c08 0872 af09 4m..,.'o..,..r..
0000050: 2c08 3c75 af0a 2c08 1d77 8f0b 2d08 1178 ,.<u..,..w..-..x
0000060: 8f0c 2d08 1279 af0d 2d08 1579 af0e 2d08 ..-..y..-..y..-.
0000070: 267b 9f0f 2d08 377c 9f10 2d08 377b 8f12 &{..-.7|..-.7{..
0000080: 2d08 087b af13 2d08 187a bf14 2d08 297a -..{..-..z..-.)z
0000090: 8f16 2d08 197c 8f17 2d08 397c bf19 2d08 ..-..|..-.9|..-.
00000a0: 087e 9f1a 2d08 387b af1c 2d08 257c bf1e .~..-.8{..-.%|..
00000b0: 2d08 057c bf1f 2d08 337d af21 2d08 217c -..|..-.3}.!-.!|
00000c0: 9f23 2d08 207c 9f25 2c08 2e7b af27 2c08 .#-. |.%,..{.',.
00000d0: 2d7e 9f29 2c08 0c7e 8f2b 2c08 0c7c 9f2d -~.),..~.+,..|.-
00000e0: 2c08 0c7c af2e 2c08 3b7c af30 2c08 3a7e ,..|..,.;|.0,.:~
00000f0: 9f32 2c08 397d bf34 2c08 297c 9f37 2c08 .2,.9}.4,.)|.7,.
0000100: 067e 9f38 2c08 377c 9f3a 2c08 247e bf3c .~.8,.7|.:,.$~.<
0000110: 2c08 247e af3e 2c08 327e bf40 2c08 107e ,.$~.>,.2~.@,..~
0000120: bf42 2b08 1e7d bf44 2b08 1e7d bf46 2b08 .B+..}.D+..}.F+.
0000130: 1d7d bf47 2b08 3d7e 8f4a 2b08 0d7e 9f4c .}.G+.=~.J+..~.L
0000140: 2b08 0f7e 9f4e 2c08 117e 8f50 2c08 127e +..~.N,..~.P,..~
0000150: 9f52 2c08 007e bf54 2c08 107d 8f56 2c08 .R,..~.T,..}.V,.
0000160: 307e bf58 2b08 1f7e 8f5a 2b08 2f7e af5c 0~.X+..~.Z+./~.\
0000170: 2b08 2f7c bf5e 2c08 207e af60 2c08 127e +./|.^,. ~.`,..~
0000180: bf62 2c08 137d 8f64 2c08 247d af66 2c08 .b,..}.d,.$}.f,.
0000190: 267d bf68 2c08 067c af6a 2c08 077c 9f6c &}.h,..|.j,..|.l
00001a0: 2c08 087a 8f6d 2c08 3777 9f6e 2c08 3674 ,..z.m,.7w.n,.6t
00001b0: af70 2c08 056d af71 2c08 0569 af71 2c08 .p,..m.q,..i.q,.
00001c0: 3465 bf72 2c08 045f 9f72 2c08 285a 8f72 4e.r,.._.r,.(Z.r
00001d0: 2c08 2855 9f72 2c08 1e50 9f71 2d08 344b ,.(U.r,..P.q-.4K
00001e0: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
00001f0: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000200: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
0000210: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
0000220: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000230: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
0000240: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
0000250: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000260: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
0000270: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
0000280: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000290: 0008 0000 ....

--------------------------------------------------------
3. xxd /dev/serio_raw0 (top to bottom across the middle)
--------------------------------------------------------

0000000: 9f3e 0708 1912 af3e 0608 0d58 af3d 0608 .>.....>...X.=..
0000010: 1f58 8f3e 0608 185a bf3d 0608 275c af3d .X.>...Z.=..'\.=
0000020: 0608 385b 8f3d 0608 375c 9f3d 0608 355d ..8[.=..7\.=..5]
0000030: 8f3d 0608 345d 8f3d 0608 345c 9f3e 0608 .=..4].=..4\.>..
0000040: 025e 8f3e 0608 055d af3d 0608 335e af3e .^.>...].=..3^.>
0000050: 0608 135e 8f3e 0508 0f5e 9f3e 0608 065d ...^.>...^.>...]
0000060: 9f3e 0608 015e af3e 0608 0260 9f3d 0608 .>...^.>...`.=..
0000070: 3460 bf3d 0608 3061 bf3e 0608 0561 8f3e 4`.=..0a.>...a.>
0000080: 0608 0562 8f3e 0608 0562 bf3d 0608 3a63 ...b.>...b.=..:c
0000090: 8f3e 0608 1964 9f3e 0608 0865 8f3e 0608 .>...d.>...e.>..
00000a0: 1e65 8f3e 0608 1f66 bf3e 0708 1266 8f3e .e.>...f.>...f.>
00000b0: 0708 2766 bf3e 0808 215c 9f3e 0808 2f5f ..'f.>..!\.>../_
00000c0: af3e 0908 1e65 9f3e 0a08 2b69 bf3e 0b08 .>...e.>..+i.>..
00000d0: 1c6c 9f3e 0c08 1e6e af3e 0e08 116f bf3e .l.>...n.>...o.>
00000e0: 0f08 096f 9f3e 1108 116e 8f3e 1208 1372 ...o.>...n.>...r
00000f0: 8f3e 1308 1875 bf3e 1408 0c76 af3e 1608 .>...u.>...v.>..
0000100: 0175 bf3e 1708 0875 9f3e 1908 0173 af3d .u.>...u.>...s.=
0000110: 1a08 3578 bf3d 1b08 3b7b af3d 1d08 3079 ..5x.=..;{.=..0y
0000120: af3d 1e08 3779 8f3d 1f08 3d78 9f3d 2108 .=..7y.=..=x.=!.
0000130: 3a77 bf3d 2208 3c79 8f3e 2408 007c 9f3e :w.=".<y.>$..|.>
0000140: 2508 087b 8f3e 2708 117c 8f3e 2808 1c77 %..{.>'..|.>(..w
0000150: af3e 2a08 167b bf3e 2b08 1f7d bf3e 2d08 .>*..{.>+..}.>-.
0000160: 1a7d af3e 2f08 177a 8f3e 3108 2679 bf3e .}.>/..z.>1.&y.>
0000170: 3308 207e af3e 3408 3b7e bf3e 3608 337e 3. ~.>4.;~.>6.3~
0000180: af3e 3708 3d7a 8f3f 3908 0978 bf3f 3b08 .>7.=z.?9..x.?;.
0000190: 007c bf3f 3c08 047e af3f 3d08 0a7b 9f3f .|.?<..~.?=..{.?
00001a0: 3e08 1e79 bf3f 4008 1677 8f3f 4108 2a7b >..y.?@..w.?A.*{
00001b0: 9f3f 4208 2d7e 8f3f 4308 3e7e 9f3f 4408 .?B.-~.?C.>~.?D.
00001c0: 3e7e bf40 4508 097e 8f40 4608 1a7c bf40 >~.@E..~.@F..|.@
00001d0: 4708 1a79 8f40 4808 2e7b 8f40 4908 3f7d G..y.@H..{.@I.?}
00001e0: 8f41 4b08 057e af41 4c08 087c 9f41 4d08 .AK..~.AL..|.AM.
00001f0: 1d77 9f41 4e08 1e71 bf41 5008 1376 bf41 .w.AN..q.AP..v.A
0000200: 5008 1f75 bf41 5108 1a73 bf41 5108 1d70 P..u.AQ..s.AQ..p
0000210: 8f41 5108 2e6e 9f41 5208 126e bf41 5208 .AQ..n.AR..n.AR.
0000220: 126c af41 5208 226c af41 5208 126a bf41 .l.AR."l.AR..j.A
0000230: 5208 3464 9f42 5108 0f5d af42 5108 1b55 R.4d.BQ..].BQ..U
0000240: 8f42 5108 254f 8f00 0008 0000 8f00 0008 .BQ.%O..........
0000250: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000260: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
0000270: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
0000280: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000290: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
00002a0: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
00002b0: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
00002c0: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
00002d0: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
00002e0: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
00002f0: 0008 0000 8f00 0008 0000 ..........

------------------------------------------------------------------------
4. xxd /dev/serio_raw0 (top to bottom across the right edge scroll area)
------------------------------------------------------------------------

0000000: 8f71 0608 2c5a af71 0708 125b bf71 0708 .q..,Z.q...[.q..
0000010: 0b5c bf71 0808 1054 8f71 0808 1857 9f71 .\.q...T.q...W.q
0000020: 0908 135a af71 0908 1b5d 9f71 0a08 105f ...Z.q...].q..._
0000030: 9f71 0a08 1762 8f71 0a08 1c62 9f71 0b08 .q...b.q...b.q..
0000040: 1464 8f71 0b08 1e65 9f71 0c08 1564 9f71 .d.q...e.q...d.q
0000050: 0d08 1065 9f71 0d08 1965 8f71 0e08 1165 ...e.q...e.q...e
0000060: 8f71 0e08 1c65 8f71 0f08 1a64 af71 1008 .q...e.q...d.q..
0000070: 0564 8f71 1108 1164 9f71 1108 0b67 9f71 .d.q...d.q...g.q
0000080: 1208 0a68 8f71 1308 0769 9f71 1408 0069 ...h.q...i.q...i
0000090: 8f71 1408 0c69 8f71 1508 0769 af71 1608 .q...i.q...i.q..
00000a0: 056a bf70 1708 3466 bf70 1808 3165 8f71 .j.p..4f.p..1e.q
00000b0: 1908 0167 bf70 1a08 316a 8f71 1b08 0168 ...g.p..1j.q...h
00000c0: af70 1b08 3e6a bf70 1d08 3368 9f71 1e08 .p..>j.p..3h.q..
00000d0: 0468 af70 1f08 3567 8f71 2008 0b66 bf70 .h.p..5g.q ..f.p
00000e0: 2108 3c67 bf70 2208 3c68 bf70 2308 3f68 !.<g.p".<h.p#.?h
00000f0: 9f70 2408 3f69 8f71 2508 0f67 8f71 2608 .p$.?i.q%..g.q&.
0000100: 0f67 9f71 2808 0364 af71 2908 0266 bf70 .g.q(..d.q)..f.p
0000110: 2a08 3367 9f71 2b08 0166 8f71 2b08 0f67 *.3g.q+..f.q+..g
0000120: 8f71 2d08 0368 9f71 2e08 0666 9f71 2f08 .q-..h.q...f.q/.
0000130: 0966 af71 3008 0a66 bf70 3108 3b68 8f71 .f.q0..f.p1.;h.q
0000140: 3208 0d68 8f71 3308 0c6a bf71 3408 096a 2..h.q3..j.q4..j
0000150: bf70 3508 356a 9f71 3608 0469 af71 3708 .p5.5j.q6..i.q7.
0000160: 0367 8f71 3808 0464 8f71 3908 0766 9f71 .g.q8..d.q9..f.q
0000170: 3a08 0f66 af70 3c08 3467 9f71 3d08 0766 :..f.p<.4g.q=..f
0000180: 8f71 3e08 0e65 af71 4008 0466 af71 4108 .q>..e.q@..f.qA.
0000190: 0766 9f71 4208 0768 8f71 4308 0469 9f71 .f.qB..h.qC..i.q
00001a0: 4408 0669 bf71 4508 0469 8f71 4608 0866 D..i.qE..i.qF..f
00001b0: 9f71 4708 0c65 bf71 4908 0467 8f71 4a08 .qG..e.qI..g.qJ.
00001c0: 1a68 af71 4c08 1067 af71 4d08 1465 8f71 .h.qL..g.qM..e.q
00001d0: 4e08 2563 af71 4f08 1a5d 9f71 5008 3d63 N.%c.qO..].qP.=c
00001e0: 9f71 5108 2a61 8f71 5108 3e5d af72 5208 .qQ.*a.qQ.>].rR.
00001f0: 055a 9f72 5208 1856 af72 5208 1451 9f72 .Z.rR..V.rR..Q.r
0000200: 5108 3b4a 8f00 0008 0000 8f00 0008 0000 Q.;J............
0000210: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
0000220: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000230: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
0000240: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
0000250: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000260: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
0000270: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
0000280: 0000 8f00 0008 0000 8f00 0008 0000 8f00 ................
0000290: 0008 0000 8f00 0008 0000 8f00 0008 0000 ................
00002a0: 8f00 0008 0000 8f00 0008 0000 8f00 0008 ................
00002b0: 0000 8f00 0008 0000 ........
Slice
post Jan 7 2011, 09:30 AM
Post #13
CODE
// From here till end no idea
ec : fa        kDP_MouseResetWrap // 0xEC (Reset Wrap Mode)
f0 : fa        kDP_SetMousePoll // 0xF0 (Set Remote Mode) The mouse responds with "acknowledge" (0xFA)
f0 : fa        kDP_SetMousePoll // then resets its movement counters and enters remote mode, why 2 time?
f6 : fa        kDP_SetDefaults // 0xF6 (Set Defaults) - The mouse responds with "acknowledge" (0xFA) then loads
                            // the following values: Sampling rate = 100, resolution = 4 counts/mm, Scaling = 1:1,
                            // data reporting = disabled. The mouse then resets its movement counters and enters stream mode
e6 : fa        kDP_SetMouseScaling1To1 // 0xE6 (Set Scaling 1:1) - The mouse responds with "acknowledge" (0xFA) then
                                    // enables 1:1 scaling
e9 : fa 00 1f 02    kDP_GetMouseInformation

Why no idea? Did you read my interpretation?
This sequence is equal to
ECwrite(0x1F, 0)
and respone 00 1f 02 is differ from arguments 00->02.
Details came from ECnibble:
CODE
const int cmds[] = {
    kDP_SetMousePoll,
    kDP_SetDefaults,
    kDP_SetMouseScaling2To1,
    kDP_SetMouseSampleRate,
    kDP_SetMouseSampleRate,
    kDP_SetMouseSampleRate, //5
    kDP_SetMouseSampleRate,
    kDP_SetMouseSampleRate,
    kDP_SetMouseSampleRate,
    kDP_SetMouseSampleRate,
    kDP_GetMouseInformation, //10
    kDP_SetMouseResolution,
    kDP_SetMouseResolution,
    kDP_SetMouseResolution,
    kDP_SetMouseResolution,
    kDP_SetMouseScaling1To1 }; //15
const unsigned char params[] = {
    0xff, 0xff, 0xff, 10, 20, 40, 60, 80, 100, 200, 0xff, 0, 1, 2, 3, 0xff };

Thus
CODE
ec : fa        kDP_MouseResetWrap // begin of ECwrite
f0 : fa        kDP_SetMousePoll // command = 0    alps_ec_nibble(psmouse, 0)
f0 : fa        kDP_SetMousePoll // command = 0   alps_ec_nibble(psmouse, 0)
f6 : fa        kDP_SetDefaults // command = 1      alps_ec_nibble(psmouse, 1)
e6 : fa        kDP_SetMouseScaling1To1 // command = 0xf  alps_ec_nibble(psmouse, 0xf)

then
CODE
    /* Select new address: EC addr3 addr2 addr1 addr0 */
    if (ps2_command(ps2dev, NULL, kDP_MouseResetWrap) ||
        alps_ec_nibble(psmouse, addr >> 12) ||
        alps_ec_nibble(psmouse, addr >> 8) ||
        alps_ec_nibble(psmouse, addr >> 4) ||
        alps_ec_nibble(psmouse, addr))
        return -1;

so addr = 0x001f as we see from respond e9 : fa 00 1f 02

if you'll find info about the addresses then we can write best driver
CODE
ECwrite(0x0004, 0x06) - bad response
ECwrite(0x0006, 0x03) - bad response
ECwrite(0x0007, 0x8D) - bad response
ECwrite(0x0144, 0x04) - bad response
ECwrite(0x0159, 0x03) - bad response
ECwrite(0x004B, 0x0) - bad response
ECwrite(0x004D, 0x0) - bad response
ECwrite(0x014E, 0x0) - bad response
ECwrite(0x014D, 0x0) - bad response
ECwrite(0x0163, 0x0) - bad response
ECwrite(0x0163, 0x3) - bad response
ECwrite(0x0162, 0x0) - bad response
ECwrite(0x0162, 0x4) - bad response
ECwrite(0x0008, 0x82) - good response


and one more thought
QUOTE
It dosen't like resolution set to 3, and I know for sure is like that from windows registry:

but I see
QUOTE
-02: Resolution is 4 count/mm

May be correct initialization sequence to kDP_SetMouseSampleRate=100 kDP_SetMouseResolution=2? (ECwrite(0x0008, 0x82))
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 8 2011, 09:09 AM
Post #14
QUOTE (Slice @ Jan 7 2011, 11:30 AM) *
Why no idea? Did you read my interpretation?

Mate, bare with me, you know coding is not my thing, I'm a slow learner...
Anyway good news is that I got mouse working with your source and some additions, but up/down is reversed.. blink.gif
Today after I will finish porting my crap to the new source(yours) I will upload it so you can correct me(don't yell kthx) tongue.gif

Until then have a reading on the Andrew Skalski(the Linux patch and windows dump author):
CODE
Andrew Skalski wrote on 2010-08-10:
https://bugs.launchpad.net/ubuntu/+source/l...nger-swipes.txt
I have the "73 02 64" multitouch/dualpoint device on my Dell E6510. In a very manual process of modifying the virtualbox-ose PS/2 driver,
and copying bytes between it and /dev/serio_raw0, I managed to piece together the initialization sequence performed by the Windows
driver. The entire sequence, from boot-up, is attached. I also included raw event data for three different finger swipes:
left-to-right across the middle, top-to-bottom across the middle, and top-to-bottom across the right-edge scroll area.

Hopefully this helps in decoding the new protocol.

Andrew Skalski wrote on 2010-08-13:
https://bugs.launchpad.net/ubuntu/+source/l...iles/psmouse.ko

I applied the Dell patch (I had to modify it somewhat to make it apply cleanly), and verified that it successfully enables
vertical scrolling. It still doesn't support syndaemon, but it's a big improvement from what we had before.
Attached is a 64-bit psmouse.ko that I built against 2.6.32-24-generic.

When I have some time, I'll see about putting together a description of how I used virtualbox to manipulate the PS/2 driver.
Here's the short version:

# Enable logging in the kbd driver. Output will be written to ~/.VirtualBox/Machines/YourMachineName/Logs/Vbox.log
export VBOX_RELEASE_LOG=dev_kbd.e.l.l2.l3.f
VirtualBox [--args]

Snapshot your VM, just in case.

In the VM settings, disable "VT-x/AMD-V" (System -> Acceleration), then start up your VM.

The logs will look like:

00:00:10.810 kbd_write_mouse: kbd: write mouse 0xff
00:00:10.810 void kbd_queue(KBDState*, int, int): mouse command response: 0xfa
00:00:10.810 void kbd_queue(KBDState*, int, int): mouse command response: 0xaa
00:00:10.810 void kbd_queue(KBDState*, int, int): mouse command response: 0x00

This is the Windows driver conversing with VirtualBox's mouse emulation code
(virtualbox-ose-3.1.6-dfsg/src/VBox/Devices/Input/DevPS2.cpp).

From that point, I replaced the kbd_write_mouse() function with my own version which, instead of emulating a mouse,
would blindly reply to mouse commands by returning bytes from a hard-coded array. When it runs out of array data,
reply to all further commands with 0xFA (OK).

At first, I started with an empty array of responses. Then I went through many iterations of:

1) Boot up the VM. Figure out what the Windows driver is trying to do next, after exhausting my array of reply data.
Power off the VM.

2) Switch to Linux, send that new command to my touchpad via the serio_raw driver
(see the script I posted to https://bugzilla.kernel.org/show_bug.cgi?id=14660).
Read the touchpad's response, and add it to the end of my array.

3) Rebuild VirtualBox (debian/rules build), install the updated .so files (VBoxDD*.so) to /usr/lib/virtualbox.

4) Repeat.

Andrew Skalski wrote on 2010-08-14:

@pvillela

I tried suspending, and got the same erratic pointer behavior. Looking at the code,
the patch bails out of alps_init() before setting up reconnect/disconnect handlers.
The hardware initialization is called from the wrong place (alps_init, instead of alps_hw_init) too,
so simply assigning the reconnect handler wouldn't help without further changes.
I checked back at the patchwork site, but there were no updates.


Andrew Skalski wrote on 2010-08-20:

https://bugs.launchpad.net/ubuntu/+source/l...emulation.patch

Back from vacation. I rewrote the Dell patch, and fixed the suspend/resume bug.
I couldn't find any way to enable hardware tapping or scrolling within absolute mode -- those features are apparently
handled by the driver for this device. So, until software support is written for Linux,
we're stuck with IMPS emulation mode. I did, however, figure out how to disable/enable hardware tapping in IMPS mode,
and left it as a comment inside the patch.

The attached patch is against the Ubuntu-2.6.32-24.40 tag.


Andrew Skalski wrote on 2010-08-20:

https://bugs.launchpad.net/ubuntu/+source/l...iles/psmouse.ko

Attached updated psmouse.ko for x86_64


Andrew Skalski wrote on 2010-08-20:

https://bugs.launchpad.net/ubuntu/+source/l...emulation.patch

Here's a patch against 2.6.35. I moved the reset out of initialization and into disconnect, and rewrote the "PSMOUSE_IMPS"
hack a little differently (the original Dell patch would change psmouse->type, even when it wasn't supposed to do so.)

I wonder if this driver should be in its own .c file, separate from alps.c, since the new protocol is so different.
Maybe that's something to think about if somebody decides to implement the 6-byte absolute protocol.

I tested docking/undocking from a station with a PS/2 mouse attached, and it behaved more or less sanely.
While docked, the touchpad falls back to generic PS/2 mode, however.


Andrew Skalski wrote on 2010-10-10:

Sorry that I haven't had the time to follow up on this in a while. If upstream is holding out for multitouch specs,
then I wouldn't hold my breath waiting. From what I could tell, when I looked at it, the multitouch support in Windows
is handled by the user-space driver, and not by the hardware. So if we want that support, we're on our own.
I've decoded enough of the protocol that a full-featured driver can be written
(with the possible exception of sensitivity adjustment; though based on the Windows driver initialization,
that *might* be the job of registers 0x14d and 0x163.) But the implementation will need to handle basically
everything: tapping, dragging, scrolling, gestures, etc.

@mättu : Try setting register 0x0005 to the value 0x03 (IMPS emulation + Disable hardware tap)

It say some interesting stuff there...
Slice
post Jan 8 2011, 10:06 AM
Post #15
QUOTE (THe KiNG @ Jan 8 2011, 01:09 PM) *
Andrew Skalski wrote on 2010-10-10:
Is there any more fresh news?
QUOTE
for multitouch specs,
He has specification?
QUOTE
that *might* be the job of registers 0x14d and 0x163.) :

Try setting register 0x0005 to the value 0x03 (IMPS emulation + Disable hardware tap)

It say some interesting stuff there...

there are some info about registers I mentioned. It will be good to have more info about.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 8 2011, 10:17 AM
Post #16
QUOTE (Slice @ Jan 8 2011, 12:06 PM) *
Is there any more fresh news?He has specification?
there are some info about registers I mentioned. It will be good to have more info about.

I doubt anyone has the specs except some vendors like Toshiba(best driver for windows)
I think he tried to reverse the windows driver..
No more fresh info, I'm thinking to email him, guess I have to register on bugs.launchpad.net...
THe KiNG
post Jan 8 2011, 05:01 PM
Post #17
@ Slice,

Attached you have my fail test on EC stuff...
I managed to get it working in 3-byte mode, o/c w/o any scrolling.
Thanks for enabling original apple prefpane, you were so quiet about that wink.gif
I hope I didn't break anything and still works for you, or if you can improve the type detection and packet stuff would be great, I did all I could...
Attached File  ALPS_ECProto_Fail.zip ( 18.66K ) Number of downloads: 12


Thanks for helping me on this!
Slice
post Jan 9 2011, 09:55 AM
Post #18
First mistake
CODE
    uint16_t addr;
    uint8_t value;
    PS2Request * request = _device->allocateRequest();
    
    if ( !request ) return 0;

    // Select new address: EC addr3 addr2 addr1 addr0
    request->commands[0].command  = kPS2C_SendMouseCommandAndCompareAck;  //4
    request->commands[0].inOrOut =  kDP_MouseResetWrap; //sync.. EC

    int index = 1;
    AlpsECNibble(request, &index, addr >> 12);     -- addr is not initialized

It must be not local variable but argument of the function

Second
CODE
    if (Byte1 != 0x88 || Byte2 != 0x07 || (Byte3 != 0x9b && Byte3 != 0x9d)) // No luck so far :(
        DEBUG_LOG("ApplePS2ALPSGlidePoint Failed to enter EC Mode!\n");

if not debug then this if will affect next line. KP. Must be
{ DEBUG_LOG("ApplePS2ALPSGlidePoint Failed to enter EC Mode!\n"); }


3.
CODE
    if(_packetByteCount == 3) // Normal PS/2 mouse mode
    {
        dispatchRelativePointerEventWithPacket(_packetBuffer,3);
        _packetByteCount = 0;
        return;
    }

This means that you always in PS2 mouse mode because _packetByteCount is incremented. It may be good as temporary solution but not for our purpose.
I revert this change for next DEBUG driver.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
THe KiNG
post Jan 9 2011, 10:23 AM
Post #19
QUOTE (Slice @ Jan 9 2011, 11:55 AM) *
First mistake
CODE
    uint16_t addr;
    uint8_t value;
    PS2Request * request = _device->allocateRequest();
    
    if ( !request ) return 0;

    // Select new address: EC addr3 addr2 addr1 addr0
    request->commands[0].command  = kPS2C_SendMouseCommandAndCompareAck;  //4
    request->commands[0].inOrOut =  kDP_MouseResetWrap; //sync.. EC

    int index = 1;
    AlpsECNibble(request, &index, addr >> 12);     -- addr is not initialized

It must be not local variable but argument of the function

Second
CODE
    if (Byte1 != 0x88 || Byte2 != 0x07 || (Byte3 != 0x9b && Byte3 != 0x9d)) // No luck so far :(
        DEBUG_LOG("ApplePS2ALPSGlidePoint Failed to enter EC Mode!\n");

if not debug then this if will affect next line. KP. Must be
{ DEBUG_LOG("ApplePS2ALPSGlidePoint Failed to enter EC Mode!\n"); }


I'm open for critics, hope I will learn that way tongue.gif
I must say that I don't really enjoy this, I have more love for ACPI...
Slice
post Jan 9 2011, 11:32 AM
Post #20
QUOTE (THe KiNG @ Jan 9 2011, 02:23 PM) *
I'm open for critics, hope I will learn that way tongue.gif
I must say that I don't really enjoy this, I have more love for ACPI...

You can't make trackpad driver by ACPI methods smile.gif

Test debug version and look into kernel.log at start and while touching. (if no KP )
Attached File  VoodooALPSDebug.zip ( 94.14K ) Number of downloads: 23
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2

9 Pages V   1 2 3 > » 
Add Reply Start a new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: