Skip to content

Commit ec97b72

Browse files
committed
Add support for the upcoming 3.5.x adapter firmware
1 parent 205e98c commit ec97b72

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

RELEASE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Raphnet raw Input plugin for Mupen64Plus
22
--------------------------------
33

4+
## v1.0.1 - November 22, 2017
5+
6+
* Add support for the upcoming 3.5.x adapter firmware
7+
(2-player adapters won't work properly otherwise)
8+
49
## v1.0.0 - January 15, 2017
510

611
* Support for multiple adapters

src/gcn64.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* gc_n64_usb : Gamecube or N64 controller to USB adapter firmware
2-
Copyright (C) 2007-2015 Raphael Assenat <raph@raphnet.net>
2+
Copyright (C) 2007-2017 Raphael Assenat <raph@raphnet.net>
33
44
This program is free software: you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -53,15 +53,13 @@ static struct supported_adapter supported_adapters[] = {
5353
{ OUR_VENDOR_ID, 0x0036, 1, { 2, 1 } }, // GC/N64 USB v3.4.x (2x N64-only mode)
5454
{ OUR_VENDOR_ID, 0x0037, 1, { 2, 1 } }, // GC/N64 USB v3.4.x (2x GC-only mode)
5555

56-
// For future use...
57-
{ OUR_VENDOR_ID, 0x0038, 1, { 2, 1 } },
58-
{ OUR_VENDOR_ID, 0x0039, 1, { 2, 1 } },
59-
{ OUR_VENDOR_ID, 0x003A, 1, { 2, 1 } },
60-
{ OUR_VENDOR_ID, 0x003B, 1, { 2, 1 } },
61-
{ OUR_VENDOR_ID, 0x003C, 1, { 2, 1 } },
62-
{ OUR_VENDOR_ID, 0x003D, 1, { 2, 1 } },
63-
{ OUR_VENDOR_ID, 0x003E, 1, { 2, 1 } },
64-
{ OUR_VENDOR_ID, 0x003F, 1, { 2, 1 } },
56+
// GC/N64 USB v3.5.x flavours
57+
{ OUR_VENDOR_ID, 0x0038, 1, { 1, 1 } }, // (GC/N64 mode)
58+
{ OUR_VENDOR_ID, 0x0039, 1, { 1, 1 } }, // (N64 mode)
59+
{ OUR_VENDOR_ID, 0x003A, 1, { 1, 1 } }, // (GC mode)
60+
{ OUR_VENDOR_ID, 0x003B, 2, { 2, 1 } }, // (2x GC/N64 mode)
61+
{ OUR_VENDOR_ID, 0x003C, 2, { 2, 1 } }, // (2x N64-only mode)
62+
{ OUR_VENDOR_ID, 0x003D, 2, { 2, 1 } }, // (2x GC-only mode)
6563

6664
{ }, // terminator
6765
};

src/plugin_back.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
// Filter
5959
#define EXTENSION_RW_ONLY 0
6060

61-
6261
#define MAX_ADAPTERS 4
6362
#define MAX_CHANNELS 4
6463

@@ -302,6 +301,7 @@ static int pb_performIo(void)
302301
struct adapter *adap;
303302
struct blockio_op *biops;
304303
int j, i, res;
304+
int op_was_extio[MAX_OPS] = { };
305305

306306
for (j=0; j<g_n_channels; j++)
307307
{
@@ -316,6 +316,7 @@ static int pb_performIo(void)
316316
for (i=0; i<adap->n_ops; i++) {
317317
if (EXTENSION_RW_ONLY && (biops[i].tx_data[0] < 0x02))
318318
continue;
319+
op_was_extio[i] = 1;
319320
printf("Before blockIO: op %d, chn: %d, : tx: 0x%02x, rx: 0x%02x, data: ", i, biops[i].chn,
320321
biops[i].tx_len, biops[i].rx_len);
321322
printHexBuf(biops[i].tx_data, biops[i].tx_len);
@@ -340,7 +341,7 @@ static int pb_performIo(void)
340341
biops[i].tx_data[-1] = biops[i].rx_len;
341342

342343
#ifdef TRACE_BLOCK_IO
343-
if (EXTENSION_RW_ONLY && (biops[i].tx_data[0] < 0x02))
344+
if (EXTENSION_RW_ONLY && (!op_was_extio[i])) // Read
344345
continue;
345346

346347
printf("After blockIO: op %d, chn: %d, : tx: 0x%02x, rx: 0x%02x, data: ", i, biops[i].chn,

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define VERSION_H
2828

2929
#define PLUGIN_NAME "Mupen64Plus raphnetraw Input Plugin"
30-
#define PLUGIN_VERSION 0x010000
30+
#define PLUGIN_VERSION 0x010001
3131
#define INPUT_PLUGIN_API_VERSION 0x020000
3232
#define CONFIG_API_VERSION 0x020100
3333

0 commit comments

Comments
 (0)