Hackaday Links Column Banner

Hackaday Links: August 11, 2024

“Please say it wasn’t a regex, please say it wasn’t a regex; aww, crap, it was a regex!” That seems to be the conclusion now that Crowdstrike has released a full root-cause analysis of its now-infamous Windows outage that took down 8 million machines with knock-on effects that reverberated through everything from healthcare to airlines. We’ve got to be honest and say that the twelve-page RCA was a little hard to get through, stuffed as it was with enough obfuscatory jargon to turn off even jargon lovers such as us. The gist, though, is that there was a “lack of a specific test for non-wildcard matching criteria,” which pretty much means someone screwed up a regular expression. Outside observers in the developer community have latched onto something more dire, though, as it appears the change that brought down so many machines was never tested on a single machine. That’s a little — OK, a lot — hard to believe, but it seems to be what Crowdstrike is saying. So go ahead and blame the regex, but it sure seems like there were deeper, darker forces at work here.

Continue reading “Hackaday Links: August 11, 2024”

If You Give A Dev A Tricked Out Xbox, They’ll Patch Halo 2

[Ryan Miceli] had spent a few years poring over and reverse-engineering Halo 2 when a friend asked for a favor. His friend created an improved Xbox with significant overclocks, RAM upgrades, BIOS hacks, and a processor swap. The goal was simple: patch the hardcoded maximum resolution from 480p to 720p and maybe even 1080p. With double the CPU clock speed but only a 15% overclock on the GPU, [Ryan] got to work.

Step one was to increase the size of the DirectX framebuffers. Increasing the output resolution introduced severe graphical glitches and rendering bugs. The game reuses the framebuffers multiple times as memory views, and each view encodes a header at the top with helpful information like width, height, and tiling. After patching that, [Ryan] had something more legible, but some models weren’t loading (particularly the water in the title screen). The answer was the texture accumulation layer. The Xbox has a hardware limitation of only sampling four textures per shader pass, which means you need a buffer the size of the render resolution to accumulate the textures if you want to sample more than four textures. Trying to boot the game resulted in an out-of-memory crash. The Xbox [Ryan] was working on had been upgraded with an additional 64MB of RAM, but the memory allocator in Halo 2 wasn’t taking advantage of it. Yet.

To see where the memory was going, [Ryan] wrote a new tool called XboxImageGrabber to show where memory was allocated and by whom. Most games make a few substantial initial allocations from the native allocator, then toss it over to a custom allocator tuned for their game. However, the extra 64MB of RAM was in dev consoles and meant as debug RAM, which meant the GPU couldn’t properly access it. Additionally, between the lower 64MB and upper is the Xbox kernel. Now, it became an exercise of patching the allocator to work with two blobs of memory instead of one contiguous one. It also moved runtime data into the upper 64MB while keeping video allocations in the lower. Ultimately, [Ryan] found it easier to patch the kernel to allow memory allocations the GPU could use in the upper 64MB of memory. Running the game at 720p resulted in only a semi-playable framerate, dropping to 10fps in a few scenes.

After some initial tests, [Ryan] concluded that it wasn’t the GPU or the CPU that was the bottleneck but the swap chain. Halo 2 turns VSync on by default, meaning it has to wait until a blank period before swapping between its two framebuffers. A simple tweak is to add a third frame buffer. The average FPS jumped 10%, and the GPU became the next bottleneck to tweak. With a light GPU overclock, the game was getting very close to 30fps. Luckily for [Ryan], no BIOS tweak was needed as the GPU clock hardware can be mapped and tweaked as an MMIO. After reverse engineering, a debugging feature to visual cache evictions, [Ryan] tuned the texture and geometry cache to minimize pop-ins that the original game was infamous for.

Overall, it’s an incredible hack with months of hard work behind it. The code for the patch is on Github, and there’s a video after the break comparing the patched and unpatched games. If you still need more Halo in your life, why not make yourself a realistic battle rifle from the game?

Continue reading “If You Give A Dev A Tricked Out Xbox, They’ll Patch Halo 2

Moonbounce Music

There’s something inspiring about echos. Who among us hasn’t called out or clapped hands in a large space just to hear the sound reflected back? Radio takes this to a whole new level. You can bounce signals from buildings, aircraft, the ionisphere, or even the Moon itself. Humans have been bouncing radio waves from the moon for decades. It’s been used at war, and in peacetime. But [Hainbach] might be the first to use it for music.

Earth Moon Earth or EME communication is quite popular with amateur radio operators. With the right equipment, you can bounce a signal off the moon and hear the echo around 2.5 seconds later. The echo isn’t quite normal though. The moon and the earth are both rotating and moving in relation to each other. This causes Doppler shifts. At higher frequencies, even the craters and surface features of the moon can be heard in the echo.

[Hainbach] spent some time learning about moonbounce at a large radio telescope, and wanted to share this strange audio effect with the world. Unfortunately, most of us don’t have the large microwave dish required for this. The next best thing was to create an application which emulates the sound of a moon bounce. To this end, [Hainbach] created a Moon Echo, an audio plugin that emulates a moonbounce.

Moon Echo was created using sounds from a soprano signer and a double bass. [Hainbach] had to be careful not to be too musical, as ham operators are not allowed to broadcast music. This meant all the tests had to be broken into short non-musical clips. Rolling all this empirical data into a model took quite a bit of work, but the end result is worth it.

If you’d like to learn how to moonbounce yourself, check this article out.
Continue reading “Moonbounce Music”

A Tiny Knob Keeps You In Control

There are many forms of human interface device beyond the ubiquitous keyboard and mouse, but when it comes to fine-tuning a linear setting such as a volume control there’s nothing quite like a knob. When it comes to peripherals it’s not the size that matters, as proven by  [Stefan Wagner] with the Tiny Knob. It’s a very small PCB with a rotary encoder and knob, an ATtiny85, a USB port, and not much else.

It uses the V-USB software implementation of USB HID, and should you have a need for a Tiny Knob of your own you can find all the files for it in a GitHub repository. There’s even a very professional-looking 3D-printed enclosure for the finishing touch. We like this project for its simplicity, and we think you might too.

Over the years we’ve brought you more than one knob, they appear to be a popular subject for experimentation. If you’re up for more, have a look at this one.

Achieving Human Level Competitive Robot Table Tennis

A team at Google has spent a lot of time recently playing table tennis, purportedly only for science. Their goal was to see whether they could construct a robot which would not only play table tennis, but even keep up with practiced human players. In the paper available on ArXiv, they detail what it took to make it happen. The team also set up a site with a simplified explanation and some videos of the robot in action.

Table tennis robot vs human match outcomes. B is beginner, I is intermediate, A is advanced. (Credit: Google)
Table tennis robot vs human match outcomes. B is beginner, I is intermediate, A is advanced. (Credit: Google)

In the end, it took twenty motion-capture cameras, a pair of 125 FPS cameras, a 6 DOF robot on two linear rails, a special table tennis paddle, and a very large annotated dataset to train multiple convolutional neural networks (CNN) on to analyze the incoming visual data. This visual data was then combined with details like knowledge of the paddle’s position to churn out a value for use in the look-up table that forms the core of the high-level controller (HLC). This look-up table then decides which low-level controller (LLC) is picked to perform a certain action. In order to prevent the CNNs of the LLCs from ‘forgetting’ the training data, a total of 17 different CNNs were used, one per LLC.

The robot was tested with a range of players from a local table tennis club which made clear that while it could easily defeat beginners, intermediate players pose a serious threat. Advanced players completely demolished the table tennis robot. Clearly we do not have to fear our robotic table tennis playing overlords just yet, but the robot did receive praise for being an interesting practice partner. Continue reading “Achieving Human Level Competitive Robot Table Tennis”

Inside The Mecanum Wheel

If you make anything that moves, like a robot, you quickly realize that turning can be a pain. That’s why there are a number of designs for wheels that can go in different directions. One of the most common is the Mecanum wheel. [Jeremy] explains how they work by filming them from below on a transparent table. You can see the enlightening video below.

If you haven’t done anything with omni wheels before, it is disconcerting to see wheels rotating one way causing the vehicle to move at a right angle to the rotation. But this is very useful when you build robots or — as he shows at the start of the video — a forklift.

Continue reading “Inside The Mecanum Wheel”

Proxxon CNC Conversion Makes A Small Mill A Bit Bigger

The Proxxon MF70 mini-mill is a cheap and cheerful, but decently made little desktop mill. As such, it’s been the target of innumerable CNC-ification projects, including an official kit from the manufacturer. But that didn’t stop [Dheera Venkatraman] from sharing his Big Yellow take on this venerable pursuit with us!

This isn’t simply a CNC modification, it’s a wholly 3D-printed CNC modification, which means that you don’t already need a mill to make the usual aluminum pieces to upgrade your mill. And perhaps the standout feature: [Dheera]’s mod basically doubles the Y-axis travel and adds an extra 15 mm of headroom to the Z. If you wanted to stop here, you would have a bigger small manual mill, but as long as you’re at it, you should probably bolt on the steppers and go CNC. It’s your call, because both models are included.

[Dheera] also built a nice enclosure for the MF70, which makes sense because it’s small enough that it could fit on your desktop, and you don’t want it flinging brass chips all over your bench. But as long as it’s on your desk, why not consider a soundproof enclosure for the MF70? Or take the next step, make a nice wooden box, mount a monitor in it, and take the MF70 entirely portable, like this gonzo hack from way back in 2012.