Switch Dual Shock adapter part 3: A fake USB HID controller


In this series of posts, I’m attempting to make a Dual Shock to Switch controller adapter. It will plug into the Switch Dock’s USB port.

Last time, I ended with a real USB device that would communicate with a host computer - but all it would do is blink a light on and off.

A breadboard with a USB cable attached to it. A 3.3v regulator is attached to the +5V and GND lines of the USB cable and powering the breadboards power lines. In the middle is an ATmega8A and an LED. There are two small resistors leading from the USB D+ and D- lines to the ATMega8A. There are also the various associated resistors and capacitors necessary for things to work.

Read more…

Switch Dual Shock adapter part 2: Connecting to USB


In this series of posts, I’m attempting to make a Dual Shock to Switch controller adapter. It will plug into the Switch Dock’s USB port.

In the first post of this series, I got a development environment set up, a programmed ATmega8A onto a breadboard, and code I wrote controlling a blinking LED. In this post, I plan to get V-USB set up, and an LED blinking on a breadboard - OVER USB!

Read more…

Making a Dual Shock to Nintendo Switch controller adapter


In this series of posts, I’m going to (attempt to?…) make a Dual Shock to Switch controller adapter. It will plug into the Switch Dock’s USB port.

In doing this, I hope I’ll learn about how USB works - something I’ve vaguely wondered about for at least twenty years - and have some fun doing low-level microcontroller programming.

I’m also looking forward to stretching my writing muscles documenting the project here. Maybe you can learn along with me?

A Nintendo Switch with a PSone ‘Dual Shock’ controller next to it

Read more…

How does Git-Linearize alter commits to make them linear?


I find Extremely Linear Git History (GitHub) unreasonably amusing.

It’s also unreasonably easy to install with HomeBrew (brew install zegl/tap/git-linearize) - so I just had to give it a try out when initializing a new project.

This led me into a huge detour. Just what was it doing to my Git repo to get the linear hashes?

Come on a journey with me!

Read more…

Using the Ultra-Wide High-DPI Prestige PS341WU with a Mac


For over a year now, I’ve been using an MSI Prestige PS341WU as my main display. It plugs into my MacBook (now, an M2 MacBook Air of my own, previously mostly a 16" M1 MacBook Pro from work).

My desk, with the monitor on it

At the time I bought it, it was about the only reasonably priced ultrawide that also stood a chance of being considered ‘retina’ - and a casual browse around now seems to indicate that is still the case.

Read more…

Hello (again)


The blog is back! Eight years and one month after the last post (wow!) What have I been doing? Working for Apple, mostly. From April 2014 to July 2022 I worked on the UIKit team, for most of that time managing the UIKit Infrastructure sub-team - a wonderful bunch of people. It was (mostly) great - and, as is often true, somehow seems like something I did for ever for ever, and something that started only yesterday.
Read more…