A single-key macro pad with a screen built into the button.

2024 Tiny Games Contest: Are You A Good Judge Of Time?

What can you do with a one-button keyboard? Quite a bit, actually, especially if that key has a little screen on it. That’s the idea behind [Maker M0]’s MagicClick macro pad, which is an updated version of a highly useful project we have featured in the past. Well, now there’s a tiny game to go with it.

Animation showing the TimePerception game in action.Think you’re pretty good at measuring the passage of time? This game will likely prove you wrong. Press and hold the button and the timer begins with some pre-determined interval, such as four seconds. Once you think those four seconds have passed, release the button and find out how far off you were.

While the first version of this keyboard used the CH582F RISC-V microcontroller, the second and this third version use an ESP32-S3 on a custom, tightly packed PCB. That TFT display measures 0.85″, and the battery is an 3.7 V 802025 Li-Po. [Maker M0] has also redesigned this to make it easier to print, and plans to support circular screens in the near future.

The First New Long Wave Radio Station Of This Millennium

The decline of AM broadcast radio is a slow but inexorable process over much of the world, but for regions outside America there’s another parallel story happening a few hundred kilohertz further down the spectrum. The long wave band sits around the 200kHz mark and has traditionally carried national-level programming due to its increased range. Like AM it’s in decline due to competition from FM, digital, and online services, and one by one the stations that once crowded this band are going quiet. In the middle of all this it’s a surprise then to find a new long wave station in the works in the 2020s, bucking all contemporary broadcasting trends. Arctic 252 is based in Finland with programming intended to be heard across the Arctic region and aims to start testing in September.

The hack in this is that it provides an opportunity for some low-frequency DXing, and given the arctic location, it would be extremely interesting to hear how far it reaches over the top of the world into the northern part of North America. The 252KHz frequency is shared with a station in North Africa that may hinder reception for some Europeans, but those with long memories in north-west Europe will find it fairly empty as it has been vacated in that region by the Irish transmitter which used to use it.

So if you have a receiver capable of catching long wave and you think you might be in range, give it a listen. Closer to where this article is being written, long wave stations are being turned off.

Harris & Ewing, photographer, Public domain.

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”