Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Java PSX emulator  (Read 14151 times)
0 Members and 1 Guest are viewing this topic.
Offline K.I.L.E.R

Senior Member




Java games rock!


« Posted 2006-05-26 11:05:17 »

http://forums.ngemu.com/emulation-news-submissions/72476-report-javaone-high-performance-writing-sony-playstation-emulator-java.html

 Shocked

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #1 - Posted 2006-05-26 12:40:51 »

Hmm, the link to the pdf does not exists any more or I am to dumb to find it :/

Anyway, cool thingy ^^
Offline g666

Junior Member





« Reply #2 - Posted 2006-05-28 11:09:46 »

Sounds impressive, cant seem to find much evidence tho.

desperately seeking sanity
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #3 - Posted 2006-05-30 21:33:47 »

http://www.flickr.com/photos/feria/149120535/

http://www.lombardisoftware.com/pr.php?pr=5-9-06

Pretty convincing evidence to me.
I'm guessing part of reasons why it's so fast is that they created a dynamic recompiling CPU core using the JVM (at least that's what they suggested in the articles). This is much easier to do in java than  in for example C as you can simply write bytecode and let HotSpot do the optimizing. This will achieve great performance gains compared to the traditional interpretting CPU emulator (comparable to running a java program in interpreted mode versus HotSpot).

Toby Reyelts once rewrote JEmu2's Z80 core to a 'dynarec' core, and he showed me that it's much easier than I anticipated. His first attempt was a static recompiler but this is close to impossible without any human intervention, but a dynarec core is very doable.

Offline Martin Strand

Junior Member





« Reply #4 - Posted 2006-05-31 02:41:02 »

erikd, do you have the source for that Z80 dynarec somewhere? I'd like to change my emu and see if I can make it work with dynarec, but I wouldn't know where to start. It all sounds pretty advanced, but it ought to be a lot simpler with Java than with C++.
Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #5 - Posted 2006-05-31 09:53:07 »

I'm not sure, it was on my previous PC so I hope I have a back up of it somewhere. There were some issues with it though, which is why it wasn't included in the JEmu2 distribution.
Toby has some blogs about the subject too at http://jroller.com/page/rreyelts/20041019.

The idea is to compile 'basic blocks' of code, which is a block of code ending with a branch or return. When the branch or return is encountered, it will write byte code for all instructions in the basic block, and the instruction of the 1st instruction in the original ROM is changed to a special instruction which is illegal for the original CPU, but a mark for the CPU emulator to call the generated java version of the block of code instead of going on to interpret.

The fun thing is, in java you can simply generated all byte codes for emulating the basic block of code, and let HotSpot do the optimizing. If you let HotSpot do it's job, you don't have to do the difficult things like dead code removal and such (and you can imagine that these translated basic blocks of code will have a *lot* of dead code, like unused flags).

I'll see if I can find the Z80 recompiling core.

Offline TheAnalogKid

JGO Coder


Projects: 3



« Reply #6 - Posted 2006-05-31 21:42:41 »

Just as a funny comment, maybe Nintendo should have developped the Wii emulators for NES, SNES and N64, etc. in Java! Maybe they would have benefited of all the major advantages discussed by erikd. I know, I know, dream on...  Roll Eyes

Online kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #7 - Posted 2006-05-31 22:02:10 »

Just as a funny comment, maybe Nintendo should have developped the Wii emulators for NES, SNES and N64, etc. in Java! Maybe they would have benefited of all the major advantages discussed by erikd. I know, I know, dream on...  Roll Eyes

how do you know they didnt'?  Grin
Offline TheAnalogKid

JGO Coder


Projects: 3



« Reply #8 - Posted 2006-05-31 22:32:17 »

Well , ask them then...  Grin

Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #9 - Posted 2006-06-01 01:44:38 »

Heh, a Wii is probably fast enough to emulate even an N64 using just interpreters so why bother?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #10 - Posted 2006-06-01 12:05:17 »

I am sure they have a hardware based VM or any other low level architecture. Can't image that they would use java for it.
Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #11 - Posted 2006-06-01 12:23:40 »

It's very likely they didn't use java, but I wouldn't know why they wouldn't go for software based emulators. To include 3 emulators in HW sounds very expensive to me.

Offline TheAnalogKid

JGO Coder


Projects: 3



« Reply #12 - Posted 2006-06-01 14:58:25 »

Quote
Heh, a Wii is probably fast enough to emulate even an N64 using just interpreters so why bother?

Yes, I know. It's just that Java would have been a good choice for emulating old Nintendo systems. It would have open the door for Java game dev.

Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #13 - Posted 2006-06-01 21:59:35 »

Hi Guys,

I actually attended the session at JavaOne where Lombardi talked through and demonstrated their PSX emulator. It was pretty cool stuff. I learned some nifty tricks I hadn't thought of - like using a custom ClassLoader to allow you to generate static references to code that doesn't exist yet (i.e. code that you have yet to dynamically recompile). I talked a little bit to the presenter afterwards, and he was a pretty cool guy. We talked some about skipping BCEL/ASM to generate bytecode binaries directly from templates.

Anyway, I'll look around and see if I can find that dynarec code. IIRC, there were a few bugs in it, but it was generating code correctly for Ms. Pac Man and Galaga.

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline jfelrod1960

Junior Member




Use the source Luke, use the source!!!


« Reply #14 - Posted 2006-06-01 23:01:13 »

Does anyone know how Sony feels about these emulators?  I'm just curious.  It seems like non-PS2 owners can buy Playstation 2 games and play them on their home computer.  Increasing even more sales for Sony and other publishers.

Jeff

Jeffrey F. Elrod
Complexsive Systems
Offline ChrisM

JGO Coder


Medals: 1
Projects: 1


END OF LINE.


« Reply #15 - Posted 2006-06-01 23:30:29 »

I can tell you that Sony doesn't like it.  Emulators are frowned upon by ALL game console manufacturers.

-Chris

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #16 - Posted 2006-06-02 05:48:18 »

As I understand it they basically lose money on the console itself but get all the profits from licensing the software... if you *buy* software without a console, then they are farther ahead... Smiley

I guess emulators are really just used to bypass copy protection...

Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #17 - Posted 2006-06-02 09:15:05 »

The Z80 dynarec code is here: http://www.gagaplay.com/jemu2/cpu.zip
I'm not sure if this was the latest version though.

Quote
I can tell you that Sony doesn't like it.  Emulators are frowned upon by ALL game console manufacturers.
Like swpalmer mentioned, this is probably because they are usually used for piracy. I guess they wouldn't mind a PSX emulator so much if it were only capable of running the original CD's especially since the PSX itself is not in production anymore.

The japanese company behind the MSX system, ASCII, released an official MSX emulator themselves a few years ago.
I guess if Sony did the same with PSX and rerelease the best PSX titles cheaply which would run on the emulator, they could still make a buck with an otherwise dead system.

Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #18 - Posted 2006-06-02 16:49:22 »

It's very likely they didn't use java, but I wouldn't know why they wouldn't go for software based emulators. To include 3 emulators in HW sounds very expensive to me.

Erikd, the Wii emulates even more than 3 old consoles. From the latest I read it will emulate NES, SNES, N64, Sega Genesis and Turbo Grafx. Don't know which system the last one is, never heard of it. GameCube games shall run on the hardware itself.
Offline ChrisM

JGO Coder


Medals: 1
Projects: 1


END OF LINE.


« Reply #19 - Posted 2006-06-02 17:29:11 »

[
Erikd, the Wii emulates even more than 3 old consoles. From the latest I read it will emulate NES, SNES, N64, Sega Genesis and Turbo Grafx. Don't know which system the last one is, never heard of it. GameCube games shall run on the hardware itself.

ED, you're KILLING me!  Turbo-Grafx 16 by NEC.  Specs blew Genesis out of the water but was too "Japanese" for the American market.  Games like Street Fighter found their first home on the TG-16, along with great characters like Bonk, Keith Courage and Dracula X.  Check out the information here:  http://www.atari7800.com/turbo/

-Chris

Offline TheAnalogKid

JGO Coder


Projects: 3



« Reply #20 - Posted 2006-06-02 18:46:46 »

I already owned a TG-16 and I can say that graphics were impressive at that time. But I should have bought a SNES or genesis since there were more interessting games. And ChrisM, do you remember a bit music in Keith Courage?  Smiley It was really a Japanese style and it wasn't really approriate for the type of game in my opinion. Probably because I'm of American culture.

Offline ChrisM

JGO Coder


Medals: 1
Projects: 1


END OF LINE.


« Reply #21 - Posted 2006-06-02 20:00:59 »

And ChrisM, do you remember a bit music in Keith Courage?

You mean...THIS?

http://mediacast.sun.com/share/ChrisM/KeithCourage.mp3

SmileySmileySmiley

-Chris

Offline TheAnalogKid

JGO Coder


Projects: 3



« Reply #22 - Posted 2006-06-02 20:05:13 »

Hahaha!  Grin yes! I've never liked this shaking music.

Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #23 - Posted 2006-06-04 22:32:57 »

As I understand it they basically lose money on the console itself but get all the profits from licensing the software... if you *buy* software without a console, then they are farther ahead... Smiley

I guess emulators are really just used to bypass copy protection...

http://www.modchipstore.com/DMS4-Lite-ModChip-Playstation-2-V1-V12-Official-16195.html
This is used for bypasing the copy protection.

Major usage for PSX emulator is to improve polygon based PSX game. And some people have larger monitor than TV, so it's the only possibility for them. Actually people with larger monitor than TV should be alowed to use legally all games made for consoles without DVI support, and without improved port for PC.
Other usage of emulator is ability of playing game even after PSX blowed away. PC DVD-RAM is significantly more durable, and cheaper to repair than a PSX drive. It also saves money for INCREDIBLY expensive memory cards, and add ons. (Of course if console manufacturers though about ripping away money by selling add ons...) So it has a lot of legal uses.

While buing software without owning console might have its uses, user would encounter problem called bios. Until Sony will explicitly state that user of a legally licenced PSX game is also eligible to use PSX bios to play it (doesn't matter how he obtained it), users would be in illegal state anyway, so they would just buy games they like, and rest of them warez away anyway.

Online kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #24 - Posted 2006-06-04 22:39:40 »

any news if this emulator will ever be released?
Offline Jeff

JGO Coder




Got any cats?


« Reply #25 - Posted 2006-06-27 02:15:36 »

Does anyone know how Sony feels about these emulators?  I'm just curious.  It seems like non-PS2 owners can buy Playstation 2 games and play them on their home computer.  Increasing even more sales for Sony and other publishers.

Jeff

AFAIK You cant get a CD drive for a home PC that reads Sonys black PSX discs.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline ChrisM

JGO Coder


Medals: 1
Projects: 1


END OF LINE.


« Reply #26 - Posted 2006-06-27 07:51:20 »

Does anyone know how Sony feels about these emulators?  I'm just curious.  It seems like non-PS2 owners can buy Playstation 2 games and play them on their home computer.  Increasing even more sales for Sony and other publishers.

Jeff

AFAIK You cant get a CD drive for a home PC that reads Sonys black PSX discs.

Actually, you can read PSX black disks just fine on a PC.  This was why Bleem! was such a threat when it was released. The black color would diminish the reflection that some older CD-ROM drives had problems reading but, by and large, a majority of CD-ROM drives worked fine.

-Chris

Offline g666

Junior Member





« Reply #27 - Posted 2007-11-05 13:25:15 »

So did this thing ever surface?

sorry for resurecting such an old thread Cheesy

desperately seeking sanity
Offline bitshit

Junior Member




Java games rock!!


« Reply #28 - Posted 2007-11-05 13:32:51 »

I had an email conversation with the author sometime ago, he was very close to a release but seemed to have trouble polishing the code enough to his likings in his sparetime  Undecided

I'll point him at this post and see what happens...
Offline meshounah

Senior Newbie





« Reply #29 - Posted 2007-11-30 04:04:19 »

Does anyone know how Sony feels about these emulators?  I'm just curious.  It seems like non-PS2 owners can buy Playstation 2 games and play them on their home computer.  Increasing even more sales for Sony and other publishers.

Jeff

*cough* pirates *ahem*
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (11 views)
2014-04-15 03:46:01

UprightPath (24 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (108 views)
2014-04-08 23:06:04

tom_mai78101 (208 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!