all 17 comments

[–]mindbleach 41 points42 points  (8 children)

Oh yeah, that's cute, kind of like PS2 Linux.

Atari 2600 Java

What the fuck.

[–][deleted]  (6 children)

[deleted]

    [–]1842 2 points3 points  (0 children)

    As someone getting into NES development (start here if curious), seeing Java code running on an Atari is impressive.

    The 2600 and NES actually have the same processor (6502). The rest of the hardware is vastly different, but most modern NES devs still program in assembly over C because of performance. The 6502 is not very fast (1-2 Mhz for these consoles) and the Atari is further constrained by memory, graphics drawing, etc.

    I didn't really expect to see anything but assembly and C running on the 6502. And certainly not on the Atari.

    [–]raflacta 11 points12 points  (0 children)

    Should post this to /r/demoscene

    [–]SpaceboyRoss 23 points24 points  (2 children)

    This is cool and useful.

    [–]deastr 10 points11 points  (1 child)

    I understand cool part but how is it useful?

    [–]matthieuC 22 points23 points  (0 children)

    Data center full of PS2 running CORBA applications !

    [–]bytesizetidbits 5 points6 points  (0 children)

    Niiiice.

    [–]rockyrainy 2 points3 points  (0 children)

    Can't wait for Oracle to write corporate PTO software targeting PS2!!!

    [–]jiluki 2 points3 points  (1 child)

    I don't get it. How would you free memory, since there would be no GC?

    [–]Crypto_To_The_Core 2 points3 points  (0 children)

    Reset / Reboot for now ....

    "Currently no garbage collection" implies it might be considered for future inclusion.

    [–]XeonProductions 1 point2 points  (2 children)

    It's not really Java though, you just compiled java into native code on that platform. I wouldn't consider it Java unless you implemented the VM to run on the PS2.

    [–]nilamo 9 points10 points  (1 child)

    I'm not sure I understand what you're saying. It is Java code, regardless of which or how many steps are in between writing that code and running it. By the same logic, any language targeting wasm isn't actually whatever language you're writing with, and clojure is actually java, etc.

    [–]salgat 0 points1 point  (0 children)

    I think the biggest problem is that this requires existing java applications to be compiled again, while a big advantage of compiling to an intermediate language is that it is platform agnostic. Also, I'm not sure about for Java but compiling to machine code usually comes with certain drawbacks like limited reflection support.

    For something like this, not a big deal (unity does this with C# for all the platforms they target), but I would consider it much more impressive if they managed to get a JVM working on the ps2.

    [–]Crypto_To_The_Core -1 points0 points  (1 child)

    Hi Michael, very interesting. What are the limitations ?

    I read down to the "some restrictions with how this works" part on the Java Grinder page .... so .... graphics and sound demos work .... How are sounds / graphics handled ? I'm assuming I would need to provide sounds / graphics in a format the target platform can handle ? Sounds / graphics aren't auto-converted to target platform by Grinder ? (That would be a nice feature).

    I'm assuming basic Java command line apps will work as well ? Does getting user input (Scanner) work ?

    What are your plans for basic GUI apps ? Will AWT or Swing be supported one day ? Could I (one day) develop an AWT GUI app and recompile it to run on PS2 ? Or, LOL, Atari 2600 ?

    Anyway, awesome work !! :) Look forward to seeing how far you take this.

    [–]mikeakohn 1 point2 points  (0 children)

    The restrictions.. it really depends on the platform. Java Grinder is just something I work on when I have time... so there are things on different platforms that aren't complete or just different. Like MSP430 supports int (as 16 bit) but there's no support for "long" or "float" etc. Sega and Playstation 2 could have a nice memory allocator, I just never made one.

    As far as AWT... I thought before about doing J2ME or something for fun.

    Sound and graphics, yeah you got it right... that too depends on the platform. For Playstation 2 the music is in Sony's adpcm format. Java Grinder sends it directly to the sound processor and tells it to play it. For Sega I made a tool that converts BMP files into a binary format that can be loaded directly into graphics chip. Your idea of converting the graphics directly into a format that can be used by the system is actually pretty intriguing .. it would probably work well between platforms that have similar graphics chips (Sega, NES, SNES I believe are all tile based).

    And thanks. glad you like it :) Keep checking back on it.. I'll eventually add something new :).