Giter VIP home page Giter VIP logo

joycouch's Introduction

JoyCouch (broken)

My own library (obviously in the works) that allows the implementation of the Nintendo Joy-Con. This requires bluetooth.

This project is now being written in Rust under the name joycon-rs.

I'll be updating this README with some more detailed docs in the future. For now, I am trying to get this to be in working condition.

NOTE: This project is currently migrating to Kotlin/Native in a completely different workspace. Because of this, there will be a new repository (linked here when created) created for the development from here on out.

I have decided to make this a stable working version with documentation as a prototype before moving to a native version. I will of course work on the native porting but I think it'd be good to have something working before I actually port it.

I am also thinking about a new name for this library. Any suggestions are welcome.

Right now, this, to my knowledge, only works on mac. I am sure it might be functional to some degree on linux since mac and linux are both unix based. It is currently broken on windows and I am working to make it more portable. See issue #3

JoyCouch is a WIP easy-to-use, efficient, flexible, thread-safe Nintendo Joy-Con API. It is very early in development and currently includes:

  • Rumbling
  • JoyconManager for managing the interactions with either left and right JoyCons
  • Delegated Input Handling (docs coming soon)
  • Input/Output handling
    • Customizing input intervals
    • Customizing output reports
    • Customizing input/output handlers
    • Customizing subcommands
    • Access to HID input and output
  • Basic Memory reading
  • Player LED Settings
  • Detecting Battery life
  • Custom Rumbling
  • Analog Stick Calculations/Calibration
    • This is still being worked on so this will also be in the wip list was well
  • Basic async support of Joycons
    • The async functionality is very early and must be improved upon and optimized.

JoyCouch is going to include the following (note: the following is not a final list and will change over time):

  • Analog Stick Calculations/Calibration
    • Custom user calibration
  • Mono-and-Dual Joy-Con support
  • Gyro/Accelerometer support
  • Infrared (far future, no idea what to use it for imo)
  • Multiple player support
  • Better asynchronous support of JoyCons

Currently referencing this: https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering

joycouch's People

Contributors

alexcouch avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

joycouch's Issues

Output Report Factory Unnecessarily Adds Report ID to Data Buffer When That is Already Handled By API Backend

The JoyconOutputReportFactory unnecessarily adds the report ID to the report data buffer even though purejavahidapi adds that to the data buffer anyways. You're supposed to give it a data buffer with a size that allows room for an offset but not set the report ID since calling #setOutputReport requires you to pass in a report ID. The implementation adds the report ID to the data buffer. The resulting data buffer is:

reportID, reportID, 0x0, 0x0, 0x0, 0x0, 0x0...[i=10]subcommandID, subcommandArgs

This is unnecessary. Not sure what problems this could introduce but this should be fixed at some point.

Add License

Currently this code has no license, making it unclear how it is supposed to be used, modified and reused. If it is desired that the code be open source and usable by others, then perhaps one of the licenses listed here could be used:

https://opensource.org/licenses

Library Broken on Windows: Memory Works Differently Because of Windows' Native HID Memory Handling

Windows platform needs fixing. When connecting and initializing a JoyCon crashes the program due to NullPointerExceptions and StackOverflowExceptions due to different memory handling. On windows, there is a function called HidP_GetCaps which returns a struct of data that contains a max buffer size for input and output reports. There needs to be proper handling of data buffers for reports. The maximum output report data buffer is 50. According to the purejavahidapi implementation for Windows, it takes the report length and adds an offset of 1 due to the addition of the report ID. This also creates another issue.

This is a note for myself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.