Emulating X86 On Apple’s AARCH64 X64 Emulator

You might know [Evan Martin] as the developer of retrowin32. It’s a Windows and x86 emulator designed to run on a Mac or on the web. He’s recently been exploring how to run 32-bit x86 binaries on the AArch64 (aka ARM64) architecture.

[Evan] realized that Apple’s ARM-based Macs feature a high-quality x86 emulator, used via the Rosetta binary translation system. It only supports 64-bit x86-64 binaries, also known as x64, and thus he had initially discounted it for running older 32-bit x86 software. However, as it turns out, x64 features a special compatibility mode for running 32-bit code. [Evan] was able to leverage this to run 32-bit Windows executables rather neatly via the high-performance Rosetta emulator.

To run a 32-bit executable on a 64-bit processor in this way, one creates a 64-bit program that is tasked with loading the 32-bit executable. It’s a little fussy, involving some tricks to handle memory management between the 32-bit code and the 64-bit wrapper, and how to interface with the OS, but [Evan] explains deftly how it’s all done.

[Evan] notes that this hack may not work forever, especially if Apple changes or deprecates Rosetta’s remaining x86-64 emulation in the future. Regardless, Apple’s “Game Porting Toolkit” relies on similar techniques used by Wine. If you find yourself dancing across platforms, you might learn some nifty tricks from [Evan]’s example!

Logic Analyzers: Tapping Into Raspberry Pi Secrets

Today, I’d like to highlight a tool that brings your hacking skills to a whole new level, and does that without breaking the bank – in fact, given just how much debugging time you can save, how many fun pursuits you can unlock, and the numerous features you can add, this might be one of the cheapest tools you will get. Whether it’s debugging weird problems, optimizing your code, probing around a gadget you’re reverse-engineering, or maybe trying to understand someone’s open-source library, you are likely missing out a lot if you don’t have a logic analyzer on hand!

It’s heartbreaking to me that some hackers still don’t know the value that a logic analyzer brings. Over and over again, tactical application of a logic analyzer has helped me see an entirely different perspective on something I was hacking on, and that’s just the thing I’d like to demonstrate today.

Diving In

A logic analyzer has a number of digital inputs, and it continuously reads the state of these digital inputs, sending them to your computer or showing them on a screen – it’s like a logic-level-only oscilloscope. If you have an I2C bus with one MCU controlling a sensor, connect a logic analyzer to the clock and data pins, wire up the ground, launch the logic analyzer software on your computer, and see what’s actually happening.

For instance, have you ever noticed the ID_SC and ID_SD pins on the Raspberry Pi GPIO connector? Are you wondering what they’re for? Don’t you want to check what actually happens on these pins? Let’s do that right now! Continue reading “Logic Analyzers: Tapping Into Raspberry Pi Secrets”

Copper Be Gone: The Chemistry Behind PCB Etching

For a lot of reasons, home etching of PCBs is somewhat of a dying art. The main reason is the rise of quick-turn PCB fabrication services, of course; when you can send your Gerbers off and receive back a box with a dozen or so professionally made PCBs for a couple of bucks, why would you want to mess with etching your own?

Convenience and cost aside, there are a ton of valid reasons to spin up your own boards, ranging from not having to wait for shipping to just wanting to control the process yourself. Whichever camp you’re in, though, it pays to know what’s going on when your plain copper-clad board, adorned with your precious artwork, slips into the etching tank and becomes a printed circuit board. What exactly is going on in there to remove the copper? And how does the etching method affect the final product? Let’s take a look at a few of the more popular etching methods to understand the chemistry behind your boards.

Continue reading “Copper Be Gone: The Chemistry Behind PCB Etching”

Why Are We Only Just Now Hearing About LED Beaded Curtains

Beaded curtains are a pretty banal piece of home decor, unlikely to excite most interior design enthusiasts. Throw on some addressable LEDs, though, and you’ve got something eye-catching at the very least, as [Becky] demonstrates.

Joining the LED strands at the bottom made running the wiring easy but made walking through the blinds hard.

The project started with an existing beaded curtain as a base. A series of addressable LED strands were then carefully sewn to the beads using knots tied in plain sewing thread. The strands were configured as a single strand as far as the data lines were concerned, to make animation easy. Power was supplied to both ends of the strand to ensure nice and even brightness across the strands.

The brains of the system is a PixelBlaze controller, which makes it easy to wirelessly control the behavior of the strings. It’s the perfect tool for quickly whipping up fancy animations and pretty effects without hand-assembling a bunch of code yourself.

There was only a few problems with the project. [Becky] found a pretty passable LED beaded curtain from China midway through the project, which reduced her enthusiasm to finish the build. There were also issues walking through the curtain due to the wiring scheme she chose, where the bottom of one strand was connected to its neighbor.

Regardless, it’s a fun blinky build that brings some color to an otherwise drab doorway. It’s hard to complain about that! Video after the break.

Continue reading “Why Are We Only Just Now Hearing About LED Beaded Curtains”

The McDonald’s Ice Cream Machine Saga And Calls For Right To Repair

The inside of a Taylor C709 ice cream machine, as seen from the back with the cover on the electronics removed. (Credit: iFixit)
The inside of a Taylor C709 ice cream machine, as seen from the back with the cover over the electronics removed. (Credit: iFixit)

Raising a likely somewhat contentious topic, iFixit and Public Knowledge have challenged the manufacturer behind McDonald’s ice cream machines to make them easy to diagnose and repair. This is a subject that’s probably familiar to anyone who is vaguely familiar with US news and the importance of ice cream at McDonald’s locations to the point that a live tracker was set up so that furtive customers can catch a glimpse at said tracker before finding themselves staring in dismay at an ‘Out of Order’ sign on one of these Taylor ice cream machines.

The story is more complex than just a machine being “broken”, however. The maintenance contracts are lucrative, the instruction manual is long, and the error codes are cryptic. When you add to that the complexity of cleaning and maintaining the machines, it’s tempting to just claim the machine is out of order. These Taylor machines (the C602 and the C709 from the iFixit video) are a bit more complex than your usual ice cream maker in that they also have a pasteurization element that’s supposed to keep already poured mix safe to use the next day.

Continue reading “The McDonald’s Ice Cream Machine Saga And Calls For Right To Repair”

3D Printing RC Car Tires To Go Fast

There’s a bit of a high-speed arms race in the RC world on YouTube these days. [Michael Rectin] is in on the action, and he’s been exploring how to 3D print a decent set of tires to help his RC car reach higher speeds mph.

His first efforts involved experiments with TPU. The tires looked okay, but had very little traction. He later moved on to VarioShore TPU, a filament capable of delivering various properties depending on the printing method. Printing for the softest, and thus grippiest, possible tires, [Michael] whipped up some sporty looking boots for his wheels.

His tires improved overĀ  off-road RC tires in one major way. His design didn’t suffer significant ballooning as the rotational velocity increased. However, the VarioShore material lacked grip compared to off-the-shelf rubber RC tires designed for high-speed use. The commercially-available tires also offered a smoother ride.

[Michael] also demonstrated some neat tricks for high-speed RC driving. He used a modified flight controller to correct the car’s steering in response to perturbations, and put in a scaling method that reduces steering inputs at higher speed. That didn’t entirely stop the carnage though, with some incidents seeing wheels thrown off in big tumbling crashes.

Electric-powered RC cars can go darn quick these days, but you might want to consider jet power if you want to break records. Video after the break.

Continue reading “3D Printing RC Car Tires To Go Fast”

3D Printed Engine Gets Carburetor

3D printed materials have come a long way in the last decade or so as printers have become more and more mainstream. Printers can use all kinds of different plastics with varying physical characteristics, and there are even printers now for other materials like concrete and metal. But even staying within the realm of the plastic printer can do a lot of jobs you might not expect. [Camden Bowen] recently 3D printed a single-piston engine which nearly worked, and is back with some improvements to it thanks to a small carburetor.

The carburetor itself isn’t 3D printed (although not from lack of trying) — it’s on loan from a weed eater, and is helping to solve a problem with the fuel-air mixture of his original design. Switching from butane to a liquid fuel also solved some problems as well, and using starter fluid also helped to kick off the ignition. Although it ran for a short period of time over several starts, the valve train suffered some damage with the exhaust valves melting in place to the head. This is actually a problem common to any internal combustion engine like this, especially if the fuel-air mixture is too lean, there’s incomplete combustion, the valves aren’t adjusted properly, or any number of other problems. In this case it seems to have been caused by improper engine timing.

It’s actually noteworthy though that the intake valves weren’t burned, meaning that if the engine can be tuned to allow for complete combustion before the exhaust gasses leave the combustion chamber, the plastic 3D printed head and valve train will likely survive much longer operational periods. We’ll certainly look forward to the next iteration of this engine build to see if that’s the case. If 3D printed piston engines aren’t your speed, though, take a look at this jet engine which uses a 3D printed compressor.

Continue reading “3D Printed Engine Gets Carburetor”