Skip to content

Instantly share code, notes, and snippets.

View TheNathannator's full-sized avatar

Nathan TheNathannator

View GitHub Profile
@TheNathannator
TheNathannator / WasmTest.cs
Last active January 31, 2025 14:39
Unity editor script for extracting the Wasmtime NuGet package's runtime binaries when using NugetForUnity, because NugetForUnity doesn't handle them for you.
using UnityEngine;
using System.IO;
using Wasmtime;
using UnityEngine.Assertions;
using System;
namespace Playground
{
public class WasmTest : MonoBehaviour
{
@TheNathannator
TheNathannator / main.cpp
Last active May 19, 2024 01:45
Using GameInput to read raw Xbox One controller data
#include <cassert>
#include <iostream>
#include <iomanip>
#include <memory>
#include <windows.h>
#include <wrl.h>
// Install the https://www.nuget.org/packages/Microsoft.GameInput package for this example
#include <GameInput.h>
@TheNathannator
TheNathannator / WiiMap2GCMap.py
Last active February 18, 2024 02:49 — forked from NWPlayer123/WiiMap2GCMap.py
Converts Wii symbol maps (e.g. Kirby's Return to Dreamland) to GameCube symbol maps
import os
import sys
def sanitize(line):
line = line.strip()
line = line.replace("\t", " ")
for i in range(5):
line = line.replace(" ", " ")
return line.split(" ")

OBSOLETE

As of September 16, 2024, the Xbox One controller protocol (known officially as the Gaming Input Protocol, or GIPUSB) has been published as a Microsoft open standard. This document is thus no longer necessary, and certainly not accurate. Refer to the documentation there for guidance on the protocol.

The original document here is preserved as-is, and will not receive any further updates.



@TheNathannator
TheNathannator / GIP Interface Writeup.md
Last active March 30, 2025 12:30
A writeup on how to interact with the Xbox One driver on Windows directly

GIP Interface

A writeup on how to directly communicate with GIP (Xbox One) devices on a basic level.

I tried Windows.Gaming.Input.Custom and was unable to get it to work, so I resorted to this. Would have liked if I could do things more legitimately with what little documentation was provided, but oh well.

This writeup is not at all comprehensive of every possibilty with the interface, otherwise there'd be far too much to go through.

Thanks to the XInputHooker project for having a bunch of function detours set up, made my life easier when doing all of this.