PS2 controller timing details

I revised the program and got it to print up to 30 data packets, trigger on the “5A” status of the controller. However, there is only room for the first 6 command bytes, and no room for the data bytes. I can however, print 10 data packets with the full command and data bytes. Here is the format:

packet 1 packet 2 packet 3
packet 4 packet 5 packet 6

packet 28 packet 29 packet 30
<time in us it took to get all 30 packets>

I took several looks at the pattern for the wired controller right after it is plugged into a ps2, and here is a sample that represents the majority of the frames I saw:

010000004201 010101010101 010001004301 Wired DS2
000000004601 000001004601 000000004701 on GT4, PS2
000000004C01 000001004C01 000301004401
FF0100004D01 000000004101 03FFFF004F01
000200004001 000201004001 000202004001
000203004001 000204004001 000205004001
000206004001 000207004001 000208004001
000209004001 00020A004001 00020B004001
000000004101 000000004301 010000004201
000000004201 000000004201 000000004201
2035626 us
9 000301004401
10 FF0100004D01
1752212 us

And here, just for comparison, a wireless controller (I just did it once)

010000004201 010101010101 010001004301 WIRELESS
000000004601 000001004601 000000004701 PREDATOR
000000004C01 000001004C01 000301004401 on GT4, ps2
FF0100004D01 000000004101 03FFFF004F01
000200004001 000201004001 000202004001
000203004001 000204004001 000205004001
000206004001 000207004001 000208004001
000209004001 00020A004001 00020B004001
000000004101 000000004301 010000004201
000000004201 000000004201 000000004201
1534679 us

Stuff to note:
-the 00…004201 is the “regular transmission” command, which goes into effect after the26th or so startup packet is sent, meaning it takes about 26 bytes to “initialize” a controller
-wireless setup seems same as wired
-30 packets takes 1.5+ seconds, regular transmission is 60 packets/second exact (not coincidentally, ps2 video is 60 fps)

Conclusion: It seems like the PS2 console “tries” a variety of “get dat” commands and “looks” for a response from the controller (in the incoming data bytes where button data usually is). In this way, the console can find out what type of controller it is, and perhaps, the controller (wireless ones at least) can be configured to run.

I think the next step would be to print 30 packets of cmd AND dat bytes to see each controllers (wired vs wireless) response to each of these different commands.