Hacking [Tool] Joy-Con Toolkit

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
Quick question, is there a way to adjust the Left stick calibration/deadzone through this? Doing it through the switch is very frustrating as , especially when you can see what the issue is through this program (when titlting to the right, 75% time the X value will only reach .80 rather than 1). Being able to lower the outer range would be a godsend.

Edit: Think I figured it out looking at the source code and opening the spi backup in an editor. Will experiment a bit.

Edit 2: Was successfully able to edit it and apply, this tool is amazing! Saved me from gambling another 70 hoping to get a left joycon stick without range issues.

He he, I was preparing to explain how to change the user calibration of L-Stick manually but you figured it out.
Nice job!

And remember spi_flash_notes is your friend for understanding the SPI flash dump.
You can also do this job easily, by sending the correct x11 SPI Write subcmd in Debug: Expert mode, instead of using the restore option and a modified SPI backup.
 

cualquiercosa327

Well-Known Member
Member
Joined
Mar 24, 2009
Messages
201
Trophies
1
XP
428
Country
I've changed 2 bits in the SPI that control how the controller shows up. The firmware is the same for all 3 controllers, so this kind of thing works.
But you have half the buttons to use, so it's only for testing things.

I also have the Mayflash Magic-NS. It's the reason I don't have a Pro controller actually.
Steam controller is not supported by it yet. Maybe it can support it through USB connection.
Better ask them at [email protected] for support

Hello.Thanks for your great work.I only wanna said i have just send a mail (i think it is dificult they implement because this controller has the option of create your own profiles and i doubt it has many free space for kept several of them).
I dont know if you have see than they are in proyect a new linux kernel driver for use this controller which is going to be included on the kernel itself.
https://github.com/rodrigorc/inputmap
Excuse me for use your thread for posting this,i thought it could be interesnting for many people ( this controller has the same haptip feedback than ours joycon which is great)
Thank you for all
Dani
 

cualquiercosa327

Well-Known Member
Member
Joined
Mar 24, 2009
Messages
201
Trophies
1
XP
428
Country
Hello.Thanks for your great work.I only wanna said i have just send a mail (i think it is dificult they implement because this controller has the option of create your own profiles and i doubt it has many free space for kept several of them).
I dont know if you have see than they are in proyect a new linux kernel driver for use this controller which is going to be included on the kernel itself.
https://github.com/rodrigorc/inputmap
Excuse me for use your thread for posting this,i thought it could be interesnting for many people ( this controller has the same haptip feedback than ours joycon which is great)
Thank you for all
Dani

Hello.They have answer me this ,which is a little strange but..
"We do not have your mentioned Steam Controller device so as we can not make test for it.
We’ve tested original PS4/XBOX ONE/WII U PRO..controller and they all work well."

also i have found than homebrew developers are able to use ir_camera (i am no sure if it could work on pc also : my Switch is no able to load homebrew and i have no download and test anything..

https://github.com/switchbrew/switch-examples/blob/master/hid/irsensor/source/main.c
 

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
@cualquiercosa327
Well, to my understanding, inputmap cannot be used for Joy-Con, because it speaks with input interface.
Joy-Con's normal input is way limited and it works just by connecting the controller.
To access the full functions (Analog joysticks, gyro/acc, hd rumble, IR, etc), you need a kernel driver that speaks to hid interface.

About the libnx devkit samples, as you can see I took a small part to the IR image transfer functions:
https://github.com/switchbrew/libnx/commit/e243e4507ec777a855f4996ef706a6c35e1986f0

The thing is that, these are tied with the nintendo switch services that exist on the device.
The only way, to have IR on PC, is first for us to decode the direct communication with the Joy-Con.
Unfortunately, now that I can use the irsensor sample homebrew, I don't have a working UART sniffer to capture the IR config and input report packets..

In the end, I don't think that we will be far away from accomplishing this.
This weekend, I'll try to fix my adapter and try REing the IR protocol again.
 
Last edited by CTCaer,
  • Like
Reactions: MK73DS

cualquiercosa327

Well-Known Member
Member
Joined
Mar 24, 2009
Messages
201
Trophies
1
XP
428
Country
@cualquiercosa327
Well, to my understanding, inputmap cannot be used for Joy-Con, because it speaks with input interface.
Joy-Con's normal input is way limited and it works just by connecting the controller.
To access the full functions (Analog joysticks, gyro/acc, hd rumble, IR, etc), you need a kernel driver that speaks to hid interface.

Hi,i think it has been mixed two matters : one about the posibility of use the Steam Controller on linux and (i wish) on the consoles.

I talking about "Rodrigo Rivas Costa" is creating a kernel driver for the steam controller which the info he has discover while RE it,and it is going to be incluided on the oficial kernel and also some "tools" (which are on his github).

https://www.phoronix.com/scan.php?page=news_item&px=Steam-Controller-RE-Kernel

Also they are a user mode way to use the steam controller

https://github.com/kozec/sc-controller

I am not sure if the joycon could work on linux on the same way but i think in case something would be made it should be similar .
I paste the answer of the company of my-flash NS about a posible implementation of steam controller as other compatible controller with there device.

@cualquiercosa327

About the libnx devkit samples, as you can see I took a small part to the IR image transfer functions:
https://github.com/switchbrew/libnx/commit/e243e4507ec777a855f4996ef706a6c35e1986f0

The thing is that, these are tied with the nintendo switch services that exist on the device.
The only way, to have IR on PC, is first for us to decode the direct communication with the Joy-Con.
Unfortunately, now that I can use the irsensor sample homebrew, I don't have a working UART sniffer to capture the IR config and input report packets..

Excuse me for no inform myself more about the proyect (now i am studing for a job and i have no many free time for other stuff) but again : thanks about your implication on the Switch proyects (I love your tool,only miss ,again i have no test the new version and i dont know if it can be done already,some scripting or way to use several vibration files (an example would be could "recreate" the minigame "kazuate" of 1 2 Switch)

@cualquiercosa327
In the end, I don't think that we will be far away from accomplishing this.
This weekend, I'll try to fix my adapter and try REing the IR protocol again
Then you sniff the data and found how it works directly? I thought you could use some programs as IDA PRO for decompiling the services and understand them for implement them later
 

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
@cualquiercosa327
Yes the joy-con can work as full fledged controller with their own custom drivers. For now there are many user mode programs for Joy-Con though.

About rumble and 1-2 Switch:
It can be done by REing the game, and then make an emulation of the way these .bnvib files are played.

For the above 2, it's not in my plans to look into them..

About REing IR Sensor:
Actually both. I have the sample packets and I figure them out from REing the services through IDA. It's way easier that way and there's no need to learn what every byte/bit in the packet does.

-----------

Anyway, I'm gonna drop this here:
426I8wd.png


For now the image for testing is 60 x 80. When I'll finalize this, you will be able to choose up to 240 x 320
 

TotalInsanity4

GBAtemp Supreme Overlord
Member
Joined
Dec 1, 2014
Messages
10,800
Trophies
0
Location
Under a rock
XP
9,814
Country
United States
@MK73DS
You haven't seen anything yet.
It constantly changes as I figure things out
Here's with a nice pseudo thermo color palette and max res (it's a petty it's NIR camera though..):
1EjBiUa.png
That's upsetting, I thought you somehow managed to make thermal imaging work with the IR camera lol
 
  • Like
Reactions: CTCaer

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
@MK73DS
You haven't seen anything yet.
It constantly changes as I figure things out
Here's with a nice pseudo thermo color palette and max res (it's a petty it's NIR camera though..):
1EjBiUa.png

I'm dying now *-*
I absolutely didn't expect you to be able to RE and implement the NIR camera so quickly ! I don't have any word, that's maybe the biggest news for me this month (with SSB for Switch, of course :3)
 

Ep8Script

Well-Known Member
Member
Joined
Aug 5, 2017
Messages
335
Trophies
0
XP
555
Country
Australia
EDIT:
Oh, there's a new joy-con update. Can someone send me a new spi backup after updating the controller?
I'll try to find what exactly changed.

If you upload the source code/build with the IR camera. :P

Lol, either way I'll try to have it done within the next 24 hours, just can't do it right now. But my Joy-Con are updated so I can do it.
 
  • Like
Reactions: CTCaer

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
If you upload the source code/build with the IR camera. :P

Lol, either way I'll try to have it done within the next 24 hours, just can't do it right now. But my Joy-Con are updated so I can do it.

Haha don't worry! You know that I always release it and normally before the binary release.

Also a nice fellow at dekunukem repository has info about nfc.
I'm planning for a release with nfc support also.

But for now I want more IR modes. I'm going for hand analysis mode. I'll release the imagetransfer mode code before that though, so people can poke with it.
 

Ep8Script

Well-Known Member
Member
Joined
Aug 5, 2017
Messages
335
Trophies
0
XP
555
Country
Australia
Haha don't worry! You know that I always release it and normally before the binary release.

Also a nice fellow at dekunukem repository has info about nfc.
I'm planning for a release with nfc support also.

But for now I want more IR modes. I'm going for hand analysis mode. I'll release the imagetransfer mode code before that though, so people can poke with it.
Thanks so much!

Oh and that's awesome, you're doing God's work honestly porting all this to Windows. NFC support would be super cool, is that just reading or writing? I assume both, but I doubt you could use it to "emulate" an amiibo because if you could, everyone on here would go crazy haha.

That makes sense. Hand analysis would be cool if you could work it out, do you mean similar to the Kinect... like a wireframe or something? Would be cool to see. I hope you release the imagetransfer very soon because I'd love to check it out! Hate pushing you though because I know you're doing all the work and I'm just using it, but I'm a fan and would love to try it! Thanks.
 

Ep8Script

Well-Known Member
Member
Joined
Aug 5, 2017
Messages
335
Trophies
0
XP
555
Country
Australia
I got the email for you adding to the issue and I got excited thinking you released it, rip. Constant stream does sound good tho!

Also here's that thing I promised. I'm not sure if it'll be helpful but I hope it is.
 

Attachments

  • spi_left_DC68EBC8FF26.zip
    133 KB · Views: 129

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
Thanks so much!

Oh and that's awesome, you're doing God's work honestly porting all this to Windows. NFC support would be super cool, is that just reading or writing? I assume both, but I doubt you could use it to "emulate" an amiibo because if you could, everyone on here would go crazy haha.

That makes sense. Hand analysis would be cool if you could work it out, do you mean similar to the Kinect... like a wireframe or something? Would be cool to see. I hope you release the imagetransfer very soon because I'd love to check it out! Hate pushing you though because I know you're doing all the work and I'm just using it, but I'm a fan and would love to try it! Thanks.

Read/write. But I don't know if all tag regions are accessible.

Hand analysis produces points for finger prints, point for hand/palm center, points for joints and full outline of the hand shape.
You can create wireframes by connecting the dots if you want, and then track them.
It can understand many things but you can create wonders with the data provided.
The outline specifically works with everything and you can write an AI parser code for that to identify different object shapes and movement.

I got the email for you adding to the issue and I got excited thinking you released it, rip. Constant stream does sound good tho!

Also here's that thing I promised. I'm not sure if it'll be helpful but I hope it is.
Got it thank you. You can now delete it, because it has your BD_Addr (except if you don't care :P).
 
  • Like
Reactions: TotalInsanity4

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: :rofl2: :rofl2: