Lines 89-95
Link Here
|
89 |
static int gc_status_bit[] = { 0x40, 0x80, 0x20, 0x10, 0x08 }; |
89 |
static int gc_status_bit[] = { 0x40, 0x80, 0x20, 0x10, 0x08 }; |
90 |
|
90 |
|
91 |
static char *gc_names[] = { NULL, "SNES pad", "NES pad", "NES FourPort", "Multisystem joystick", |
91 |
static char *gc_names[] = { NULL, "SNES pad", "NES pad", "NES FourPort", "Multisystem joystick", |
92 |
"Multisystem 2-button joystick", "N64 controller", "PSX controller" |
92 |
"Multisystem 2-button joystick", "N64 controller", "PSX controller", |
93 |
"PSX DDR controller" }; |
93 |
"PSX DDR controller" }; |
94 |
/* |
94 |
/* |
95 |
* N64 support. |
95 |
* N64 support. |
Lines 271-277
Link Here
|
271 |
udelay(gc_psx_delay); |
271 |
udelay(gc_psx_delay); |
272 |
read = parport_read_status(gc->pd->port) ^ 0x80; |
272 |
read = parport_read_status(gc->pd->port) ^ 0x80; |
273 |
for (j = 0; j < 5; j++) |
273 |
for (j = 0; j < 5; j++) |
274 |
data[j] |= (read & gc_status_bit[j] & gc->pads[GC_PSX]) ? (1 << i) : 0; |
274 |
data[j] |= (read & gc_status_bit[j] & (gc->pads[GC_PSX] | gc->pads[GC_DDR])) |
|
|
275 |
? (1 << i) : 0; |
275 |
parport_write_data(gc->pd->port, cmd | GC_PSX_CLOCK | GC_PSX_POWER); |
276 |
parport_write_data(gc->pd->port, cmd | GC_PSX_CLOCK | GC_PSX_POWER); |
276 |
udelay(gc_psx_delay); |
277 |
udelay(gc_psx_delay); |
277 |
} |
278 |
} |
Lines 300-306
Link Here
|
300 |
gc_psx_command(gc, 0, data2); /* Dump status */ |
301 |
gc_psx_command(gc, 0, data2); /* Dump status */ |
301 |
|
302 |
|
302 |
for (i =0; i < 5; i++) /* Find the longest pad */ |
303 |
for (i =0; i < 5; i++) /* Find the longest pad */ |
303 |
if((gc_status_bit[i] & gc->pads[GC_PSX]) && (GC_PSX_LEN(id[i]) > max_len)) |
304 |
if((gc_status_bit[i] & (gc->pads[GC_PSX] | gc->pads[GC_DDR])) && (GC_PSX_LEN(id[i]) > max_len)) |
304 |
max_len = GC_PSX_LEN(id[i]); |
305 |
max_len = GC_PSX_LEN(id[i]); |
305 |
|
306 |
|
306 |
for (i = 0; i < max_len * 2; i++) { /* Read in all the data */ |
307 |
for (i = 0; i < max_len * 2; i++) { /* Read in all the data */ |