It looks like osu!, but it's actually Trombone Champ

Implementing A Rhythm Game Entirely In A GPU Shader

Most rhythm games have a community creating custom charts, and Trombone Champ is no exception. What is exceptional, however, [CraftedCart]’s osu! played in a Trombone Champ chart.

It all started as a challenge to make the most unserious chart possible. Among some other ideas, [CraftedCart] eventually decides to make an osu! chart but play it in Trombone Champ. Okay, not a problem, let’s just–oh, you can’t run arbitrary code without a making a mod. So instead, they decided to use shaders on the GPU. There are, of course, all sorts of problems with such an idea. Being stuck in the fixed render pipeline of a game, you can’t just add any resources to your shader you want. This leads to using textures as memory, both the game state and the osu! chart are actually textures. Another interesting one is getting user input into the shader. [CraftedCart] solves that by connecting the position of the game object the background is rendered to to the cursor; then, the shader reads the world to local transform matrix to determine the mouse position. Finally, the graphics the player ends up seeing are rendered using ray marching.

Video after the break.
Continue reading “Implementing A Rhythm Game Entirely In A GPU Shader”

Battle Born Explains How Its Battery Thermal Safety Works

Autopsy of Battle Born LFP battery with the 'thermal safety' on the bus bar. (Credit: Will Prowse)
Autopsy of Battle Born LFP battery with the ‘thermal safety’ on the bus bar. (Credit: Will Prowse)

After users of Battle Born LFP batteries encountered issues such as a heavily discolored positive terminal and other signs of overheating, multiple autopsies showed that the cause appeared to be the insertion of a thermoplastic between the bus bar and the terminal. Over time thermal creep loosened the connections, causing poor contact and melting plastic enclosures. According to Battle Born, this is actually part of an ingenious thermal safety design, and in a recently published article they explain how it works.

The basic theory appears to be that if there’s a thermal event, the ABS thermoplastic will soften and reduce the pressure on the bolted-together copper bus bar and brass terminal. This then allows for an aluminium-oxide layer to form on the aluminium connecting bolt courtesy of the dissimilar copper/aluminium interface. Aluminium-oxide is non-conductive and thus interrupts the flow of current.

Of course, there are countless issues with that theory, least of all the many reports of in-field failures. We recently covered [Will Prowse] studying the death of one of these 100 Ah LFP batteries from brand-new to failure under controlled circumstances. This clearly shows the thermal creep loosening up the connection and causing poor contact between the bus bar, the bolt and the terminal, with poor contact and thermal issues resulting.

Continue reading “Battle Born Explains How Its Battery Thermal Safety Works”

Using Metal Screws In Plastic Parts

Machine screws aren’t made for wood or sheet metal, they make specific screws for those applications. You probably also know there are special screws for plastic. But did you know there are at least two distinct types? In a recent video, [Lost in Tech] show us different types of plastic screws, including thermal camera shots of screws driving into 3D printed parts, along with tests using a torque driver.

We have often used “any old” screw in printed parts, which usually works OK. We’ve also used threaded inserts or captive nuts, classic choices. One of the issues with screws or inserts is that you have to get accurately sized holes in your 3D prints.

In addition to learning about the types of screws and how best to accommodate them, he also developed a free web-based tool that does all the math for you.

Of course, there are cases when you do need a threaded insert. In particular, the plastic screws will tend to wear the plastic each time you insert them. If you expect the screw to go in and out many times, this might not be the right technique for you. On the other hand, if you think you might remove and replace the screws a few dozen times over the life of the part, this might be attractive.

We’ve covered self-tapping screws in plastic before, but, as the video shows, not all of them are created equal. And, of course, there are always heat-set inserts.

Continue reading “Using Metal Screws In Plastic Parts”

Hackaday Podcast Episode 365: Early 3DP Engineering, A New CAD Interface, And Flying Around The Moon

Humans flew around the Moon this week, but Hackaday Editors Elliot Williams and Tom Nardi were stuck on Earth — luckily, there was no shortage of stories and hacks to keep them occupied. From the news that Linux might be putting the i486 out to pasture, to the fascinating potential of the threadless ball screw and connecting Bluetooth calipers up to FreeCAD.

You’ll hear about the latest in Internet via high-altitude balloon, the zen of organizing your parts bins, all the problems with Markdown files, and a deep-dive into making a convincing LED fire effect. The episode wraps up with some polarizing opinions on long term data storage, and a freewheeling discussion about the importance of literal moonshots.

Check out the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Flying around the Moon? Download this episode in DRM-free MP3 so you’ll have something to listen to.

Continue reading “Hackaday Podcast Episode 365: Early 3DP Engineering, A New CAD Interface, And Flying Around The Moon”

This Week In Security: Flatpak Fixes, Android Malware, And SCADA Was IOT Before IOT Was Cool

Rowhammer attacks have been around since 2014, and mitigations are in place in most modern systems, but the team at gddr6.fail has found ways to apply the attack to current-generation GPUs.

Rowhammer attacks attach the electrical characteristics of RAM, using manipulation of the contents of RAM to cause changes in the contents of adjacent memory cells. Bit values are just voltage levels, after all, and if a little charge leaks across from one row to the next, you can potentially pull a bit high by writing repeatedly to its physical neighbors.

The attack was used to allow privilege escalation by manipulating the RAM defining the user data, and later, to allow reading and manipulation of any page in ram by modifying the system page table that maps memory and memory permissions. By 2015 researchers refined the attack to run in pure JavaScript against browsers, and in 2016 mobile devices were shown to be vulnerable. Mitigations have been put in place in physical memory design, CPU design, and in software. However, new attack vectors are still discovered regularly, with DDR4 and DDR5 RAM as well as AMD and RISC-V CPUs being vulnerable.

The GDDR6-Fail attack targets the video ram of modern graphics cards, and is able to trigger similar vulnerabilities in the graphics card itself, culminating in accessing and changing the memory of the PC via the PCI bus and bypassing protections.

For users who fear they are at risk — most likely larger AI customers or shared hosting environments where the code running on the GPU may belong to untrusted users — enabling error correcting (ECC) mode in the GPU reduces the amount of available RAM, but adds protection by performing checksums on the memory to detect corruption or bit flipping. For the average home user, your mileage may vary – there’s certainly easier ways to execute arbitrary code on your PC – like whatever application is running graphics in the first place!

Continue reading “This Week In Security: Flatpak Fixes, Android Malware, And SCADA Was IOT Before IOT Was Cool”

Bacteria Marching To The Beat Of A Tiny Drum

Traditionally, identifying a bacterium requires peering through a microscope. Researchers from TU Delft want to trade your eyes for your ears when identifying bacteria. This is possible because they’ve crafted nanoscale drums that convert bacteria’s movement into sound.

The technique originated when Delft researchers noticed something odd. If a living bacterium were on a graphene sheet, it would beat a distinctive pattern that you can detect with a laser. Each drumhead consists of two graphene sheets laid over an 8-micrometer-wide cavity. The sheets are less than a nanometer thick.

The sounds are due to the subtle motion of the tiny lifeform. Scientists have known about these motions, but previously had to measure them en masse. The tiny drums can respond to a single organism, typically about 1 to 10 micrometers in size.

Graphene makes this sensor possible because it is thin enough to behave like a drum with such a tiny force, yet also strong enough to support the bacterium. At first, the technique was simply to determine if antibiotics were killing the bacteria. However, they found that specific bacteria produced audio with unique spectrograms.

It is foolproof, but machine language models can identify among three common bacteria with nearly 90% accuracy. The next step is to reduce the high-tech research setup to something practical for a hospital or doctor’s office. Early prototypes are now in use in two hospitals.

We’ve seen the benefits of automated microscopes that can detect a particular disease. This technology, refined, could go even further.

Running DOOM On…a TrueType Font?

Over the years, DOOM has been ported to many things; think of any arbitrary device and chances are it can run the classic shooter. But what about something more esoteric like [Artem]’s DOOM in a TrueType font?

Okay, it’s not technically a port of DOOM, but it’s still very cool. TrueType actually has a bytecode used for hints to the render and, while not made for this, it’s just complete enough for this demo to run. Either to increase the over-engineering, or just to make it all a bit easier, [Artem] makes a simple DSL and a matching compiler written in Python.

All of this allows the byte code intended to implement serifs run arbitrary code, in this case, ray casting the walls for a DOOM demo. The final bytecode is 6,580 in size and, assuming your font renderer implements this, is very playable.

While this project’s implementation of the game is a bit abstract, the version of DOOM that you can run over DNS is the real deal.