Linux Fu: Databases Are Next-Level File Systems

It is funny how exotic computer technology eventually either fails or becomes commonplace. At one time, having more than one user on a computer at once was high tech, for example. Then there are things that didn’t catch on widely like vector display or content-addressable memory. The use of mass storage — especially disk drives — in computers, though has become very widespread. But at one time it was an exotic technique and wasn’t nearly as simple as it is today.

However, I’m surprised that the filesystem as we know it hasn’t changed much over the years. Sure, compared to, say, the 1960s we have a lot better functionality. And we have lots of improvements surrounding speed, encoding, encryption, compression, and so on. But the fundamental nature of how we store and access files in computer programs is stagnant. But it doesn’t have to be. We know of better ways to organize data, but for some reason, most of us don’t use them in our programs. Turns out, though, it is reasonably simple and I’m going to show you how with a toy application that might be the start of a database for the electronic components in my lab.

You could store a database like this in a comma-delimited file or using something like JSON. But I’m going to use a full-featured SQLite database to avoid having a heavy-weight database server and all the pain that entails. Is it going to replace the database behind the airline reservation system? No. But will it work for most of what you are likely to do? You bet. Continue reading “Linux Fu: Databases Are Next-Level File Systems”

Cold War Code Breaking Manual Teaches Impossible Puzzle Solving

Cryptologist [Lambros Callimahos] was a victim of his own success. He wrote a trilogy of books called Military Cryptanalytics covering code breaking in 1977. The first two volumes were eventually published, but the NSA blocked the public release of the third volume back in 1992. But last December, it finally saw the light of day.

Of course, some parts of the book are redacted, including parts of the table of contents. That’s pretty bad when even your chapter headings can be classified. [Richard Bean] over on Phys.org has some notes about the book along with some examples of hard-to-solve crypto puzzles.

Continue reading “Cold War Code Breaking Manual Teaches Impossible Puzzle Solving”

ISS Artificial Gravity Study Shows Promise For Long Duration Spaceflight

The International Space Station is humanity’s most expensive gym membership.

Since the earliest days of human spaceflight, it’s been understood that longer trips away from Earth’s gravity can have a detrimental effect on an astronaut’s body. Floating weightless invariably leads to significantly reduced muscle mass in the same way that a patient’s muscles can atrophy if they spend too much time laying in bed. With no gravity to constantly fight against, an astronauts legs, back, and neck muscles will weaken from disuse in as little as a week. While this may not pose an immediate problem during spaceflight, astronauts landing back on Earth in this physically diminished state are at a higher risk of injury.

Luckily this problem can be largely mitigated with rigorous exercise, and any orbiting vessel spacious enough to hold human occupants for weeks or months will by necessity have enough internal volume to outfit it with basic exercise equipment such as a treadmill or a resistance machine. In practice, every space station since the Soviet Union’s Salyut 1 in 1971 has featured some way for its occupants to workout while in orbit. It’s no replacement for being on Earth, as astronauts still return home weaker than when they left, but it’s proven to be the most practical approach to combating the debilitating aspects of long duration spaceflight.

Early NASA concept for creating artificial gravity.

Of course, there’s an obvious problem with this: every hour spent exercising in space is an hour that could be better spent doing research or performing maintenance on the spacecraft. Given the incredible cost of not just putting a human into orbit, but keeping them there long-term, time is very literally money. Which brings us back to my original point: astronauts spending two or more hours each day on the International Space Station’s various pieces of exercise equipment just to stave off muscle loss make it the world’s most expensive gym membership.

The ideal solution, it’s been argued, is to design future spacecraft with the ability to impart some degree of artificial gravity on its passengers through centripetal force. The technique is simple enough: just rotate the craft along its axis and the crew will “stick” to the inside of the hull. Unfortunately, simulating Earth-like gravity in this way would require the vessel to either be far larger than anything humanity has ever launched into space, or rotate at a dangerously high speed. That’s a lot of risk to take on for what’s ultimately just a theory.

But a recent paper from the University of Tsukuba in Japan may represent the first real steps towards the development of practical artificial gravity systems aboard crewed spacecraft. While their study focused on mice rather than humans, the results should go a long way to codifying what until now was largely the stuff of science fiction.

Continue reading “ISS Artificial Gravity Study Shows Promise For Long Duration Spaceflight”

The Epic Saga Of Hacking Knights Of The Round

For the uninitiated, Knights of the Round was a hack-and-slash arcade game released by Capcom in 1991 that rather loosely followed the legend of King Arthur and the eponymous Knights of the Round Table. In it, up to three players make their way from stage to stage, vanquishing foes and leveling up their specific character’s weapons and abilities. But [Sebastian Mihai] was looking for a new way to experience this classic title, so he decided to reverse engineer the game and create his own version called Warlock’s Tower.

Those familiar with the original game will no doubt notice some of the differences right away while watching the video below, but for those who don’t have an intimate knowledge of Arthur’s digital adventures, the major changes are listed on the project’s web page. Among the most notable are the removal of cooperative multiplayer and stage time limits. This turns the game from a frantic beat ’em up to a more methodical adventure. Especially since you now have to compete the game in a single life. If we had to guess, we’d say [Sebastian] prefers his games to have a bit of a challenge to them.

Even if you aren’t interested in playing Warlock’s Tower yourself, the story of how [Sebastian] created it is absolutely fascinating. He started with zero knowledge of Motorola 68000 assembly, but by the end of the project, was wrangling multiple debuggers and writing custom tools to help implement the approximately 70 patches that make up the custom build.

The hundreds of hours of work that went into creating these patches is documented as a sort of stream of consciousness on the project page, allowing you to follow along in chronological order. Whether it inspires you to tackle your own reverse engineering project or makes you doubt whether or not you’ve got the patience to see it through, it’s definitely worth a read. If you’re a Knights of the Round fan, you should also take a look at the incredible wealth of information he’s amassed about the original game itself, which honestly serves as an equally impressive project in its own right.

Modified versions of classic games, known colloquially as “ROM hacks” are fairly common among serious fans who want to see their favorite games improved over time. While they aren’t always as ambitious as Warlock’s Tower, they all serve as examples of how a dedicated community can push a product well beyond the scope envisioned by its original creators.

Continue reading “The Epic Saga Of Hacking Knights Of The Round

Tractors And The Right To Repair: It’s Going Global

For more than a few years now, we’ve been covering the saga of tractors from the larger manufacturers on which all components are locked down by software to the extent that they can only be replaced by officially sanctioned dealers. We’re thus pleased to see a couple of moments when the story has broken out of the field of a few farmers and right-to-repair geeks and into the mainstream. First up:  a segment on the subject from NPR is worth a listen, as the US public radio station interviews a Montana farmer hit by a $5k fuel sensor on his John Deere as a hook form which to examine the issue. Then there is a blog post from the National Farmers Union, the body representing UK farmers, in which they too lay out the situation and also highlight the data-grabbing aspects of these machines.

Continue reading “Tractors And The Right To Repair: It’s Going Global”

An Emulator That Only Plays One Game

[Ben Smith] had previously implemented a GameBoy Color emulator but decided to make a new emulator that to play just one game called pokegb. The game is, of course, the popular blue edition of Pokemon. While this emulator could play other GameBoy games, the way it was implemented was to support only the opcodes and features that Pokemon Blue used. What’s perhaps even more amazing is that this full emulator is just 582 lines of C++ (using SDL for graphics and input). There is also an obfuscated version that comes in at just 68 lines and in the shape of three Pokeballs. All the code for pokegb can be found on GitHub.

[Ben] goes through a detailed listing of each opcode of the processor, memory, the graphics unit (PPU), and how it interacts with a modern operating system. We love the idea of implementing each opcode one by one and gradually seeing the emulator make it farther and farther through the ROM. The only feature that’s noticeably absent is sound, which would require a significant amount of code to emulate properly.

If you’re interested in a deep dive into the audio chips inside a Gameboy Color, [Ken Shirriff] has already done the research for you.

At MIT, Clothing Fiber Watches You

[Yoel Fink] and his team at MIT have announced their creation of a fiber that can sense and store data. In addition, they can use data from a shirt made of the material to infer the wearer’s activity with high accuracy. The fiber contains hundreds of microscale silicon chips into a preform used to create a polymer fiber that connects the chips using four 25 micron tungsten wires. You can read the paper directly in Nature Communications.

The fiber contains temperature sensors and enough memory (24CW1280X chips) to store a short movie for two months without power. It also contains 1,650 neural network elements, which means the fiber can train to infer activity itself without additional help.

Continue reading “At MIT, Clothing Fiber Watches You”