Simple Version Of Pong Played On A Row Of LEDs

As far as video games go, Pong is already about as simple as it gets. But if even two dimensions is a bit more than you’re looking to tackle, [mircemk] shows how you can distill the core gameplay of this iconic title to its absolute minimum using an Arduino and a row of LEDs.

While [mircemk] brings their usual design aesthetic and flash to the project, this one could truly be done as a parts bin build. All you really need is a microcontroller with enough I/O pins (here, an Arduino Nano is used), a couple of buttons, and the aforementioned LEDs. A 16×2 LCD and a buzzer have been added to improve on the user interface a bit, but even that isn’t strictly required.

To play, each user holds their button and gets ready to hit it as soon as the LED closest to them lights up. Again, [mircemk] spruces this build up by offering both integrated buttons on the front panel of the game, as well as a pair of external “controllers” so you don’t have to crowd around the main unit. In this incarnation the score is shown on the LCD, but swapping that out for a pair of seven-segment LEDs could give the whole thing a bit more of a retro flair.

This isn’t the first time [mircemk] has tackled 1D Pong — if you can spring for addressable LEDs, you can pull the whole thing off with significantly less wiring.

Continue reading “Simple Version Of Pong Played On A Row Of LEDs”

A 64-bit X86 Bootloader From Scratch

For most people, you turn on your computer, and it starts the operating system. However, the reality is much more complex as [Thasso] discovered. Even modern x86 chips start in 16-bit real mode and there is a bit of fancy footwork required to shift to modern protected mode with full 64-bit support. Want to see how? [Thasso] shows us the ropes.

Nowadays, it is handy to develop such things because you don’t have to use real hardware. An emulator like QEMU will suffice. If you know assembly language, the process is surprisingly simple, although there is a lot of nuance and subtlety. The biggest task is setting up appropriate paging tables to control the memory mapping. In real mode, segments have access to fixed 64 K blocks of memory unless you use some tricks. But in protected mode, segments define blocks of memory that can be very small or cover the entire address space. These segments define areas of memory even though it is possible to set segments to cover all memory and — sort of — ignore them. You still have to define them for the switch to protected mode.

In the bad old days, you had more reason to worry about this if you were writing a DOS Extender or using some tricks to get access to more memory. But still good to know if you are rolling your own operating system. Why do the processors still boot into real mode? Good question.

Using Forward- And Reverse-Osmosis To Let Astronaut EVA Suits Produce Fresh Water From Urine

An uncomfortable reality with the spacesuits used for extravehicular activities (EVA) – commonly referred to as spacewalks – is that the astronaut spends hours in them, during which normal bodily functions like urinating and defecating continue. The current EVA record at the ISS is currently a hair under nine hours, necessitating a new approach. A team of researchers have now pitched the idea of an in-suit water recovery system with an article by [Sofia Etlin] and colleagues as published in Frontiers in Space Technologies.

For the current Extravehicular Mobility Unit (EMU) EVA spacesuit the current solution is what is called the MAG: the Maximum Absorbency Garment, which is effectively a fancy adult diaper with sodium polyacrylate as absorbent for up to 2 L of fluids. It replaced the urine collection device (UCD) that was used until female astronauts joined the astronaut corps in the 1970s. Generally astronauts aim to not defecate until they finish their EVA, which leaves urinating and the related activity of rehydrating as the spacesuits only have 0.95 L of water that has to last the duration of the spacewalk. Continue reading “Using Forward- And Reverse-Osmosis To Let Astronaut EVA Suits Produce Fresh Water From Urine”

Hackaday Links Column Banner

Hackaday Links: July 14, 2024

We’ve been going on at length in this space about the death spiral that AM radio seems to be in, particularly in the automotive setting. Car makers have begun the process of phasing AM out of their infotainment systems, ostensibly due to its essential incompatibility with the electronics in newer vehicles, especially EVs. That argument always seemed a little specious to us, since the US has an entire bureaucracy dedicated to making sure everyone works and plays well with each other on the electromagnetic spectrum. The effort to drop AM resulted in pushback from US lawmakers, who threatened legislation to ensure every vehicle has the ability to receive AM broadcasts, on the grounds of its utility in a crisis and that we’ve spent billions ensuring that 80% of the population is within range of an AM station.

Continue reading “Hackaday Links: July 14, 2024”

Five Ways To Repair Broken PCB Traces

When everything used wires, it was easy to splice them or replace them. Not so much with PC boards, but everyone has their favorite method for repairing a broken trace. [Mr. SolderFix] has his five favorite ways, as you can see in the video below.

Of course, before you can repair a trace, you probably have to expose it since most boards have solder mask now. Unless you plan to shut the trace at both ends, exposing the actual trace is probably the first step.

Continue reading “Five Ways To Repair Broken PCB Traces”

Undo Arduino Encryption With An Oscilloscope

Cryptography ain’t easy. Seemingly small details like how many times a computationally intensive loop runs can give the game away. [Lord Feistel] gives us a demo of how this could work with nothing more than poorly designed code, a resistor, and an oscilloscope.

The hardware side is, as mentioned, really simple. Put a resistor inline with the Arduino and monitor the voltage drop across the resistor with the scope. When the chip is working hard, it consumes more current, and code sections that take longer will show up as longer dips.

On the software end, it’s only a little more complicated.  The RSA encryption scheme involves a lot of exponentiation and modulo-taking. Here, [Lord Feistel] is targeting a naive way of computing the exponents quickly, and demonstrates how you can read the exponent straight out the chip’s power demand.

Implementing this attack against a real-world RSA algorithm, in the context of the Arduino doing other stuff, will be harder. And we don’t know if the algorithm implemented in “standard” Arduino libraries is smarter than this one. (If you know, let us know in the comments.) But still, this is a cool example of just how simple and straightforward it can be to eavesdrop on bad code.

If you only need to bypass encryption instead of breaking it, check out [Lord Feistel]’s other tutorial on power glitching that we featured previously. If you haven’t played around with the hardware side of security, it gets deep pretty quickly, but you can at least dip your toes in the shallow end with what you’ve got in your closet.

Wrap Your Keyboard With A Vacuum Former

Coloured keycaps are a common customisation when it comes to making your input device special. If you are working with modern tech it’s easy, there are plenty of vendors who can sell you keycaps for any purpose. With retro tech it’s never so simple, if a keycap hasn’t been made for decades you’re out of luck. This doesn’t faze [Drygol] though, who has solved the coloured retro keycap in a unique and non-destructive way. Wrap them in vinyl film using a vacuum former.

Vacuum formers are an often-underrated tool in the hardware arsenal, but as this project shows, they can produce startlingly good results. Original keycaps are placed on a 3D-printed scaffold before the vinyl is formed over them, then they are carefully cut out and a triangular edge on both sides is folded underneath, The result is an Amiga with a striking orange keyboard, and for us the best bit is that the original key is safely preserved under the vinyl.

[Drygol]’s exceptional work in the retrocomputing sphere has delighted us many times on these pages. There are too many examples to link here, but one we particularly liked was this nearly-all-new Amiga 2000.