James Smith

James Smith

@loopj.com

British guy in the San Francisco Bay Area. Having fun with hardware, software and reverse engineering. Former co-founder of Bugsnag.

392 followers56 following108 posts

View full thread

TinySD just reads and writes raw blocks, so you can bring your own filesystem. It pairs nicely with ChaN's FatFs, littlefs, etc.

I’m releasing it under a permissive license (MIT), in the hope it can be a useful building block for other embedded projects. Excited to see it out in the wild!

View full thread

I built this after writing "just enough SD" for three separate bare-metal projects, and deciding it was time to do it properly. Everything else either forced a filesystem on me or was framework-specific.

It ships with an SDHCI host driver for SD Host Controller versions 1 to 3, plus a simple interface for adding your own hosts. If you’re bit-banging the bus or driving it with PIO, CRC and framing helpers are included too.

TinySD supports SD memory cards (SDSC, SDHC and SDXC) and SDIO devices, both with high speed support. No dynamic allocation, and no threads, callbacks or interrupts required.

View full thread

Calibration and shaping get combined into a small precomputed transform at boot (or whenever they change). The poll loop just calls "apply", a handful of integer operations with no FPU required. Plain C99, no dependencies, no allocation.

View full thread

Calibration comes first. Pickaxes runs a calibration session on the firmware that captures rest position, min and max travel, and orientation. Release the stick, push it in each direction, rotate it around the rim. Drive it from a homebrew app or a button combo on the device.

Shaping comes second, and is where the feel comes from. Inner and outer deadzones in axial or radial shapes, gamma response curves, and circular, square, or octagonal virtual gates, all in one struct you can change at runtime without recalibrating.

Portablizers cobble together sticks and triggers from whatever fits the design: Joycon sticks, 3DS sliders, random ALPS sticks from Digikey. Pickaxes lets you tune the raw ADC values from these to match OEM feel, or to your own preference.

I wanted a truly modular/customizable desk shelf, so I built one. Rack Nook is a desk shelf system, based around 10" or 19" rack components. It's open source, you can find everything you need to build your own here: github.com/loopj/rack-n...

View full thread

For the center rack module I installed a DeskPi 6.91-inch touch screen, and wrote a quick Flutter application for media control.

The whole thing is really simple, honestly it's just a shelf on some 3D-printed legs, but having the rack rails allows for a lot of flexibility in how you set it up, and what you put on it. Let me know if you build your own!

I wanted a truly modular/customizable desk shelf, so I built one. Rack Nook is a desk shelf system, based around 10" or 19" rack components. It's open source, you can find everything you need to build your own here: github.com/loopj/rack-n...

For my desk, I went with a 5ft wide butcher block shelf, using 10" rack components in a 2U:1U:1U:1U:2U configuration. This allows for a wide cubby in the middle for tucking away my keyboard and mouse.

Working on a DIY monitor riser system based around 10-inch "half rack" modules. It uses cheap Penn Elcom (or compatible) steel rack rails, hardware store lumber, and 3d-printed legs. I'm building this form factor for my desk - 5ft wide with a cubby for keyboard/laptop in the middle.

James Smith reposted

As part of a collaboration with the incredibly talented @redherring32.com of Opentendo fame, we are happy to announce the OpenTendo-AGB (OpenGBA)! This is a fully open source recreation of the AGB-CPU-01 circuit board. (Repository is attached in the next post)

👋 just released the first public version of libjoybus, an open implementation of the Nintendo Joybus protocol used by N64 and GameCube controllers, with initial support for Pi Pico (1 and 2) and SiLabs Gecko microcontrollers: github.com/loopj/libjoy...

github.comGitHub - loopj/libjoybus: An implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollersAn implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollers - loopj/libjoybus
View full thread

For the protocol nerds out there, I managed to get the target response time (time between message being received from a console, and us sending the reply) down to ~3us on the Pi Pico backend. This is *very* close to the ASIC's response time in OEM controllers.

👋 just released the first public version of libjoybus, an open implementation of the Nintendo Joybus protocol used by N64 and GameCube controllers, with initial support for Pi Pico (1 and 2) and SiLabs Gecko microcontrollers: github.com/loopj/libjoy...

github.comGitHub - loopj/libjoybus: An implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollersAn implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollers - loopj/libjoybus
View full thread

The Pi Pico implementation is written from scratch using PIO and fits in a single state machine, so theoretically can support 8 simultaneous buses on a Pi Pico, or 12 (!) on a Pi Pico 2.

👋 just released the first public version of libjoybus, an open implementation of the Nintendo Joybus protocol used by N64 and GameCube controllers, with initial support for Pi Pico (1 and 2) and SiLabs Gecko microcontrollers: github.com/loopj/libjoy...

github.comGitHub - loopj/libjoybus: An implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollersAn implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollers - loopj/libjoybus

This was initially extracted from the WavePhoenix project with the goal of being more broadly usable. This library supports "host mode", aka acting as an N64 or GameCube console and communicating with a controller, as well as "target mode" aka emulating a controller on the joybus.

James Smith reposted

And they tried to tell me it shouldn’t be done! But behold! The #Cuboid! It’s rocking both the GCLoader and the Dual. And also, it’s shorter! SD card smartly tucks in the back above the optional handle.

James Smith reposted

A silly idea that turned out well! Most flex PCBs are cut by laser, not milled, so you can make perforations by adding incomplete edge cuts. These disks are for cleanly joining LED strips at different angles and different radii, and they break apart with just my fingers, no other tools.

James Smith reposted

*cracks knuckles* okay so you know how the media has a problem with taking snippets of scientific studies out of context and writing articles which mislead the public? now imagine a computer program is doing that when you ask it questions about scientific literature but also it makes stuff up.

OpenOCD such a great tool but the development really is a hot mess. It is relied upon by so many projects, but still hosted on SOURCEFORGE. Every vendor is maintaining their own fork and nothing seems to get upstreamed. I don't know who the core maintainers are, but something has to change.

James Smith reposted

I'm stoked to have finally finished the Kawaii, a fully functional metal Wii keychain. It's way smaller than it looks— only as big as a Game Boy cartridge! ✨🟦✨ Huge thanks to @weskmods.bsky.social and @dingding-cnc.bsky.social for being awesome project partners!

Weskmods@weskmods.bsky.social

The Nintendo Kawaii, a collaboration project between myself, @mks.bsky.social and @dingding-cnc.bsky.social has finally been released fully open source! If you're brave enough to build one you'll have one of the most unique pieces of gaming jewellery ever. Info here: bitbuilt.net/forums/index...