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

Added Support for N64 Controller #1117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 31 additions & 29 deletions BetterJoyForCemu/App.config
Original file line number Diff line number Diff line change
@@ -1,89 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<appSettings>
<!--Motion Server IP: the default is localhost; you can change it to 0.0.0.0 (all interfaces) or a specific LAN IP
which is **useful if you want to access the server from another computer in a network.** Default: 127.0.0.1-->
<add key="IP" value="127.0.0.1" />
<add key="IP" value="127.0.0.1"/>
<!--Motion Server port: the default is 26760; if it conflicts with another server set it to anything valid
but in that case also change the port in PadTest and cemuhook.ini accordingly. Default: 26760 -->
<add key="Port" value="26760" />
<add key="Port" value="26760"/>
<!--Whether the Motion Server is enabled or not. Default: true -->
<add key="MotionServer" value="true" />
<add key="MotionServer" value="true"/>

<!--The controller's HD rumble settings for the low/high frequency rumble. Change to change the pitch of the rumble.-->
<!--Don't set above ~1200. Default: 40 and 120 -->
<!--To have "stronger" rumble, try setting the low/high to 160/320-->
<add key="LowFreqRumble" value="40" />
<add key="HighFreqRumble" value="120" />
<add key="LowFreqRumble" value="160"/>
<add key="HighFreqRumble" value="320"/>
<!--Rumble Setting. Turns rumble on or off.-->
<!--On is "true"; off is "false". Default: true -->
<add key="EnableRumble" value="true" />
<add key="EnableRumble" value="true"/>

<!--Enables a input when shaking a controller, only works with DS4 for now, replaces the touchpad input (Button 13 on DirectInput)-->
<!--On is "true"; off is "false". Default: false -->
<add key="EnableShakeInput" value="false" />
<add key="EnableShakeInput" value="false"/>
<!--How sensitve the shake detection should be. Default: 10-->
<add key="ShakeInputSensitivity" value="10" />
<add key="ShakeInputSensitivity" value="10"/>
<!--How often should the shake input run in milliseconds. -->
<!--Don't set this lower than 15 -->
<!-- Default: 200 -->
<add key="ShakeInputDelay" value="200" />
<add key="ShakeInputDelay" value="200"/>

<!--Swap A-B buttons; if on, this mimicks the (half of) Xbox layout by the button name, rather than by the physical layout.-->
<!--Also swaps buttons when using "Also use for buttons/axes"-->
<!--On is "true"; off is "false". Default: false -->
<add key="SwapAB" value="false" />
<add key="SwapAB" value="false"/>
<!--Swap X-Y buttons; if on, this mimicks the (other half of) Xbox layout by the button name, rather than by the physical layout.-->
<!--Also swaps buttons when using "Also use for buttons/axes"-->
<!--On is "true"; off is "false". Default: false -->
<add key="SwapXY" value="false" />
<add key="SwapXY" value="false"/>

<!-- Allows for calibration of the controller's gyro. Adds a "Calibrate" button.-->
<!-- When "true", click the "Calibrate" button once to get gyro calibrate data.-->
<!-- When enabled, can only calibrate one controller at a time.-->
<!-- Default: false -->
<add key="AllowCalibration" value="false" />
<add key="AllowCalibration" value="false"/>
<!-- Default calibration; used for third party controller -->
<add key="acc_sensiti" value="16384,16384,16384"/>
<add key="gyr_sensiti" value="18642,18642,18642"/>
<add key="stick_cal" value="0x780,0x780,0x780,0x830,0x780,0x780"/>
<add key="deadzone" value="200"/>
<add key="stick2_cal" value="0x780,0x780,0x780,0x830,0x780,0x780"/>
<add key="deadzone2" value="200"/>
<add key="stickN64_cal" value="0x560,0x580,0x7b8,0x838,0x560,0x580" />
<add key="deadzoneN64" value="0" />

<!-- Scales the xy coordinates each of the joysticks report. Increase this if you can't push the stick to its maximum. -->
<add key="StickScalingFactor" value="1.00" />
<add key="StickScalingFactor2" value="1.00" />
<add key="StickScalingFactor" value="1.00"/>
<add key="StickScalingFactor2" value="1.00"/>

<!-- Allows use of gyroscope tilting to get full control of the slider values (big triggers)-->
<!-- Works on pro controller and joined joycons (pro controller case - triggers combined, joycons case - separate tilt)-->
<!-- Default: false -->
<add key="GyroAnalogSliders" value="false" />
<add key="GyroAnalogSliders" value="false"/>
<!-- Change to -400 to change direction of tilt needed. Positive is ramp up if pointing up-->
<!-- Default: 400 -->
<add key="GyroAnalogSensitivity" value="400" />
<add key="GyroAnalogSensitivity" value="400"/>

<!-- Determines whether or not the program should purge the affected devices list upon exit -->
<!-- Should prevent any more issues of the controller being unusable after the program (even though this can be fixed if you read the README) -->
<!-- Default: true -->
<add key="PurgeAffectedDevices" value="false" />
<add key="PurgeAffectedDevices" value="false"/>
<!-- Determines whether or not HidGuardian's process whitelist is purged on start-up -->
<!-- Can interfere with other programs using HidGuardian, but prevents whitelist from being clogged from crashed instances -->
<!-- Default: true -->
<add key="PurgeWhitelist" value="false" />
<add key="PurgeWhitelist" value="false"/>
<!-- Determines whether or not to use HidGuardian (improves compatibility with other programs, like Steam, when set to "false") -->
<!-- When "true", BetterJoy will hide the Pro/Joycons from other programs to prevent glitching out on exit and to prevent DI/XI clashes in certain programs -->
<!-- Default: false -->
<add key="UseHIDG" value="false" />
<add key="UseHIDG" value="false"/>

<!-- The program will keep the HOME button LED ring light on at all times. -->
<!-- Default: true -->
<add key="HomeLEDOn" value="true"/>
<!-- Will use multiple lights to display the current player rather than a single LED-->
<add key="UseIncrementalLights" value="true" />
<add key="UseIncrementalLights" value="true"/>

<!-- Determines whether or not to translate gyro movements into joystick ("joy") or mouse movement ("mouse"), or have no effect ("none") -->
<!-- When "joy_left" or "joy_right", turn gyro movements into respective left/right joystick (mouse-like) movements -->
Expand Down Expand Up @@ -121,28 +123,28 @@
<!-- Determines whether or not the program will expose detected controllers as Xbox 360 controllers -->
<!-- When "false", BetterJoy is only usable with programs that support UDPServer. -->
<!-- Default: true -->
<add key="ShowAsXInput" value="true" />
<add key="ShowAsXInput" value="true"/>
<!-- Have ShowAsXInput as false if using this -->
<!-- Default: false -->
<add key="ShowAsDS4" value="false"/>

<!-- Automatically power off controllers at program exit -->
<!-- Default: false -->
<add key="AutoPowerOff" value="false" />
<add key="AutoPowerOff" value="false"/>
<!-- Automatically power off controllers after a period of inactivity (in minutes) -->
<!-- Default: 30 (-1 indicates infinite time) -->
<add key="PowerOffInactivity" value="-1" />
<add key="PowerOffInactivity" value="-1"/>
<!-- Power off controllers when Capture (left only) or Home (right only or combined) buttons are pressed for a long interval (2s) -->
<!-- Default: true -->
<add key="HomeLongPowerOff" value="true" />
<add key="HomeLongPowerOff" value="true"/>

<!-- Double click sticks on joycons (L3, R3) to change joycon orientation -->
<!-- Default: true -->
<add key="ChangeOrientationDoubleClick" value="true" />
<add key="ChangeOrientationDoubleClick" value="true"/>
<!-- Do not rejoin joycons once split via clicking on their icon -->
<!-- When 'true' allows you to double-click the joycons to split them and then change their orientation to vertical -->
<!-- Default: false -->
<add key="DoNotRejoinJoycons" value="false" />
<add key="DoNotRejoinJoycons" value="false"/>

<!-- Determines what type of debugging information to be printed -->
<!-- None = 0 -->
Expand All @@ -153,6 +155,6 @@
<!-- Rumble = 5 -->
<!-- Shake Input = 6 -->
<!-- Default: 0 -->
<add key="DebugType" value="0" />
<add key="DebugType" value="0"/>
</appSettings>
</configuration>
</configuration>
16 changes: 11 additions & 5 deletions BetterJoyForCemu/BetterJoy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>BetterJoyForCemu</RootNamespace>
<AssemblyName>BetterJoyForCemu</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
Expand All @@ -29,6 +29,7 @@
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -238,6 +239,7 @@
<Content Include="Drivers\README.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Icons\n64.png" />
<Content Include="Icons\snes.png" />
<None Include="Properties\app.manifest" />
<Content Include="Icons\betterjoyforcemu_icon.ico" />
Expand All @@ -247,26 +249,30 @@
<Content Include="x64\hidapi.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Icons\cross.png" />
<Content Include="Icons\jc_left_s.png" />
<Content Include="Icons\jc_right_s.png" />
<Resource Include="Icons\cross.png" />
<Resource Include="Icons\jc_left_s.png" />
<Resource Include="Icons\jc_right_s.png" />
<Resource Include="Icons\jc_left.png" />
<Resource Include="Icons\jc_right.png" />
<Resource Include="Icons\pro.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="3rdPartyControllers.resx">
<DependentUpon>3rdPartyControllers.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Reassign.resx">
<DependentUpon>Reassign.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
Expand All @@ -283,4 +289,4 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
Binary file added BetterJoyForCemu/Icons/n64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading