Bluepad32 Brings All The Controllers To Your MCU

As much as we enjoy spinning up our own solutions, there are times when you’ve got to look at what’s on the market and realize you might be out of your league. For example, take Bluetooth game controllers. Sure, you could make your own with a microcontroller, some buttons, and a couple joysticks. But between the major players like Microsoft, Nintendo, and Sony, as well as independent peripheral companies like 8BitDo, there’s some seriously impressive hardware out there that can be easily repurposed.

How, you ask? Well, Bluepad32 by [Ricardo Quesada] would be a great place to start. This Apache v2.0 licensed project allows you to easily interface with a wide array of commercially available BT controllers, and supports an impressive number of software and hardware platforms. Using the Arduino IDE on the ESP32? No problem. CircuitPython on Adafruit’s PyPortal? Supported. There’s even example code provided for using it on Linux and Mac OS. Sorry Windows fans — perhaps there’s a sassy paperclip or sentient dog built into your OS that can instruct you further.

A few of the controllers supported by Bluepad32.

The nature of the Bluetooth Human Interface Device (HID) protocol means that, at least in theory, pretty much all modern devices should be supported by Bluepad32 automatically. But even still, it’s hard not to be impressed by the official controller compatibility list. There’s also separate lists for Bluetooth mice and keyboards that are known to work with the project.

While it’s somewhat unlikely to be a problem in this particular community, there is an unusual quirk to this project which we think should at least be mentioned. Although Bluepad32 itself is free and open source software (FOSS), it depends on the BTstack library, which in turn uses a more ambiguous licensing scheme. BTstack is “open” in the sense that you can see the source code and implement it in your own projects, but its custom license precludes commercial use. If you want to use BTstack (and by extension, Bluepad32) in a commercial product, you need to contact the developers and discuss terms.

License gotchas aside, Bluepad32 is definitely a project to keep in the back of your mind for the future. You can always build your own controller if you’re looking a challenge, but you’ll have a hell of a time beating the decades of testing and development Sony has put into theirs.

A toy gamepad controlling Super Mario World emulated on a MacBook

Turning A Toy Gamepad Into A Real One, With Bluetooth

It’s important to instill healthy habits in your children when they’re still young. Preferences for sports, snacks and dinosaurs are typically formed in early childhood, as is loyalty to a specific gaming platform. [RetrogradeScene] apparently wished to steer his young daughter towards the Nintendo camp, but wasn’t looking forward to having her grubby hands touch his prized controllers. So he built her her own kid-friendly controller out of a Fisher-Price toy.

The toy in question is an imitation game controller that just makes funny sounds when you press the buttons. Converting it into a real, working game controller was a matter of soldering some wires onto the existing PCB and hooking them up to a microcontroller board, in this case a DFRobot FireBeetle. After loading the ESP32-BLE-Gamepad library and assigning the correct pin-button combinations in software [RetrogradeScene] ended up with a big, brightly-coloured gamepad that actually functioned as one.

Unfortunately, the FireBeetle took up space where the original AAA batteries were sitting, so the hacked gamepad needed a new power source. Classic batteries are heavy and inconvenient anyway, so [RetrogradeScene] installed a modern lithium battery plus a USB-C port for charging. Of course, no Bluetooth gadget is complete without an accompanying smartphone app either: [RetrogradeScene] wrote one for his iPhone that enables him to quickly change the button layout between the Nintendo and Xbox styles.

This might be a rare example of someone making a gamepad from, well, a gamepad. We’ve seen a few more unusual things being converted into game controllers, ranging from a handful of LEGO bricks to entire cars.

Continue reading “Turning A Toy Gamepad Into A Real One, With Bluetooth”

A schematic explaining the workings of the Commodore 64's joystick port

Bluetooth Interface Adds Rumble Feedback To Commodore 64 Games

Nothing says “1980s gaming” like a black joystick with a single red fire button. But if you prefer better ergonomics, you can connect modern gamepads to your retrocomputers thanks to a variety of modern-to-classic interface adapters. These typically support just the directional pad and one or two action buttons, leaving out modern features like motion control and haptic feedback.

That’s a bit of a shame, because we think it would be pretty cool to feel that shock in our hands whenever Pitfall Harry drowns in quicksand or Frogger gets hit by traffic. We’re therefore happy to report that [Ricardo Quesada] has decided to add rumble functionality to the Bluetooth-to-Joystick-port interface that he’s been working on. He demonstrates the feature on his Commodore 64 in the video embedded after the break.

Naturally, any software needs to be adapted to support haptic feedback, but a trickier problem turned out to be the hardware: joystick ports are input-only devices and therefore cannot send “enable rumble” signals to any connected gamepads. [Ricardo] found a clever way around this, using the analog inputs on the joystick port that were typically used for paddle-type controllers.

The analog-to-digital converter inside the computer works by applying a pulse signal to the analog port and measuring the time it takes to discharge a capacitor. The modern gamepad interface simply detects whether these pulses are present; they can be enabled or disabled through software by toggling the analog readout on the joystick port. This way, the joystick port can be used to send a single bit of information to any device connected to it.

[Ricardo] developed patches for Rambo: First Blood part II and Leman to enable rumble functionality. He describes the process in detail in his blog post, which should enable anyone who knows their way around 6502 machine code to add rumble support to their favorite games.

The adapter works with a variety of retro systems that use the Atari-style joystick interface, but if you’re an Apple II user, you might want to look at this Raspberry Pi-based project that interfaces with its nonstandard joystick interface. If you’re into wireless gaming in general, be sure to also check out our history of wireless game controllers.

Continue reading “Bluetooth Interface Adds Rumble Feedback To Commodore 64 Games”