Mine Bitcoin With An ESP8266

With all the hype surrounding cryptocurrencies and the current high not quite so high but still pretty eye-watering price of Bitcoin, there are some things which might once have been pure folly that could now be deemed worthy of pursuit. There is an excavation mission being considered to unearth a hard drive containing an early Bitcoin wallet in a Welsh landfill, for instance. But a more approachable task for you may be the possibility of mining using minimal hardware.

Take [Merlot Machina]’s project for example, implementing a Bitcoin miner on an ESP8266. Part of this is the timeless pursuit of answering the joke question: “Will it mine Bitcoin”, and the other part is looking at this like a lottery ticket. Is it a worthwhile punt at a prize for a minimal investment?

He gives us a rundown of some of the statistics involved, and comes away with the conclusion that it is something like a not-very-good lottery ticket. The ESP performs 1200 hashes per second while the entire Bitcoin community manages about 1.2 exahashes per second. This he calculates gives him a 1 in 1016 chance of mining a block every ten minutes, which for the tiny cost of an ESP and its relatively frugal power budget is a chance he sees as worth taking.

So far he has implemented the hashing algorithm and verified it against a known hash on an already-mined block. At this point though he’s hit a roadblock in the need to run Bitcoin core on a server to keep the ESP supplied with new block headers, so the ESP miner remains a proof of concept. The write-up is still an interesting read though, and given that many readers will have a few spare ESP boards it’s possible that one of you may take it to the next level and Win It Big. If that’s you, you’ll be able to sit on your private island sipping a cool drink, and laugh at the commenters who said it would never happen. Meanwhile here at Hackaday we’ll stick to tried-and-trusted revenue generation strategies, such as bringing you the latest hardware hacks.

This might seem a peculiarly slow miner, but it’s not the slowest we’ve seen by any means. The ever-prolific [Ken Shirriff] has tried it on an IBM 1401 mainframe and a Xerox Alto, and you can of course do it the old-fashioned way.

Old Logic Analyzer Becomes New PC Case

There are a lot of cool ways to wrap a case around your custom PC build. But the off-the-shelf stuff doesn’t really set your machine apart from the herd, no matter how many RGB LEDs you put inside. If you really want to stand out, think out of the box, and build your PC into the case of an old logic analyzer.

Looking for a little retro cool factor, [Bob Alexander] turned to the world’s boneyard, eBay, and rounded up a dead H-P 1653 logic analyzer. State of the art in 1989 but not worth repairing by [Bob]’s lights, he removed the original 10″ CRT to make room for an alternate display. After a bit of experimentation, he settled on an LCD panel mounted behind a sheet of acrylic that he thermoformed to the shape of the CRT face. All the original guts were removed to make way for the motherboard and power supply, and a custom PCB to interface the original keypad and rotary encoder into the PC. The old buttons now launch various programs and the encoder acts as the PC volume control. The floppy drive made way for a USB hub, the BNC connectors became power and reset buttons, and a photo taken through the CRT bezel before the electronics were removed provides a window into the soul of the original instrument. It’s a really nice build, and totally unique.

Need some inspiration for your custom case mod? This wall-mounted render farm is pretty snazzy. Or perhaps you’d prefer something more apocalyptic, like this ammo can PC.

Espple: A Wireless Apple 1 On An ESP8266

The Apple 1 was one of the three big hobbyist computers that burst onto the scene in 1977. Unlike the PET 2001 and the TRS-80, only a couple hundred Apple 1s were ever produced, and with only a handful in existence today, you’ll have to fork out some serious money to get a Wozniak original for yourself.

The Apple 1 experience is easily emulated, of course, but this ESP8266 emulates the Apple 1 on hard mode. Dubbed the Espple by its creator [Hrvoje Cavrak], it emulates the 6502-based original in all its 1-MHz glory, while providing 20-kB of RAM, a considerable upgrade over the 4-kB standard. The complete original character set is provided for that old-timey feel, and there’s a BASIC interpreter ready to go. The kicker here, though, is that the emulator is completely wireless. You telnet into the 8266 rather than connecting a keyboard directly, and video is transmitted over-the-air using a GPIO pin as a 60-MHz PAL transmitter. A short length of wire is all you need to transmit to an analog PAL TV on channel 4; the video below shows a little BASIC code running and a low-res version of Woz himself.

You’ll find Apple emulators aplenty around these parts, everything from an Apple ][ on an Arduino Uno to a tiny Mac on an ESP32. There hasn’t been much in the way of Apple 1 emulations, though, at least until now.

Continue reading “Espple: A Wireless Apple 1 On An ESP8266”

[Ken Shirriff] Becomes A Core Memory Repairman (Again)

Lately, [Ken Shirriff] has been on some of the most incredible hardware adventures. In his most recent undertaking we find [Ken] elbow-deep in the core memory of a 50-year-old machine, the IBM 1401. The computer wasn’t shut down before mains power was cut, and it has refused to boot ever since. The culprit is in the core memory support circuitry, and thanks to [Ken’s] wonderful storytelling we can travel along with him to repair an IBM 1401.

From a hardware standpoint core memory makes us giddy. It’s a grid of wires with ferrite toroids at every intersection. Bits can be set or cleared based on how electricity is applied to the intersecting wires. [Al Williams] walked through some of the core memory history last year and we enjoyed hearing [Pamela Liou] recount the story of how textile workers consulted on the fabrication of core memory for the Apollo missions during her OHWS Talk in October. But giddiness aside, core memory has pretty much gone the way of the dodo having been displaced by technologies that take up exponentially less space.

Bad inductor (green housing has been dissolved away)

We chuckle at [Ken’s] mention of the core memory capacity for the IBM 1401. It has 4000 characters of memory built-in (with another 12,000 in an expansion box) and he goes on to detail that these are 6-bit characters on a machine that operates in decimal and not binary (hence 4k instead of the base-2 friendly 4096).

You may remember his work a few years back to repair core memory on the same model. The Museum has two 1401’s, which turned out to be a huge help in trouble-shooting this. After tracing out the control lines, the repair team began swapping cards between the working and non-working machines. They were able to bring it back online — establishing one of the green inductors was bad — only to be struck with a second fault in the power supply.

Get this, [Ken] comments that “the whole computer is pre-silicon”. When working through the PSU, some suspect transistors were replaced with germanium power transistors. Those may have been a red-herring, as a penciled-in fuse on the original schematics turned out to be the linchpin of the PSU repair. Buried deep in the assembly, replacing the designed-to-fail part let the ancient beast awake once more.

Machines of this quality were heavily documented, and the schematics make this type of trouble-shooting a lot more manageable. But it’s still as much an art as it is skill. Make sure to give [Ken’s] article a read, and look around at the other repair jobs he’s documented — keeping these machines in service is becoming wizard-level work and we love being able to follow along.

34C3: Hacking Into A CPU’s Microcode

Inside every modern CPU since the Intel Pentium fdiv bug, assembly instructions aren’t a one-to-one mapping to what the CPU actually does. Inside the CPU, there is a decoder that turns assembly into even more primitive instructions that are fed into the CPU’s internal scheduler and pipeline. The code that drives the decoder is the CPU’s microcode, and it lives in ROM that’s normally inaccessible. But microcode patches have been deployed in the past to fix up CPU hardware bugs, so it’s certainly writeable. That’s practically an invitation, right? At least a group from the Ruhr University Bochum took it as such, and started hacking on the microcode in the AMD K8 and K10 processors.

The hurdles to playing around in the microcode are daunting. It turns assembly language into something, but the instruction set that the inner CPU, ALU, et al use was completely unknown. [Philip] walked us through their first line of attack, which was essentially guessing in the dark. First they mapped out where each x86 assembly codes went in microcode ROM. Using this information, and the ability to update the microcode, they could load and execute arbitrary microcode. They still didn’t know anything about the microcode, but they knew how to run it.

So they started uploading random microcode to see what it did. This random microcode crashed almost every time. The rest of the time, there was no difference between the input and output states. But then, after a week of running, a breakthrough: the microcode XOR’ed. From this, they found out the syntax of the command and began to discover more commands through trial and error. Quite late in the game, they went on to take the chip apart and read out the ROM contents with a microscope and OCR software, at least well enough to verify that some of the microcode operations were burned in ROM.

The result was 29 microcode operations including logic, arithmetic, load, and store commands — enough to start writing microcode code. The first microcode programs written helped with further discovery, naturally. But before long, they wrote microcode backdoors that triggered when a given calculation was performed, and stealthy trojans that exfiltrate data encrypted or “undetectably” through introducing faults programmatically into calculations. This means nearly undetectable malware that’s resident inside the CPU. (And you think the Intel Management Engine hacks made you paranoid!)

[Benjamin] then bravely stepped us through the browser-based attack live, first in a debugger where we could verify that their custom microcode was being triggered, and then outside of the debugger where suddenly xcalc popped up. What launched the program? Calculating a particular number on a website from inside an unmodified browser.

He also demonstrated the introduction of a simple mathematical error into the microcode that made an encryption routine fail when another particular multiplication was done. While this may not sound like much, if you paid attention in the talk on revealing keys based on a single infrequent bit error, you’d see that this is essentially a few million times more powerful because the error occurs every time.

The team isn’t done with their microcode explorations, and there’s still a lot more of the command set left to discover. So take this as a proof of concept that nearly completely undetectable trojans could exist in the microcode that runs between the compiled code and the CPU on your machine. But, more playfully, it’s also an invitation to start exploring yourself. It’s not every day that an entirely new frontier in computer hacking is bust open.

Ergonomic Keyboard Designed From The Ground Up

In 2011, [Fabio] had been working behind a keyboard for about a decade when he started noticing wrist pain. This is a common long-term injury for people at desk jobs, but rather than buy an ergonomic keyboard he decided that none of the commercial offerings had all of the features he needed. Instead, he set out on a five-year journey to build the perfect ergonomic keyboard.

Part of the problem with other solutions was that no keyboards could be left in Dvorak (a keyboard layout [Fabio] finds improves his typing speed) after rebooting the computer, and Arduino-based solutions would not make themselves available to the computer’s BIOS. Luckily he found the LUFA keyboard library, and then was able to salvage a PCB from another keyboard. From there, he programmed everything on a Teensy microcontroller, added an OLED screen, and soldered it all together (including a set of Cherry MX switches).

Of course, the build wasn’t truly complete until recently, when a custom two-part case was 3D printed. The build quality and attention to detail in this project is impressive, and if you want to roll out your own [Fabio] has made all of the CAD files and software available. Should you wish to incorporate some of his designs into other types of specialized keyboards, there are some ideas floating around that will surely improve your typing or workflow.

Sound Isolated Server Rack

Servers are most often found in climate controlled data centers. This means they aren’t exactly built for creature comforts like quiet operation. Quite the contrary — many server chassis include fans which absolutely scream when the machine is under load. [Whiskykilo] needed to set up a 12 U rack in his basement for working from home. He knew the sound would get on anyone’s nerves, but especially on those of his wife.

To solve this problem, he built a sound isolated rack. The build started with a standard 12 U metal rack frame. This is wrapped in 1/2″ MDF coated with automotive sound deadening material. An outer frame built of 1×4 lumber and another layer of 1/2″ MDF. Isolating the inner and outer boxes made the biggest contribution to quieting down the noisy servers.

Computers need to breathe, so the front and back doors of the rack enclosure include banks of intake and exhaust fans to keep air flowing through the servers. Two AC Infinity controllers keep the fans operating and monitor temperature. These machines do generate some heat – so 64 °F (18C) intake and 81 °F (27C) exhaust is not unheard of. The servers don’t seem to mind running at these temperatures. A Raspberry Pi 3 keeps an eye on UPS operation and displays the data on a 7″ HDMI LCD.

Interested in running a server at home? You don’t have to go to the lumberyard – check out this server made with Ikea components, or this server built from 96 MacBook Pros.