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.

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++.

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).

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...

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...

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.

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.

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.

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.

[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/

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? 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.

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.

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!

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.

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.

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