OpenSteamController icon indicating copy to clipboard operation
OpenSteamController copied to clipboard

Hd rumble converter

Open cualquiercosa327 opened this issue 6 years ago • 3 comments

Hello,the SteamController has the same technology for rumble as Nintendo Joycon and Nintendo Switch Pro Controller : linear resonant actuators. It could be seen of several ways,but maybe the most interesting is a kind of "speaker" which could emulate textures,sensations.. One the best uses could be seen on the minigames from 1 2 Switch,in concrete the Kazuate game (ball counting)

It would amazing could port the files between the diferent formats. (They are more devices which use the tech and others which would be released as the dualshock 5 for playstation 5 next year).

The Steam Controller has them on their rom according this web

The Nintendo format is called "bnvib" and it has been reverse enginering. it is created with a program than Nintendo included on their SDK using a wav file .Also,son same cases, they use an extra file on a format called "nvibcp" which give some description of how the sound must be converted. I only has been seen this file once time while reverse enginering the minigame kazuake ,in concrete it seems was used to create the file "Kazuate_VIB_Rolling2_SlowReverse.bnvib".

Ctcaer also create the format "jcvib" which is the bnvib expanded ,as the controller is able to understand it directly.

According to Ctcaer :

" The vibration data is encoded so every frequency and amplitude fit into a byte that joy-cons understand.these files are not sent to the joy-cons.They are parsed in the console, Anyway, these files are not sent to the joy-cons .They are parsed in the console,decoded and sent to Joy-Cons re-encoded in a format they understand. So this is real-time, not preloaded. . Each packet sent to joycon can have maximum 8 bytes of vibration data. 4 for each one (left/right).

.bnvib is the official format and keeps the vibration into 4 uint8.

.jcvib is my coined format and it's raw. 4 uint8 that the controller can understand right away.

Ctcaer also checked the SteamControllerSinger and it's similar on what to do. The only difference is what raw commands each controller understand and the frequency bandwidth of these.

Joy-con bandwidth is small: Low freq band: 40.875 - 626.286Hz High freq band: 81.751 - 1252.572Hz

So that's why you need to transport the notes to lower octaves until you are inside the range and then separate bass-mid and mid-high notes.

I can easily convert the frequencies but the amplitudes need a look up table, because I haven't reverse engineered the algorithm behind it.

The encoding algorithm for frequency is -32*(log(2)-log(freq/5))/log(2)

The algorithm for amplitude is splitted in 3 range indexes (idx < 16, 16 <= idx < 32, idx < 128) and it's currently undecoded.

The amplitudes below are not safe for the integrity of the linear resonant actuators.

" Here i post the links where i found the info (Also give thankd to CTCaer for give some explanations directly)

https://gbatemp.net/threads/tool-joy-con-toolkit.478560/

https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering

https://github.com/CTCaer/jc_toolkit

https://gbatemp.net/threads/tool-joy-con-toolkit.478560/

cualquiercosa327 avatar Nov 28 '19 13:11 cualquiercosa327

Hi again,i would add than the rumble which are included on Steam controller are three : simulate mouse wheel,trackpad and gun

cualquiercosa327 avatar Dec 01 '19 11:12 cualquiercosa327

Hello,i have found a website (on Japanese) than talk about the joycon rumble hd , and the author has created a library and program to use the right Joycon on windows . I recommend read the text (with a translator as the google one)

The library (binary and source code)

http://kako.com/blog/?p=46325

the link : http://www.kako.com/zipfile_here/tiny_bt_hid_v01.zip

-A sound recording he created

http://kako.com/blog/?p=34689

http://www.kako.com/zipfile_here/joycon_music_test_v01.zip

-A nice experiment he tried to record rumble files:

http://kako.com/blog/?p=24418

I must give thanks to him for everything because i have learned a lot (I mailed him but i dont know if he received)

Also they are a great link on the latest web which came on english:

http://www.techtile.org/en/techtiletoolkit/

cualquiercosa327 avatar Dec 06 '19 19:12 cualquiercosa327

I don't know if this helps, but I found out the exact haptic output parts that are used in the steam controller; there are a total of 2 parts - 1 part attached to the back of each trackpad. They are AlpsAlpine HAPTIC™ Reactors. Although I'm having trouble finding a retailer that carries that part; the site I linked says that 1 order requires a minimum quantity of 1000, and does not provide a datasheet. https://www.allaboutcircuits.com/uploads/articles/Steam_Controller_round_PCB.jpg

2bndy5 avatar Apr 09 '20 05:04 2bndy5