Live data from Hacker News

Reverse Engineering the DualShock 4

blog.the.al

31–40 of 74 posts

Re: Reverse Engineering the DualShock 4

#31
post #30
post #8

Neat find. What could cause the calibration offset to be zero? Certainly it did not come this way from the factory. Any abuse/misuse of the controller would not cause it either. Ah, I suspect this was a firmware update that got borked somehow. Maybe the cable was disconnected before the update could complete.

> What could cause the calibration offset to be zero? A possible explanation can be found on part 4 of this post: > [...] if the checksum is not valid, there is a loop that clears out the flash [...] I suspect (but haven’t tried yet) that if the battery of the controller dies while it’s writing on the flash, at the next startup the checksum does not match and the DS4 gets totally messed up like this one. That is, acc…

Thanks for that, I missed it in TFA. But ouch, that feels like an extreme design choice. What's the logic here to erasing the flash on a failed checksum, or requiring a checksum in the first place? Is there a non-obvious security threat?

Re: Reverse Engineering the DualShock 4

#34
post #20
post #19

Earlier quoted context omitted.

Well, we can't really know if it does or doesn't reduce the rate (at least without more research than I am aware having been performed, and more than I'm willing to do), but I can only report that my own experience is that reading stuff like this as a lurker has been helpful for me. Given the choice and without the ability to know what is in people's hearts and whether or not I have moved them, I prefer optimism. I'd…

I don't know about research but we certainly have a lot of evidence - people rarely have to explain to other users not to be rude jerks in comments, mainly because people know to flag them and the people who write them learn not to write them. This isn't really about optimism or pessimism but a critical component of the basic social immune system of the forum. You can see this expressed in an infinite stream of guide…

To clarify, I didn't mean to say you were a pessimist, or even that I'm an optimist, just that I prefer optimism in this scenario.

I actually do regularly see rude comments, for what it's worth. We may have different thresholds for what we consider rude. I glanced through the comments in that search, they seemed to be responding to a much higher level of toxicity than what we're discussing, and they're escalating the situation. I don't think nitpickers are trolling or flamebaiting. And to be clear, I'm not suggesting we don't flag comments, I agree that's a critical function to the community.

I think the crux of it is this; if explaining to people the problem we have with their behavior and asking that they change it never worked - why would we be having this conversation? Surely when you asked me disengage in this type of response, you thought there was a reasonable possibility of convincing me?

Re: Reverse Engineering the DualShock 4

#35

Earlier quoted context omitted.

It's not a good analogy but at the end of the day it's a bad Linux issue. Sony has no obligation to make sure it's driver will never halt a system. Linux does.

So... are you saying the dog's owner has no obligation to pick up their dog's poo? You're right, it's not a good analogy. It's barely one at all.

On their own land, no the owner can let them shit all around the house.

Re: Reverse Engineering the DualShock 4

#37
post #31
post #30

Earlier quoted context omitted.

> What could cause the calibration offset to be zero? A possible explanation can be found on part 4 of this post: > [...] if the checksum is not valid, there is a loop that clears out the flash [...] I suspect (but haven’t tried yet) that if the battery of the controller dies while it’s writing on the flash, at the next startup the checksum does not match and the DS4 gets totally messed up like this one. That is, acc…

Thanks for that, I missed it in TFA. But ouch, that feels like an extreme design choice. What's the logic here to erasing the flash on a failed checksum, or requiring a checksum in the first place? Is there a non-obvious security threat?

The issue is probably a missing A/B firmware update for the config section.

If a firmware update needs to alter the calibration data or other rather static config, and that update process is interrupted by an empty battery then it can't recover. It should of course be more conservative in killing all of the config section... Or could reset to some sane default. Or have a copy of the old known good data around and restart the procedure

Re: Reverse Engineering the DualShock 4

#38
post #34
post #20

Earlier quoted context omitted.

I don't know about research but we certainly have a lot of evidence - people rarely have to explain to other users not to be rude jerks in comments, mainly because people know to flag them and the people who write them learn not to write them. This isn't really about optimism or pessimism but a critical component of the basic social immune system of the forum. You can see this expressed in an infinite stream of guide…

To clarify, I didn't mean to say you were a pessimist, or even that I'm an optimist, just that I prefer optimism in this scenario. I actually do regularly see rude comments, for what it's worth. We may have different thresholds for what we consider rude. I glanced through the comments in that search, they seemed to be responding to a much higher level of toxicity than what we're discussing, and they're escalating the…

The main thing I want to convince you of is to flag this type of comment - a thing everyone should do! The engaging (or not) is more practical thing - avoiding the risk of a giant thread of meta sitting at the top of a submission to the detriment of actually interesting discussion. Since everyone loves meta and bickering, this happens quite a bit. If the comment is safely at the bottom of the thread, engage away. I sure can't seem to help it. It just does a lot less good than flagging (which is not just for trolls and flamewarriors).

Re: Reverse Engineering the DualShock 4

#39
post #23

Maybe I should send him a Stadia controller? Maybe someone will get some utility out of it with Google completely killing Stadia off.

Does it have USB drivers?

While I've never tried it in that way, I understand it should function as a standard USB game controller when wired, but its real gem would be fully leveraging its wireless support.

Re: Reverse Engineering the DualShock 4

#40
post #30
post #8

Neat find. What could cause the calibration offset to be zero? Certainly it did not come this way from the factory. Any abuse/misuse of the controller would not cause it either. Ah, I suspect this was a firmware update that got borked somehow. Maybe the cable was disconnected before the update could complete.

> What could cause the calibration offset to be zero? A possible explanation can be found on part 4 of this post: > [...] if the checksum is not valid, there is a loop that clears out the flash [...] I suspect (but haven’t tried yet) that if the battery of the controller dies while it’s writing on the flash, at the next startup the checksum does not match and the DS4 gets totally messed up like this one. That is, acc…

I'd wager a bad/worn NAND block, 'cosmic ray' or other electrical glitch was more likely to cause a checksum issue than anything else. It might be sudden battery disconnect caused due to the controller being dropped (per the first page), but there should be local capacitance on the NAND supply voltage size to last a page write cycle as sudden power loss is going to happen in a lot of situations.

I would generally critique the use of a checksum on this config data without a backup or ping-pong writing system specifically because in the case of a 1 bit failure on something critical like cal or configuration data, really you want the data anyway and just hope that the 1 bit wasn't that important and also be ok if the bit flips back again on the next go around.

Post reply on HN