Emuforums.com

Go Back   Emuforums.com > Forum & Emulation News Discussion > Emulation News Submissions
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read

WON'T YOU JOIN US?
You are not a registered member and
are viewing this site as a guest.
Registration is simple and FREE.
Join this CrowdGather community today.
Registration offers the following perks:

» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging

join

Closed Thread
 
Thread Tools Display Modes
Old May 18th, 2006, 22:03   #1
SirSanjiyan
Registered User
 
Join Date: May 2006
Location: SF Bay Area, CA
Posts: 6
Thumbs up Report from JavaOne: High Performance: Writing a Sony PlayStation Emulator in Java

Matt Howitt and Graham Sanderson of Lombardi Software presented a new PSX emulator written entirely in Java named JPSX and covered some of the technical challenges that came up in writing the emulator. The project will eventually go open-source and the author announced that JPSX's object-oriented development approach supports different modules to extend the capabilities of the emulator. (Hardware acceleration via OpenGL was brought up at the following Q&A session, and the author acknowledged that implementations of the graphics engine in Java3D or other 3D Java-written APIs would help offset the load of emulation from the CPU; it currently implements software only based rendering).

This is one mean product of coding. I am willing to post the slides from the presentation later on for other developers to muse over once the program is open-sourced. Unfortunetely, there are no screenshots to present, but I can say that I saw four instances of this emulator running smoothly simultaneously on a Windows XP machine and at least two on a Mac.

It should be noted that this emulator is not a Lombardi Software product; as I understand it, Matt Howitt wrote this in his spare time and it is entirely his own work.

Here is the text from the presentation's abstract:

Session Title: "High Performance: Writing a Sony PlayStation Emulator in Java™ Technology"

<snip>
A PlayStation emulator requires lightning-fast 2-D and 3-D graphics (up to 60 fps), accurate timing, multichannel sound, and streaming video. This case study explores some of the challenges, solutions, and lessons learned while implementing a full-speed PlayStation emulator in pure Java™ technology.

Topics to be covered include:

- Marrying object orientation and speed
- Cool Java technology-based stuff, such as NIO and VolatileImage
- Taking full advantage of optimizations in Java technology's native compiler
- Cross-platform issues
- Java technology-based bytecode generation
- Cool emulator stuff, such as a runtime-profiling-based optimizing R3000 to bytecode compiler

Many of the strategies covered are applicable to mainstream Java technology-based applications, not just Java technology-based games.

Note: This talk does not contain specific technical details of the PlayStation software or hardware.
</snip>

I am looking for more information on where the authors will provide more information on JPSX...they said that the additional info would be found somewhere on the JavaOne website.
SirSanjiyan is offline  

Advertisement [Remove Advertisement]
Old May 19th, 2006, 10:21   #2
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
should be interesting to see how well it performs. altho i spose it depends how far they go with it, they might just make a Playstation interpreter, altho they are talking about it needing lots of speed, so they may work on a recompiler for it.

be interesting to see how it performs against the PSX emu giants such as ePSXe, PSXeven, AdriPSX and PCSX :P
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline  
Old May 19th, 2006, 11:05   #3
StateS
Registered User
 
Join Date: Aug 2002
Posts: 46
isn't java painfully slow though? making a psx emu in java that will run at speed will be like impossible won't it? I mean, I have used programs made in java (like Azureus) and they are slow as hell... But then again, I would love to see how that emu performs on my PC
StateS is offline  
Old May 19th, 2006, 11:07   #4
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Azureus is slow cos the java console stuff is slow, the language itself isnt greatly slower than C
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline  
Old May 19th, 2006, 16:28   #5
Kurbster
Administrator
 
Join Date: Mar 2002
Location: Massachusetts, USA
Posts: 9,439
I thought java was slow because of the Virtual Machine....

no matter, I'm interested in seeing how they pulled this off using an object-oriented language, being a java programmer myself :3
__________________



Kurbster is offline  
Old May 19th, 2006, 17:10   #6
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Quote:
Originally Posted by Kirby
I thought java was slow because of the Virtual Machine....
yeh thats what i meant, i couldnt remember the name for it haha
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline  
Old May 19th, 2006, 17:33   #7
cyclonmaster
EmuAddict-_-;;
 
cyclonmaster's Avatar
 
Join Date: Apr 2005
Location: Sarawak, Malaysia
Posts: 2,736
Wow... I respect the author, he take the challenge. Good Luck.
__________________

Win XP SP3 | Monitor BenQ FP 91G+|Intel Core i3-530 2.93GHz | GA-P55-USB3L - GIGABYTE | Albatron 6600GT 128MB PCI-E | Corsairs 2GB DDR3

Laptop Lenovo z460 : Win XP SP3 | Intel Core i5-460M(2.8GHz) | NVidia G310M CUDA DDR3 1GB | 2GB DDR3 Memory | 500GB HDD SATA | 14.1 WXGA LED Display


Please Answer This Survey. Thank You.
cyclonmaster is offline  
Old May 19th, 2006, 23:56   #8
StateS
Registered User
 
Join Date: Aug 2002
Posts: 46
anyone wanna give that guy some competition? :P jk I'm still strugling with c myself... damn raza fraza pointers... imagine this though: I had 3 months to learn C... (I'm in college btw) I got lost when it came to pointers and I just gave up for like 2 and a half months, and now I'm studying C so I can try to get a good grade on my exam... which is on tuesday. I heard that the last subject we studied was trees, I still have Strings, pointers, fifos, files, bit manipulation, macros and modules to tackle... yeah... I'm such a dumbass... But I MUST SUCCEED! :P
StateS is offline  
Old May 19th, 2006, 23:57   #9
SirSanjiyan
Registered User
 
Join Date: May 2006
Location: SF Bay Area, CA
Posts: 6
Quote:
I thought java was slow because of the Virtual Machine....

no matter, I'm interested in seeing how they pulled this off using an object-oriented language, being a java programmer myself :3
Java can be slow if the Java code has to be interpreted on the fly. Remember that running Java code is a two step process. First, the source files are compiled into bytecodes; those are the the *.class files that the javac compiler produces.

The second step varies. If the bytecodes are interpreted, yes Java can be slow because each individual bytecode is interpreted on the fly. The other way bytecodes can be processed is throught the JIT compiler. Bytecodes used this way are compiled into machine code; this is where Java can reach speeds comparable to other compiled languages. Since most of the compilation time is spent compiling source into bytecodes, the compilation from bytecodes to machine code is very small.

Quote:
should be interesting to see how well it performs. altho i spose it depends how far they go with it, they might just make a Playstation interpreter, altho they are talking about it needing lots of speed, so they may work on a recompiler for it.

be interesting to see how it performs against the PSX emu giants such as ePSXe, PSXeven, AdriPSX and PCSX :P
I was there. It was a thing of beauty (for a software based renderer), although there was yet any kind of configuration interface or anything. It should be relatively simple to write the code to setup input plugins, tho. As mentioned previously, the architecture allows plugins to be written for it (as other versions of the *.class or *.jar files, I imagine), so if someone can write one using Java3D or another 3D graphics Java API, we'd be in heaven.

There was a limited selection of games chosen (Crash Bandicoot, Wipeout XL, and Oddworld), but it was amazing to see them all run at full speed AT THE SAME TIME. I don't know what hardware the test system was running, but it was clearly a Windows XP machine.

Incidentally, it turns out the presentation slides are available at the JavaOne website, so I'm leaving instructions here on how to get them. Sorry, still no screenshots or videos. You'll have to ask around.

Instructions for getting presentation slides.

- Go to the JavaOne website. (hxxp://java.sun.com/javaone/sf/index.jsp,
replace the "hxxp" with "http")
- Click on the link that says "New for 2006 - Download Presentation PDFs Now"
- You should get a webpage that says "Content Catalog Viewer"
- Click Start Search and wait for the search results
- Note the username and password at the top of the search results.
- Search the webpage for the word "PlayStation"
- Click the paperclip icon on the left to download the slides (Adobe PDF format); you will need to enter a username and password, they should be the ones given at the top of the search results.

It's pretty deep and even with the author there, it was mad code. A true Java Master will be able to understand it fully, but it was still intriguing.

Quote:
but I can say that I saw four instances of this emulator running smoothly simultaneously on a Windows XP machine and at least two on a Mac.
I correct myself, three instance of JPSX were running at the same time. I'm not sure about the Mac, although I'm almost certain more than one was running on it.

Last edited by SirSanjiyan; May 20th, 2006 at 00:11..
SirSanjiyan is offline  
Old May 20th, 2006, 17:34   #10
Qwin
 
Qwin's Avatar
 
Join Date: Dec 2005
Location: Netherlands
Posts: 643
i saw it its great i hope they go open source soon
__________________
yooooo cool cool ..... no realy .... cooool!!!!!!
click here for pcsx2 1.0 beta works full speed
Qwin is offline  
Old May 22nd, 2006, 01:37   #11
grahams
graham sanderson
 
Join Date: May 2006
Location: austin
Posts: 20
Jpsx

Hey, this is Graham the author of JPSX...

Sadly my JPSX website has taken a bit of a back seat to the actual development thus far; I'll try and get something up there this week, some JavaOne photos and some screenshots.

I'll put a bunch of info up about writing plugins too, since the concept is a little different from the C emulators; basically anything is replacable, and you can put the interfaces wherever you like; Most things can be replaced without changing any existing code, and whilst there isn't a config GUI right now, you can configure stuff in XML.

I'll post the link to the website once it is up.
grahams is offline  
Old May 22nd, 2006, 09:53   #12
StateS
Registered User
 
Join Date: Aug 2002
Posts: 46
could you post some screenshots here in the forums for all to admire, y'know admire as in: ooooooooo or aaaaaaaaaaah :P I would really like to see some screens of this thing running, I'm a real emulation enthusiast, I love all things related to Emulation
StateS is offline  
Old May 22nd, 2006, 10:25   #13
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Quote:
Originally Posted by grahams
Hey, this is Graham the author of JPSX...

Sadly my JPSX website has taken a bit of a back seat to the actual development thus far; I'll try and get something up there this week, some JavaOne photos and some screenshots.

I'll put a bunch of info up about writing plugins too, since the concept is a little different from the C emulators; basically anything is replacable, and you can put the interfaces wherever you like; Most things can be replaced without changing any existing code, and whilst there isn't a config GUI right now, you can configure stuff in XML.

I'll post the link to the website once it is up.
hey Graham, best of luck with the emulator, it will definately be an interesting one to see! i know your journey ahead isnt going to be an easy one, sony dont make the simplest of systems and i realise there isnt a great deal of PS1 documentation, but persevere with it an im sure you will make it in the end
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline  
Old May 25th, 2006, 16:52   #14
jeng28
Registered User
 
Join Date: Apr 2006
Location: Vacation.
Posts: 38
Quote:
Originally Posted by StateS
isn't java painfully slow though? making a psx emu in java that will run at speed will be like impossible won't it? I mean, I have used programs made in java (like Azureus) and they are slow as hell... But then again, I would love to see how that emu performs on my PC
Not really States. Java is very slow because it has to run under other OS environment. As i 'used to be' Java programmer, You can maximize speed of the application by optimizing source code. However, Java under XP box is the problem. If there are JavaOS, it might be something.

Back to the topic, i'm really looking forward to this emulator's release. It may motivate java programmer to move into emulation world. Hope it happens.
jeng28 is offline  
Old May 26th, 2006, 12:03   #15
ahoge
Registered User
 
Join Date: May 2006
Location: here and there
Posts: 1
>I thought java was slow because of the Virtual Machine...

Using a VM means several things. There is a startup time (short command line programs for example will be damn slow in comparison for that reason), there is some memory overhead (about 8mb) and it handles memory itself, which means that there is usually some ram lying around for future use.

Java used to be damn slow, but thats many years ago. Since 1.2 there is JIT (just-in-time compilation... thats "hotspot" nowadays) and it became faster which each release. With 1.6 there was a surprisingly big performance jump (too bad that it isnt really out yet).

Most swing apps feel sorta slow, because lazy inits are used all over the place, which makes everything a tad unresponsive. However, most gtk apps seem to behave worse than that.

Oh and applets... they also make look java rather bad. Most of em are 1.0/1.1 compatible and do silly things, which prevent hardware acceleration (still faster than flash tho). And then there is the vm startup, which totally lags the browser. Heh.

So yea, there are surely a few things which make java look slow and there is still that leftover prejudice from the interpreted days.

Java (or managed languages in general) isnt the one size fits all super hammer, but its pretty good for a broad selection of applications (emulation hasnt been a part of that so far). I mean sure it would be nice to have everything written in asm hardcore optimized for this cpu, but that isnt really realistic. You always need to find a good trade-off between performance and development time/maintainability/security.

My favorite example for java's being-good-enough-ness is oddlabs' game tribal trouble. It even works just fine on a 500mhz machine with a gf2mx
ahoge is offline  
Old May 26th, 2006, 21:16   #16
SirSanjiyan
Registered User
 
Join Date: May 2006
Location: SF Bay Area, CA
Posts: 6
Quote:
Java (or managed languages in general) isnt the one size fits all super hammer, but its pretty good for a broad selection of applications (emulation hasnt been a part of that so far). I mean sure it would be nice to have everything written in asm hardcore optimized for this cpu, but that isnt really realistic. You always need to find a good trade-off between performance and development time/maintainability/security.
Most compiled languages nowadays have very few instances where coding in asm would make a significant difference in runtime; compilers usually spit out the best code you could get. Most places where asm might fit nowadays is just trying to make up for slowness that could have been corrected in source code (i.e. insert sort vs. merge/quicksort, as a simplified example)

Not to say that asm has a lack of value; I know there are places in some code where it would be appropiate, but I haven't really come across it yet...and I bet it tends to get very machine specific beyond the simple asm code...
SirSanjiyan is offline  
Old July 30th, 2006, 16:44   #17
Shin_Gouki
Registered User
 
Shin_Gouki's Avatar
 
Join Date: Jan 2003
Location: Europe / Germany
Posts: 902
Hello everybody!

I googled a bit and found the pdf-doc from the report:
http://developers.sun.com/learning/j...ff/TS-5547.pdf
(quite boring for itself, altough topics are damn cool)
But on suns-site i even founnd this:
a audio-broadcast from the report.
There u get all the pdf infos AND the author of "jPSX" explains his concepts & aims.

-->
http://developers.sun.com/learning/j...547/index.html

All u need is an "java-dev" account. -> just put an valid email with password . U dont even need to approve, just login with ur email & password.

I think its time to rethink which lange u "have" to choose when writing an emulator :O
(Although the concepts u have to understand require quite a lot of knowlede->multi thread aproach, byte code generater, binary trees a.s.o...)

man i knew java rocks, but its really "moving" forward, i guess :O
--> BTW: i didn't heard anything about "Cross-Plattform" Issues? (1st post) did i miss something??
wbr Shin Gouki

Last edited by Shin_Gouki; July 30th, 2006 at 21:10..
Shin_Gouki is offline  
Old October 9th, 2006, 23:19   #18
SirSanjiyan
Registered User
 
Join Date: May 2006
Location: SF Bay Area, CA
Posts: 6
The source code will appearently be available via subversion, as JPSX now has a project page on Google Code. Nothing is up yet, but that will hopefuly change.

Must be hard having a full time position to put some time into it; though I thought he would have gotten around to it sooner (the ultimate hoot: what it comes out AFTER next year's JavaOne?)
SirSanjiyan is offline  
Old October 9th, 2006, 23:45   #19
Chrono Archangel
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 8,090
thanks for the heads up SirSanjiyan. I know alot of poeple are interested in this project.
Chrono Archangel is offline  
Old October 10th, 2006, 16:33   #20
Shin_Gouki
Registered User
 
Shin_Gouki's Avatar
 
Join Date: Jan 2003
Location: Europe / Germany
Posts: 902
hey wow, nice for keeping us informed!
its blank but still there it is:
http://code.google.com/p/jpsx/
can u say when it was created?

IMO this thread should be moved to the Programming Forum, because i think it will get into that direction.
wbr Shin Gouki

Last edited by Shin_Gouki; October 10th, 2006 at 17:38..
Shin_Gouki is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 07:16.

© 2006 - 2012 Emu Forums | About Emu Forums | Advertisers | Investors | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.