1
0
mirror of https://github.com/raphnet/gc_n64_usb-v3 synced 2024-12-21 23:08:53 -05:00
gc_n64_usb-v3/requests.h
Raphael Assenat 0e0c381fbd Implement feature set query commands
The adapter can now be queried by the management tool to see
what configuration options and requests are available without
harcoding them for each release.
2017-11-22 09:37:42 -05:00

49 lines
1.4 KiB
C

#ifndef _gcn64_requests_h__
#define _gcn64_requests_h__
/* Commands */
#define RQ_GCN64_SET_CONFIG_PARAM 0x01
#define RQ_GCN64_GET_CONFIG_PARAM 0x02
#define RQ_GCN64_SUSPEND_POLLING 0x03
#define RQ_GCN64_GET_VERSION 0x04
#define RQ_GCN64_GET_SIGNATURE 0x05
#define RQ_GCN64_GET_CONTROLLER_TYPE 0x06
#define RQ_GCN64_SET_VIBRATION 0x07
#define RQ_GCN64_RAW_SI_COMMAND 0x80
#define RQ_GCN64_BLOCK_IO 0x81
#define RQ_RNT_GET_SUPPORTED_REQUESTS 0xF0
#define RQ_RNT_GET_SUPPORTED_MODES 0xF1
#define RQ_RNT_GET_SUPPORTED_CFG_PARAMS 0xF2
#define RQ_RNT_RESET_FIRMWARE 0xFE
#define RQ_GCN64_JUMP_TO_BOOTLOADER 0xFF
/* Configuration parameters and constants */
#define CFG_PARAM_MODE 0x00
/* Values for mode */
#define CFG_MODE_STANDARD 0x00
#define CFG_MODE_N64_ONLY 0x01
#define CFG_MODE_GC_ONLY 0x02
#define CFG_MODE_2P_STANDARD 0x10
#define CFG_MODE_2P_N64_ONLY 0x11
#define CFG_MODE_2P_GC_ONLY 0x12
#define CFG_PARAM_SERIAL 0x01
#define CFG_PARAM_POLL_INTERVAL0 0x10
#define CFG_PARAM_POLL_INTERVAL1 0x11
#define CFG_PARAM_POLL_INTERVAL2 0x12
#define CFG_PARAM_POLL_INTERVAL3 0x13
#define CFG_PARAM_N64_SQUARE 0x20 // Not implemented
#define CFG_PARAM_GC_MAIN_SQUARE 0x21 // Not implemented
#define CFG_PARAM_GC_CSTICK_SQUARE 0x22 // Not implemented
#define CFG_PARAM_FULL_SLIDERS 0x23
#define CFG_PARAM_INVERT_TRIG 0x24
#define CFG_PARAM_TRIGGERS_AS_BUTTONS 0x25
#define CFG_PARAM_DISABLE_ANALOG_TRIGGERS 0x32
#endif