Live data from Hacker News

Reverse Engineering the DualShock 4

blog.the.al

61–70 of 74 posts

Re: Reverse Engineering the DualShock 4

#61
post #58
post #52

Earlier quoted context omitted.

Linux uses modules, some other BSD not. A faulty USB driver (specially storage related ones) can panic your BSD kernel with ease. With Linux you could blacklist lots of modules since forever easily, forbidding to load them. Try that with Windows or MacOS. Go buy some cheap WiFi adapter. Noth Atheros. Ralink, better. Often your favourite OS will panic/BSOD too.

Ah nice do we try to find excuses that monolithic kernel's are not so bad at all right? And it's totally ok that those (any) "high-quality" driver can crash the system? >Linux uses modules, some other BSD not. Has nothing todo with modules, if it's loaded it's in kernel-space. Not others...OpenBSD is the ONE. BTW: For those butt-hurt ones (that i blatantly attacked poor linux), it not just about linux but should we n…

What you're asking for is a microkernel os, or at least a generic kernel shim to interface a user space driver.

Example of microkernel: QNX.

Example of userspace driver: fuse.

I'm not familiar with the architecture of OpenBSD, does it run it's drivers in userspace?

Re: Reverse Engineering the DualShock 4

#62
post #60
post #57

Earlier quoted context omitted.

A traditional videogame controller is not much more than a few switches and perhaps a few potentiometers, see for instance the pinout for the Master System: https://www.smspower.org/Development/ControllerPort That is, someone who started playing videogames in the SMS/NES days might have formed a mental model of the controller being mostly a passive device, with at most a few active chips to multiplex the pins in the…

Sure (I was there) but the same can kind of be said about mice and keyboards, too. Ever since USB took off ~30 years ago and basically killed off raw I/O pins on the front of computers, human interface devices have required microcontrollers on board. Edit: added timeline.

> but the same can kind of be said about mice and keyboards, too.

AFAIK, even old keyboards (AT and PS/2 connectors) already had a microcontroller, and the same was true of mice. The communication between the keyboard or mouse and the computer was through a serial protocol, instead of the computer directly reading the keyboard matrix or the mouse buttons and wheels. The exception might have been computers with built-in keyboards. But the joystick port (https://en.wikipedia.org/wiki/Game_port) directly exposed the buttons and potentiometers from the joystick, instead of talking to a microcontroller on it.

Re: Reverse Engineering the DualShock 4

#63
post #62
post #60

Earlier quoted context omitted.

Sure (I was there) but the same can kind of be said about mice and keyboards, too. Ever since USB took off ~30 years ago and basically killed off raw I/O pins on the front of computers, human interface devices have required microcontrollers on board. Edit: added timeline.

> but the same can kind of be said about mice and keyboards, too. AFAIK, even old keyboards (AT and PS/2 connectors) already had a microcontroller, and the same was true of mice. The communication between the keyboard or mouse and the computer was through a serial protocol, instead of the computer directly reading the keyboard matrix or the mouse buttons and wheels. The exception might have been computers with built-…

Yeah, that was what the "kind of" was meant to shadily cover. Thanks for clarifying.

Re: Reverse Engineering the DualShock 4

#64
post #58
post #52

Earlier quoted context omitted.

Linux uses modules, some other BSD not. A faulty USB driver (specially storage related ones) can panic your BSD kernel with ease. With Linux you could blacklist lots of modules since forever easily, forbidding to load them. Try that with Windows or MacOS. Go buy some cheap WiFi adapter. Noth Atheros. Ralink, better. Often your favourite OS will panic/BSOD too.

Ah nice do we try to find excuses that monolithic kernel's are not so bad at all right? And it's totally ok that those (any) "high-quality" driver can crash the system? >Linux uses modules, some other BSD not. Has nothing todo with modules, if it's loaded it's in kernel-space. Not others...OpenBSD is the ONE. BTW: For those butt-hurt ones (that i blatantly attacked poor linux), it not just about linux but should we n…

Fun you say this, but I panicked a few OpenBSD releases before by just using a USB hub and some SD card adapters.

And I remind you I helped with some OpenBSD ports such as Mednafen, so I am not saying this as a bluff. The mail list is clear.

Re: Reverse Engineering the DualShock 4

#65
post #58

Earlier quoted context omitted.

Ah nice do we try to find excuses that monolithic kernel's are not so bad at all right? And it's totally ok that those (any) "high-quality" driver can crash the system? >Linux uses modules, some other BSD not. Has nothing todo with modules, if it's loaded it's in kernel-space. Not others...OpenBSD is the ONE. BTW: For those butt-hurt ones (that i blatantly attacked poor linux), it not just about linux but should we n…

What you're asking for is a microkernel os, or at least a generic kernel shim to interface a user space driver. Example of microkernel: QNX. Example of userspace driver: fuse. I'm not familiar with the architecture of OpenBSD, does it run it's drivers in userspace?

>I'm not familiar with the architecture of OpenBSD, does it run it's drivers in userspace?

No it's the BSD without modules.

>Example of microkernel: QNX.

Yes and minix, hurd and TrueUnix64 just some other examples.

Re: Reverse Engineering the DualShock 4

#66
post #64
post #58

Earlier quoted context omitted.

Ah nice do we try to find excuses that monolithic kernel's are not so bad at all right? And it's totally ok that those (any) "high-quality" driver can crash the system? >Linux uses modules, some other BSD not. Has nothing todo with modules, if it's loaded it's in kernel-space. Not others...OpenBSD is the ONE. BTW: For those butt-hurt ones (that i blatantly attacked poor linux), it not just about linux but should we n…

Fun you say this, but I panicked a few OpenBSD releases before by just using a USB hub and some SD card adapters. And I remind you I helped with some OpenBSD ports such as Mednafen, so I am not saying this as a bluff. The mail list is clear.

I am not talking about BSD vs Linux, i am talking about systems where no shitty driver can bring down the system....i say that as a FreeBSD user btw.

Re: Reverse Engineering the DualShock 4

#67
post #50
post #41

the controller seems refusing to boot that's when I realized that my idea of what is a controller is completely obsolete

How come? Ever since controllers used Bluetooth they would need to use some sort of programmable microcontroller or cpu. Both of these things need to 'boot' at some point. And yes even microcontrollers have bootloaders.

it is obvious in hindsight, but I never put a thought on it before reading that sentence

Re: Reverse Engineering the DualShock 4

#68
post #66
post #64

Earlier quoted context omitted.

Fun you say this, but I panicked a few OpenBSD releases before by just using a USB hub and some SD card adapters. And I remind you I helped with some OpenBSD ports such as Mednafen, so I am not saying this as a bluff. The mail list is clear.

I am not talking about BSD vs Linux, i am talking about systems where no shitty driver can bring down the system....i say that as a FreeBSD user btw.

I had panics with FBSD too. It will happen to you at least once.
Post reply on HN