chiark / gitweb /
hostside: hidraw-ioctl, hiddev-ioctl, kdled-ioctl: build by default
[trains.git] / hostside / neo-s.pl
1 #!/usr/bin/perl
2 $|=1;
3 for ($a=0xff; $a>=0x00; $a-=0x01) {
4 #for ($a=0x6a; $a<=0x6a; $a+=0x01) {
5     next if $a eq 0x43;
6     next if $a eq 0x46;
7     next if $a eq 0x53;
8     next if $a eq 0x58;
9     next if $a eq 0x6a;
10 for ($b=0x40; $b<=0xc0; $b++) {
11 #for ($b=0xff; $b<=0xff; $b++) {
12 @l= ( $b,0xff,$a);
13 print STDERR (join ' ', map { sprintf "%02x", $_ } @l), "\n";
14 #next if $a eq 0x46;
15     print pack("c*", @l) or die $!;
16 }
17 printf STDERR "---\n";
18 #sleep 1;# if !($a & 0x0f);
19 }    
20
21 __END__
22
23  ??,0x00,0x43   ?? is something to do with mice; with ??=0, no mice visible
24 speed,any?,0x46 rumble big weight (Left)
25 0xff,0x00,0x53  swaps things round
26  some,some,0x58  swaps things round - hat switch from joystick ?
27  some,some,0x6a  crashes ?  no further output afaict