Live data from Hacker News

Reverse Engineering the DualShock 4

blog.the.al

51–60 of 74 posts

Re: Reverse Engineering the DualShock 4

#51
post #45

That's what i don't get with linux...having all drivers inside the kernel is madness, no wait...it's pure stupidity. No other Universal OS makes that...crash my system with a USB-Controller...that's some Windows 98 reliability(-issues) right there.

I don't think Linux is exclusive here, there are plenty of examples of both macOS and Windows also crashing when plugging in various accessories.

- https://developer.apple.com/forums/thread/678644?page=5 - " Big Sur panic when connect/disconnect usb-c dock "

- https://forums.macrumors.com/threads/macbook-air-crashing-wh... - "MacBook air crashing when plugging a USB device"

- https://answers.microsoft.com/en-us/windows/forum/all/window... - " Windows freezing when I plug in a USB device"

Try searching for "$operating-system crash when connect usb" for various OSes and distributions and you'll see it's a problem everywhere, not just Linux.

Re: Reverse Engineering the DualShock 4

#52
post #45

That's what i don't get with linux...having all drivers inside the kernel is madness, no wait...it's pure stupidity. No other Universal OS makes that...crash my system with a USB-Controller...that's some Windows 98 reliability(-issues) right there.

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.

Re: Reverse Engineering the DualShock 4

#53
post #45

That's what i don't get with linux...having all drivers inside the kernel is madness, no wait...it's pure stupidity. No other Universal OS makes that...crash my system with a USB-Controller...that's some Windows 98 reliability(-issues) right there.

I don't think Linux is exclusive here, there are plenty of examples of both macOS and Windows also crashing when plugging in various accessories. - https://developer.apple.com/forums/thread/678644?page=5 - " Big Sur panic when connect/disconnect usb-c dock " - https://forums.macrumors.com/threads/macbook-air-crashing-wh... - "MacBook air crashing when plugging a USB device" - https://answers.microsoft.com/en-us/windo…

I remember OpenBSD panicking over some USB hubs a few releases ago. USB is hell.

Re: Reverse Engineering the DualShock 4

#54
post #18

>And then, suddenly.. Caps Lock is blinking and the system is totally frozen :anguished:. So plugging in a brand-name joystick caused a kernel panic. Gross.

so... gross because sony should have better firmware or gross because linux should have a better usb stack, that is, it should never panic the kernel.

USB sucks everywhere. OpenBSD can panic over USB too. It happened to me. Hubs, faulty USB drives, Chinese gamepads, noname ElCheapo USB Ralink WiFi dongles with dubious designs...

I think the only truly secure OS for this would be Hurd or SeL4+Genode.

Re: Reverse Engineering the DualShock 4

#55
post #24

Earlier quoted context omitted.

In what world do you step in your own dog’s shit and blame the dog for being lazy?

Haha get a lazy dog and you'll know what I'm talking about

And lazy dogs don't come with bags & shovels, accessories are sold separately.

On the plus side, you might attract a Quick Brown Fox!

Re: Reverse Engineering the DualShock 4

#56
post #45

That's what i don't get with linux...having all drivers inside the kernel is madness, no wait...it's pure stupidity. No other Universal OS makes that...crash my system with a USB-Controller...that's some Windows 98 reliability(-issues) right there.

I don't think Linux is exclusive here, there are plenty of examples of both macOS and Windows also crashing when plugging in various accessories. - https://developer.apple.com/forums/thread/678644?page=5 - " Big Sur panic when connect/disconnect usb-c dock " - https://forums.macrumors.com/threads/macbook-air-crashing-wh... - "MacBook air crashing when plugging a USB device" - https://answers.microsoft.com/en-us/windo…

Yeah, crashes from hardware driver are fairly common on Windows. And without any surprise, USB is the most common one (I'd say network devices (Ethernet, Wifi, or BT) are a close second).

Re: Reverse Engineering the DualShock 4

#57
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.

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 interface, to allow for more buttons than there are pins.

Re: Reverse Engineering the DualShock 4

#58
post #52
post #45

That's what i don't get with linux...having all drivers inside the kernel is madness, no wait...it's pure stupidity. No other Universal OS makes that...crash my system with a USB-Controller...that's some Windows 98 reliability(-issues) right there.

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 no create operating-systems where this is not possible? Just asking...

Re: Reverse Engineering the DualShock 4

#60
post #57
post #50

Earlier quoted context omitted.

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.

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.

Post reply on HN