diff --git a/README.md b/README.md index 6e02418..230b94d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,34 @@ ![](http://ctcaer.com/wii/jc6.png) This image is for reference. +## Information + +Joy-Con Toolkit is a downloadable program that allows users to modify the digital appearance of their official Nintendo Switch Joy-Con and Pro Controllers via Bluetooth connection + +Additional features include: IR camera captures, NFC reading, saving custom colors, backing up SPI flash, calibrating analog sticks, and more + +## v5.2.0 Changelog + +Near Infrared Camera: +* Add live configuration when streaming +* Add many new IR settings (de-noise, led intensity, strobe lights, etc) +* Change custom IR sensor registers +* Auto exposure mode (This is done manually, so it's experimental. Expect bugs). + +User Calibration Editing: +* Add Accelerometer/Gyroscope user calibration editing +* Add Stick device factory parameters editing. Helps when you have drifting issues, that can't be fixed by calibrating the stick. Just raise the deadzone value. + +Debugging / Troubleshooting: +* Add 2 command line options: +* -d: Dumps the communication packets into a log text file +* -f: Forces the app to not check for connection again. Helps in some cases that the app reports that the controller was disconnected. + +Others: +* Organize the IR/Playground/Calibration panels a little better +* Many bugfixes and optimizationsbugfixes/optimizations + + ## Prerequisites: **Microsoft Visual C++ 2017 (x86) Redistributable** (All Windows versions) diff --git a/jctool/FormJoy.h b/jctool/FormJoy.h index 5acf86e..701afbd 100644 --- a/jctool/FormJoy.h +++ b/jctool/FormJoy.h @@ -1,5 +1,26 @@ -// Copyright (c) 2018 CTCaer. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ #pragma once #include diff --git a/jctool/Overrides.h b/jctool/Overrides.h index a7c3441..482b357 100644 --- a/jctool/Overrides.h +++ b/jctool/Overrides.h @@ -1,3 +1,27 @@ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + #pragma once namespace Overrides { using namespace System::Windows::Forms; diff --git a/jctool/RCa30052 b/jctool/RCa30052 new file mode 100644 index 0000000..1fa1db2 Binary files /dev/null and b/jctool/RCa30052 differ diff --git a/jctool/colors.xml b/jctool/colors.xml new file mode 100644 index 0000000..1641033 --- /dev/null +++ b/jctool/colors.xml @@ -0,0 +1,29 @@ + + + + + + + + + \ No newline at end of file diff --git a/jctool/dpiawarev2.manifest.xml b/jctool/dpiawarev2.manifest.xml index 78575d6..485a716 100644 --- a/jctool/dpiawarev2.manifest.xml +++ b/jctool/dpiawarev2.manifest.xml @@ -1,3 +1,25 @@ + + diff --git a/jctool/ir_sensor.h b/jctool/ir_sensor.h index b8c5b62..eba6edb 100644 --- a/jctool/ir_sensor.h +++ b/jctool/ir_sensor.h @@ -1,3 +1,27 @@ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + #pragma once // crc-8-ccitt / polynomial 0x07 look up table diff --git a/jctool/jc_colorpicker/AdobeColors.cs b/jctool/jc_colorpicker/AdobeColors.cs index 2d3a725..140014a 100644 --- a/jctool/jc_colorpicker/AdobeColors.cs +++ b/jctool/jc_colorpicker/AdobeColors.cs @@ -18,6 +18,30 @@ /***** *****/ /******************************************************************/ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + using System.Drawing; namespace jcColor { diff --git a/jctool/jc_colorpicker/AssemblyInfo.cs b/jctool/jc_colorpicker/AssemblyInfo.cs index d343c33..d8e383b 100644 --- a/jctool/jc_colorpicker/AssemblyInfo.cs +++ b/jctool/jc_colorpicker/AssemblyInfo.cs @@ -1,3 +1,27 @@ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + using System.Reflection; using System.Runtime.CompilerServices; diff --git a/jctool/jc_colorpicker/PresetNameDialog.Designer.cs b/jctool/jc_colorpicker/PresetNameDialog.Designer.cs index 3cd6cec..5ecd1ad 100644 --- a/jctool/jc_colorpicker/PresetNameDialog.Designer.cs +++ b/jctool/jc_colorpicker/PresetNameDialog.Designer.cs @@ -1,4 +1,28 @@ -namespace jcColor +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + +namespace jcColor { partial class PresetNameDialog { diff --git a/jctool/jc_colorpicker/PresetNameDialog.cs b/jctool/jc_colorpicker/PresetNameDialog.cs index 0d68f68..250e60e 100644 --- a/jctool/jc_colorpicker/PresetNameDialog.cs +++ b/jctool/jc_colorpicker/PresetNameDialog.cs @@ -1,4 +1,28 @@ -using System; +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + +using System; using System.Windows.Forms; namespace jcColor diff --git a/jctool/jc_colorpicker/RoundButton.cs b/jctool/jc_colorpicker/RoundButton.cs index 3a453d1..ff1e399 100644 --- a/jctool/jc_colorpicker/RoundButton.cs +++ b/jctool/jc_colorpicker/RoundButton.cs @@ -1,3 +1,27 @@ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + using System; using System.Windows.Forms; using System.ComponentModel; diff --git a/jctool/jc_colorpicker/Util.cs b/jctool/jc_colorpicker/Util.cs index 3af4aa8..fb2d684 100644 --- a/jctool/jc_colorpicker/Util.cs +++ b/jctool/jc_colorpicker/Util.cs @@ -5,6 +5,30 @@ // Modified by: // CTCaer | Feb 2018. +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + using System; using System.Collections.Generic; using System.Drawing; diff --git a/jctool/jc_colorpicker/ctrl2DColorBox.cs b/jctool/jc_colorpicker/ctrl2DColorBox.cs index ef09a41..70d3387 100644 --- a/jctool/jc_colorpicker/ctrl2DColorBox.cs +++ b/jctool/jc_colorpicker/ctrl2DColorBox.cs @@ -18,6 +18,30 @@ /***** *****/ /******************************************************************/ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; diff --git a/jctool/jc_colorpicker/ctrlVerticalColorSlider.cs b/jctool/jc_colorpicker/ctrlVerticalColorSlider.cs index 2067dae..bb694c3 100644 --- a/jctool/jc_colorpicker/ctrlVerticalColorSlider.cs +++ b/jctool/jc_colorpicker/ctrlVerticalColorSlider.cs @@ -18,6 +18,30 @@ /***** *****/ /******************************************************************/ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + using System; using System.Drawing; using System.Windows.Forms; diff --git a/jctool/jc_colorpicker/frmJoyConColorPicker.cs b/jctool/jc_colorpicker/frmJoyConColorPicker.cs index 43fe3b0..f905d73 100644 --- a/jctool/jc_colorpicker/frmJoyConColorPicker.cs +++ b/jctool/jc_colorpicker/frmJoyConColorPicker.cs @@ -19,6 +19,30 @@ /***** *****/ /******************************************************************/ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + using System; using System.Drawing; using System.ComponentModel; @@ -1289,53 +1313,57 @@ private void InitializeComponent() { // // rbtn_RetailColors17 // - this.rbtn_RetailColors17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(175)))), ((int)(((byte)(175))))); this.rbtn_RetailColors17.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.rbtn_RetailColors17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + //this.rbtn_RetailColors17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); this.rbtn_RetailColors17.Location = new System.Drawing.Point(4, 7); this.rbtn_RetailColors17.Name = "rbtn_RetailColors17"; this.rbtn_RetailColors17.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors17.TabIndex = 16; this.rbtn_RetailColors17.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors17, "Pastel Pink"); this.rbtn_RetailColors17.UseVisualStyleBackColor = false; this.rbtn_RetailColors17.Click += new System.EventHandler(this.m_lbl_Preset_Click); // // rbtn_RetailColors18 // - this.rbtn_RetailColors18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(255)))), ((int)(((byte)(130))))); this.rbtn_RetailColors18.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.rbtn_RetailColors18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + //this.rbtn_RetailColors18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); this.rbtn_RetailColors18.Location = new System.Drawing.Point(42, 7); this.rbtn_RetailColors18.Name = "rbtn_RetailColors18"; this.rbtn_RetailColors18.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors18.TabIndex = 17; this.rbtn_RetailColors18.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors18, "Pastel Yellow"); this.rbtn_RetailColors18.UseVisualStyleBackColor = false; this.rbtn_RetailColors18.Click += new System.EventHandler(this.m_lbl_Preset_Click); // // rbtn_RetailColors19 // - this.rbtn_RetailColors19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(203)))), ((int)(((byte)(235))))); this.rbtn_RetailColors19.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.rbtn_RetailColors19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + //this.rbtn_RetailColors19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); this.rbtn_RetailColors19.Location = new System.Drawing.Point(80, 7); this.rbtn_RetailColors19.Name = "rbtn_RetailColors19"; this.rbtn_RetailColors19.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors19.TabIndex = 18; this.rbtn_RetailColors19.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors19, "Pastel Purple"); this.rbtn_RetailColors19.UseVisualStyleBackColor = false; this.rbtn_RetailColors19.Click += new System.EventHandler(this.m_lbl_Preset_Click); // // rbtn_RetailColors20 // - this.rbtn_RetailColors20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(188)))), ((int)(((byte)(255)))), ((int)(((byte)(200))))); this.rbtn_RetailColors20.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.rbtn_RetailColors20.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + //this.rbtn_RetailColors20.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); this.rbtn_RetailColors20.Location = new System.Drawing.Point(118, 7); this.rbtn_RetailColors20.Name = "rbtn_RetailColors20"; this.rbtn_RetailColors20.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors20.TabIndex = 19; this.rbtn_RetailColors20.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors20, "Pastel Green"); this.rbtn_RetailColors20.UseVisualStyleBackColor = false; this.rbtn_RetailColors20.Click += new System.EventHandler(this.m_lbl_Preset_Click); // @@ -1393,49 +1421,53 @@ private void InitializeComponent() { // // rbtn_RetailColors25 // - this.rbtn_RetailColors25.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors25.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(55)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); this.rbtn_RetailColors25.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rbtn_RetailColors25.Location = new System.Drawing.Point(4, 43); this.rbtn_RetailColors25.Name = "rbtn_RetailColors25"; this.rbtn_RetailColors25.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors25.TabIndex = 24; this.rbtn_RetailColors25.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors25, "Pastel Pink"); this.rbtn_RetailColors25.UseVisualStyleBackColor = false; this.rbtn_RetailColors25.Click += new System.EventHandler(this.m_lbl_Preset_Click); // // rbtn_RetailColors26 // - this.rbtn_RetailColors26.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors26.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(51)))), ((int)(((byte)(45))))); this.rbtn_RetailColors26.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rbtn_RetailColors26.Location = new System.Drawing.Point(42, 43); this.rbtn_RetailColors26.Name = "rbtn_RetailColors26"; this.rbtn_RetailColors26.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors26.TabIndex = 25; this.rbtn_RetailColors26.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors26, "Pastel Yellow"); this.rbtn_RetailColors26.UseVisualStyleBackColor = false; this.rbtn_RetailColors26.Click += new System.EventHandler(this.m_lbl_Preset_Click); // // rbtn_RetailColors27 // - this.rbtn_RetailColors27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(55)))), ((int)(((byte)(48)))), ((int)(((byte)(55))))); this.rbtn_RetailColors27.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rbtn_RetailColors27.Location = new System.Drawing.Point(80, 43); this.rbtn_RetailColors27.Name = "rbtn_RetailColors27"; this.rbtn_RetailColors27.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors27.TabIndex = 26; this.rbtn_RetailColors27.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors27, "Pastel Purple"); this.rbtn_RetailColors27.UseVisualStyleBackColor = false; this.rbtn_RetailColors27.Click += new System.EventHandler(this.m_lbl_Preset_Click); // // rbtn_RetailColors28 // - this.rbtn_RetailColors28.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.rbtn_RetailColors28.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(50)))), ((int)(((byte)(45))))); this.rbtn_RetailColors28.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.rbtn_RetailColors28.Location = new System.Drawing.Point(118, 43); this.rbtn_RetailColors28.Name = "rbtn_RetailColors28"; this.rbtn_RetailColors28.Size = new System.Drawing.Size(32, 32); this.rbtn_RetailColors28.TabIndex = 27; this.rbtn_RetailColors28.Text = "roundButton16"; + this.toolTip1.SetToolTip(this.rbtn_RetailColors28, "Pastel Green"); this.rbtn_RetailColors28.UseVisualStyleBackColor = false; this.rbtn_RetailColors28.Click += new System.EventHandler(this.m_lbl_Preset_Click); // diff --git a/jctool/jc_colorpicker/jcColorDialog.vs2017.csproj b/jctool/jc_colorpicker/jcColorDialog.vs2017.csproj index b184db3..462326f 100644 --- a/jctool/jc_colorpicker/jcColorDialog.vs2017.csproj +++ b/jctool/jc_colorpicker/jcColorDialog.vs2017.csproj @@ -1,4 +1,25 @@ - + + Local diff --git a/jctool/jctool.cpp b/jctool/jctool.cpp index 57a2dd8..607bdd2 100644 --- a/jctool/jctool.cpp +++ b/jctool/jctool.cpp @@ -1,10 +1,32 @@ -// Copyright (c) 2018 CTCaer. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ #include #include #include #include +#include // #define NOMINMAX #include @@ -20,6 +42,7 @@ using namespace CppWinFormJoy; #pragma comment(lib, "SetupAPI") bool enable_traffic_dump = false; +bool enable_hid_listings = false; // new line, disable hid listing hid_device *handle; hid_device *handle_l; @@ -2905,6 +2928,41 @@ void usb_device_print(struct hid_device_info *dev) } */ +void output_hid_device_info_list() { + // Enumerate and output the HID devices on the system + hid_device_info* devs, * cur_dev; + devs = hid_enumerate(0x0, 0x0); + cur_dev = devs; + std::wstring dev_info_list; + while (cur_dev) { + std::wstringstream dev_info; + if (cur_dev->product_string || cur_dev->manufacturer_string || cur_dev->serial_number) { + wchar_t* product_string = cur_dev->product_string ? cur_dev->product_string : L"Unknown Product"; + wchar_t* manufacturer_string = cur_dev->manufacturer_string ? cur_dev->manufacturer_string : L"Unknown Manufacturer"; + wchar_t* serial_number = cur_dev->serial_number ? cur_dev->serial_number : L"Unknown Serial Number"; + + dev_info << std::setfill(L'0') << std::hex; + dev_info << L"HID Device: 0x" << std::setw(4) << cur_dev->product_id << L" \"" << product_string << L'"' << L'\n'; + dev_info << L"\tvendor = 0x" << std::setw(4) << cur_dev->vendor_id << L" \"" << manufacturer_string << L'"' << L'\n'; + dev_info << L"\trelease = " << std::dec << cur_dev->release_number << L'\n'; + dev_info << L"\tserial = " << serial_number << std::hex << L'\n'; + dev_info << L"\tusage = 0x" << std::setw(4) << cur_dev->usage << L" page: 0x" << cur_dev->usage_page << L'\n'; + dev_info << L"\n" << cur_dev->path; + + std::wstring dev_info_str = dev_info.str(); + System::String^ dev_info_str_handle = System::String(dev_info_str.c_str(), 0, dev_info_str.length()).ToString(); + + if (MessageBox::Show(dev_info_str_handle, + L"CTCaer's Joy-Con Toolkit - HID Device Info Report", + MessageBoxButtons::OKCancel, MessageBoxIcon::Information) == System::Windows::Forms::DialogResult::Cancel) { + break; + } + } + cur_dev = cur_dev->next; + } + hid_free_enumeration(devs); +} + int test_chamber() { //Add your testing code. @@ -2914,6 +2972,11 @@ int test_chamber() { int device_connection(){ if (check_connection_ok) { + if (enable_hid_listings) { + output_hid_device_info_list(); + enable_hid_listings = false; + } + handle_ok = 0; // Joy-Con (L) if (handle = hid_open(0x57e, 0x2006, nullptr)) { @@ -2926,12 +2989,46 @@ int device_connection(){ return handle_ok; } // Pro Controller + Sleep(1); // adding delay here supposedly makes the handle call work properly if (handle = hid_open(0x57e, 0x2009, nullptr)) { handle_ok = 3; return handle_ok; } // Nothing found else { + // Check for third-party controllers + hid_device_info* devs = hid_enumerate(0x0, 0x0); + hid_device_info* cur_dev = devs; + while (cur_dev) { + std::wstring product_string = cur_dev->product_string ? cur_dev->product_string : L"Unknown Product"; + std::wstring manufacturer_string = cur_dev->manufacturer_string ? cur_dev->manufacturer_string : L"Unknown Manufacturer"; + std::wstring serial_number = cur_dev->serial_number ? cur_dev->serial_number : L"Unknown Serial Number"; + + if (product_string == L"Wireless Gamepad" && manufacturer_string == L"Nintendo" && cur_dev->usage == 0x0005) { + //if (true) { + std::wstring third_party_warning = L"A potential third-party device has been detected:\n\n\t" + + product_string + L" : " + manufacturer_string + L"\n\n" + + L"Editing could be potentially unstable. Would you like to use this device anyways?"; + if (MessageBox::Show(System::String(third_party_warning.c_str(), 0, third_party_warning.length()).ToString(), + L"CTCaer's Joy-Con Toolkit - Third-Party Device Detected", + MessageBoxButtons::YesNo, MessageBoxIcon::Warning) == System::Windows::Forms::DialogResult::Yes) + { + if (handle = hid_open(cur_dev->product_id, cur_dev->vendor_id, cur_dev->serial_number)) { + // Maybe do some more tests here just to double check + hid_free_enumeration(devs); + handle_ok = 3; + return handle_ok; + } + else { + MessageBox::Show(L"Could not obtain the device.\nIt's usage has been aborted.", + L"CTCaer's Joy-Con Toolkit - Third-Party Device Connection Failed", + MessageBoxButtons::OK, MessageBoxIcon::Stop); + } + } + } + cur_dev = cur_dev->next; + } + hid_free_enumeration(devs); return 0; } } @@ -2965,6 +3062,13 @@ int Main(array^ args) { } */ check_connection_ok = true; + + if (args->Length > 0) { + if (args[0] == "-l") { + enable_hid_listings = true; // List all connected HID device information for first connection check + } + } + while (!device_connection()) { if (MessageBox::Show( L"The device is not paired or the device was disconnected!\n\n" + diff --git a/jctool/jctool.h b/jctool/jctool.h index 3d14b7f..c2bb64e 100644 --- a/jctool/jctool.h +++ b/jctool/jctool.h @@ -1,3 +1,27 @@ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + #pragma once #include diff --git a/jctool/jctool.vs2017.vcxproj b/jctool/jctool.vs2017.vcxproj index 94bc2eb..5a5e3e4 100644 --- a/jctool/jctool.vs2017.vcxproj +++ b/jctool/jctool.vs2017.vcxproj @@ -1,4 +1,26 @@ - + + + @@ -8,17 +30,17 @@ {DF218734-A810-4FFF-8164-638680773512} - v4.7.1 + v4.7.2 ManagedCProj jctool - 10.0.16299.0 + 10.0 jctool Application false - v141 + v143 true true Unicode diff --git a/jctool/jctool.vs2017.vcxproj.filters b/jctool/jctool.vs2017.vcxproj.filters index 8dbe63a..6fe1ad2 100644 --- a/jctool/jctool.vs2017.vcxproj.filters +++ b/jctool/jctool.vs2017.vcxproj.filters @@ -1,4 +1,26 @@ - + + + diff --git a/jctool/luts.h b/jctool/luts.h index e1d1615..b0579c6 100644 --- a/jctool/luts.h +++ b/jctool/luts.h @@ -1,3 +1,27 @@ +//***************************************************************************************/ +//MIT License + +//Copyright (c) 2017 CTCaer + +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: + +//The above copyright notice and this permission notice shall be included in all +//copies or substantial portions of the Software. + +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//SOFTWARE. +//***************************************************************************************/ + #pragma once #include struct lut_amp { diff --git a/jctool/original_res/retail_colors.xml b/jctool/original_res/retail_colors.xml index 9dc7a0b..de6956a 100644 --- a/jctool/original_res/retail_colors.xml +++ b/jctool/original_res/retail_colors.xml @@ -1,23 +1,45 @@ - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jctool/spi_pro_000BE478EBD0.bin b/jctool/spi_pro_000BE478EBD0.bin new file mode 100644 index 0000000..289c027 Binary files /dev/null and b/jctool/spi_pro_000BE478EBD0.bin differ