- Dual-Core Architecture: Dedicated 1000Hz USB gaming pipeline on Core 1 and BLE/Wi-Fi/Web telemetry on Core 0. - Multi-Input BLE Host: Parsers for Xbox Wireless, Google Stadia, 8BitDo (Ultimate/Pro2/SN30), and Generic HOGP gamepads. - Multi-Console USB Emulation: Nintendo Switch, PC DirectInput, PS3, PS4, Xbox 360 (libxsm3 cryptographic challenge-response), Original Xbox, and Couch Mouse/Keyboard. - Onboard Web Portal & Captive Portal: Real-time SVG gamepad visualizer, stick deadzone calibration, button combo remapping, and Wi-Fi manager. - Low-Latency Radio Management: Interactive SoftAP toggle to drop to 0-latency gaming mode. - Dual OTA Firmware Flashing: Browser-based wireless firmware updater and automated Python OTA script. - Strict Build Quality: Clean build under -Wall -Wextra with zero warnings or errors. - Versioning & Licensing: Semantic Versioning v1.0.0 and GNU GPLv3 with Commercial Restrictions.
51 lines
2.0 KiB
C
51 lines
2.0 KiB
C
/*
|
|
xsm3.h - part of libxsm3
|
|
Copyright (C) 2022 InvoxiPlayGames
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef XSM3_H_
|
|
#define XSM3_H_
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
|
|
// Identification data taken from an official wired controller. (Serial number is static.)
|
|
extern const uint8_t xsm3_id_data_ms_controller[0x1D];
|
|
|
|
// The response data from the previously completed challenge.
|
|
extern uint8_t xsm3_challenge_response[0x30];
|
|
|
|
// The console ID fetched from the console after request 0x82.
|
|
extern uint8_t xsm3_console_id[0x8];
|
|
|
|
// Clears the state of the XSM3 internal variables.
|
|
void xsm3_initialise_state();
|
|
|
|
// Sets the identification data to use.
|
|
void xsm3_set_identification_data(const uint8_t id_data[0x1D]);
|
|
|
|
// Imports the console-specific keys (GetKey index 0x23 and 0x24 for wired controllers) into the current state.
|
|
void xsm3_import_kv_keys(const uint8_t key1[0x10], const uint8_t key2[0x10]);
|
|
|
|
// Initialises the XSM3 state using information from the challenge init packet (0x82) and places a response in xsm3_challenge_response.
|
|
void xsm3_do_challenge_init(uint8_t challenge_packet[0x22]);
|
|
|
|
// Completes a verify challenge passed from request 0x87 and places the response data in xsm3_challenge_response.
|
|
void xsm3_do_challenge_verify(uint8_t challenge_packet[0x16]);
|
|
|
|
#endif // XSM3_H_
|