From a3a93f156cd9e5e01ed273eb7a0a3ff6d7cf033e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 30 Jan 2011 17:59:37 +0000 Subject: [PATCH] hostside, notes: new notes directory; move neo-s info into it; remove obsolete files including hidraw fuzzer and abandoned libusb attempt --- hostside/neo-s.pl | 27 --------- hostside/neo-usb.c | 60 ------------------- neo-s.pl | 20 ------- .../neo-s-gamepad}/neo-s.README | 0 .../neo-s-gamepad}/neo-usbsnoop.log | 0 .../neo-s-gamepad}/usbsnoop.log | 0 6 files changed, 107 deletions(-) delete mode 100644 hostside/neo-s.pl delete mode 100644 hostside/neo-usb.c delete mode 100755 neo-s.pl rename {hostside => notes/neo-s-gamepad}/neo-s.README (100%) rename {hostside => notes/neo-s-gamepad}/neo-usbsnoop.log (100%) rename {hostside => notes/neo-s-gamepad}/usbsnoop.log (100%) diff --git a/hostside/neo-s.pl b/hostside/neo-s.pl deleted file mode 100644 index 2365b0f..0000000 --- a/hostside/neo-s.pl +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/perl -$|=1; -for ($a=0xff; $a>=0x00; $a-=0x01) { -#for ($a=0x6a; $a<=0x6a; $a+=0x01) { - next if $a eq 0x43; - next if $a eq 0x46; - next if $a eq 0x53; - next if $a eq 0x58; - next if $a eq 0x6a; -for ($b=0x40; $b<=0xc0; $b++) { -#for ($b=0xff; $b<=0xff; $b++) { -@l= ( $b,0xff,$a); -print STDERR (join ' ', map { sprintf "%02x", $_ } @l), "\n"; -#next if $a eq 0x46; - print pack("c*", @l) or die $!; -} -printf STDERR "---\n"; -#sleep 1;# if !($a & 0x0f); -} - -__END__ - - ??,0x00,0x43 ?? is something to do with mice; with ??=0, no mice visible -speed,any?,0x46 rumble big weight (Left) -0xff,0x00,0x53 swaps things round - some,some,0x58 swaps things round - hat switch from joystick ? - some,some,0x6a crashes ? no further output afaict diff --git a/hostside/neo-usb.c b/hostside/neo-usb.c deleted file mode 100644 index 5c0d375..0000000 --- a/hostside/neo-usb.c +++ /dev/null @@ -1,60 +0,0 @@ -/**/ - -int main(void) { - usb_init(); - usb_find_busses(); - usb_find_devices(); - struct usb_bus busses= usb_get_busses(); - struct usb_bus *bus; - struct usb_device *dev; - for (bus=busses; bus; bus=bus->next) { - for (dev=bus->devices; dev; dev=dev->next) { - if (dev->descriptor.idVendor != 0x18b || - dev->descriptor.idProduct != 0x123) - continue; - goto found; - } - } - die("not found"); - - assert(dev->bNumConfigurations == 1); - assert(dev->config[0].bNumInterfaces == 2); - assert(dev->config[0].interface[0]. - - usb_dev_handle *dh= usb_open(dev); - int r= usb_claim_interface(dh, 0); assert(r>=0); - - r= usb_set_configuration(dh, dev->config[0].bConfigurationValue); - assert(r>=0); - - usb_dev_handle *dh2= usb_open(dev); - int r= usb_claim_interface(dh, 1); assert(r>=0); - - printf("ok\n"); - char hbuf[100]; - uint8_t cbuf[ sizeof(hbuf)/2 + 10 ]; - for (;;) { - n: - putchar('>'); - fflush(stdout); - if (!fgets(hbuf, sizeof(hbuf), stdin)) break; - const char *p= hbuf; - uint8_t *o= cbuf; - for (;;) { - char h3[3]; - int c= *p++; - if (c=='\n') break; - if (isspace((unsigned char)c)) continue; - if (!c) die("bad line"); - h3[0]= c; - c= *p++; - if (!c) die("bad line"); - h3[1]= c; - h3[2]= 0; - char *ep; - o= strtoul(h3, &ep, 16); - if (ep != h3+2) { fprintf(stderr,"bad hex\n"); goto n; } - } - r= usb_control_msg(dh, - - usb_control_msg diff --git a/neo-s.pl b/neo-s.pl deleted file mode 100755 index f8f0c37..0000000 --- a/neo-s.pl +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/perl -$|=1; -for ($a=0x43; $a<=0x53; $a+=0x10) { - next if $a eq 0x46; -#for ($b=90; $b<=95; $b++) { - $b=0xff; -printf STDERR "%02x %02x\n", $b, $a; -#next if $a eq 0x46; - print pack("c*", 0xff, $b,$a) or die $!; -#} -printf STDERR "---\n"; -#sleep 1;# if !($a & 0x0f); -} - -__END__ - -speed,0x00,0x46 rumble - ??,0x00,0x43 ?? is something to do with mouse acceleration; with ??=0 - no mice visible -0xff,0x00,0x53 swaps things round diff --git a/hostside/neo-s.README b/notes/neo-s-gamepad/neo-s.README similarity index 100% rename from hostside/neo-s.README rename to notes/neo-s-gamepad/neo-s.README diff --git a/hostside/neo-usbsnoop.log b/notes/neo-s-gamepad/neo-usbsnoop.log similarity index 100% rename from hostside/neo-usbsnoop.log rename to notes/neo-s-gamepad/neo-usbsnoop.log diff --git a/hostside/usbsnoop.log b/notes/neo-s-gamepad/usbsnoop.log similarity index 100% rename from hostside/usbsnoop.log rename to notes/neo-s-gamepad/usbsnoop.log -- 2.30.2