The BBC Tetris Companion

[Leaded Solder] took on an interesting challenge. The BBC, apparently, produced a game console known as the BBC Bridge Companion that connected to your TV and helped you learn to play Bridge back in 1985. At £200, we doubt many were sold new, but there were nine ROM cartridges available, presumably at an additional cost. [Leaded Solder] doesn’t care about playing bridge, but decided to teach the computer itself to play Tetris.

Inside is what you might expect for 1985. A Z80 and TI video chip, although naturally enough, it is the PAL variant. With 16K of VRAM the machine would have been very capable for its day. Unlike some game systems, the Bridge Companion runs its own code before launching what’s on the ROM cartridge. That required a few evenings of reverse engineering to figure out the correct header. Meanwhile, the surplus real hardware needed a quick repair on its cartridge slot before he could test it with real metal.

There were more hurdles, including adapting the PAL output for a composite monitor. Don’t miss the second part of the series for more technical details, and we’ll be interested in following the posts to their conclusion later this month.

Oddly enough, we think this is the first time the BBC Bridge Companion has made an appearance on Hackaday. However, we’ve had no shortage of card shufflers.

This Filesystem Is Born To Fail

Sandboxing a Linux process usually means spending a lot of effort deciding what it isn’t allowed to see. You might put it in a mount namespace, bind-mount a few directories into place, hide some others, add a chroot, and generally construct a carefully restricted version of the filesystem. But a new Linux kernel feature is about to change all of that. Instead of carefully hiding most of the filesystem, why not just take the filesystem away?

That’s essentially the idea behind FailFS, a tiny pseudo-filesystem expected to land in Linux 7.3. As the name suggests, it doesn’t do very much. In fact, that’s the point: every operation that reaches FailFS returns EOPNOTSUPP, meaning “operation not supported.”

The interesting bit is what happens when a process uses FailFS as its root or current working directory. At that point, normal pathname lookup essentially ceases to work. Absolute paths fail. Absolute symbolic links fail. Relative paths using the normal current-directory mechanism fail. If the application tries to open /etc/passwd, there simply isn’t a useful /etc to find.

Continue reading “This Filesystem Is Born To Fail”

A 3D Printed Cycloidal Gearbox

Stepper motors are undeniably useful, but sometimes they need a bit of gearing to help perform their task. [Gjhudson2008] has a compact gearbox for NEMA 17 or 23 steppers that is mostly 3D printed. How compact? The gearbox, named VANTIX, is exactly the height of a standard NEMA 17 axle.

However, for it to be that thin, your stepper has to have the D-bore on the shaft go all the way down. Some steppers leave a shank uncut at the base, and that won’t work for VANTIX.

The recommendation is to print in ABS with a 0.2 mm nozzle for certain parts to help improve tolerance. Most of the assembly is either press fit or installed during the printing process. Some parts of the gearbox are better to print with a larger nozzle, too.

There are some heat-set inserts and, of course, you’ll need lube to keep everything moving smoothly. There are a few top plates you can print to fit various mounting scenarios.

We have seen a number of similar designs. We’ve also looked at some e-bike-inspired drives.

Rubidium Frequency Standard Explained

You’ve probably heard of rubidium frequency standards, which are used where you need an extremely accurate time or frequency reference. [IMSAI] guy has a good explainer video about what’s actually going on inside one of these standards. Much of the basic idea also applies to cesium standards.

The explainer starts with the periodic table. Rubidium and cesium are both alkali metals, with a single electron in their outermost electron shell. Rubidium has 37 electrons, with the outermost one relatively loosely bound. Naturally occurring rubidium consists mainly of two isotopes, rubidium-85 and rubidium-87, which have the same number of protons and electrons but different numbers of neutrons.

A rubidium standard typically has three gas cells that have a bit of rubidium in them. An RF-excited rubidium-87 discharge lamp produces light at very specific wavelengths. The RF energy excites rubidium atoms into higher electronic states, and when their electrons fall back to lower-energy states, the atoms emit photons.

That light passes through a filter cell containing rubidium-85. The filter preferentially absorbs part of the lamp’s spectrum, leaving light that optically pumps the rubidium-87 atoms in the second resonance cell into one of two closely spaced hyperfine states of the atom’s ground state.

Those two states differ because of the interaction between the magnetic moment of the outer electron and that of the rubidium-87 nucleus. Their energy separation corresponds to a microwave frequency of about 6.835 GHz.

The resonance cell is illuminated by the filtered light while also being exposed to microwave energy from a local oscillator. When the microwave frequency is exactly equal to the rubidium-87 hyperfine transition frequency, it transfers atoms between the two ground-state hyperfine levels. That changes how strongly the cell absorbs the optical pumping light, producing a detectable dip in the light reaching a photodetector.

Electronics then servo the microwave oscillator onto the center of that absorption dip, using a feedback technique somewhat analogous to a phase-locked loop. Once locked, the oscillator is effectively referenced to an atomic transition rather than to the dimensions or mechanical properties of a crystal, giving you an extremely stable frequency standard.

Continue reading “Rubidium Frequency Standard Explained”

Calculus-Free PID (Almost) In A Spreadsheet

PID controllers are everywhere. They regulate temperature, motor speed, power supplies, positioning systems, process equipment, and probably a dozen things within arm’s reach of you right now.

They’re also frequently explained with enough calculus to make them seem more mysterious than they really are. Granted, the I and D in PID stand for calculus terms, but they are easy enough to build into a spreadsheet. Grab a copy and keep it open while you read this post.

The Google Sheet implements a simple simulated PID controller along with a simulated process — the thing we’re trying to control. You can change the controller gains, alter the process, introduce disturbances, and watch what happens without compiling anything or wiring up a heater that might accidentally become a toaster. Continue reading “Calculus-Free PID (Almost) In A Spreadsheet”

FitzRoy’s Glass: Victorian Weather Marvel Or Glorified Thermometer?

Everyone talks about the weather. This is doubly true for sailors, where bad weather could mean a very bad day. So it isn’t surprising that navies around the world have had a keen interest in weather forecasting. But how did you predict the weather before modern instruments, radar, and satellite images? Vice Admiral Robert FitzRoy had great faith in “storm glasses,” a glass chamber containing some chemicals that he didn’t invent, but did document and promote heavily during the 1860s.

Did it work? Apparently not, but the device is still interesting in its own right. FitzRoy was a pioneer of meteorology, replacing folklore with actual observations and attempts at scientific rigor. While he did arm observation stations with conventional things like thermometers and barometers, he was also a proponent of the weather glass. Continue reading “FitzRoy’s Glass: Victorian Weather Marvel Or Glorified Thermometer?”

At Last! CP/M For Protected Mode

If you used a serious computer pre-IBM PC, there was a fair chance its operating system was CP/M. CP/M was a staple among 8080 and Z80 computers and while there were other versions, we’ll always associate CP/M with the Z-80. There was a CP/M made for the PC which used an 8088 (a hybrid 8-bit bus with a 16-bit 8086 core), but it was overwhelmed by MSDOS. However, there was another interesting version made for the 68000, and now [johnsonjh] has ported that over to create an early version of CP/M for 80386 protected mode.

The Z-80 only had a 16-bit address bus, so it could only handle 64K of memory. It was common to “bank switch” some memory, and CP/M Plus could be made to understand that (for example, you might have 32K of common memory and three banks of 32K memory; you could address one bank at a time). However, the 386 had a full-blown memory management unit that could remap physical 4K memory pages to anywhere in a program’s virtual address space.

Ordinary CP/M couldn’t handle that, but the Motorola 68000 had a similar page management model, so it makes sense it might be easier to port CP/M-68K to the 80386 than starting from the original, even though the instruction set for the Z-80 is conceptually more similar to the 80386.

What can you do with it? We don’t know. Presumably, it will allow you to use lots of memory. Historically, CP/M software from one variant would not run on another, so you’ll have to build anything you want to use. Of course, the real killer for lots of CP/M memory was multitasking, but that takes MP/M, and only about half of that is currently working. But we won’t be surprised to see it completed soon.

While CP/M skills won’t land you many jobs these days, it is a pretty good way to get mentioned on Hackaday.