A while back, I wrote an article showing how to automate video games using the Cronus controller adapter. At the end of that article, I promised that I would upload the source code for the wrapper I was creating for use with C# apps. Even though I had finished that code shortly thereafter, I do not have the code available so that I can share it. However, over the weekend, I received an interest from a reader that was working on a similar project and needed help getting his C# wrapper working. During that discussion, I put together a very simple working version of the wrapper for him to use. Even though it isn’t fully functioning like the last wrapper I wrote, this wrapper still provides most of the functionality one would need for communicating with their Xbox or PlayStation from their computer. I’m also providing the source code so that anyone interested can finish out any missing pieces they might need.
The ZIP file (available at the end of this article) includes 2 projects. The first project is the wrapper itself. This project generates a DLL file that you can reference in your other Cronus-controlled applications. Just make sure you also include the gcdapi.dll file as this is what the wrapper encapsulates. The second project in the ZIP is a simple interface that can be used with the Xbox 360. Currently it only supports button controls for D-Pad Up, Down, Left, & Right as well as A, B, X, & Y as shown here.
To use this interface, you will need to connect the Cronus controller adapter to your Xbox 360 and connect a wired Xbox 360 controller to the Cronus controller adapter. Next, you will need to connect your computer to the Cronus controller adapter using the USB cable provided with the adapter. With everything connected, launch the app and click the “Is Connected?” button. If everything is working correctly, you should see the word “True” next to that button and the other buttons on the form should become enabled. If they do, you can test the app by clicking any of the controller buttons. The D-Pad buttons will need to have their values changed in the code in order to work correctly. Otherwise, when you click one of those buttons your Xbox will repeat the command multiple times. For example, if you click the “Right” button, your Xbox will scroll to the right several times before it stops whereas you will need to change the code to make it only scroll once for every click.
That’s it. You should now be able to control your Xbox 360 from your computer. You can also add support for the Nintendo Wii and the Sony PlayStation 3 & 4 by following the Device API documentation at http://www.gamepadproxy.com/manual/. Just click on “Device API” on the left-side menu and click “API Reference”. At the bottom of that page you will find the corresponding codes for the console you want to provide support for. Most of the codes are the same regardless of what console you are using. You will also find the documentation for the functions I did not complete the wrapper for.
Here is the source code for the wrapper as well as the example application as shown above. Feel free to modify this code and use it as you please. The only stipulation is that you use it in accordance with the GCD API & Cronus license agreements since that is what this wrapper is built for.
Download: CronusController.zip (90KB)
Includes gcdapi.dll which can be found in the CronusController/bin/Debug/ folder along with the GCAPIWrapper.dll (source code provided) and the CronusController.exe app shown above (source code also included).
Update: I have updated the app to include controller feedback. Check it out and download the latest version of the app by clicking here.
P.S. I take no responsibility for any damages that may occur to your console or Cronus controller adapter by using the software provided in this article.
PayPal will open in a new tab.