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”
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”