Re: Gamepad to Mouse: Help needed
Posted: Fri Sep 27, 2019 10:30 am
That is perfect now I'll be working on it the next week as time and health allows
High-performance gaming devices.
https://www.consoletuner.com/forum/
https://www.consoletuner.com/forum/viewtopic.php?f=26&t=13195
ILL_MURDER wrote:is there any way to get sony nav and logitech g502 support for left stick? as well as assigning buttons to functiond?
#define PS4 0
#define XBOX 1
#define SWITCH 2
#define CONSOLE PS4
#include <remapper.gph>
#include <keyboard.gph>
#include <mouse.gph>
init {
push_to_talk(FALSE);
port_inhibit_ffb(PORT_USB_A);
remapper_disable(STICK_1_X);
remapper_disable(STICK_1_Y);
remapper_disable(ACCEL_1_X);
remapper_disable(ACCEL_1_Y);
remapper_disable(ACCEL_1_Z);
remapper_swap(BUTTON_6, BUTTON_9);
remapper_mask(RMP_BT_A);
const uint8 kmap[] = {
KEY_P, BUTTON_17,
KEY_OPENBRACKET, BUTTON_4,
KEY_CLOSEBRACKET, BUTTON_2,
KEY_BACKSLASH, BUTTON_3,
}; keymapping(kmap);
const uint8 mmap[] = {
MOUSE_X, STICK_1_X,
MOUSE_Y, STICK_1_Y,
MWHEEL_FORWARD, BUTTON_14,
MWHEEL_BACKWARD, BUTTON_21,
MBUTTON_1, BUTTON_5,
MBUTTON_2, BUTTON_16,
MBUTTON_3, BUTTON_9,
MBUTTON_4, BUTTON_13,
MBUTTON_5, BUTTON_10,
}; mousemapping(mmap);
#define hex2u(n) n >> 8, n
#define evaluate(n) hex2u(n##i)
#define fix2hex(n) evaluate(n)
#if CONSOLE == PS4
#define DATA_SET 2
#define GLOBAL_HSCALE 0.95
#define GLOBAL_VSCALE 0.95
#define SENSITIVITY 2.80
#define YX_RATIO 1.00
#define DD_FACTOR 0.13
#define DZ_HORIZONTAL 13.0
#define DZ_VERTICAL 13.0
const uint8 mxyc[] = {
0xFF,
fix2hex(SENSITIVITY), fix2hex(YX_RATIO), fix2hex(DD_FACTOR),
fix2hex(DZ_HORIZONTAL), fix2hex(DZ_VERTICAL), 0x00, 0xCA,
0x00, 0x00, 0x12, 0x0A, 0x1A, 0xA8, 0x20, 0xF0, 0x25, 0xA3, 0x2A, 0x59,
0x2F, 0x0F, 0x32, 0xFA, 0x36, 0x1E, 0x3A, 0x0A, 0x3D, 0x2E, 0x40, 0x4F,
0x43, 0x73, 0x46, 0x97, 0x49, 0xB8, 0x4C, 0x14, 0x4F, 0x35, 0x51, 0x91,
0x54, 0xB3, 0x57, 0x0F, 0x5A, 0x33
}; mxyconverter(mxyc);
#elif CONSOLE == XBOX
#define DATA_SET 2
#define GLOBAL_HSCALE 1.15
#define GLOBAL_VSCALE 1.15
#define SENSITIVITY 2.50
#define YX_RATIO 1.00
#define DD_FACTOR 0.12
#define DZ_HORIZONTAL 12.60
#define DZ_VERTICAL 12.60
const uint8 mxyc[] = {
0xFF,
fix2hex(SENSITIVITY), fix2hex(YX_RATIO), fix2hex(DD_FACTOR),
fix2hex(DZ_HORIZONTAL), fix2hex(DZ_VERTICAL), 0x01, 0x00,
0x00, 0x00, 0x11, 0x40, 0x19, 0xE1, 0x20, 0x28, 0x25, 0xA3, 0x2B, 0x23,
0x2F, 0x0F, 0x32, 0xFA, 0x36, 0xE6, 0x3A, 0x0A, 0x3D, 0xF5, 0x41, 0x19,
0x44, 0x3A, 0x46, 0x97, 0x49, 0xB8, 0x4C, 0x14, 0x4F, 0x35, 0x51, 0x91,
0x53, 0xEB, 0x57, 0x0F, 0x59, 0x68
}; mxyconverter(mxyc);
#endif
}