Even The PlayStation 2 Can’t Escape Java

Love it or hate it, you can’t deny that Java has a pretty impressive track record in terms of supported platforms. Available on everything from flip phones to DVD players, not to mention computers, Oracle once famously claimed that Java runs on three billion devices. An estimate that, in truth, is probably on the low side at this point. Especially when [Michael Kohn] keeps figuring out how to run it on increasingly esoteric devices.

[Michael] writes in to tell us that he’s added support for the PlayStation 2 console to Java Grinder, his software for taking Java code and turning it into a native binary for a variety of unexpected platforms. His previous conquests have included the TRS-80 and Atari 2600, so by comparison the PS2 is an almost tame addition to the list.

Let’s be honest, you probably don’t have any desire to run a Java program on Sony’s nearly two decade old game system. But that’s OK. The documentation [Michael] has written up is fascinating anyway, covering specifics of the PS2’s rather unique hardware and quirks he ran into when developing on an emulator and deploying on real hardware. Even if you’ll never put the findings to practical use, it’s absolutely worth a read.

In the video after the break you can see the demo [Michael] came up with booting on a real PS2 to prove the software works. To really put his mark on it, he mentions he wrote and performed the demo’s songs and even drew some of the artwork on paper and scanned it into his computer.

We’ve previously covered his work getting Java running on the Sega Genesis, as well as the venerable 6502 CPU. Oh, and one time he encoded data onto a pancake. We like this guy’s style.

Continue reading “Even The PlayStation 2 Can’t Escape Java”

Lathe Headstock Alignment: Cutting A Test Bar

Let’s say you’ve recently bought a lathe and set it up in your shop. Maybe you’ve even gone and leveled it like a boss. You’re ready to make chips, right? Well, not so fast. As real machinists will tell you, you can use all the levels and lasers and whatever that you want, but the proof is in the cut. Precision leveling gets your machine in the ballpark (machinists have very small ballparks) but the final step to getting a machine to truly perform well is to cut a test bar. This is a surefire way to eliminate any last traces of twist in the bed.

There are two types of test bars. One is for checking headstock-to-ways alignment, which is what we’re doing here. There’s another type used for checking tailstock alignment, but that’s a subject for another day.

Continue reading “Lathe Headstock Alignment: Cutting A Test Bar”

DIY Scientific Calculator Powered By Pi Zero

It’s the eternal question hackers face: do you built it, or do you buy it? The low cost and high availability of electronic gadgets means we increasingly take the latter option. Especially since it often ends up that building your own version will cost more than just buying a commercial product; and that’s before you factor in the time you’ll spend working on it.

But such concerns clearly don’t phase [Andrea Cavalli]. Sure he could just buy a scientific calculator, but it wouldn’t really be his scientific calculator. Instead, he’s taking the scenic route and building his own scientific calculator from scratch. The case is 3D printed, the PCB is custom, and even the software is his own creation.

His PCB hooks right up to the GPIO pins of the internal Raspberry Pi Zero, making interfacing with the dome switch keyboard very easy. The board also holds the power management hardware for the device, including the physical power switch, USB connection for charging, and TPS79942DDCR linear regulator.

The case, including the buttons, is entirely 3D printed. At this point the buttons don’t actually have any labels on them, which presumably makes the calculator more than a little challenging to use, but no doubt [Andrea] is working on that for a later revision of the hardware. A particularly nice detail is the hatch to access the Pi’s micro SD card, making it easy to update the software or completely switch operating systems without having to take the calculator apart.

After the kernel messages scroll by, the Pi boots right into the Java calculator environment. This gives the user a fairly standard scientific calculator experience, complete with nice touches like variable highlighting. The Mario mini-game probably isn’t strictly required, but if you’re writing the code for your own calculator you can do whatever you want.

Here at Hackaday we’ve seen a calculator that got a Raspberry Pi upgrade, a classic scientific calculator emulated with an Arduino, and of course we’ve raved about the NumWorks open source graphing calculator. Even with such stiff competition, we think this project is well on its way to being one of the most impressive calculators we’ve ever come across.

Continue reading “DIY Scientific Calculator Powered By Pi Zero”

Sushi-Snarfing Barbie Uses Solenoid To Swallow

The view from America has long seen French women as synonymous with thin and/or beautiful. France is well-known for culinary skill and delights, and yet many of its female inhabitants seem to view eating heartily as passé. At a recent workshop devoted to creating DIY amusements, [Niklas Roy] and [Kati Hyyppä] built an electro-mechanical sushi-eating game starring Barbie, American icon of the feminine ideal. The goal of the game is to feed her well and inspire a happy relationship with food.

Built in just three days, J’ai faim! (translation: I’m hungry!) lets the player satiate Barbie one randomly lit piece of sushi at a time. Each piece has a companion LED mounted beneath the surface that’s connected in series to the one on the game board. Qualifying sushi are determined by a photocell strapped to the underside of Barbie’s tongue, which detects light from the hidden LED. Players must race against the clock to eat each piece, taking Barbie up the satisfaction meter from ‘starving’ to ‘well-fed’. Gobble an unlit piece, and the score goes down.

The game is controlled with a lovely pink lollipop of a joystick, which was the main inspiration for the game. Players move her head with left and right, and pull down to engage the solenoid that pushes her comically long tongue out of her button-nosed face. Barbie’s brain is an Arduino Uno, which also controls the stepper motor that moves her head.

[Niklas] and [Kati] wound up using cardboard end stops inside the box instead of trying to count the rapidly changing steps as she swivels around. The first motor they used was too weak to move her head. The second one worked, but the game’s popularity combined with the end stops did a number on the gears after a day or so. Click past the break to sink your teeth into the demo video.

Barbie can do more than teach young girls healthy eating habits. She can also teach them about cryptography.

Continue reading “Sushi-Snarfing Barbie Uses Solenoid To Swallow”