New psp emulator in Java

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
shadowpcsx2
Posts: 5
Joined: Wed Jul 30, 2008 7:50 pm

New psp emulator in Java

Post by shadowpcsx2 »

Hello Me and my team have started a new psp emulator calling jpcsp written in java.

Not much have done yet but you can take a look at our forum at

www.jpcsp.org/forum/

any help will be really useful :)

thank you
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

psp emulator in java?

Good luck to get 0.1 fps...
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

moonlight wrote:psp emulator in java?
Good luck to get 0.1 fps...
Haha, moonlight, why do you think so?
If you program it well, it can be same fast as c++ apps... if you program it well
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

No, if the program runs in a java virtual machine.
A different matter would be if it is compiled somehow to machine code, but even in that case, it is not the most appropiate language for an emulator, and even less for a more or less powerfull device.
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

That simply is not true. Search the web for benchmarks, JVM is able to run 3D graphics pretty smoothly.

I dont see why emulator in Java is a bad Idea. Me myself, I dont like Java as a language, but I know that you can make nice and fast programs in java, if you are careful enough about the efficiency of the code.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

Haha, moonlight, why do you think so?
If you program it well, it can be same fast as c++ apps... if you program it well
Forget about it. If you're saying so, i hardly doubt of your coding skills. While in making of gestionals you can just choose the language you mostly like, in realtime apps things change slightly. Don't be fooled by jogl demos...in that apps the hard work is delegated to native video driver, it's not java VM at all. You could never implement decently JIT on a JIT VM itself (do you like chinese boxes???). I work with java, and I love Java. Really. But i love spicy pizza too, and i don't eat it for breakfast. Have right tools for right works. Java is not for an emulator. Period. If you don't believe me, go learn about VM theory and forget about that idiot benchmarks.

PS: don't even think to flame on moonlight...you don't even know who he is
PPS: When i first saw your program i thought it was a disassembler and i liked the idea of an open-source, managed, portable elf disassembler....i think you should keep your project on this level.
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

kralyk wrote:That simply is not true. Search the web for benchmarks, JVM is able to run 3D graphics pretty smoothly.

I dont see why emulator in Java is a bad Idea. Me myself, I dont like Java as a language, but I know that you can make nice and fast programs in java, if you are careful enough about the efficiency of the code.
You should study a bit more the differences between a simple OGL demo app (which as jean already stated doesn't do a lot of code execution but only delegates to the graphics hardware) or other GUI app and an emulator. You *CAN* write the prior two in Java that runs nearly as fast (in the terms of GUI responsiveness which moves in seconds as magnitude) as a C++ application true. But that does not work for the latter, as it puts other requirements on the code generation and execution. All you could do in Java is create a nice and dandy GUI for the underlying emulator.

And better don't try to argue with people like moonlight (that really know what they're talking about) without having a ton of hard grounded arguments to back up your position.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

amen.

I also decompiled this java "PSP emulator" just to find a very basic MIPS disassembler (just a standard MIPS without standard FPU). There is no way you may reach an acceptable speed with an interpreter in JAVA and the way you handle memory accesses. And advertisizing it as a PSP emulator is a lie.
User avatar
Actarus
Posts: 33
Joined: Mon May 19, 2008 12:54 am
Contact:

Post by Actarus »

I think you must work hard. Good Luck
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

Alright, alright, just calm down, dont shoot me.

I just thought java was not bad in 3d based on some articles&benchmarks I read like year ago, they might have been misleading or wrong...
I didnt say Java was a bad language, I didnt say moonlight was a bad programmer (I dont care who he is or isnt), I didnt say emulator in java is a great idea, I didnt say you cant do nice stuff in java. I said I dont like java - hope this its not against rules, duh, If anyone feels insulted by me not liking java then sorry...
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

kralyk, "you" may also be read as "one" or "the people behind the project". Don't take it personaly ;P.
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

No way! Im not behind that project, I cant do much Java I prefer c++ and I wouldnt do it in Java even if I did Java well...
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

kralyk wrote:No way! Im not behind that project, I cant do much Java I prefer c++ and I wouldnt do it in Java even if I did Java well...
Code it in SDL, it'll get more FPS and be cross platform (which I think is your aim anyway) =)

Wally

P.S Don't go doubting moonlight, he's too shiny!
Last edited by Wally on Wed Jul 30, 2008 11:13 pm, edited 1 time in total.
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

Yes, tahts what I would do If I was part of the project, which I am not, thank you very much, If I was Id have admited it already...
the_darkside_986
Posts: 9
Joined: Tue Jul 18, 2006 3:29 pm

java

Post by the_darkside_986 »

Java? That might be fun for entertainment or stretching the limits of abstraction... oh well, but anyway, would it be possible to gain great speed in a real C emulator by "recompiling" the MIPS code to the native architecture of the emulator host machine (such as x86, for example)? Since the CPU is a 32-bit core, would such an emulator work best on a 32-bit OS or a 64-bit OS running on an x86_64 machine? Doesn't 64-bit AMD have more registers than x86, so it would be able to handle the number of registers that MIPS has?
shadowpcsx2
Posts: 5
Joined: Wed Jul 30, 2008 7:50 pm

Post by shadowpcsx2 »

hlide wrote:amen.

I also decompiled this java "PSP emulator" just to find a very basic MIPS disassembler (just a standard MIPS without standard FPU). There is no way you may reach an acceptable speed with an interpreter in JAVA and the way you handle memory accesses. And advertisizing it as a PSP emulator is a lie.
heh why the need to decompile it? it is open source :P
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

shadowpcsx2 wrote:
hlide wrote:amen.

I also decompiled this java "PSP emulator" just to find a very basic MIPS disassembler (just a standard MIPS without standard FPU). There is no way you may reach an acceptable speed with an interpreter in JAVA and the way you handle memory accesses. And advertisizing it as a PSP emulator is a lie.
heh why the need to decompile it? it is open source :P
because I wasn't given the source link :P

And be sure there is no virus threat inside ;PPP
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Re: java

Post by hlide »

the_darkside_986 wrote:oh well, but anyway, would it be possible to gain great speed in a real C emulator by "recompiling" the MIPS code to the native architecture of the emulator host machine (such as x86, for example)?
Of course, we already know two emulators : Potemkin (C/C++), pspplayer (C# but dynarec is C++). Both use a x86 dynarec.
the_darkside_986 wrote:Since the CPU is a 32-bit core, would such an emulator work best on a 32-bit OS or a 64-bit OS running on an x86_64 machine?
the Allegrex core should be okay. HLE is another pain to achieve.
the_darkside_986 wrote:Doesn't 64-bit AMD have more registers than x86, so it would be able to handle the number of registers that MIPS has?
no, Allegrex main processor has :

32 x 32-bit GPR
32 x 32-bit FPR
128 x 32-bit VFPR (or 8 x 4 x 4 x 32-bit VFPR)
shadowpcsx2
Posts: 5
Joined: Wed Jul 30, 2008 7:50 pm

Post by shadowpcsx2 »

hmm allegrex doesn't have cop0 ?
Wraggster
Posts: 121
Joined: Fri Aug 26, 2005 7:40 am
Contact:

Post by Wraggster »

Quick question, would in time this java emulator be portable to say the PS3 using the BD-J method of homebrew (ie java homebrew for the PS3) ?
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

shadowpcsx2 wrote:hmm allegrex doesn't have cop0 ?
cop0 is accessible only for kernel mode. Do you plan to emulate kernel modules and all the hardware addresses ?
shadowpcsx2
Posts: 5
Joined: Wed Jul 30, 2008 7:50 pm

Post by shadowpcsx2 »

not atm at least :P thanks :)
nickblame
Posts: 2
Joined: Thu Jul 31, 2008 5:40 am

Post by nickblame »

hlide wrote:amen.

I also decompiled this java "PSP emulator" just to find a very basic MIPS disassembler (just a standard MIPS without standard FPU). There is no way you may reach an acceptable speed with an interpreter in JAVA and the way you handle memory accesses. And advertisizing it as a PSP emulator is a lie.
first of all nobody advertized anything. second of all what do you call a starting project for emulating a psp? if not a psp emulator?

whats the matter do you want to get a kickass psp emu to play the games? well you are welcome to build one. this is just an approach of emulating the psp system open source and shadow asked for any1 that would like to contribute. maybe this emu will add to the road of fully emulating psp real time maybe not. but his name is till now a winner since his previous work (both playstation) are a couple of the most complete emus (not to mention other emus contibs).


every emu project should be a big party for the scene cheers :D
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

nickblame wrote: well you are welcome to build one.
That's again one of those ironic situations... hlide is indeed working on a PSP emulator... and though he doesn't "advertise" it, it's surely more promising than a java interpreter...
maybe this emu will add to the road of fully emulating psp real time maybe not.
Likely not. Reasons are mentioned already in this thread. Just get used to it - Java is not designed for such a project.

Sorry, but as nice as this project may be for learning purposes, it definitely does not lead to realtime psp emulation for sure. Not in the next hand full of years until java hardware is common (and much much more powerful) and even then I'm in doubt.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
nickblame
Posts: 2
Joined: Thu Jul 31, 2008 5:40 am

Post by nickblame »

Raphael wrote: That's again one of those ironic situations... hlide is indeed working on a PSP emulator... and though he doesn't "advertise" it, it's surely more promising than a java interpreter...
now that really sound like advertising. the "I am trying an emu join if you like" on the other hand does not.

now about the other stuff you are suggesting.. i try not to be ironic and i simply can't.. these screenshots should tell you why i can't prevent from being ironic..

http://s329.photobucket.com/albums/l390 ... /jpsx1.png
http://s329.photobucket.com/albums/l390 ... /jpsx2.png
http://s329.photobucket.com/albums/l390 ... /jpsx3.png

what is that?

http://developers.sun.com/learning/java ... =coolstuff

do you follow the emu schene? look at the dates here on ngemu:
http://forums.ngemu.com/emulation-news- ... -java.html

and this is what the author of jpsx had to say yesterday:
http://forums.ngemu.com/emulation-news- ... -jpsx.html
he might release it soon.

so this is for the fact that java is slow and "it can't be done". offcourse it does not mean that jpcsp will be like that. but it can be done.


*edit: i think this is getting off-topic :/ this thread was intended to notify any1 interested in such a project. all the other stuff is irrelevant and i might got a bit carried away. sorry if I offended any1
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

nickblame wrote:
Raphael wrote: That's again one of those ironic situations... hlide is indeed working on a PSP emulator... and though he doesn't "advertise" it, it's surely more promising than a java interpreter...
now that really sound like advertising. the "I am trying an emu join if you like" on the other hand does not.
I'm not advertising anything and I'm not releasing anything and saying this is a PSP emulator because the more I investigate about PSP emulation, the more I feel having a COMPLETE PSP emulator is a very difficult road to reach the end.

Guys, I'm waiting for you to emulate VFPU on Java. So far, no PSP emulator was able to emulate it. Be the first to open this path.

Honestly, I could help them but the real question is : what the exact goal of this PSP emulator ?
shadowpcsx2
Posts: 5
Joined: Wed Jul 30, 2008 7:50 pm

Post by shadowpcsx2 »

hlide wrote: Honestly, I could help them but the real question is : what the exact goal of this PSP emulator ?
The goal of the emu at least at first stage is to provide a debug + testing enviroment for pspsdk .

Java might not be that fast but i think while psplayer (noxa's emu) can run pspsdk demos at 120fps we can manage to have 60 or 30 with good coding

If later that emu will run games and with what framerate that is something i can not tell

Really i don't understand that bad attidude of ppl in ps2dev forums. It reminds me good old times (back in 2001) when me and linuzappz annouced pcsx2 emu (www.pcsx2.net) where ps2dev scene had the same untrustfull behaviour as they have now.

Judging other ppl work (and when it is free) isn't something that should happend. After all a portable emu can only make good i think.

Sorry for everything

shadow
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

shadowpcsx2 wrote:The goal of the emu at least at first stage is to provide a debug + testing enviroment for pspsdk.
as long as you are not planning to run a firmware on your psp emulator and mess with hardware it should be possible. That question was already raised with a LLE psp emulator. As Jean stated, this may be a cool debugger.
shadowpcsx2 wrote:Java might not be that fast but i think while psplayer (noxa's emu) can run pspsdk demos at 120fps we can manage to have 60 or 30 with good coding
pspplayer is using a C++ dynarec and I'm not sure pspsdk demos have the same complexity of recent 3D games. As a debugger, this speed is not a big problem.
shadowpcsx2 wrote:If later that emu will run games and with what framerate that is something i can not tell
once again, LLE or HLE emulator, interpreter or dynarec. Dynarec for Java is probably not the right word. You need indeed to generate java code dynamically. I saw the jpsx technical demo which explains how to do so. I guess something similar should be done for jpcsp (why not jpsp ?).
shadowpcsx2 wrote:Really i don't understand that bad attidude of ppl in ps2dev forums.
recently, there were a lot of announcement of new PSP emulators and still no concrete code or result. The term of PSP emulator is too vague because for most not dev people it means we can run officials games or even an official firmware on it, which is not the case for the existing "PSP emulators". So we tend to be bored with those kind of announcements in this forum.
M@x
Posts: 6
Joined: Tue Feb 05, 2008 5:03 am

Post by M@x »

nickblame wrote:
Raphael wrote: That's again one of those ironic situations... hlide is indeed working on a PSP emulator... and though he doesn't "advertise" it, it's surely more promising than a java interpreter...
now that really sound like advertising. the "I am trying an emu join if you like" on the other hand does not.

now about the other stuff you are suggesting.. i try not to be ironic and i simply can't.. these screenshots should tell you why i can't prevent from being ironic..

http://s329.photobucket.com/albums/l390 ... /jpsx1.png
http://s329.photobucket.com/albums/l390 ... /jpsx2.png
http://s329.photobucket.com/albums/l390 ... /jpsx3.png

what is that?

http://developers.sun.com/learning/java ... =coolstuff

do you follow the emu schene? look at the dates here on ngemu:
http://forums.ngemu.com/emulation-news- ... -java.html

and this is what the author of jpsx had to say yesterday:
http://forums.ngemu.com/emulation-news- ... -jpsx.html
he might release it soon.

so this is for the fact that java is slow and "it can't be done". offcourse it does not mean that jpcsp will be like that. but it can be done.


*edit: i think this is getting off-topic :/ this thread was intended to notify any1 interested in such a project. all the other stuff is irrelevant and i might got a bit carried away. sorry if I offended any1
I was in the J1 session 2006, it really shocked me by the demo which ran 4 PS1 emulators on 1 PC at same time, and the games went extremely smooth.
The most interesting part is that the author really implemented a JIT by Java itself, and this JIT utilized JDK6's JIT feature a lot - or say, a JIT on top of another JIT. Please remember: it's pure Java implementation (except for CD-ROM driver emulation, if you want to use real PS1 CD instead of an ISO), so it's totally platform-independent.
Post Reply