Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hd rumble converter #10

Open
cualquiercosa327 opened this issue Nov 28, 2019 · 3 comments
Open

Hd rumble converter #10

cualquiercosa327 opened this issue Nov 28, 2019 · 3 comments

Comments

@cualquiercosa327
Copy link

cualquiercosa327 commented Nov 28, 2019

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
Copy link
Author

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

@cualquiercosa327
Copy link
Author

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/

@2bndy5
Copy link

2bndy5 commented Apr 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants