diff options
| author | MmAaXx500 <viktor.balogh45@gmail.com> | 2024-07-26 16:57:13 +0200 |
|---|---|---|
| committer | MmAaXx500 <viktor.balogh45@gmail.com> | 2024-07-26 23:11:28 +0200 |
| commit | 03fa8fcdf35fa0757f283d7f3f0c69b46fb9bd47 (patch) | |
| tree | 139b41205a53e8ad0f053ded5323ecd5baa9fb5f | |
| parent | 7ba0884ca4ef4663698071c56f4b6f85d7faaff1 (diff) | |
| download | hid-tmff2-03fa8fcdf35fa0757f283d7f3f0c69b46fb9bd47.tar.gz hid-tmff2-03fa8fcdf35fa0757f283d7f3f0c69b46fb9bd47.zip | |
document periodic effect update packets
| -rw-r--r-- | docs/FFBEFFECTS.md | 184 |
1 files changed, 108 insertions, 76 deletions
diff --git a/docs/FFBEFFECTS.md b/docs/FFBEFFECTS.md index 60b2e50..8ce57b9 100644 --- a/docs/FFBEFFECTS.md +++ b/docs/FFBEFFECTS.md @@ -662,11 +662,10 @@ Update type: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ``` -### Offset: `N/A` - ## FF_PERIODIC: + ### Init -``` +``` 60 00 - standard header 01 - ID 6b - new periodic effect @@ -675,7 +674,7 @@ Update type: 00 00 - phase (left/right) between 00 00 and 4a f7 (32586) meaning is 0 to ~359 deg phase shift in 5b steps e8 03 - period between 00 00 and ff ff (in milliseconds) - 00 80 + 00 80 00 00 - attack_length 00 00 - attack_level *** 00 00 - fade_length @@ -695,8 +694,27 @@ Update type: ``` ### Modifying: + +``` +4th byte 5th byte hex +00001110 00000001 0e 01 - magnitude +00001110 00000010 0e 02 - offset +00001110 00000100 0e 04 - phase +00001110 00001000 0e 08 - period +00001110 00001111 0e 0f - magnitude + offset + phase + period +01001001 49 - duration / offset / duration + offset +00110001 10000001 31 81 - envelope attack length +00110001 10000010 31 82 - envelope attack level +00110001 10000100 31 84 - envelope fade length +00110001 10001000 31 88 - envelope fade level +00101001 29 - envelope (all) +00101110 00001111 2e 0f - magnitude + offset + phase + period + envelope +00110110 00001111 36 0f - magnitude + offset + phase + period + envelope attack length & level +01101110 00001111 6e 0f - magnitude + offset + phase + period + envelope + duration + offset ``` - magnitude: + +``` +magnitude: 60 00 02 - ID 0e 01 @@ -706,118 +724,132 @@ Update type: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - offset of effect: - 60 00 - 02 - ID - 0e 02 - 64 35 - value, between ff bf (-16385) and fd 3f (16381) - 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - - phase: +magnitude + offset + phase + period: 60 00 - 02 - ID - 0e 04 - 64 35 - value, between 00 00 and 4a f7 (32586) in 5b steps + 01 - ID + 0e 0f + dd 3f - magnitude, between 00 00 and fc 7f (32764) + cb 0c - offset, between ff bf (-16385) and fd 3f (16381) + 5a 00 - phase, between 00 00 and 4a f7 (32586) in 5b steps meaning is 0 to 359 deg phase shift - 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - - period: - 60 00 - 02 - ID - 0e 08 - 64 35 - value, between 00 00 and ff ff (in milliseconds) - 00 00 00 00 00 00 00 00 00 + f8 2a - period, between 00 00 and ff ff (in milliseconds) + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ``` -### Envelope: +#### Envelope: ``` +envelope attack/fade level/length: + multiple values can be updated with one packet + 60 00 - standard header 01 - ID - 31 - modify envelope - 84 - ID of envelope attribute ( attack_level 82, - attack_length 81, - fade_level 88, - fade_length 84 ) - 63 04 - value attribute should be set to - 00 00 00 00 00 00 00 00 00 + 31 85 + d0 07 - attack length + dc 05 - fade length + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -``` -### Duration: -``` - Square: - 60 00 +envelope (all): + 60 00 - standard header 01 - ID - 49 - ? - 01 - Effect type - 41 - ? - 4e 0c - Time in milliseconds - 00 00 00 00 00 00 00 00 + 29 + d0 07 - attack length + 69 34 - attack level + dc 05 - fade length + 32 1a - fade level + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +``` - Sine: +#### Duration: +``` 60 00 01 - ID - 49 - ? - 03 - Effect type - 41 - ? - ec 13 - Time in milliseconds - 00 00 00 00 00 00 00 00 + 49 + 03 - effect type 01 - Square + 02 - Triangle + 03 - Sine + 04 - Sawtooth up + 05 - Sawtooth down + 45 - update type 41 - duration + 44 - offset + 45 - duration + offset + 74 27 - duration + 00 00 - offset + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +``` + +#### Combined - Triangle: +``` +magnitude + offset + phase + period + envelope: 60 00 01 - ID - 49 - ? - 02 - Effect type - 41 - ? - 4e 0c - Time in milliseconds - 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 2e 0f + dd 3f - magnitude, between 00 00 and fc 7f (32764) + cb 0c - offset + 5a 00 - phase + f8 2a - period + dc 05 - attack length + 30 73 - attack level + e8 03 - fade length + 30 73 - fade level + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - Sawtooth up: +magnitude + offset + phase + period + envelope attack length & level: 60 00 01 - ID - 49 - ? - 04 - Effect type - 41 - ? - 4e 0c - Time in milliseconds - 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 36 0f + dd 3f - magnitude + cb 0c - offset + 5a 00 - phase + f8 2a - period + 83 - envelope update type + e8 03 - attack length + cc 0c - attack level + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - Sawtooth down: +magnitude + offset + phase + period + envelope + duration + offset: 60 00 01 - ID - 49 - ? - 05 - Effect type - 41 - ? - ec 13 - Time in milliseconds - 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 6e 0f + dd 3f - magnitude + cb 0c - offset + 5a 00 - phase + f8 2a - period + cc 0c - attack length + e8 03 - attack level + dc 05 - fade length + cc 0c - fade level + 03 - effect type 01 - Square + 02 - Triangle + 03 - Sine + 04 - Sawtooth up + 05 - Sawtooth down + 45 - update type 41 - duration + 44 - offset + 45 - duration + offset + 74 27 - duration + 00 00 - offset + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ``` -### Offset: `N/A ?` ## PS4 Input `rdesc` ``` |
