Analog button and keyboard tester. (#16390)

Added analog button indication for those buttons that may have use for it
- primarily L2/R2, but support was added for all buttons where at least
one controller is known to support it. Added also core option to hide
mismatching inputs where analog value is not sent (like keyboard
hotkeys assigned to retropad buttons). Analog button inputs are not
set up for remote transmission, only for local test.

Analog axes have now also dynamic coloring.

Added a keyboard tester screen which includes a standard 102-key PC
keyboard + extra blocks for all RETROK_ values present in the code.
Screen adapted from DOSBox-Pure onscreen keyboard with permission.
Keyboard button A+B switches between the two screens. Keyboard
inputs are not set up for remote transmission, only for local test.
Core option added to select start screen.

Other small improvements: core reset will take new option values,
input driver applies received values more carefully.
This commit is contained in:
zoltanvb 2024-05-04 09:33:25 +02:00 committed by GitHub
parent 8741e7b9f0
commit 28189a04a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 646 additions and 122 deletions

View File

@ -8,7 +8,7 @@
* - Allow changing IP address and port in runtime
* - Input recording / Combos
* - Enable test input loading from menu
* - Visualization of keyboard and aux inputs (gyro, accelero, light)
* - Visualization of aux inputs (gyro, accelero, light)
*/
#include <stdio.h>
@ -50,13 +50,16 @@
#define DESC_OFFSET(desc, port, index, id) ( \
port * ((desc)->index_max - (desc)->index_min + 1) * ((desc)->id_max - (desc)->id_min + 1) + \
index * ((desc)->id_max - (desc)->id_min + 1) + \
(index - (desc)->index_min) * ((desc)->id_max - (desc)->id_min + 1) + \
id \
)
#define MAX_TEST_STEPS 200
#define INITIAL_FRAMES 60*5
#define ONE_TEST_STEP_FRAMES 60*5
#define KEYBOARD_OFFSET 1000
#define NETRETROPAD_SCREEN_PAD 0
#define NETRETROPAD_SCREEN_KEYBOARD 1
struct descriptor {
int device;
@ -77,6 +80,9 @@ struct remote_joypad_message {
uint16_t state;
};
static bool keyboard_state[RETROK_LAST];
static bool keyboard_state_validated[RETROK_LAST];
static int s;
static int port;
static char server[64];
@ -114,11 +120,24 @@ static struct descriptor analog = {
.id_max = RETRO_DEVICE_ID_ANALOG_Y
};
static struct descriptor analog_button = {
.device = RETRO_DEVICE_ANALOG,
.port_min = 0,
.port_max = 0,
.index_min = RETRO_DEVICE_INDEX_ANALOG_BUTTON,
.index_max = RETRO_DEVICE_INDEX_ANALOG_BUTTON,
.id_min = RETRO_DEVICE_ID_JOYPAD_B,
.id_max = RETRO_DEVICE_ID_JOYPAD_R3
};
static struct descriptor *descriptors[] = {
&joypad,
&analog
&analog,
&analog_button
};
static uint16_t analog_item_colors[32];
static uint16_t combo_def[] =
{
1 << RETRO_DEVICE_ID_JOYPAD_UP | 1 << RETRO_DEVICE_ID_JOYPAD_LEFT, /* D-pad diagonals */
@ -137,6 +156,8 @@ static uint16_t combo_def[] =
1 << RETRO_DEVICE_ID_JOYPAD_L2 | 1 << RETRO_DEVICE_ID_JOYPAD_R2
};
static unsigned current_screen = NETRETROPAD_SCREEN_PAD;
typedef struct
{
unsigned expected_button;
@ -153,7 +174,7 @@ static unsigned last_test_step = MAX_TEST_STEPS + 1;
static uint32_t input_state_validated = 0;
static uint32_t combo_state_validated = 0;
static bool dump_state_blocked = false;
static bool hide_analog_mismatch = true;
/************************************/
/* JSON Helpers for test input file */
/************************************/
@ -338,6 +359,56 @@ end:
/* Test input file handling end */
/********************************/
static void draw_background(void)
{
if (frame_buf)
{
unsigned rle, runs, count;
/* Body is 255 * 142 within the 320 * 240 frame */
uint16_t *pixel = frame_buf + 49 * 320 + 32;
if (current_screen == NETRETROPAD_SCREEN_PAD)
for (rle = 0; rle < sizeof(body); )
{
uint16_t color = 0;
for (runs = body[rle++]; runs > 0; runs--)
{
for (count = body[rle++]; count > 0; count--)
*pixel++ = color;
color = 0x4208 - color;
}
pixel += 65;
}
else if (current_screen == NETRETROPAD_SCREEN_KEYBOARD)
for (rle = 0; rle < sizeof(keyboard_body); )
{
uint16_t color = 0;
for (runs = keyboard_body[rle++]; runs > 0; runs--)
{
for (count = keyboard_body[rle++]; count > 0; count--)
*pixel++ = color;
color = 0x4208 - color;
}
pixel += 65;
}
}
}
static void flip_screen(void)
{
if (current_screen == NETRETROPAD_SCREEN_PAD)
current_screen = NETRETROPAD_SCREEN_KEYBOARD;
else if (current_screen == NETRETROPAD_SCREEN_KEYBOARD)
current_screen = NETRETROPAD_SCREEN_PAD;
draw_background();
}
void NETRETROPAD_CORE_PREFIX(retro_init)(void)
{
unsigned i;
@ -345,26 +416,7 @@ void NETRETROPAD_CORE_PREFIX(retro_init)(void)
dump_state_blocked = false;
frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
if (frame_buf)
{
unsigned rle, runs, count;
uint16_t *pixel = frame_buf + 49 * 320 + 32;
for (rle = 0; rle < sizeof(body); )
{
uint16_t color = 0;
for (runs = body[rle++]; runs > 0; runs--)
{
for (count = body[rle++]; count > 0; count--)
*pixel++ = color;
color = 0x4208 - color;
}
pixel += 65;
}
}
draw_background();
/* Allocate descriptor values */
for (i = 0; i < ARRAY_SIZE(descriptors); i++)
@ -430,6 +482,39 @@ void NETRETROPAD_CORE_PREFIX(retro_get_system_av_info)(
info->geometry.aspect_ratio = 4.0 / 3.0;
}
static void NETRETROPAD_CORE_PREFIX(update_keyboard_cb)(bool down, unsigned keycode,
uint32_t character, uint16_t key_modifiers)
{
struct retro_message message;
char buf[255];
if (keycode < RETROK_LAST)
{
keyboard_state[keycode] = down ? true : false;
if (down && ((keycode == RETROK_a && keyboard_state[RETROK_b]) || (keycode == RETROK_b && keyboard_state[RETROK_a])))
flip_screen();
/* Message for the keypresses not shown as actual keys, just placeholder blocks */
if ((keycode == 0) ||
(keycode == 12) ||
(keycode >= 33 && keycode < 39) ||
(keycode >= 40 && keycode < 44) ||
(keycode == 58) ||
(keycode == 60) ||
(keycode >= 62 && keycode < 65) ||
(keycode >= 94 && keycode < 96) ||
(keycode >= 123 && keycode < 127) ||
(keycode == 272) ||
(keycode >= 294 && keycode < 297) ||
(keycode >= 309 && keycode < 323))
{
snprintf(buf, sizeof(buf), "Key pressed: %d",keycode);
message.msg = buf;
message.frames = 60;
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE, &message);
}
}
}
static void retropad_update_input(void)
{
unsigned i;
@ -477,7 +562,11 @@ static void retropad_update_input(void)
/* Update state */
desc->value[offset] = state;
/* Attempt to send updated state */
/* Do not send analog button state - RA side is not prepared to receive it */
if (i>1)
continue;
/* Otherwise, attempt to send updated state */
msg.port = port;
msg.device = desc->device;
msg.index = index;
@ -492,6 +581,35 @@ static void retropad_update_input(void)
}
}
static void open_UDP_socket()
{
socket_target_t in_target;
if (s && s != SOCKET_ERROR)
close(s);
s = socket_create(
"retropad",
SOCKET_DOMAIN_INET,
SOCKET_TYPE_DATAGRAM,
SOCKET_PROTOCOL_UDP);
if (s == SOCKET_ERROR)
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "socket failed");
/* setup address structure */
memset((char *) &si_other, 0, sizeof(si_other));
in_target.port = port;
in_target.server = server;
in_target.domain = SOCKET_DOMAIN_INET;
socket_set_target(&si_other, &in_target);
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "Server IP Address: %s\n" , server);
}
void NETRETROPAD_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
{
static const struct retro_variable vars[] = {
@ -500,10 +618,13 @@ void NETRETROPAD_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
{ "net_retropad_ip_octet2", "IP address part 2; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "net_retropad_ip_octet3", "IP address part 3; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "net_retropad_ip_octet4", "IP address part 4; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "net_retropad_screen", "Start screen; Retropad|Keyboard tester" },
{ "net_retropad_hide_analog_mismatch", "Hide mismatching analog button inputs; True|False" },
{ NULL, NULL },
};
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
struct retro_keyboard_callback kcb = { NETRETROPAD_CORE_PREFIX(update_keyboard_cb) };
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
NETRETROPAD_CORE_PREFIX(environ_cb) = cb;
@ -514,25 +635,42 @@ void NETRETROPAD_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
if (cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &logger))
NETRETROPAD_CORE_PREFIX(log_cb) = logger.log;
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK, &kcb);
}
static void netretropad_check_variables(void)
{
struct retro_variable var, var2, var3, var4, port_var;
var.key = "net_retropad_ip_octet1";
var2.key = "net_retropad_ip_octet2";
var3.key = "net_retropad_ip_octet3";
var4.key = "net_retropad_ip_octet4";
port_var.key = "net_retropad_port";
struct retro_variable var, var2, var3, var4, port_var, screen_var, hide_a_var;
var.key = "net_retropad_ip_octet1";
var2.key = "net_retropad_ip_octet2";
var3.key = "net_retropad_ip_octet3";
var4.key = "net_retropad_ip_octet4";
port_var.key = "net_retropad_port";
screen_var.key = "net_retropad_screen";
hide_a_var.key = "net_retropad_hide_analog_mismatch";
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var2);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var3);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var4);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &port_var);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &screen_var);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &hide_a_var);
snprintf(server, sizeof(server), "%s.%s.%s.%s", var.value, var2.value, var3.value, var4.value);
port = atoi(port_var.value);
if (screen_var.value &&
((current_screen == NETRETROPAD_SCREEN_PAD && strstr(screen_var.value,"Keyboard")) ||
(current_screen == NETRETROPAD_SCREEN_KEYBOARD && strstr(screen_var.value,"Retropad"))))
flip_screen();
if (hide_a_var.value && strstr(hide_a_var.value,"True"))
hide_analog_mismatch = true;
else
hide_analog_mismatch = false;
}
void NETRETROPAD_CORE_PREFIX(retro_set_audio_sample)(retro_audio_sample_t cb)
@ -562,7 +700,10 @@ void NETRETROPAD_CORE_PREFIX(retro_set_video_refresh)(retro_video_refresh_t cb)
}
void NETRETROPAD_CORE_PREFIX(retro_reset)(void)
{}
{
netretropad_check_variables();
open_UDP_socket();
}
void NETRETROPAD_CORE_PREFIX(retro_run)(void)
{
@ -582,31 +723,60 @@ void NETRETROPAD_CORE_PREFIX(retro_run)(void)
int offset = DESC_OFFSET(&joypad, 0, 0, i);
if (joypad.value[offset])
input_state |= 1 << i;
/* Construct a red gradient representation for analog buttons */
offset = DESC_OFFSET(&analog_button, 0, RETRO_DEVICE_INDEX_ANALOG_BUTTON, i);
analog_item_colors[i] = (uint16_t)((int16_t)analog_button.value[offset]/1638) << 11;
}
for (i = analog.id_min; i <= analog.id_max; i++)
{
/* bitmap: x-- x- x+ x++ y-- y- y+ y++*/
/* default analog deadzone: 0.0 - increased for convenience, default analog threshold: 0.5 */
/* default analog deadzone: 0.0 - increased for convenience to 0.1, default analog threshold: 0.5 */
/* Red gradient also calculated */
int offset = DESC_OFFSET(&analog, 0, RETRO_DEVICE_INDEX_ANALOG_LEFT, i);
if ( (int16_t)analog.value[offset] < -32766/2)
if ( (int16_t)analog.value[offset] < -32768/2)
{
input_state |= 1 << (16 + i*8 + 0);
analog_item_colors[ 16 + i*8 + 0] = (uint16_t)((-1*((int16_t)analog.value[offset])-32768/2) /528) << 11;
}
else if ((int16_t)analog.value[offset] < -3276)
{
input_state |= 1 << (16 + i*8 + 1);
analog_item_colors[ 16 + i*8 + 1] = (uint16_t)((-1*((int16_t)analog.value[offset]) ) /528) << 11;
}
else if ((int16_t)analog.value[offset] > 32768/2)
{
input_state |= 1 << (16 + i*8 + 3);
analog_item_colors[ 16 + i*8 + 3] = (uint16_t)(( ((int16_t)analog.value[offset])-32768/2) /528) << 11;
}
else if ((int16_t)analog.value[offset] > 3276)
{
input_state |= 1 << (16 + i*8 + 2);
analog_item_colors[ 16 + i*8 + 2] = (uint16_t)(( ((int16_t)analog.value[offset]) ) /528) << 11;
}
offset = DESC_OFFSET(&analog, 0, RETRO_DEVICE_INDEX_ANALOG_RIGHT, i);
if ( (int16_t)analog.value[offset] < -32766/2)
if ( (int16_t)analog.value[offset] < -32768/2)
{
input_state |= 1 << (16 + i*8 + 4);
analog_item_colors[ 16 + i*8 + 4] = (uint16_t)((-1*((int16_t)analog.value[offset])-32768/2) /528) << 11;
}
else if ((int16_t)analog.value[offset] < -3276)
{
input_state |= 1 << (16 + i*8 + 5);
analog_item_colors[ 16 + i*8 + 5] = (uint16_t)((-1*((int16_t)analog.value[offset]) ) /528) << 11;
}
else if ((int16_t)analog.value[offset] > 32768/2)
{
input_state |= 1 << (16 + i*8 + 7);
analog_item_colors[ 16 + i*8 + 7] = (uint16_t)(( ((int16_t)analog.value[offset])-32768/2) /528) << 11;
}
else if ((int16_t)analog.value[offset] > 3276)
{
input_state |= 1 << (16 + i*8 + 6);
analog_item_colors[ 16 + i*8 + 6] = (uint16_t)(( ((int16_t)analog.value[offset]) ) /528) << 11;
}
}
/* Input test section start. */
@ -619,7 +789,7 @@ void NETRETROPAD_CORE_PREFIX(retro_run)(void)
}
/* Print a log for A+B combination, but only once while those are pressed */
if (input_state == ((1 << RETRO_DEVICE_ID_JOYPAD_A | 1 << RETRO_DEVICE_ID_JOYPAD_B) & 0x0000ffff))
if (input_state & ((1 << RETRO_DEVICE_ID_JOYPAD_A | 1 << RETRO_DEVICE_ID_JOYPAD_B) & 0x0000ffff))
{
if (!dump_state_blocked)
{
@ -647,6 +817,9 @@ void NETRETROPAD_CORE_PREFIX(retro_run)(void)
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO,
"[Remote RetroPad]: Proceeding to test step %d at frame %d, next: %d\n",
current_test_step,current_frame,next_teststep_frame+INITIAL_FRAMES);
if((input_test_steps[current_test_step].expected_button < KEYBOARD_OFFSET && current_screen == NETRETROPAD_SCREEN_KEYBOARD) ||
(input_test_steps[current_test_step].expected_button >= KEYBOARD_OFFSET && current_screen == NETRETROPAD_SCREEN_PAD))
flip_screen();
}
else
{
@ -671,8 +844,20 @@ void NETRETROPAD_CORE_PREFIX(retro_run)(void)
if (current_test_step < last_test_step)
{
expected_input = 1 << input_test_steps[current_test_step].expected_button;
if(input_state & expected_input)
bool test_success = false;
if (input_test_steps[current_test_step].expected_button < KEYBOARD_OFFSET)
{
expected_input = 1 << input_test_steps[current_test_step].expected_button;
if(input_state & expected_input)
test_success = true;
}
else
{
expected_input = input_test_steps[current_test_step].expected_button - KEYBOARD_OFFSET;
if (expected_input < RETROK_LAST && keyboard_state[expected_input])
test_success = true;
}
if (test_success)
{
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO,
"[Remote RetroPad]: Test step %d successful at frame %d\n",
@ -683,82 +868,124 @@ void NETRETROPAD_CORE_PREFIX(retro_run)(void)
}
}
/* Input test section end. */
for (rle = 0; rle < sizeof(retropad_buttons); )
if (current_screen == NETRETROPAD_SCREEN_PAD)
{
unsigned runs;
char paint = 0;
for (runs = retropad_buttons[rle++]; runs > 0; runs--)
for (rle = 0; rle < sizeof(retropad_buttons); )
{
unsigned button = paint ? 1 << retropad_buttons[rle++] : 0;
unsigned runs;
char paint = 0;
if (paint)
for (runs = retropad_buttons[rle++]; runs > 0; runs--)
{
unsigned count;
uint16_t color;
/* Red for active inputs */
if (input_state & button)
if (paint)
{
color = 0xA000;
input_state_validated |= button;
unsigned button = 0;
unsigned button_analog = 0;
unsigned count;
uint16_t color;
/* 0 - 15: buttons, 16 - 31: analog x/y */
/* 32 - 47: analog input for same buttons */
if (retropad_buttons[rle] < 32)
button = 1 << retropad_buttons[rle];
else
button_analog = 1 << (retropad_buttons[rle] - 32);
/* Red for active inputs */
if (input_state & button)
{
if(retropad_buttons[rle]<16)
color = 0xA000;
else
/* Gradient for analog axes */
color = analog_item_colors[retropad_buttons[rle]];
input_state_validated |= button;
}
/* Red gradient for active analog button inputs, from 0 to 0xa000 */
else if (button_analog && analog_item_colors[retropad_buttons[rle] - 32])
{
color = analog_item_colors[retropad_buttons[rle] - 32];
}
else if (button_analog && hide_analog_mismatch && input_state & button_analog)
color = 0xA000;
else
{
/* Light blue for expected input */
if (expected_input & button || expected_input & button_analog)
color = 0x7fff;
/* Light green for already validated input */
else if (input_state_validated & button || input_state_validated & button_analog)
color = 0xbff7;
/* White as default */
else
color = 0xffff;
}
rle++;
for (count = retropad_buttons[rle++]; count > 0; count--)
*pixel++ = color;
}
else
{
/* Light blue for expected input */
if (expected_input & button)
color = 0x7fff;
/* Light green for already validated input */
else if (input_state_validated & button )
color = 0xbff7;
/* White as default */
else
color = 0xffff;
}
pixel += retropad_buttons[rle++];
for (count = retropad_buttons[rle++]; count > 0; count--)
*pixel++ = color;
paint = !paint;
}
else
pixel += retropad_buttons[rle++];
paint = !paint;
pixel += 65;
}
}
else if (current_screen == NETRETROPAD_SCREEN_KEYBOARD)
{
for (rle = 0; rle < ARRAY_SIZE(keyboard_buttons); )
{
unsigned runs;
char paint = 0;
pixel += 65;
for (runs = keyboard_buttons[rle++]; runs > 0; runs--)
{
if (paint)
{
unsigned count;
uint16_t color;
/* Same color scheme as for retropad buttons */
if (keyboard_state[keyboard_buttons[rle]])
{
color = 0xA000;
keyboard_state_validated[keyboard_buttons[rle]] = true;
}
else
{
if (expected_input > 0 && expected_input == keyboard_buttons[rle])
color = 0x7fff;
else if (keyboard_state_validated[keyboard_buttons[rle]])
color = 0xbff7;
else
color = 0xffff;
}
rle++;
for (count = keyboard_buttons[rle++]; count > 0; count--)
*pixel++ = color;
}
else
pixel += keyboard_buttons[rle++];
paint = !paint;
}
pixel += 65;
}
}
NETRETROPAD_CORE_PREFIX(video_cb)(frame_buf, 320, 240, 640);
retro_sleep(4);
}
bool NETRETROPAD_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
{
socket_target_t in_target;
netretropad_check_variables();
s = socket_create(
"retropad",
SOCKET_DOMAIN_INET,
SOCKET_TYPE_DATAGRAM,
SOCKET_PROTOCOL_UDP);
if (s == SOCKET_ERROR)
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "socket failed");
/* setup address structure */
memset((char *) &si_other, 0, sizeof(si_other));
in_target.port = port;
in_target.server = server;
in_target.domain = SOCKET_DOMAIN_INET;
socket_set_target(&si_other, &in_target);
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "Server IP Address: %s\n" , server);
open_UDP_socket();
/* If a .ratst file is given (only possible via command line),
* initialize test sequence. */

View File

@ -1,6 +1,8 @@
#ifndef REMOTEPAD_H
#define REMOTEPAD_H
/* Run-length-encoded format, serialized. */
/* Number of segments - length of individual segments (segment are alternating black and background color, always starting with black) */
static uint8_t body[] =
{
/* 0 */ 3, 38, 13, 204,
@ -156,8 +158,8 @@ static uint8_t retropad_buttons[] =
/* 0 */ 5, 38, 12, 13, 154, 13, 13, 37,
/* 1 */ 5, 35, 12, 21, 144, 13, 21, 34,
/* 2 */ 5, 33, 12, 26, 138, 13, 26, 32,
/* 3 */ 5, 32, 12, 28, 136, 13, 28, 31,
/* 4 */ 5, 32, 12, 29, 134, 13, 30, 30,
/* 3 */ 13, 32, 12, 7, 0, 44, 15, 0, 12, 6, 136, 13, 8, 0, 45, 14, 0, 13, 6, 31,
/* 4 */ 13, 32, 12, 7, 0, 44, 15, 0, 12, 7, 134, 13, 9, 0, 45, 14, 0, 13, 7, 30,
/* 5 */ 5, 31, 12, 31, 133, 13, 30, 30,
/* 6 */ 5, 31, 12, 31, 133, 13, 30, 30,
/* 7 */ 9, 31, 12, 2, 23, 12, 6, 133, 13, 5, 24, 13, 1, 30,
@ -168,9 +170,9 @@ static uint8_t retropad_buttons[] =
/* 12 */ 5, 39, 10, 13, 152, 11, 14, 37,
/* 13 */ 5, 34, 10, 24, 141, 11, 24, 32,
/* 14 */ 5, 31, 10, 29, 136, 11, 29, 30,
/* 15 */ 5, 30, 10, 31, 134, 11, 32, 28,
/* 16 */ 5, 29, 10, 33, 133, 11, 32, 28,
/* 17 */ 5, 29, 10, 33, 133, 11, 32, 28,
/* 15 */ 13, 30, 10, 9, 0, 42, 15, 0, 10, 7, 134, 11, 9, 0, 43, 14, 0, 11, 9, 28,
/* 16 */ 13, 29, 10, 10, 0, 42, 15, 0, 10, 8, 133, 11, 9, 0, 43, 14, 0, 11, 9, 28,
/* 17 */ 13, 29, 10, 10, 0, 42, 15, 0, 10, 8, 133, 11, 9, 0, 43, 14, 0, 11, 9, 28,
/* 18 */ 5, 29, 10, 33, 133, 11, 32, 28,
/* 19 */ 5, 29, 10, 33, 133, 11, 32, 28,
/* 20 */ 5, 29, 10, 33, 133, 11, 32, 28,
@ -215,12 +217,12 @@ static uint8_t retropad_buttons[] =
/* 59 */ 3, 204, 9, 13, 38,
/* 60 */ 3, 203, 9, 15, 37,
/* 61 */ 3, 202, 9, 16, 37,
/* 62 */ 3, 202, 9, 17, 36,
/* 63 */ 5, 39, 4, 13, 149, 9, 18, 36,
/* 64 */ 5, 39, 4, 13, 149, 9, 18, 36,
/* 65 */ 5, 39, 4, 13, 149, 9, 18, 36,
/* 66 */ 5, 39, 4, 13, 149, 9, 18, 36,
/* 67 */ 5, 39, 4, 13, 150, 9, 17, 36,
/* 62 */ 7, 202, 9, 6, 0, 41, 5, 0, 9, 6, 36,
/* 63 */ 9, 39, 4, 13, 149, 9, 7, 0, 41, 5, 0, 9, 6, 36,
/* 64 */ 9, 39, 4, 13, 149, 9, 7, 0, 41, 5, 0, 9, 7, 35,
/* 65 */ 9, 39, 4, 13, 149, 9, 7, 0, 41, 5, 0, 9, 7, 35,
/* 66 */ 9, 39, 4, 13, 149, 9, 7, 0, 41, 5, 0, 9, 7, 35,
/* 67 */ 9, 39, 4, 13, 150, 9, 6, 0, 41, 5, 0, 9, 6, 36,
/* 68 */ 5, 39, 4, 13, 150, 9, 17, 36,
/* 69 */ 5, 39, 4, 13, 151, 9, 15, 37,
/* 70 */ 5, 39, 4, 13, 151, 9, 14, 38,
@ -233,12 +235,12 @@ static uint8_t retropad_buttons[] =
/* 77 */ 9, 24, 6, 12, 19, 7, 12, 115, 1, 12, 33, 8, 12, 16,
/* 78 */ 13, 24, 6, 13, 17, 7, 13, 30, 2, 14, 35, 3, 13, 22, 1, 14, 30, 8, 15, 15,
/* 79 */ 13, 24, 6, 14, 15, 7, 14, 30, 2, 14, 34, 3, 14, 21, 1, 16, 29, 8, 16, 14,
/* 80 */ 13, 24, 6, 15, 13, 7, 15, 30, 2, 14, 34, 3, 14, 21, 1, 17, 27, 8, 17, 14,
/* 81 */ 13, 24, 6, 16, 11, 7, 16, 30, 2, 14, 34, 3, 14, 20, 1, 18, 27, 8, 18, 13,
/* 82 */ 13, 24, 6, 16, 12, 7, 15, 30, 2, 14, 34, 3, 14, 20, 1, 18, 27, 8, 18, 13,
/* 83 */ 13, 24, 6, 15, 14, 7, 14, 30, 2, 14, 34, 3, 14, 20, 1, 18, 26, 8, 19, 13,
/* 84 */ 13, 24, 6, 14, 16, 7, 13, 30, 2, 14, 34, 3, 14, 20, 1, 18, 27, 8, 18, 13,
/* 85 */ 9, 24, 6, 13, 18, 7, 12, 112, 1, 18, 27, 8, 17, 14,
/* 80 */ 21, 24, 6, 15, 13, 7, 15, 30, 2, 14, 34, 3, 14, 21, 1, 6, 0, 33, 5, 0, 1, 6, 27, 8, 7, 0, 40, 5, 0, 8, 5, 14,
/* 81 */ 21, 24, 6, 16, 11, 7, 16, 30, 2, 14, 34, 3, 14, 20, 1, 7, 0, 33, 5, 0, 1, 6, 27, 8, 7, 0, 40, 5, 0, 8, 6, 13,
/* 82 */ 21, 24, 6, 16, 12, 7, 15, 30, 2, 14, 34, 3, 14, 20, 1, 7, 0, 33, 5, 0, 1, 7, 26, 8, 7, 0, 40, 5, 0, 8, 6, 13,
/* 83 */ 21, 24, 6, 15, 14, 7, 14, 30, 2, 14, 34, 3, 14, 20, 1, 7, 0, 33, 5, 0, 1, 7, 25, 8, 8, 0, 40, 5, 0, 8, 6, 13,
/* 84 */ 21, 24, 6, 14, 16, 7, 13, 30, 2, 14, 34, 3, 14, 20, 1, 7, 0, 33, 5, 0, 1, 7, 26, 8, 7, 0, 40, 5, 0, 8, 6, 13,
/* 85 */ 17, 24, 6, 13, 18, 7, 12, 112, 1, 7, 0, 33, 5, 0, 1, 6, 27, 8, 7, 0, 40, 5, 0, 8, 5, 14,
/* 86 */ 9, 24, 6, 12, 20, 7, 11, 113, 1, 17, 27, 8, 17, 14,
/* 87 */ 11, 24, 6, 11, 10, 5, 1, 11, 7, 10, 113, 1, 16, 29, 8, 16, 14,
/* 88 */ 7, 44, 5, 3, 134, 1, 14, 31, 8, 14, 15,
@ -251,12 +253,12 @@ static uint8_t retropad_buttons[] =
/* 95 */ 5, 39, 5, 13, 152, 0, 13, 38,
/* 96 */ 5, 39, 5, 13, 151, 0, 15, 37,
/* 97 */ 5, 39, 5, 13, 150, 0, 17, 36,
/* 98 */ 5, 39, 5, 13, 150, 0, 17, 36,
/* 99 */ 5, 39, 5, 13, 149, 0, 18, 36,
/* 100 */ 5, 39, 5, 13, 149, 0, 18, 36,
/* 101 */ 3, 201, 0, 18, 36,
/* 102 */ 3, 201, 0, 18, 36,
/* 103 */ 3, 202, 0, 17, 36,
/* 98 */ 9, 39, 5, 13, 150, 0, 6, 0, 32, 6, 0, 0, 5, 36,
/* 99 */ 9, 39, 5, 13, 149, 0, 7, 0, 32, 6, 0, 0, 6, 35,
/* 100 */ 9, 39, 5, 13, 149, 0, 7, 0, 32, 6, 0, 0, 6, 35,
/* 101 */ 7, 201, 0, 7, 0, 32, 6, 0, 0, 6, 35,
/* 102 */ 7, 201, 0, 7, 0, 32, 6, 0, 0, 6, 35,
/* 103 */ 7, 202, 0, 6, 0, 32, 6, 0, 0, 5, 36,
/* 104 */ 7, 84, 24, 5, 78, 28, 5, 30, 0, 17, 36,
/* 105 */ 7, 82, 24, 9, 74, 28, 9, 29, 0, 15, 37,
/* 106 */ 7, 82, 24, 9, 74, 28, 9, 30, 0, 13, 38,
@ -299,4 +301,295 @@ static uint8_t retropad_buttons[] =
/* sizeof( buttons ) = 1238 */
static uint8_t keyboard_body[] =
{
/* 0 */ 1, 255,
/* 1 */ 1, 255,
/* 2 */ 1, 255,
/* 3 */ 2, 0, 255,
/* 4 */ 2, 0, 255,
/* 5 */ 2, 0, 255,
/* 6 */ 2, 0, 255,
/* 7 */ 2, 0, 255,
/* 8 */ 2, 0, 255,
/* 9 */ 2, 0, 255,
/* 10 */ 2, 0, 255,
/* 11 */ 2, 0, 255,
/* 12 */ 2, 0, 255,
/* 13 */ 2, 0, 255,
/* 14 */ 2, 0, 255,
/* 15 */ 2, 0, 255,
/* 16 */ 2, 0, 255,
/* 17 */ 2, 0, 255,
/* 18 */ 2, 0, 255,
/* 19 */ 2, 0, 255,
/* 20 */ 2, 0, 255,
/* 21 */ 2, 0, 255,
/* 22 */ 2, 0, 255,
/* 23 */ 2, 0, 255,
/* 24 */ 2, 0, 255,
/* 25 */ 2, 0, 255,
/* 26 */ 2, 0, 255,
/* 27 */ 2, 0, 255,
/* 28 */ 2, 0, 255,
/* 29 */ 2, 0, 255,
/* 30 */ 2, 0, 255,
/* 31 */ 2, 0, 255,
/* 32 */ 2, 0, 255,
/* 33 */ 2, 0, 255,
/* 34 */ 2, 0, 255,
/* 35 */ 2, 0, 255,
/* 36 */ 2, 0, 255,
/* 37 */ 2, 0, 255,
/* 38 */ 2, 0, 255,
/* 39 */ 2, 0, 255,
/* 40 */ 2, 0, 255,
/* 41 */ 2, 0, 255,
/* 42 */ 2, 0, 255,
/* 43 */ 2, 0, 255,
/* 44 */ 2, 0, 255,
/* 45 */ 2, 0, 255,
/* 46 */ 2, 0, 255,
/* 47 */ 2, 0, 255,
/* 48 */ 2, 0, 255,
/* 49 */ 2, 0, 255,
/* 50 */ 2, 0, 255,
/* 51 */ 2, 0, 255,
/* 52 */ 2, 0, 255,
/* 53 */ 2, 0, 255,
/* 54 */ 2, 0, 255,
/* 55 */ 2, 0, 255,
/* 56 */ 2, 0, 255,
/* 57 */ 2, 0, 255,
/* 58 */ 2, 0, 255,
/* 59 */ 2, 0, 255,
/* 60 */ 2, 0, 255,
/* 61 */ 2, 0, 255,
/* 62 */ 2, 0, 255,
/* 63 */ 2, 0, 255,
/* 64 */ 2, 0, 255,
/* 65 */ 2, 0, 255,
/* 66 */ 2, 0, 255,
/* 67 */ 2, 0, 255,
/* 68 */ 2, 0, 255,
/* 69 */ 2, 0, 255,
/* 70 */ 2, 0, 255,
/* 71 */ 2, 0, 255,
/* 72 */ 2, 0, 255,
/* 73 */ 2, 0, 255,
/* 74 */ 2, 0, 255,
/* 75 */ 2, 0, 255,
/* 76 */ 2, 0, 255,
/* 77 */ 2, 0, 255,
/* 78 */ 2, 0, 255,
/* 79 */ 2, 0, 255,
/* 80 */ 2, 0, 255,
/* 81 */ 2, 0, 255,
/* 82 */ 2, 0, 255,
/* 83 */ 2, 0, 255,
/* 84 */ 2, 0, 255,
/* 85 */ 2, 0, 255,
/* 86 */ 2, 0, 255,
/* 87 */ 2, 0, 255,
/* 88 */ 2, 0, 255,
/* 89 */ 2, 0, 255,
/* 90 */ 2, 0, 255,
/* 91 */ 2, 0, 255,
/* 92 */ 2, 0, 255,
/* 93 */ 2, 0, 255,
/* 94 */ 2, 0, 255,
/* 95 */ 2, 0, 255,
/* 96 */ 2, 0, 255,
/* 97 */ 2, 0, 255,
/* 98 */ 2, 0, 255,
/* 99 */ 2, 0, 255,
/* 100 */ 2, 0, 255,
/* 101 */ 2, 0, 255,
/* 102 */ 2, 0, 255,
/* 103 */ 2, 0, 255,
/* 104 */ 2, 0, 255,
/* 105 */ 2, 0, 255,
/* 106 */ 2, 0, 255,
/* 107 */ 2, 0, 255,
/* 108 */ 2, 0, 255,
/* 109 */ 2, 0, 255,
/* 110 */ 2, 0, 255,
/* 111 */ 2, 0, 255,
/* 112 */ 2, 0, 255,
/* 113 */ 2, 0, 255,
/* 114 */ 2, 0, 255,
/* 115 */ 2, 0, 255,
/* 116 */ 2, 0, 255,
/* 117 */ 2, 0, 255,
/* 118 */ 2, 0, 255,
/* 119 */ 2, 0, 255,
/* 120 */ 2, 0, 255,
/* 121 */ 2, 0, 255,
/* 122 */ 2, 0, 255,
/* 123 */ 2, 0, 255,
/* 124 */ 2, 0, 255,
/* 125 */ 2, 0, 255,
/* 126 */ 2, 0, 255,
/* 127 */ 2, 0, 255,
/* 128 */ 2, 0, 255,
/* 129 */ 2, 0, 255,
/* 130 */ 2, 0, 255,
/* 131 */ 2, 0, 255,
/* 132 */ 2, 0, 255,
/* 133 */ 2, 0, 255,
/* 134 */ 2, 0, 255,
/* 135 */ 2, 0, 255,
/* 136 */ 2, 0, 255,
/* 137 */ 1, 255,
/* 138 */ 1, 255,
/* 139 */ 1, 255,
/* 140 */ 1, 255,
/* 141 */ 1, 255,
};
static uint16_t keyboard_buttons[] =
{
/* 0 */ 1, 255,
/* 1 */ 1, 255,
/* 2 */ 1, 255,
/* 3 */ 1, 255,
/* 4 */ 69, 1, 27, 3, 22, 282, 4, 1, 282, 1, 5, 283, 3, 1, 283, 3, 5, 284, 3, 1, 284, 3, 5, 285, 3, 1, 285, 1, 2, 285, 1, 13, 286, 3, 1, 286, 4, 4, 287, 3, 2, 287, 3, 4, 288, 3, 1, 288, 4, 4, 289, 3, 2, 289, 2, 14, 290, 4, 1, 290, 3, 4, 291, 2, 1, 291, 1, 1, 291, 3, 4, 292, 4, 1, 292, 1, 1, 292, 1, 4, 293, 2, 1, 293, 1, 1, 293, 3, 5, 316, 4, 1, 316, 3, 4, 302, 3, 1, 302, 1, 7, 19, 3, 40,
/* 5 */ 69, 1, 27, 3, 22, 282, 4, 1, 282, 1, 5, 283, 3, 1, 283, 3, 5, 284, 3, 1, 284, 3, 5, 285, 3, 1, 285, 1, 2, 285, 1, 13, 286, 3, 1, 286, 4, 4, 287, 3, 2, 287, 3, 4, 288, 3, 1, 288, 4, 4, 289, 3, 2, 289, 2, 14, 290, 4, 1, 290, 3, 4, 291, 2, 1, 291, 1, 1, 291, 3, 4, 292, 4, 1, 292, 1, 1, 292, 1, 4, 293, 2, 1, 293, 1, 1, 293, 3, 5, 316, 4, 1, 316, 3, 4, 302, 3, 1, 302, 1, 7, 19, 3, 40,
/* 6 */ 85, 1, 27, 1, 1, 27, 3, 1, 27, 2, 17, 282, 1, 4, 282, 1, 5, 283, 1, 6, 283, 1, 4, 284, 1, 6, 284, 1, 4, 285, 1, 3, 285, 1, 2, 285, 1, 13, 286, 1, 3, 286, 1, 7, 287, 1, 3, 287, 1, 7, 288, 1, 6, 288, 1, 4, 289, 1, 3, 289, 1, 2, 289, 1, 13, 290, 1, 4, 290, 1, 1, 290, 1, 4, 291, 1, 2, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 3, 293, 1, 5, 316, 1, 2, 316, 1, 1, 316, 1, 6, 302, 1, 3, 302, 1, 7, 19, 1, 1, 19, 1, 1, 19, 3, 36,
/* 7 */ 85, 1, 27, 1, 1, 27, 3, 1, 27, 2, 17, 282, 1, 4, 282, 1, 5, 283, 1, 6, 283, 1, 4, 284, 1, 6, 284, 1, 4, 285, 1, 3, 285, 1, 2, 285, 1, 13, 286, 1, 3, 286, 1, 7, 287, 1, 3, 287, 1, 7, 288, 1, 6, 288, 1, 4, 289, 1, 3, 289, 1, 2, 289, 1, 13, 290, 1, 4, 290, 1, 1, 290, 1, 4, 291, 1, 2, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 3, 293, 1, 5, 316, 1, 2, 316, 1, 1, 316, 1, 6, 302, 1, 3, 302, 1, 7, 19, 1, 1, 19, 1, 1, 19, 3, 36,
/* 8 */ 79, 1, 27, 2, 1, 27, 1, 2, 27, 1, 18, 282, 4, 1, 282, 1, 5, 283, 3, 3, 283, 1, 5, 284, 3, 1, 284, 3, 5, 285, 3, 1, 285, 4, 13, 286, 3, 1, 286, 3, 5, 287, 3, 1, 287, 3, 5, 288, 3, 4, 288, 1, 4, 289, 3, 2, 289, 2, 14, 290, 4, 1, 290, 3, 4, 291, 2, 1, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 4, 1, 292, 1, 1, 292, 1, 4, 293, 2, 1, 293, 1, 3, 293, 1, 5, 316, 1, 2, 316, 1, 1, 316, 3, 4, 302, 3, 1, 302, 1, 7, 19, 1, 1, 19, 1, 4, 19, 1, 35,
/* 9 */ 79, 1, 27, 2, 1, 27, 1, 2, 27, 1, 18, 282, 4, 1, 282, 1, 5, 283, 3, 3, 283, 1, 5, 284, 3, 1, 284, 3, 5, 285, 3, 1, 285, 4, 13, 286, 3, 1, 286, 3, 5, 287, 3, 1, 287, 3, 5, 288, 3, 4, 288, 1, 4, 289, 3, 2, 289, 2, 14, 290, 4, 1, 290, 3, 4, 291, 2, 1, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 4, 1, 292, 1, 1, 292, 1, 4, 293, 2, 1, 293, 1, 3, 293, 1, 5, 316, 1, 2, 316, 1, 1, 316, 3, 4, 302, 3, 1, 302, 1, 7, 19, 1, 1, 19, 1, 4, 19, 1, 35,
/* 10 */ 79, 1, 27, 1, 2, 27, 2, 1, 27, 1, 18, 282, 1, 4, 282, 1, 5, 283, 1, 4, 283, 1, 6, 284, 1, 6, 284, 1, 4, 285, 1, 6, 285, 1, 13, 286, 1, 6, 286, 1, 4, 287, 1, 3, 287, 1, 2, 287, 1, 4, 288, 1, 5, 288, 1, 5, 289, 1, 3, 289, 1, 2, 289, 1, 13, 290, 1, 6, 290, 1, 4, 291, 1, 2, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 2, 293, 1, 6, 316, 4, 3, 316, 1, 6, 302, 1, 1, 302, 1, 7, 19, 3, 1, 19, 4, 35,
/* 11 */ 79, 1, 27, 1, 2, 27, 2, 1, 27, 1, 18, 282, 1, 4, 282, 1, 5, 283, 1, 4, 283, 1, 6, 284, 1, 6, 284, 1, 4, 285, 1, 6, 285, 1, 13, 286, 1, 6, 286, 1, 4, 287, 1, 3, 287, 1, 2, 287, 1, 4, 288, 1, 5, 288, 1, 5, 289, 1, 3, 289, 1, 2, 289, 1, 13, 290, 1, 6, 290, 1, 4, 291, 1, 2, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 2, 293, 1, 6, 316, 4, 3, 316, 1, 6, 302, 1, 1, 302, 1, 7, 19, 3, 1, 19, 4, 35,
/* 12 */ 81, 1, 27, 1, 3, 27, 1, 1, 27, 1, 18, 282, 1, 4, 282, 1, 5, 283, 1, 3, 283, 1, 7, 284, 1, 6, 284, 1, 4, 285, 1, 6, 285, 1, 13, 286, 1, 6, 286, 1, 4, 287, 1, 3, 287, 1, 2, 287, 1, 4, 288, 1, 4, 288, 1, 6, 289, 1, 3, 289, 1, 2, 289, 1, 13, 290, 1, 6, 290, 1, 4, 291, 1, 2, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 1, 293, 1, 7, 316, 1, 6, 316, 1, 6, 302, 1, 1, 302, 1, 7, 19, 1, 3, 19, 1, 2, 19, 1, 35,
/* 13 */ 81, 1, 27, 1, 3, 27, 1, 1, 27, 1, 18, 282, 1, 4, 282, 1, 5, 283, 1, 3, 283, 1, 7, 284, 1, 6, 284, 1, 4, 285, 1, 6, 285, 1, 13, 286, 1, 6, 286, 1, 4, 287, 1, 3, 287, 1, 2, 287, 1, 4, 288, 1, 4, 288, 1, 6, 289, 1, 3, 289, 1, 2, 289, 1, 13, 290, 1, 6, 290, 1, 4, 291, 1, 2, 291, 1, 1, 291, 1, 1, 291, 1, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 1, 293, 1, 7, 316, 1, 6, 316, 1, 6, 302, 1, 1, 302, 1, 7, 19, 1, 3, 19, 1, 2, 19, 1, 35,
/* 14 */ 73, 1, 27, 2, 1, 27, 2, 1, 27, 2, 17, 282, 1, 4, 282, 1, 5, 283, 1, 3, 283, 4, 4, 284, 1, 3, 284, 3, 5, 285, 1, 6, 285, 1, 13, 286, 1, 3, 286, 3, 5, 287, 1, 4, 287, 2, 5, 288, 1, 3, 288, 1, 7, 289, 1, 4, 289, 2, 14, 290, 1, 4, 290, 3, 4, 291, 1, 2, 291, 1, 1, 291, 3, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 1, 293, 3, 5, 316, 1, 4, 316, 3, 4, 302, 3, 1, 302, 4, 4, 19, 1, 3, 19, 4, 35,
/* 15 */ 73, 1, 27, 2, 1, 27, 2, 1, 27, 2, 17, 282, 1, 4, 282, 1, 5, 283, 1, 3, 283, 4, 4, 284, 1, 3, 284, 3, 5, 285, 1, 6, 285, 1, 13, 286, 1, 3, 286, 3, 5, 287, 1, 4, 287, 2, 5, 288, 1, 3, 288, 1, 7, 289, 1, 4, 289, 2, 14, 290, 1, 4, 290, 3, 4, 291, 1, 2, 291, 1, 1, 291, 3, 4, 292, 1, 4, 292, 1, 1, 292, 1, 4, 293, 1, 2, 293, 1, 1, 293, 3, 5, 316, 1, 4, 316, 3, 4, 302, 3, 1, 302, 4, 4, 19, 1, 3, 19, 4, 35,
/* 16 */ 1, 255,
/* 17 */ 1, 255,
/* 18 */ 1, 255,
/* 19 */ 1, 255,
/* 20 */ 1, 255,
/* 21 */ 1, 255,
/* 22 */ 1, 255,
/* 23 */ 1, 255,
/* 24 */ 1, 255,
/* 25 */ 1, 255,
/* 26 */ 1, 255,
/* 27 */ 1, 255,
/* 28 */ 1, 255,
/* 29 */ 1, 255,
/* 30 */ 49, 16, 49, 1, 10, 50, 3, 10, 51, 3, 8, 52, 1, 2, 52, 1, 8, 53, 4, 9, 54, 3, 8, 55, 4, 9, 56, 2, 9, 57, 4, 7, 48, 4, 31, 8, 3, 14, 8, 4, 10, 277, 1, 11, 278, 1, 2, 278, 1, 8, 280, 3, 1, 280, 1, 2, 280, 1, 4, 300, 1, 2, 300, 1, 1, 300, 1, 7, 267, 1, 5, 268, 1, 11,
/* 31 */ 49, 16, 49, 1, 10, 50, 3, 10, 51, 3, 8, 52, 1, 2, 52, 1, 8, 53, 4, 9, 54, 3, 8, 55, 4, 9, 56, 2, 9, 57, 4, 7, 48, 4, 31, 8, 3, 14, 8, 4, 10, 277, 1, 11, 278, 1, 2, 278, 1, 8, 280, 3, 1, 280, 1, 2, 280, 1, 4, 300, 1, 2, 300, 1, 1, 300, 1, 7, 267, 1, 5, 268, 1, 11,
/* 32 */ 83, 3, 96, 2, 2, 96, 1, 8, 49, 1, 13, 50, 1, 12, 51, 1, 7, 52, 1, 2, 52, 1, 8, 53, 1, 11, 54, 1, 14, 55, 1, 8, 56, 1, 2, 56, 1, 8, 57, 1, 2, 57, 1, 7, 48, 1, 2, 48, 1, 22, 61, 3, 6, 8, 1, 2, 8, 1, 1, 8, 2, 3, 8, 2, 1, 8, 1, 3, 8, 1, 4, 8, 4, 5, 277, 1, 1, 277, 2, 2, 277, 2, 4, 278, 1, 2, 278, 1, 2, 278, 1, 5, 280, 1, 1, 280, 1, 1, 280, 1, 2, 280, 1, 4, 300, 2, 1, 300, 1, 1, 300, 1, 7, 267, 1, 3, 268, 1, 1, 268, 1, 1, 268, 1, 9,
/* 33 */ 83, 3, 96, 2, 2, 96, 1, 8, 49, 1, 13, 50, 1, 12, 51, 1, 7, 52, 1, 2, 52, 1, 8, 53, 1, 11, 54, 1, 14, 55, 1, 8, 56, 1, 2, 56, 1, 8, 57, 1, 2, 57, 1, 7, 48, 1, 2, 48, 1, 22, 61, 3, 6, 8, 1, 2, 8, 1, 1, 8, 2, 3, 8, 2, 1, 8, 1, 3, 8, 1, 4, 8, 4, 5, 277, 1, 1, 277, 2, 2, 277, 2, 4, 278, 1, 2, 278, 1, 2, 278, 1, 5, 280, 1, 1, 280, 1, 1, 280, 1, 2, 280, 1, 4, 300, 2, 1, 300, 1, 1, 300, 1, 7, 267, 1, 3, 268, 1, 1, 268, 1, 1, 268, 1, 9,
/* 34 */ 77, 2, 96, 1, 2, 96, 2, 9, 49, 1, 12, 50, 1, 10, 51, 3, 8, 52, 4, 8, 53, 3, 9, 54, 3, 12, 55, 1, 9, 56, 2, 9, 57, 4, 7, 48, 1, 2, 48, 1, 9, 45, 3, 19, 8, 3, 4, 8, 1, 1, 8, 1, 3, 8, 1, 3, 8, 4, 1, 8, 1, 2, 8, 1, 5, 277, 1, 1, 277, 1, 1, 277, 1, 1, 277, 1, 5, 278, 4, 1, 278, 1, 1, 278, 1, 4, 280, 1, 1, 280, 1, 1, 280, 1, 2, 280, 1, 4, 300, 1, 1, 300, 2, 1, 300, 1, 6, 267, 1, 5, 268, 3, 4, 269, 3, 3,
/* 35 */ 77, 2, 96, 1, 2, 96, 2, 9, 49, 1, 12, 50, 1, 10, 51, 3, 8, 52, 4, 8, 53, 3, 9, 54, 3, 12, 55, 1, 9, 56, 2, 9, 57, 4, 7, 48, 1, 2, 48, 1, 9, 45, 3, 19, 8, 3, 4, 8, 1, 1, 8, 1, 3, 8, 1, 3, 8, 4, 1, 8, 1, 2, 8, 1, 5, 277, 1, 1, 277, 1, 1, 277, 1, 1, 277, 1, 5, 278, 4, 1, 278, 1, 1, 278, 1, 4, 280, 1, 1, 280, 1, 1, 280, 1, 2, 280, 1, 4, 300, 1, 1, 300, 2, 1, 300, 1, 6, 267, 1, 5, 268, 3, 4, 269, 3, 3,
/* 36 */ 79, 16, 49, 1, 11, 50, 1, 14, 51, 1, 10, 52, 1, 11, 53, 1, 8, 54, 1, 2, 54, 1, 10, 55, 1, 9, 56, 1, 2, 56, 1, 11, 57, 1, 7, 48, 1, 2, 48, 1, 22, 61, 3, 6, 8, 1, 2, 8, 1, 1, 8, 3, 1, 8, 1, 3, 8, 1, 1, 8, 1, 4, 8, 1, 1, 8, 4, 5, 277, 1, 1, 277, 1, 1, 277, 1, 1, 277, 2, 4, 278, 1, 2, 278, 1, 1, 278, 1, 1, 278, 1, 4, 280, 3, 1, 280, 1, 2, 280, 1, 4, 300, 1, 2, 300, 1, 1, 300, 1, 6, 267, 1, 5, 268, 1, 1, 268, 1, 10,
/* 37 */ 79, 16, 49, 1, 11, 50, 1, 14, 51, 1, 10, 52, 1, 11, 53, 1, 8, 54, 1, 2, 54, 1, 10, 55, 1, 9, 56, 1, 2, 56, 1, 11, 57, 1, 7, 48, 1, 2, 48, 1, 22, 61, 3, 6, 8, 1, 2, 8, 1, 1, 8, 3, 1, 8, 1, 3, 8, 1, 1, 8, 1, 4, 8, 1, 1, 8, 4, 5, 277, 1, 1, 277, 1, 1, 277, 1, 1, 277, 2, 4, 278, 1, 2, 278, 1, 1, 278, 1, 1, 278, 1, 4, 280, 3, 1, 280, 1, 2, 280, 1, 4, 300, 1, 2, 300, 1, 1, 300, 1, 6, 267, 1, 5, 268, 1, 1, 268, 1, 10,
/* 38 */ 77, 16, 49, 1, 10, 50, 1, 15, 51, 1, 10, 52, 1, 11, 53, 1, 8, 54, 1, 2, 54, 1, 9, 55, 1, 10, 56, 1, 2, 56, 1, 11, 57, 1, 7, 48, 1, 2, 48, 1, 31, 8, 1, 2, 8, 1, 1, 8, 1, 1, 8, 1, 1, 8, 1, 3, 8, 2, 5, 8, 1, 1, 8, 1, 8, 277, 1, 1, 277, 1, 1, 277, 1, 2, 277, 1, 4, 278, 1, 2, 278, 1, 1, 278, 1, 1, 278, 1, 4, 280, 1, 3, 280, 1, 2, 280, 1, 4, 300, 1, 2, 300, 1, 1, 300, 1, 5, 267, 1, 5, 268, 1, 3, 268, 1, 9,
/* 39 */ 77, 16, 49, 1, 10, 50, 1, 15, 51, 1, 10, 52, 1, 11, 53, 1, 8, 54, 1, 2, 54, 1, 9, 55, 1, 10, 56, 1, 2, 56, 1, 11, 57, 1, 7, 48, 1, 2, 48, 1, 31, 8, 1, 2, 8, 1, 1, 8, 1, 1, 8, 1, 1, 8, 1, 3, 8, 2, 5, 8, 1, 1, 8, 1, 8, 277, 1, 1, 277, 1, 1, 277, 1, 2, 277, 1, 4, 278, 1, 2, 278, 1, 1, 278, 1, 1, 278, 1, 4, 280, 1, 3, 280, 1, 2, 280, 1, 4, 300, 1, 2, 300, 1, 1, 300, 1, 5, 267, 1, 5, 268, 1, 3, 268, 1, 9,
/* 40 */ 61, 16, 49, 1, 10, 50, 4, 9, 51, 3, 11, 52, 1, 8, 53, 3, 10, 54, 2, 9, 55, 1, 12, 56, 2, 9, 57, 4, 7, 48, 4, 31, 8, 3, 2, 8, 3, 2, 8, 2, 1, 8, 1, 1, 8, 1, 1, 8, 4, 1, 8, 1, 8, 277, 1, 1, 277, 1, 1, 277, 1, 1, 277, 2, 4, 278, 1, 2, 278, 1, 2, 278, 1, 5, 280, 1, 4, 280, 2, 5, 300, 1, 2, 300, 1, 1, 300, 3, 3, 267, 1, 19,
/* 41 */ 61, 16, 49, 1, 10, 50, 4, 9, 51, 3, 11, 52, 1, 8, 53, 3, 10, 54, 2, 9, 55, 1, 12, 56, 2, 9, 57, 4, 7, 48, 4, 31, 8, 3, 2, 8, 3, 2, 8, 2, 1, 8, 1, 1, 8, 1, 1, 8, 4, 1, 8, 1, 8, 277, 1, 1, 277, 1, 1, 277, 1, 1, 277, 2, 4, 278, 1, 2, 278, 1, 2, 278, 1, 5, 280, 1, 4, 280, 2, 5, 300, 1, 2, 300, 1, 1, 300, 3, 3, 267, 1, 19,
/* 42 */ 1, 255,
/* 43 */ 1, 255,
/* 44 */ 1, 255,
/* 45 */ 1, 255,
/* 46 */ 1, 255,
/* 47 */ 1, 255,
/* 48 */ 1, 255,
/* 49 */ 1, 255,
/* 50 */ 53, 1, 9, 3, 2, 9, 2, 2, 9, 3, 8, 113, 3, 8, 119, 1, 3, 119, 1, 5, 101, 4, 10, 114, 3, 9, 116, 5, 7, 121, 1, 3, 121, 1, 7, 117, 1, 2, 117, 1, 10, 105, 1, 10, 111, 2, 9, 112, 4, 8, 91, 3, 10, 93, 3, 32, 127, 2, 5, 127, 1, 4, 279, 3, 9, 281, 3, 1, 281, 3, 7, 263, 4, 5, 264, 2, 4, 265, 4, 10,
/* 51 */ 53, 1, 9, 3, 2, 9, 2, 2, 9, 3, 8, 113, 3, 8, 119, 1, 3, 119, 1, 5, 101, 4, 10, 114, 3, 9, 116, 5, 7, 121, 1, 3, 121, 1, 7, 117, 1, 2, 117, 1, 10, 105, 1, 10, 111, 2, 9, 112, 4, 8, 91, 3, 10, 93, 3, 32, 127, 2, 5, 127, 1, 4, 279, 3, 9, 281, 3, 1, 281, 3, 7, 263, 4, 5, 264, 2, 4, 265, 4, 10,
/* 52 */ 79, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 1, 2, 9, 1, 6, 113, 1, 3, 113, 1, 7, 119, 1, 3, 119, 1, 5, 101, 1, 13, 114, 1, 2, 114, 1, 10, 116, 1, 9, 121, 1, 3, 121, 1, 7, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 1, 2, 112, 1, 8, 91, 1, 14, 93, 1, 32, 127, 1, 1, 127, 1, 1, 127, 2, 1, 127, 1, 4, 279, 1, 3, 279, 3, 5, 281, 1, 1, 281, 1, 1, 281, 1, 2, 281, 1, 9, 263, 1, 4, 264, 1, 2, 264, 1, 3, 265, 1, 2, 265, 1, 10,
/* 53 */ 79, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 1, 2, 9, 1, 6, 113, 1, 3, 113, 1, 7, 119, 1, 3, 119, 1, 5, 101, 1, 13, 114, 1, 2, 114, 1, 10, 116, 1, 9, 121, 1, 3, 121, 1, 7, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 1, 2, 112, 1, 8, 91, 1, 14, 93, 1, 32, 127, 1, 1, 127, 1, 1, 127, 2, 1, 127, 1, 4, 279, 1, 3, 279, 3, 5, 281, 1, 1, 281, 1, 1, 281, 1, 2, 281, 1, 9, 263, 1, 4, 264, 1, 2, 264, 1, 3, 265, 1, 2, 265, 1, 10,
/* 54 */ 73, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 3, 7, 113, 1, 3, 113, 1, 7, 119, 1, 3, 119, 1, 5, 101, 4, 10, 114, 3, 11, 116, 1, 10, 121, 1, 1, 121, 1, 8, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 1, 2, 112, 1, 8, 91, 1, 14, 93, 1, 32, 127, 1, 1, 127, 1, 1, 127, 1, 2, 127, 1, 4, 279, 3, 1, 279, 1, 2, 279, 1, 4, 281, 1, 1, 281, 1, 1, 281, 1, 2, 281, 1, 9, 263, 1, 5, 264, 2, 4, 265, 4, 10,
/* 55 */ 73, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 3, 7, 113, 1, 3, 113, 1, 7, 119, 1, 3, 119, 1, 5, 101, 4, 10, 114, 3, 11, 116, 1, 10, 121, 1, 1, 121, 1, 8, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 1, 2, 112, 1, 8, 91, 1, 14, 93, 1, 32, 127, 1, 1, 127, 1, 1, 127, 1, 2, 127, 1, 4, 279, 3, 1, 279, 1, 2, 279, 1, 4, 281, 1, 1, 281, 1, 1, 281, 1, 2, 281, 1, 9, 263, 1, 5, 264, 2, 4, 265, 4, 10,
/* 56 */ 75, 2, 9, 1, 2, 9, 4, 1, 9, 1, 2, 9, 1, 6, 113, 1, 1, 113, 1, 1, 113, 1, 7, 119, 1, 1, 119, 1, 1, 119, 1, 5, 101, 1, 13, 114, 1, 2, 114, 1, 10, 116, 1, 11, 121, 1, 9, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 4, 8, 91, 1, 14, 93, 1, 32, 127, 1, 1, 127, 1, 1, 127, 2, 1, 127, 1, 4, 279, 1, 3, 279, 1, 2, 279, 1, 4, 281, 3, 1, 281, 1, 2, 281, 1, 8, 263, 1, 5, 264, 1, 2, 264, 1, 6, 265, 1, 10,
/* 57 */ 75, 2, 9, 1, 2, 9, 4, 1, 9, 1, 2, 9, 1, 6, 113, 1, 1, 113, 1, 1, 113, 1, 7, 119, 1, 1, 119, 1, 1, 119, 1, 5, 101, 1, 13, 114, 1, 2, 114, 1, 10, 116, 1, 11, 121, 1, 9, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 4, 8, 91, 1, 14, 93, 1, 32, 127, 1, 1, 127, 1, 1, 127, 2, 1, 127, 1, 4, 279, 1, 3, 279, 1, 2, 279, 1, 4, 281, 3, 1, 281, 1, 2, 281, 1, 8, 263, 1, 5, 264, 1, 2, 264, 1, 6, 265, 1, 10,
/* 58 */ 79, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 1, 2, 9, 1, 6, 113, 1, 2, 113, 1, 8, 119, 1, 1, 119, 1, 1, 119, 1, 5, 101, 1, 13, 114, 1, 2, 114, 1, 10, 116, 1, 11, 121, 1, 9, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 1, 11, 91, 1, 14, 93, 1, 11, 13, 3, 7, 13, 1, 10, 127, 1, 1, 127, 1, 1, 127, 1, 2, 127, 1, 4, 279, 1, 3, 279, 1, 2, 279, 1, 4, 281, 1, 3, 281, 1, 2, 281, 1, 7, 263, 1, 6, 264, 1, 2, 264, 1, 6, 265, 1, 10,
/* 59 */ 79, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 1, 2, 9, 1, 6, 113, 1, 2, 113, 1, 8, 119, 1, 1, 119, 1, 1, 119, 1, 5, 101, 1, 13, 114, 1, 2, 114, 1, 10, 116, 1, 11, 121, 1, 9, 117, 1, 2, 117, 1, 10, 105, 1, 9, 111, 1, 2, 111, 1, 8, 112, 1, 11, 91, 1, 14, 93, 1, 11, 13, 3, 7, 13, 1, 10, 127, 1, 1, 127, 1, 1, 127, 1, 2, 127, 1, 4, 279, 1, 3, 279, 1, 2, 279, 1, 4, 281, 1, 3, 281, 1, 2, 281, 1, 7, 263, 1, 6, 264, 1, 2, 264, 1, 6, 265, 1, 10,
/* 60 */ 69, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 3, 8, 113, 2, 1, 113, 1, 8, 119, 1, 1, 119, 1, 6, 101, 4, 10, 114, 1, 2, 114, 1, 10, 116, 1, 11, 121, 1, 10, 117, 2, 11, 105, 1, 10, 111, 2, 9, 112, 1, 11, 91, 3, 10, 93, 3, 11, 13, 1, 3, 13, 3, 3, 13, 1, 3, 13, 2, 5, 127, 2, 2, 127, 2, 1, 127, 1, 4, 279, 3, 1, 279, 1, 2, 279, 1, 4, 281, 1, 3, 281, 3, 7, 263, 1, 8, 264, 2, 4, 265, 4, 10,
/* 61 */ 69, 2, 9, 1, 2, 9, 1, 2, 9, 1, 1, 9, 3, 8, 113, 2, 1, 113, 1, 8, 119, 1, 1, 119, 1, 6, 101, 4, 10, 114, 1, 2, 114, 1, 10, 116, 1, 11, 121, 1, 10, 117, 2, 11, 105, 1, 10, 111, 2, 9, 112, 1, 11, 91, 3, 10, 93, 3, 11, 13, 1, 3, 13, 3, 3, 13, 1, 3, 13, 2, 5, 127, 2, 2, 127, 2, 1, 127, 1, 4, 279, 3, 1, 279, 1, 2, 279, 1, 4, 281, 1, 3, 281, 3, 7, 263, 1, 8, 264, 2, 4, 265, 4, 10,
/* 62 */ 13, 167, 13, 3, 1, 13, 1, 2, 13, 1, 1, 13, 3, 2, 13, 1, 68, 270, 1, 4,
/* 63 */ 13, 167, 13, 3, 1, 13, 1, 2, 13, 1, 1, 13, 3, 2, 13, 1, 68, 270, 1, 4,
/* 64 */ 13, 167, 13, 1, 3, 13, 1, 2, 13, 1, 2, 13, 1, 3, 13, 1, 67, 270, 3, 3,
/* 65 */ 13, 167, 13, 1, 3, 13, 1, 2, 13, 1, 2, 13, 1, 3, 13, 1, 67, 270, 3, 3,
/* 66 */ 13, 167, 13, 1, 3, 13, 1, 2, 13, 1, 2, 13, 1, 3, 13, 1, 68, 270, 1, 4,
/* 67 */ 13, 167, 13, 1, 3, 13, 1, 2, 13, 1, 2, 13, 1, 3, 13, 1, 68, 270, 1, 4,
/* 68 */ 11, 167, 13, 3, 1, 13, 1, 2, 13, 1, 3, 13, 2, 1, 13, 1, 73,
/* 69 */ 11, 167, 13, 3, 1, 13, 1, 2, 13, 1, 3, 13, 2, 1, 13, 1, 73,
/* 70 */ 37, 2, 301, 2, 21, 97, 2, 10, 115, 4, 7, 100, 3, 10, 102, 4, 9, 103, 3, 8, 104, 1, 2, 104, 1, 8, 106, 4, 6, 107, 1, 2, 107, 1, 9, 108, 1, 25, 39, 1, 10, 92, 1, 68, 260, 1, 2, 260, 1, 5, 261, 4, 3, 262, 3, 10,
/* 71 */ 37, 2, 301, 2, 21, 97, 2, 10, 115, 4, 7, 100, 3, 10, 102, 4, 9, 103, 3, 8, 104, 1, 2, 104, 1, 8, 106, 4, 6, 107, 1, 2, 107, 1, 9, 108, 1, 25, 39, 1, 10, 92, 1, 68, 260, 1, 2, 260, 1, 5, 261, 4, 3, 262, 3, 10,
/* 72 */ 49, 1, 301, 1, 2, 301, 1, 1, 301, 3, 2, 301, 4, 1, 301, 3, 5, 97, 1, 2, 97, 1, 9, 115, 1, 10, 100, 1, 2, 100, 1, 9, 102, 1, 11, 103, 1, 11, 104, 1, 2, 104, 1, 11, 106, 1, 6, 107, 1, 1, 107, 1, 10, 108, 1, 25, 39, 1, 10, 92, 1, 68, 260, 1, 2, 260, 1, 5, 261, 1, 5, 262, 1, 13,
/* 73 */ 49, 1, 301, 1, 2, 301, 1, 1, 301, 3, 2, 301, 4, 1, 301, 3, 5, 97, 1, 2, 97, 1, 9, 115, 1, 10, 100, 1, 2, 100, 1, 9, 102, 1, 11, 103, 1, 11, 104, 1, 2, 104, 1, 11, 106, 1, 6, 107, 1, 1, 107, 1, 10, 108, 1, 25, 39, 1, 10, 92, 1, 68, 260, 1, 2, 260, 1, 5, 261, 1, 5, 262, 1, 13,
/* 74 */ 45, 1, 301, 1, 7, 301, 1, 1, 301, 1, 2, 301, 1, 1, 301, 1, 7, 97, 1, 2, 97, 1, 9, 115, 4, 7, 100, 1, 2, 100, 1, 9, 102, 4, 8, 103, 1, 1, 103, 2, 8, 104, 4, 11, 106, 1, 6, 107, 2, 11, 108, 1, 12, 59, 1, 24, 92, 1, 67, 260, 4, 5, 261, 3, 3, 262, 3, 11,
/* 75 */ 45, 1, 301, 1, 7, 301, 1, 1, 301, 1, 2, 301, 1, 1, 301, 1, 7, 97, 1, 2, 97, 1, 9, 115, 4, 7, 100, 1, 2, 100, 1, 9, 102, 4, 8, 103, 1, 1, 103, 2, 8, 104, 4, 11, 106, 1, 6, 107, 2, 11, 108, 1, 12, 59, 1, 24, 92, 1, 67, 260, 4, 5, 261, 3, 3, 262, 3, 11,
/* 76 */ 45, 1, 301, 1, 4, 301, 4, 1, 301, 4, 1, 301, 3, 5, 97, 4, 12, 115, 1, 7, 100, 1, 2, 100, 1, 9, 102, 1, 11, 103, 1, 2, 103, 1, 8, 104, 1, 2, 104, 1, 11, 106, 1, 6, 107, 1, 1, 107, 1, 10, 108, 1, 37, 92, 1, 70, 260, 1, 8, 261, 1, 2, 262, 1, 2, 262, 1, 10,
/* 77 */ 45, 1, 301, 1, 4, 301, 4, 1, 301, 4, 1, 301, 3, 5, 97, 4, 12, 115, 1, 7, 100, 1, 2, 100, 1, 9, 102, 1, 11, 103, 1, 2, 103, 1, 8, 104, 1, 2, 104, 1, 11, 106, 1, 6, 107, 1, 1, 107, 1, 10, 108, 1, 37, 92, 1, 70, 260, 1, 8, 261, 1, 2, 262, 1, 2, 262, 1, 10,
/* 78 */ 55, 1, 301, 1, 2, 301, 1, 1, 301, 1, 2, 301, 1, 1, 301, 1, 6, 301, 1, 5, 97, 1, 2, 97, 1, 12, 115, 1, 7, 100, 1, 2, 100, 1, 9, 102, 1, 11, 103, 1, 2, 103, 1, 8, 104, 1, 2, 104, 1, 8, 106, 1, 2, 106, 1, 6, 107, 1, 2, 107, 1, 9, 108, 1, 12, 59, 1, 25, 92, 1, 69, 260, 1, 8, 261, 1, 2, 262, 1, 2, 262, 1, 10,
/* 79 */ 55, 1, 301, 1, 2, 301, 1, 1, 301, 1, 2, 301, 1, 1, 301, 1, 6, 301, 1, 5, 97, 1, 2, 97, 1, 12, 115, 1, 7, 100, 1, 2, 100, 1, 9, 102, 1, 11, 103, 1, 2, 103, 1, 8, 104, 1, 2, 104, 1, 8, 106, 1, 2, 106, 1, 6, 107, 1, 2, 107, 1, 9, 108, 1, 12, 59, 1, 25, 92, 1, 69, 260, 1, 8, 261, 1, 2, 262, 1, 2, 262, 1, 10,
/* 80 */ 43, 2, 301, 2, 2, 301, 4, 1, 301, 1, 4, 301, 3, 5, 97, 1, 2, 97, 1, 9, 115, 4, 7, 100, 3, 10, 102, 1, 12, 103, 2, 9, 104, 1, 2, 104, 1, 9, 106, 2, 7, 107, 1, 2, 107, 1, 9, 108, 4, 9, 59, 1, 25, 92, 1, 69, 260, 1, 5, 261, 3, 4, 262, 2, 11,
/* 81 */ 43, 2, 301, 2, 2, 301, 4, 1, 301, 1, 4, 301, 3, 5, 97, 1, 2, 97, 1, 9, 115, 4, 7, 100, 3, 10, 102, 1, 12, 103, 2, 9, 104, 1, 2, 104, 1, 9, 106, 2, 7, 107, 1, 2, 107, 1, 9, 108, 4, 9, 59, 1, 25, 92, 1, 69, 260, 1, 5, 261, 3, 4, 262, 2, 11,
/* 82 */ 1, 255,
/* 83 */ 1, 255,
/* 84 */ 1, 255,
/* 85 */ 1, 255,
/* 86 */ 1, 255,
/* 87 */ 1, 255,
/* 88 */ 1, 255,
/* 89 */ 1, 255,
/* 90 */ 53, 1, 304, 3, 8, 304, 1, 1, 304, 1, 8, 323, 1, 10, 122, 4, 7, 120, 1, 3, 120, 1, 9, 99, 2, 8, 118, 1, 3, 118, 1, 8, 98, 3, 9, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 34, 47, 1, 11, 303, 4, 1, 303, 1, 4, 303, 1, 2, 303, 3, 1, 303, 1, 28, 273, 2, 22, 257, 1, 6, 258, 3, 4, 259, 3, 4, 271, 6, 1,
/* 91 */ 53, 1, 304, 3, 8, 304, 1, 1, 304, 1, 8, 323, 1, 10, 122, 4, 7, 120, 1, 3, 120, 1, 9, 99, 2, 8, 118, 1, 3, 118, 1, 8, 98, 3, 9, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 34, 47, 1, 11, 303, 4, 1, 303, 1, 4, 303, 1, 2, 303, 3, 1, 303, 1, 28, 273, 2, 22, 257, 1, 6, 258, 3, 4, 259, 3, 4, 271, 6, 1,
/* 92 */ 63, 1, 304, 1, 3, 304, 1, 3, 304, 1, 1, 304, 1, 2, 304, 1, 7, 323, 1, 14, 122, 1, 7, 120, 1, 3, 120, 1, 8, 99, 1, 2, 99, 1, 7, 118, 1, 3, 118, 1, 8, 98, 1, 2, 98, 1, 8, 110, 2, 1, 110, 1, 8, 109, 2, 1, 109, 2, 34, 47, 1, 11, 303, 1, 4, 303, 1, 6, 303, 1, 4, 303, 1, 27, 273, 4, 21, 257, 1, 9, 258, 1, 6, 259, 1, 3, 271, 1, 2, 271, 1, 1, 271, 1, 1,
/* 93 */ 63, 1, 304, 1, 3, 304, 1, 3, 304, 1, 1, 304, 1, 2, 304, 1, 7, 323, 1, 14, 122, 1, 7, 120, 1, 3, 120, 1, 8, 99, 1, 2, 99, 1, 7, 118, 1, 3, 118, 1, 8, 98, 1, 2, 98, 1, 8, 110, 2, 1, 110, 1, 8, 109, 2, 1, 109, 2, 34, 47, 1, 11, 303, 1, 4, 303, 1, 6, 303, 1, 4, 303, 1, 27, 273, 4, 21, 257, 1, 9, 258, 1, 6, 259, 1, 3, 271, 1, 2, 271, 1, 1, 271, 1, 1,
/* 94 */ 61, 1, 304, 3, 1, 304, 1, 5, 304, 2, 1, 304, 2, 5, 323, 1, 14, 122, 1, 9, 120, 1, 1, 120, 1, 9, 99, 1, 10, 118, 1, 3, 118, 1, 8, 98, 3, 9, 110, 1, 1, 110, 2, 8, 109, 1, 1, 109, 1, 1, 109, 1, 33, 47, 1, 12, 303, 4, 1, 303, 4, 1, 303, 1, 1, 303, 3, 1, 303, 3, 25, 273, 6, 20, 257, 1, 8, 258, 1, 4, 259, 3, 4, 271, 1, 2, 271, 1, 1, 271, 1, 1,
/* 95 */ 61, 1, 304, 3, 1, 304, 1, 5, 304, 2, 1, 304, 2, 5, 323, 1, 14, 122, 1, 9, 120, 1, 1, 120, 1, 9, 99, 1, 10, 118, 1, 3, 118, 1, 8, 98, 3, 9, 110, 1, 1, 110, 2, 8, 109, 1, 1, 109, 1, 1, 109, 1, 33, 47, 1, 12, 303, 4, 1, 303, 4, 1, 303, 1, 1, 303, 3, 1, 303, 3, 25, 273, 6, 20, 257, 1, 8, 258, 1, 4, 259, 3, 4, 271, 1, 2, 271, 1, 1, 271, 1, 1,
/* 96 */ 57, 3, 304, 1, 1, 304, 3, 1, 304, 1, 1, 304, 1, 2, 304, 1, 7, 323, 1, 12, 122, 1, 11, 120, 1, 10, 99, 1, 10, 118, 1, 3, 118, 1, 8, 98, 1, 2, 98, 1, 8, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 33, 47, 1, 15, 303, 1, 1, 303, 1, 2, 303, 1, 1, 303, 1, 1, 303, 1, 4, 303, 1, 28, 273, 2, 22, 257, 1, 7, 258, 1, 8, 259, 1, 10,
/* 97 */ 57, 3, 304, 1, 1, 304, 3, 1, 304, 1, 1, 304, 1, 2, 304, 1, 7, 323, 1, 12, 122, 1, 11, 120, 1, 10, 99, 1, 10, 118, 1, 3, 118, 1, 8, 98, 1, 2, 98, 1, 8, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 33, 47, 1, 15, 303, 1, 1, 303, 1, 2, 303, 1, 1, 303, 1, 1, 303, 1, 4, 303, 1, 28, 273, 2, 22, 257, 1, 7, 258, 1, 8, 259, 1, 10,
/* 98 */ 69, 3, 304, 1, 1, 304, 1, 1, 304, 1, 1, 304, 1, 1, 304, 1, 2, 304, 1, 8, 323, 1, 10, 122, 1, 11, 120, 1, 1, 120, 1, 9, 99, 1, 2, 99, 1, 8, 118, 1, 1, 118, 1, 9, 98, 1, 2, 98, 1, 8, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 8, 44, 1, 11, 46, 1, 11, 47, 1, 16, 303, 1, 1, 303, 1, 2, 303, 1, 1, 303, 1, 1, 303, 1, 4, 303, 1, 28, 273, 2, 22, 257, 1, 6, 258, 1, 9, 259, 1, 3, 271, 5, 2,
/* 99 */ 69, 3, 304, 1, 1, 304, 1, 1, 304, 1, 1, 304, 1, 1, 304, 1, 2, 304, 1, 8, 323, 1, 10, 122, 1, 11, 120, 1, 1, 120, 1, 9, 99, 1, 2, 99, 1, 8, 118, 1, 1, 118, 1, 9, 98, 1, 2, 98, 1, 8, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 8, 44, 1, 11, 46, 1, 11, 47, 1, 16, 303, 1, 1, 303, 1, 2, 303, 1, 1, 303, 1, 1, 303, 1, 4, 303, 1, 28, 273, 2, 22, 257, 1, 6, 258, 1, 9, 259, 1, 3, 271, 5, 2,
/* 100 */ 59, 1, 304, 3, 1, 304, 1, 1, 304, 1, 1, 304, 1, 1, 304, 1, 3, 304, 1, 18, 122, 4, 7, 120, 1, 3, 120, 1, 9, 99, 2, 10, 118, 1, 10, 98, 3, 9, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 8, 44, 1, 23, 47, 1, 13, 303, 4, 1, 303, 1, 2, 303, 1, 1, 303, 1, 1, 303, 1, 5, 303, 2, 26, 273, 2, 22, 257, 1, 6, 258, 4, 3, 259, 3, 8, 271, 1, 2,
/* 101 */ 59, 1, 304, 3, 1, 304, 1, 1, 304, 1, 1, 304, 1, 1, 304, 1, 3, 304, 1, 18, 122, 4, 7, 120, 1, 3, 120, 1, 9, 99, 2, 10, 118, 1, 10, 98, 3, 9, 110, 1, 2, 110, 1, 8, 109, 1, 3, 109, 1, 8, 44, 1, 23, 47, 1, 13, 303, 4, 1, 303, 1, 2, 303, 1, 1, 303, 1, 1, 303, 1, 5, 303, 2, 26, 273, 2, 22, 257, 1, 6, 258, 4, 3, 259, 3, 8, 271, 1, 2,
/* 102 */ 3, 252, 271, 1, 2,
/* 103 */ 3, 252, 271, 1, 2,
/* 104 */ 3, 248, 271, 4, 3,
/* 105 */ 3, 248, 271, 4, 3,
/* 106 */ 1, 255,
/* 107 */ 1, 255,
/* 108 */ 3, 251, 271, 1, 3,
/* 109 */ 3, 251, 271, 1, 3,
/* 110 */ 37, 2, 306, 2, 2, 306, 1, 7, 306, 1, 19, 308, 2, 2, 308, 1, 2, 308, 1, 8, 32, 85, 7, 307, 2, 2, 307, 1, 2, 307, 1, 20, 305, 2, 2, 305, 1, 7, 305, 1, 8, 276, 1, 11, 274, 2, 11, 275, 1, 13, 256, 4, 15, 271, 5, 1,
/* 111 */ 39, 2, 306, 2, 2, 306, 1, 7, 306, 1, 19, 308, 2, 2, 308, 1, 2, 308, 1, 8, 32, 2, 81, 32, 2, 7, 307, 2, 2, 307, 1, 2, 307, 1, 20, 305, 2, 2, 305, 1, 7, 305, 1, 8, 276, 1, 11, 274, 2, 11, 275, 1, 13, 256, 4, 15, 271, 5, 1,
/* 112 */ 51, 1, 306, 1, 4, 306, 1, 4, 306, 2, 1, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 2, 308, 1, 8, 32, 2, 81, 32, 2, 6, 307, 1, 2, 307, 1, 1, 307, 1, 2, 307, 1, 19, 305, 1, 4, 305, 1, 4, 305, 2, 1, 305, 1, 7, 276, 2, 11, 274, 2, 11, 275, 2, 12, 256, 1, 2, 256, 1, 14, 271, 1, 2, 271, 1, 3,
/* 113 */ 51, 1, 306, 1, 4, 306, 1, 4, 306, 2, 1, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 2, 308, 1, 8, 32, 2, 81, 32, 2, 6, 307, 1, 2, 307, 1, 1, 307, 1, 2, 307, 1, 19, 305, 1, 4, 305, 1, 4, 305, 2, 1, 305, 1, 7, 276, 2, 11, 274, 2, 11, 275, 2, 12, 256, 1, 2, 256, 1, 14, 271, 1, 2, 271, 1, 3,
/* 114 */ 49, 1, 306, 1, 3, 306, 3, 2, 306, 1, 3, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 1, 308, 3, 7, 32, 2, 81, 32, 2, 6, 307, 1, 2, 307, 1, 1, 307, 1, 1, 307, 3, 18, 305, 1, 3, 305, 3, 2, 305, 1, 3, 305, 1, 6, 276, 6, 8, 274, 2, 8, 275, 6, 11, 256, 1, 2, 256, 1, 14, 271, 1, 6,
/* 115 */ 49, 1, 306, 1, 3, 306, 3, 2, 306, 1, 3, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 1, 308, 3, 7, 32, 2, 81, 32, 2, 6, 307, 1, 2, 307, 1, 1, 307, 1, 1, 307, 3, 18, 305, 1, 3, 305, 3, 2, 305, 1, 3, 305, 1, 6, 276, 6, 8, 274, 2, 8, 275, 6, 11, 256, 1, 2, 256, 1, 14, 271, 1, 6,
/* 116 */ 43, 1, 306, 1, 4, 306, 1, 3, 306, 1, 3, 306, 1, 18, 308, 4, 1, 308, 1, 2, 308, 1, 8, 32, 2, 81, 32, 2, 6, 307, 4, 1, 307, 1, 2, 307, 1, 19, 305, 1, 4, 305, 1, 3, 305, 1, 3, 305, 1, 6, 276, 6, 6, 274, 6, 6, 275, 6, 11, 256, 1, 2, 256, 1, 21,
/* 117 */ 43, 1, 306, 1, 4, 306, 1, 3, 306, 1, 3, 306, 1, 18, 308, 4, 1, 308, 1, 2, 308, 1, 8, 32, 2, 81, 32, 2, 6, 307, 4, 1, 307, 1, 2, 307, 1, 19, 305, 1, 4, 305, 1, 3, 305, 1, 3, 305, 1, 6, 276, 6, 6, 274, 6, 6, 275, 6, 11, 256, 1, 2, 256, 1, 21,
/* 118 */ 49, 1, 306, 1, 4, 306, 1, 3, 306, 1, 3, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 2, 308, 1, 8, 32, 2, 81, 32, 2, 6, 307, 1, 2, 307, 1, 1, 307, 1, 2, 307, 1, 19, 305, 1, 4, 305, 1, 3, 305, 1, 3, 305, 1, 7, 276, 2, 10, 274, 4, 10, 275, 2, 12, 256, 1, 2, 256, 1, 14, 271, 5, 2,
/* 119 */ 49, 1, 306, 1, 4, 306, 1, 3, 306, 1, 3, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 2, 308, 1, 8, 32, 2, 81, 32, 2, 6, 307, 1, 2, 307, 1, 1, 307, 1, 2, 307, 1, 19, 305, 1, 4, 305, 1, 3, 305, 1, 3, 305, 1, 7, 276, 2, 10, 274, 4, 10, 275, 2, 12, 256, 1, 2, 256, 1, 14, 271, 5, 2,
/* 120 */ 49, 2, 306, 2, 3, 306, 2, 1, 306, 1, 3, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 3, 308, 2, 6, 32, 2, 81, 32, 2, 6, 307, 1, 2, 307, 1, 1, 307, 1, 3, 307, 2, 18, 305, 2, 3, 305, 2, 1, 305, 1, 3, 305, 1, 8, 276, 1, 11, 274, 2, 11, 275, 1, 13, 256, 4, 8, 266, 1, 9, 271, 1, 2,
/* 121 */ 47, 2, 306, 2, 3, 306, 2, 1, 306, 1, 3, 306, 1, 18, 308, 1, 2, 308, 1, 1, 308, 1, 3, 308, 2, 6, 32, 85, 6, 307, 1, 2, 307, 1, 1, 307, 1, 3, 307, 2, 18, 305, 2, 3, 305, 2, 1, 305, 1, 3, 305, 1, 8, 276, 1, 11, 274, 2, 11, 275, 1, 13, 256, 4, 8, 266, 1, 9, 271, 1, 2,
/* 122 */ 1, 255,
/* 123 */ 1, 255,
/* 124 */ 1, 255,
/* 125 */ 1, 255,
/* 126 */ 1, 255,
/* 127 */ 1, 255,
/* 128 */ 1, 255,
/* 129 */ 1, 255,
/* 130 */ 41, 1, 12, 10, 2, 33, 10, 2, 34, 10, 2, 35, 10, 2, 36, 10, 2, 38, 10, 2, 40, 10, 2, 41, 10, 2, 42, 10, 2, 43, 10, 2, 58, 10, 2, 60, 10, 2, 62, 10, 2, 63, 10, 2, 64, 10, 2, 94, 10, 2, 95, 10, 2, 123, 10, 2, 124, 10, 2, 125, 10, 16,
/* 131 */ 41, 1, 12, 10, 2, 33, 10, 2, 34, 10, 2, 35, 10, 2, 36, 10, 2, 38, 10, 2, 40, 10, 2, 41, 10, 2, 42, 10, 2, 43, 10, 2, 58, 10, 2, 60, 10, 2, 62, 10, 2, 63, 10, 2, 64, 10, 2, 94, 10, 2, 95, 10, 2, 123, 10, 2, 124, 10, 2, 125, 10, 16,
/* 132 */ 1, 255,
/* 133 */ 1, 255,
/* 134 */ 41, 1, 126, 10, 2, 272, 10, 2, 294, 10, 2, 295, 10, 2, 296, 10, 2, 309, 10, 2, 310, 10, 2, 311, 10, 2, 312, 10, 2, 313, 10, 2, 315, 10, 2, 316, 10, 2, 317, 10, 2, 318, 10, 2, 319, 10, 2, 320, 10, 2, 321, 10, 2, 322, 10, 2, 314, 10, 2, 0, 10, 16,
/* 135 */ 41, 1, 126, 10, 2, 272, 10, 2, 294, 10, 2, 295, 10, 2, 296, 10, 2, 309, 10, 2, 310, 10, 2, 311, 10, 2, 312, 10, 2, 313, 10, 2, 315, 10, 2, 316, 10, 2, 317, 10, 2, 318, 10, 2, 319, 10, 2, 320, 10, 2, 321, 10, 2, 322, 10, 2, 314, 10, 2, 0, 10, 16,
/* 136 */ 1, 255,
/* 137 */ 1, 255,
/* 138 */ 1, 255,
/* 139 */ 1, 255,
/* 140 */ 1, 255,
/* 141 */ 1, 255,
};
#endif /* REMOTEPAD_H */

View File

@ -1336,12 +1336,16 @@ static void input_remote_parse_packet(
switch (msg->device)
{
case RETRO_DEVICE_JOYPAD:
input_state->buttons[user] &= ~(1 << msg->id);
if (msg->state)
input_state->buttons[user] |= 1 << msg->id;
if (msg->id < 16)
{
input_state->buttons[user] &= ~(1 << msg->id);
if (msg->state)
input_state->buttons[user] |= 1 << msg->id;
}
break;
case RETRO_DEVICE_ANALOG:
input_state->analog[msg->index * 2 + msg->id][user] = msg->state;
if (msg->id<2 && msg->index<2)
input_state->analog[msg->index * 2 + msg->id][user] = msg->state;
break;
}
}
@ -1606,7 +1610,7 @@ static int16_t input_state_device(
if (id == RETRO_DEVICE_ID_ANALOG_Y)
base += 1;
#ifdef HAVE_NETWORKGAMEPAD
if ( input_st->remote
if ( input_st->remote && idx < RETRO_DEVICE_INDEX_ANALOG_BUTTON
&& input_state && input_state->analog[base][port])
res = input_state->analog[base][port];
else