Hi all,
There have been a few discussions here (and elsewhere) about Java on the DC. Of course, PW3 has java applet support. Yet, I have not found any reviews/discussions of that JVM. So, I spent some time this weekend exercising PW3's jvm. Here are my impressions: Good, Bad and Ugly.
Good - It is a functional JVM on the DC. In itself, that is pretty amazing! And it works, just about as good as one could expect an obscure JVM to run. I put it through the paces and it passed on everything: threads, network calls (back to server of origin), GUI (awt), drawing primitives ( lines, pixels, etc). In short, this JVM is quite well done. There are a few classloading bugs that sometimes appear when the page is reloading, but other than that it is fairly complete. Does anyone know how/where planet web acquired this jvm? Did they port it themselves (which would have been a large endevour, I imagine).
Ugly - It is Java 1.1.8, which was old even in 2001. Likely, few applets at the time of its release would have worked on PW3 because most applets would have been targeted at least java 1.2. So, this JVM was likely dead in the water before it was released. I never owned PW3 at the time of its release, so I can't say for sure how it was experienced at that time. And, speaking of ugly, that PW mouse cursor is so big and nasty looking.
Developing for this JVM requires sticking to the Java 1.1.8 APIs (documentation found here Java 1.1.8. When compiling, make sure to target 1.1 (add [-target 1.1] to your compile command).
Bad - This is an implementation of Personal Java, which is a jvm intended for devices with lower resources, so it is pretty slow. I imagine that this JVM does not do any JIT, but simply runs an interpreter. Also, Java 1.1.8 is missing many of the graphics libraries of later editions. For example, Java 1.2 introduced a new powerful graphics library, which can't be used in this version.
Could this be used to create a game? Yes, without a doubt. However, the game would need to be graphically pretty simple. I think it could handle point and click adventure games (like Monkey Island) or even a game like Silver (with pre-rendered backgrounds and a few simple small flat shaded models). It can handle software 3D rendering, but it is pretty slow.
To test this, I programmed up a simple flat shaded 3d applet that can load models in the obj file format. It chokes pretty bad once the number of polygons increases, but it was a fun little project to test the JVM. If you want to see it running, load up PW3 and go to http://www.dreamcast-java.com, and click on the 3d cubes link. It will not work in modern browsers that do not have applet support, which is a fun edge-case where the DC can view content when modern browsers can't. I could probably get the frame rate better, but will likely leave the project where it is and move on to learning about DC homebrew-ing.
Cheers!
-AdamARM
PW3 browser. Java Virtual Machine - impressions
Forum rules
Please check the other forums in the Dreamcast section before posting here to see if your topic would fit better in those categories. Example: A new game/homebrew release would go in the New Releases/Homebrew/Emulation section: http://dreamcast-talk.com/forum/viewforum.php?f=5 or if you're having an issue with getting your Dreamcast to work or a game to boot it would go in the Support section: http://dreamcast-talk.com/forum/viewforum.php?f=42
Please check the other forums in the Dreamcast section before posting here to see if your topic would fit better in those categories. Example: A new game/homebrew release would go in the New Releases/Homebrew/Emulation section: http://dreamcast-talk.com/forum/viewforum.php?f=5 or if you're having an issue with getting your Dreamcast to work or a game to boot it would go in the Support section: http://dreamcast-talk.com/forum/viewforum.php?f=42
- AdamARM
- Developer
- Posts: 11
- Dreamcast Games you play Online: PSO, Q3A, PW3
- -drez01-
- Tank Jr.
- Posts: 352
- Dreamcast Games you play Online: Quake III Arena
- Location: Canada
Re: PW3 browser. Java Virtual Machine - impressions
This is very cool. Just checked it out and I have never even seen the java loading animation on DC let alone anything 3D. Awesome stuff. I also tried on 2.6 and just says java applet not supported. I like the 2.6 cursor more by far. Thanks for sharing!
- dark
- Shark Patrol
- Posts: 2086
Re: PW3 browser. Java Virtual Machine - impressions
Cool, I remember wondering if the java on PW3 would be capable of running any of the java games that were on newgrounds in the early 00s. Sounds like the answer is probably no.
- AdamARM
- Developer
- Posts: 11
- Dreamcast Games you play Online: PSO, Q3A, PW3
Re: PW3 browser. Java Virtual Machine - impressions
dark wrote:Cool, I remember wondering if the java on PW3 would be capable of running any of the java games that were on newgrounds in the early 00s. Sounds like the answer is probably no.
Yes, probably few of them would have worked out of the box, as they would have targeted at least java1.2. They likely could have been "ported" down to an older version of Java, with some challenges (for example, Java2D does not work with 1.1).
Moreover some of the better applets in early 2000's used hardware acceleration(via the Java3D api, or via JOGL java opengl bindings). This allowed applets to get pretty close to "real" games, but very few applets used them(as it required signing the applet and the client needs to accept the dangers of the signed applets).
If the JVM in PW3 could be separated from the browser, then I imagine it would have bettter performance and liekly could be used with (a modified) JOGL binding to allow decent games on the DC. However, separating the PW JVM from the browser is currently above my pay-grade! But, I would like to help, if someone is interested in it!
- Anthony817
- Shark Patrol
- Posts: 4036
- Location: Fort Worth, Texas
Re: PW3 browser. Java Virtual Machine - impressions
Damn this is pretty cool stuff you have researched. I always wondered if the browser could do even primitive Java games and seeing the answer is yes warms my heart. I hope something comes form this, so many cool games would possibly become available to us if people could port them running on older Java to the DC as stand alone games. Probably never going to happen but eh.

- dark
- Shark Patrol
- Posts: 2086
Re: PW3 browser. Java Virtual Machine - impressions
What are some good early java games? I think more complicated stuff might start hitting the DC's limited ram.
- AdamARM
- Developer
- Posts: 11
- Dreamcast Games you play Online: PSO, Q3A, PW3
Re: PW3 browser. Java Virtual Machine - impressions
Probably the best candidates are the many J2ME games that were on pre-andriod and pre-ios phones. I never really played these games, but some of them are decent looking. I think the DC would have similar power to some of those phones, but the PW3 JVM is likely not nearly as optimized as the JVM on the J2ME phones. That being said, J2ME is a later version of Java then on PW3. But, I imagine similar games could be made.dark wrote:What are some good early java games? I think more complicated stuff might start hitting the DC's limited ram.
With regard to RAM, yes those 16 MB will be taken up very quickly, as Java bloats up memory. Moreover, in PW3 Java we only have access to main memory (not video or audio). Later versions of Java allowed closer access to video ram (via classes like VolatileImage), which takes some of the pressure off of main memory.
I would be super interested in developing a standalone java-DC game, if the JVM could be separated from the browser. As I mentioned before, doing this is above my current skill set. I can program Java in my sleep, but I don't know anything about the internals of the DC, its operating system, etc, etc.Anthony817 wrote:Damn this is pretty cool stuff you have researched. I always wondered if the browser could do even primitive Java games and seeing the answer is yes warms my heart. I hope something comes form this, so many cool games would possibly become available to us if people could port them running on older Java to the DC as stand alone games. Probably never going to happen but eh.
With regard to next steps, I plan on making a little "super-scalar" proof of concept, not a real game, just scaling some sprites past the screen with perspective. I am thinking perhaps a Galaxy Force 2 prototype. Galaxy force never got the love it should have (it should have been on the sega cd or 32x, but that is a topic for another day). If anyone else has another suggestion of a super-scaler prototype, I am open to suggestions

- -drez01-
- Tank Jr.
- Posts: 352
- Dreamcast Games you play Online: Quake III Arena
- Location: Canada
Re: PW3 browser. Java Virtual Machine - impressions
Separating the JVM from the browser would be a huge project. You would need a whole new loader. That's above my paygrade for sure. I could put your java files on disc so they could be loaded easily from the main menu no problem though. That's as standalone as I can do. Its a start anyways
- Ian Micheal
- Developer
- Posts: 6281
- Location: USA
- Contact:
Re: PW3 browser. Java Virtual Machine - impressions
https://sourceforge.net/projects/pspkvm ... p_redirect
https://sourceforge.net/projects/pspkvm ... E%29/v0.1/
Here is the java psp emulator there is src should be possible to port this to dreamcast
We also have linux ported to dreamcast which means a java port to that would be much easier and prolly run better then the browser
I have a vague memory some one had done this back in the past..
https://sourceforge.net/projects/pspkvm ... E%29/v0.1/
Here is the java psp emulator there is src should be possible to port this to dreamcast
We also have linux ported to dreamcast which means a java port to that would be much easier and prolly run better then the browser
I have a vague memory some one had done this back in the past..
-
- Similar Topics
- Replies
- Views
- Last post
-
- 2 Replies
- 24066 Views
-
Last post by Scrivani
-
- 1 Replies
- 2915 Views
-
Last post by Sennar83
-
- 0 Replies
- 1249 Views
-
Last post by Spadon
-
- 1 Replies
- 1211 Views
-
Last post by radicaledward101
-
- 9 Replies
- 4465 Views
-
Last post by Xerxes3rd