Java on Playstation 3

Ok, for now Java is second-class citizen in Playstation 3. It does exist somehow in bluray dics. But not available as an applet plugin in web browser. Adobe Flash plugin is implemented, so thats +1p for Flash programmers.

But do we have hope using OtherOS wagon?
http://www.powerdeveloper.org/playstation.php
http://www.powerdeveloper.org/news.php?id=271
http://java.sun.com/j2se/embedded/

What we know so far, 3D gfx card cannot be accessed from the OtherOS side. Lets see if Sony ever opens it up because it will expand 100% indie games where Sony might not get any revenues. But a normal non-hardware accelerated doublebuffered framebuffer is available.

OK, first Linux (Fedora 5) installed on retail PS3.

http://www.ps3forums.com/showthread.php?t=40417&page=4

Unfortunatelly, no RSX (NVidia card in PS3, reality synthesizer ;D ) exposed to guest OS for now (and maybe forever), and just cca 200MB of RAM.

But, it seems that PPC software “just works” on PS3. Sooooo, any Linux PPC Java’s around? (I know just Blackdown, I think last Linux PPC release was 1.3.1)

You know, with this whole OpenJDK thing and a complete source available OS/Java stack, independent developer game usable Java (whew-whata-mouthful) on the PS3 is starting to look possible…

Well, Java will get to the PS3 sooner or later (someone has to make newer port to PPC than 1.3.1 currently available). Sony hiding RSX from guest OSses and leaving them just 200 MB of RAM could be a bit problematic for gaming :slight_smile: I don’t know if Mesa (software OpenGL) could be adapted to use SPE’s. Have seen some pretty impressive demos of Cell doing raycasting realtime, though.

Ups, was I wrong (missed the obvious) :slight_smile: We are closer than I thought. IBM has Java for Linux PPC! 5.0 for production, 6.0 in early access program.

Now I just have to persuade someone to download it on Linux enabled PS3.

The new PS3 has the Java Powered Logo on the box with all of the other logos. (My wife bought my son one. Will not open until Christmas.) I feel like that is a little misleading since it will not run Java-based applications, or am I wrong?

Jeff

Well, its part of the blu-ray spec. For the most part some slow interpreted implementation is used, which can be used for some menu stuff… but thats about it.

There are some players with fast implementations, but there are only a few stand alone blu-ray players like that.

See this thread for further information:
http://www.java-gaming.org/forums/index.php?topic=14971.0

I understand, but to say it’s “Java Powered” implies (at least to me) that the user can run Java-based applications on it. But I can see your point. Thanks!

It looks like the way to get Java on the PS3 is via Linux and IBM.

Quite a few people seem to have got Yellow Dog Linux (YDL) working on the PS3. There’s an article about it at:
http://ps3.qj.net/PS3-Linux-The-void-has-been-filled-Full-install-instructions-for-Fedora-Core-5-/pg/49/aid/73144

It’s the Fedora Core 5 PPC image.

The next step, which no one seems to have done yet, is to install IBM’s Java for the PPC (found at http://www-128.ibm.com/developerworks/java/jdk/linux/download.html
).

There’s been several posts about trying it at the PS3Forums (http://www.ps3forums.com/), for example in the thread http://www.ps3forums.com/showthread.php?t=47492&highlight=java (you may need to register to read it).

  • Andrew

Oops, I forgot a bit of info.

At the IBM download site, the PPC version is J2SE5.0 SR3 for 64bit pSeries.

Unfortunately Linux on ps3 isn’t really that exciting from a games POV - it doesn’t have access to all the memory, and the graphics card is totally locked out which means it’s software rendering all the way. You could use Mesa, but that’d run pretty slow on the ppu. About the only viable approach would be to write a software renderer that ran on the spus, but that’d be big and complicated and I don’t see anyone doing that any time soon.

I don’t know about the speed issue.

There’s a lengthy thread about linux speed at the ps3forums http://www.ps3forums.com/showthread.php?t=45261&highlight=linux+speed, which starts out with a posting that linux runs like its on a Pentium III, with no access to the RSX and only 256 MB RAM. This triggers a lot of counterclaims (as usual).

I’d like to see someone actually try using Java first, before deciding it’s too slow to be worthwhile.

There’s a very nice article at the IBM developers site on how to install Yellow Dog Linux on the PS3, and get started programming the Cell BE (http://www-128.ibm.com/developerworks/power/library/pa-linuxps3-1/). The coding is in C unfortunately :).

An article about installing Gentoo Linux on the PS3:
http://ps3.qj.net/Gentoo-Linux-on-your-PS3-With-full-install-instructions-/pg/49/aid/78739

http://www.ps3forums.com/showthread.php?t=61761

[quote]For the arcades inside Home, Sony had originally planned to have them be Java-based.
[/quote]
Now that’s interesting a bit of information. But then it never landed to a reality. Maybe they did not have a solid JVM implementation for ps3 in time.

Playstation Home is ps3 virtual world, much like The Second Life. But it seems all in-home mini games are all C++ games within the game engine itself. This does not mean it never can run Java, but may take a long time to see it happen. This would have been a great opportunity if Java had provided a more simple minigame framework.

OK, to cut all the crap, went out and bought a fricking PS3 :smiley:

YDL is on, and Java is not so hard to put on it. Downloaded it from IBM’s site, 5.0 SR4 for PPC arch. Had just one small dependency problem.

Do not download 64bit PPC SR4 Java, because it wont work out of the box; YDL is mostly 32bit, so there are many unresolved depenencies. That can be fixed with a bit of work and access to Fedora5 repository.

Java works fine for regular Swing/Java2d apps. A bit slow to start (I’ll have to check a bit how IBM’s VM’s work, there has to be some AOP in those), but when it is up, it actually looks pretty fast and snappy.

There are some problems. There’s no access to RSX yet (Terrasoft guys are organizing a petition for Sony to open it up). And, somehow, I cannot get a sound to work from IBM’s VM. Other than that, write once, run anywhere :smiley:

On RSX front, maybe it wont be needed, it seems that terrasoft guys ported MESA in 4 days on available SPE’s (6 of them are seen by Linux). The speed is something like 80 times faster than on some Intel machine. That piece of code I still can’t find, though.

Anything you guys would be interesting me to try on this machine? Yep, you won’t be able to do AAA title in Java on PS3 for now, but Princec stuff could work in not so distant future.

sounds great, at least it finally puts an end to the Java will never appear on ps3 argument.

Thanks to share this info selendic, that’s really interesting! It shows us some possibilities of Java on PS3. How can you measure the speed of Java by saying it’s 80 times faster than some intel machines? Have you written a benchmark program or reused one? And, which tools/IDE have you used? Also, I think it’s really hard to compare the cell architecture with Intel ones. They’re so different and the cell has more cores than any mainstream Intel to date.

No, sorry for misunderstanding. It is not Java that is 80 times faster (it is actually probably slower, because Cell PPC is in order processor, so 3.2Ghz it has is more like 1.6 Ghz of out of order processor). The guys from Terrasoft, providers of Yellow Dog Linux for PS3 (basically a Fedora5 clone, you actually can put more or less any PPC Linux on PS3) are claiming that they have ported MESA software OpenGL library to use 6 of Cell’s SPE’s (basically a vector processing units). So, THEY say that MESA software OpenGL runs 80 times faster with that port than on some Intel processor (forgot which one)

More good news, applets work inside Firefox1.5, just played that great X86 emulator and few classical games that they offer. JavaWS kind of works, got some stuff to work, but some is asking for particular Suns VM and fails.

Even more good news, JSE6.0 is on its way from IBM, I’ll apply today for testing the first builds available for testers.

All in all, this is all highly experimental and unoptimized. And great to see that it works out of the box. But, I really see no reason why, when full Java is OS, someone couldn’t do proper optimizing for cell proc, and why Sony couldn’t actually provide Java via firmware update in main PS3 OS (this setup is with Linux running as guest OS, which takes out some of available RAM)

So, Cas, when are you porting LWJGL 8)

JK