Skip to content

Instantly share code, notes, and snippets.

View DJm00n's full-sized avatar

Dimitriy Ryazantcev DJm00n

View GitHub Profile
@TheNathannator
TheNathannator / GIP Interface Writeup.md
Last active April 23, 2024 21:46
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.

@Ohjurot
Ohjurot / DualSense_WASAPI_Vibration.cpp
Created November 28, 2020 18:03
Minimal demo to get the DualSense controller vibrating using the haptic feedback (Audio device channel 3 and 4)
#include <Windows.h>
#include <avrt.h>
#include <string>
#include <sstream>
#include <initguid.h>
#include <Mmdeviceapi.h>
#include <audioclient.h>
@DJm00n
DJm00n / gipHidGamepadDescriptor.txt
Last active May 8, 2021 02:16
xusb.sys HID Report Descriptors
//--------------------------------------------------------------------------------
// Report descriptor data in hex (length 262 bytes)
//--------------------------------------------------------------------------------
// 05010905 A101A100 09300931 150027FF FF000095 02751081 02C0A100 09330934
// 150027FF FF000095 02751081 02C00501 09321500 26FF0395 01750A81 02150025
// 00750695 01810305 01093515 0026FF03 9501750A 81021500 25007506 95018103
// 05091901 290A950A 75018102 15002500 75069501 81030501 09391501 25083500
@mmozeiko
mmozeiko / xbox_test.c
Last active February 27, 2024 17:41
Getting xbox controller input without xinput
// cl.exe xbox_test.c /link setupapi.lib user32.lib
#include <windows.h>
#include <setupapi.h>
#include <dbt.h>
#include <stdio.h>
/// interface
#define XBOX_MAX_CONTROLLERS 16
Description Key Value
Криптографічні алгоритми alg 1.2.804.2.1.1.1.1
Симетричні криптографічні алгоритми sym 1.2.804.2.1.1.1.1.1
Алгоритм ДСТУ ГОСТ 28147:2009 Gost28147 1.2.804.2.1.1.1.1.1.1
Алгоритм ДСТУ ГОСТ 28147:2009 в режимі простої заміни Gost28147ecb 1.2.804.2.1.1.1.1.1.1.1
Алгоритм ДСТУ ГОСТ 28147:2009 в режимі гамування Gost28147ctr 1.2.804.2.1.1.1.1.1.1.2
Алгоритм ДСТУ ГОСТ 28147:2009 в режимі гамування зі зворотним зв’язком Gost28147cfb 1.2.804.2.1.1.1.1.1.1.3
Алгоритм ДСТУ ГОСТ 28147:2009 в режимі вироблення імітовставки Gost28147cmac 1.2.804.2.1.1.1.1.1.1.4
Алгоритм криптографічного перетворення за ДСТУ ГОСТ 28147:2009 в режимі гамування зі зворотним зв’язком для захисту ключа шифрування даних Gost28147wrap 1.2.804.2.1.1.1.1.1.1.5
Алгоритм НМАС із геш-функцією за ГОСТ 34.311-95 HmacGost34311 1.2.804.2.1.1.1.1.1.2
@terrillmoore
terrillmoore / OpenSSL-1_1_0-stable-VS2015.md
Last active October 28, 2022 00:38
Building OpenSSL 1.1.0 with Microsoft VS 2015

Building OpenSSL 1.1.0 with Microsoft VS 2015

MCCI needs OpenSSL for a Windows project (that will be cross-platform). A casual search didn't turn up either a good source for cross-platform libraries, which meant we have to build them ourselves. A deeper search found a detailed guide here, and yet the details don't match what I found when I checked out the code; and the post doesn't talk about doing it directly from GitHub (which I wanted to do).

Here's the procedure for building OpenSSL on 64-bit Windows 10, with Visual Studio 2015. Others (July 2019) report that this procedure works with Visual Studio 2017 as well. I've not had a chance to try with Visual Studio 2019.

As this procedure dates from late 2016, you may find that there's a CMake or other, newer, procedure that's more suitable.

  1. If you don't have it, please install git bash from git-scm.com.
@robatron
robatron / fallout-1-high-res-patch-mac-osx.md
Last active May 6, 2024 12:55
How to get the Fallout 1 (and Fallout 2) high-resolution patch working for Mac OS X

Fallout 1 (and Fallout 2) Hi-Res Patch for Mac OS X

Fallout 1 was originally designed to run at 640x480 resolution. I wanted to run the Mac OS X version of Fallout on my MacBook 11", which has a 1366x768 display. There is a [high resolution patch][hi-res], but it only supports the Windows version of Fallout.

Turns out that the OS X version of Fallout runs through Wine, so we can get this patch working with just a few configuration changes:

Note for Fallout 2 users: The process for Fallout 2 is essentially the same, with a different patch, and some minor pathing differences. Other than that, the process is exactly the same!

Install Wine

@gregorynicholas
gregorynicholas / .inputrc
Last active April 19, 2024 04:10
OSX .inputrc to make terminal way better. and by better i mean i'm naked
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word