This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the Best Programming language for emulating a console (like PSP)?
#2
pcsx2 is c++, some c# and ASM here and there, pcsx2 really has a few advantages, one being that the plugins are developed by a whole set of different people (some people think the plugin system is a downside though), then there is the pcsx2 core (considered the official team), so when you put it all together pcsx2 has/had a huge team, each person works on their area of specialty and sometimes re-written or improved by new members for example the SuperVU/MicroVU.
That being said pcsx2 has been in development since 2004-2005ish, when it was around Jpcsp's age in development it only ran 2-11fps as you can see in this old screen shot I have ((this was when first discovered the NLOOP hack) and we were testing it in very early betas)
   

As for developing an emu I would assume it takes a lot of reverse engineering when there is little information on the system, the first thing is to find out what each component does, see if there are any public docs available, if not then you have to figure out how / why it does what it does and how to get the PC to reproduce that usually with a very slow interpreter (then later add in a recompiler) , luckily in pcsx2's case the SPU or sound card was basically the same as the old psx console, the rest of the system was a nightmare though since the ps2 was a powerhouse compared to most PC's in its time (even now it would be impossible for the top of the line modern pc to emulate the ps2 in realtime), the ps2 also had very little documentation and had to be parted together usually by trial and error.

Same goes for Jpcsp, since console makers are getting smarter and using all kinds of encryption that adds an extra step to finding out the workings, I'm not sure why the devs choose Java, but I assume it's because it's what programming language they understand (in human terms, you can't speak/write Japanese/Chinese if you haven't learned them first), or perhaps Java was just the best way to quickly emulate the system because of the JVM, Java does have some advantages though since it can take advantage of dual/quad core processors, without as much work, where in emulators like pcsx2/dolphin multi-threading is quite difficult to add and difficult to sync, so usually they only use one or two processor cores, one for the GS system and one for the emulator, (MTVU has recently added a ability to use a 3rd core in pcsx2).

Jpcsp would probably be faster in c++ but I assume it would be extremely difficult to port it over in this stage of development. :p, but really the first goal of any emulator is compatibility getting it to emulate the system first then after it works good and stable then speed and other improvements can be made to fine tune it.

I think jpcsp works great though gid15, hykem and the other devs have done a great job, jpcsp runs much better then I ever thought it would run when I first joined here, I only have a middle grade PC, and I can get full speed on many of my games now, so speed is really only a issue on lower end computers and some brand video cards and perhaps some of the more demanding games that even have trouble on the real psp.

Reply


Messages In This Thread
RE: What is the Best Programming language for emulating a console (like PSP)? - by hyakki - 08-01-2012, 09:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)