Atari Now Runs Java, Thankfully Doesn’t Require Constant Updates

Java Grinder is a tool that compiles Java programs to run on platforms like microcontrollers and consoles, by outputting native assembly code and using APIs to work with custom hardware like bespoke graphics and sound chips. Amongst other hardware, Java Grinder supports the Commodore 64, which uses a variant of the 6502 CPU. [Michael Kohn] realized the Atari 2600 shares this processor, and figured he’d get started on making Java Grinder work with the Atari by expanding on the C64 work done by [Joe Davisson]. Together, they brought Java to the Atari 2600 and made a game along the way.

According to [Michael], parts of the project were easy, as some Java routines compile down into as little as 1 or 2 instructions on the 6502. Other parts were harder, like dealing with the graphics subsystem, and modifying Java Grinder to output 8-bit bytecode to fit into the Atari’s tiny 4K ROM limit. Even with this tweak, they still couldn’t fit in a game and title screen. In the end they relied on bank switching to get the job done. [Joe]’s game is pretty solid fare for the Atari 2600 — blocky graphics and bleepy sounds — and they’ve uploaded it to the page so you can try it yourself in an emulator.

At the end of the day, porting Java code to a system with 128 bytes of RAM probably isn’t going to be particularly useful. However, as a coding exercise and learning experience, there’s a lot of value here in terms of building your skills as a coder. Other such experiments have shown us Java running on other unexpected devices, like the Sega Genesis or the MSP430. Video after the break.

Continue reading “Atari Now Runs Java, Thankfully Doesn’t Require Constant Updates”

Gravity Simulations With An FPGA

Gravity can be a difficult thing to simulate effectively on a traditional CPU. The amount of calculation required increases exponentially with the number of particles in the simulation. This is an application perfect for parallel processing.

For their final project in ECE5760 at Cornell, [Mark Eiding] and [Brian Curless] decided to use an FPGA to rapidly process gravitational calculations. This allows them to simulate a thousand particles at up to 10 frames per second. With every particle having an attraction to every other, this works out to an astonishing 1 million inverse-square calculations per frame!

The team used an Altera DE2-115 development board to build the project. General operation is run by a Nios II processor, which handles the VGA display, loads initial conditions and controls memory. The FPGA is used as an accelerator for the gravity calculations, and lends the additional benefit of requiring less memory access operations as it runs all operations in parallel.

This project is a great example of how FPGAs can be used to create serious processing muscle for massively parallel tasks. Check out this great article on sorting with FPGAs that delves deeper into the subject. Video after the break.

Continue reading “Gravity Simulations With An FPGA”

A Singing Arc Lighter

We’ve all been guilty of buying things we want, but don’t need. And that’s how [PodeCoet] found himself in possession of a couple of double-arc electric lighters, thanks to those far-eastern websites purveying cheap goods. ‘Tis the season of giving after all, justified [PodeCoet]. Being a hacker, the obvious thing to do was to make them belt out tinny tunes. If you’re still holding on to your gas lighters, don’t — because these electric ones are ‘oh so hackable’. Dual-arcs are the same, but twice the fun.

[PodeCoet] starts off with a tear down of the lighter, to figure out the schematic and understand how it works. There’s a charger IC for the LiPo, an unidentifiable micro-controller, a pair of FET’s driving a pair of power transistors, which in turn drive the HF output transformer at around 15.6kHz. He guesses that the “original micro-controller is probably an OTP part like a 12C508” but in the absence of a chipID he couldn’t be sure.

Instead of trying to break his head over it, he just swapped in a pin-compatible PIC12F1840. All that’s left to do is to write some quick-n-dirty code and sprinkle it with funny comments in order to modulate the output signal at audio frequencies. His first choice of tune was “We are Number One” by Lazy Town, the Icelandic educational musical comedy children’s television series (phew). But redditors are awesome, and someone asked him to add the “Imperial March” and [PodeCoet] obliged.

Since he was going to gift these lighters, the sneaky hacker added a prank in the code. Every time the button is pressed for more than two seconds, it works as normally expected and a counter is incremented. On the 20th count, and for one time only, the tune is played. No amount of pressing the button will play the tune again, confounding the user to wonder if he was hallucinating. This also helps ensure the lighter does not self-destruct prematurely, since the output transformer is likely designed for low duty cycles. His blog post contains all of the information needed to do this hack along with handy tips to avoid the problems he faced. A “Happy Birthday” tune would be great when lighting some birthday candles, we think.

[PodeCoet] has a fancy for high voltage stuff – check out “Home built Stun Baton turns you into a cop from Demolition Man“. This man surely loves his pranks, as evidenced by “Hacking your Co-Workers Label Makers“. And the farce is strong in this one — “Student trolls anti-Arduino Prof with parasite MCU“.

Continue reading “A Singing Arc Lighter”

OWL Insecure Internet Of Energy Monitors

[Chet] bought an electricity monitor from OWL, specifically because it was open and easy to hack on at him within the confines of his home network. Yay! Unfortunately, it also appears to be easy to hack read outside of his home network too, due to what appears to be extraordinarily sloppy security practices.

The short version of the security vulnerability is that the OWL energy monitors seem to be sending out their data to servers at OWL, and this data is then accessible over plain HTTP (not HTTPS) and with the following API: http://beta.owlintuition.com/api/electricity/history_overview.php?user=&nowl=&clientdate=. Not so bad, right? They are requiring username and password, plus the ID number of the device. Maybe someone could intercept your request and read your meter remotely, because it’s not encrypting the transaction?

Nope. Much worse. [Chet] discovered that the username and password fields appear not to be checked, and the ID number is the device’s MAC address which makes is very easy to guess at other device IDs. [Chet] tried 256 MACs out, and got 122 responses with valid data. Oh my!

Take this as a friendly reminder and a cautionary tale. If you’re running any IoT devices, it’s probably worth listening to what they’re saying and noting to whom they’re saying it, because every time you send your data off to “the cloud” you’re trusting someone else to have done their homework. It is not a given that they will have.

Listen To The Globe

There was a time when electronic hackers (or hobbyist, enthusiasts, geeks, or whatever you want to be called) were better than average at geography. Probably because most of us listened to shortwave radio or even transmitted with ham radio gear. These days, if you try listening to shortwave, you have to be pretty patient. Unless you want to hear religious broadcasters or programming aimed at the third world, there’s not much broadcast traffic to listen to anymore

The reason, of course, is the Internet. But we’ve often thought that it isn’t quite the same. When you tuned in London on your homebrew regenerative receiver, you wanted to know where that voice was coming from, and you couldn’t help but learn more about the area and the people who live there. Tune into a BBC live stream on the Internet, and it might as well be any other stream or podcast from anywhere in the world.

The New Shortwave

Maybe we need to turn kids on to Radio Garden. Superficially, it isn’t a big deal. Another catalog of streaming radio stations. You can find plenty of those around. But Radio Garden has an amazing interface (and a few other unique features). That interface is a globe. You can see dots everywhere there’s a broadcast station and with a click, you are listening to that station. The static and tuning noises are a nice touch.

Continue reading “Listen To The Globe”

Retrocomputing For $4 With A Z80

Sure, you’d like to get in on all the retrocomputing action you read about on Hackaday. But that takes a lot of money to buy vintage hardware, right? Sure, you can build your own, but who has time for a big major project? [Just4Fun] has a Hackaday.io project that disproves those two myths and gives you no more excuses. His retrocomputer? A 4MHz Z80 that can run BASIC with 64K of RAM, all built on a breadboard with 4 ICs. The cost? About $4.

Of course, that’s with some power shopping on eBay and assuming you have the usual stuff like breadboards, wire, small components, and a power supply. While it will gall the anti-Arduino crowd, [Just4Fun] uses an Arduino (well, an ATmega32A with the Arduino bootloader) to stand in for a host of Z80 peripheral devices. You can see a video of the device below, and there are more on the Hackaday.io project page.

Continue reading “Retrocomputing For $4 With A Z80”

Comfort Thermometer With Impressive LED Display

A frequent early project for someone learning to use a microcontroller such as an Arduino board involves hooking up a temperature sensor and an LCD display to make a digital thermometer. Not many components are involved, but it provides a handy practical introduction to interfacing peripherals. Once you’ve passed that step in your tech education, do you ever return to thermometers? Probably not, after all what can you add to a thermometer but a sensor and a display?

Perhaps if you have asked yourself that question you might be interested in [Richard Stevens]’s thermometer project, as he refers to it, a Comfort Thermometer Display. It takes the form of an Ikea Ribba frame inset with 517 LEDs arranged as a central set of seven segment displays, a ring of bar graphs, and an outer ring of RGB LEDs. Behind the scenes is a mass of cabling, and four shaped pieces of stripboard to fit the area around the LEDs. The display cycles through readings for temperature, heat index, and humidity.

Powering it all are a brace of microcontrollers: an ATMega328 for the 7-segments and a range of PICs controlling the bar graphs and RGB LEDs. Another PIC handles RF communication with the sensors, which are housed in a remote box. We’ve embedded the video of the device in operation below the break, and we’re sure you’ll agree it’s an impressive piece of work.

Continue reading “Comfort Thermometer With Impressive LED Display”