(08-23-2017, 08:42 AM)mistic_cave Wrote: Then can any of you shed some light, "from where would I start reading pcsx2 code base?". I am kinda lost with all those lines.
The most important thing about getting into emulation, is to understand the console, do not attempt to go through pcsx2 code before going through the ps2 docs - google is your friend -, or else nothing will make sense at all. After that, going through the code will go from pretty much impossible to relatively simple.
But still, there is no real way to get into a huge and not very starter friendly project like pcsx2 but to brute force it, I had to go through most of the classes and functions and comparing it to the docs in my spare time for a month or two until I'm comfortable going through most of it. If you gave it more hours/day, after a week or two you should be in a good place with it.
Some tips:
- The main loop is
this, but not really, there are other main sub-loops under it, and get used to this with this code base, nothing is ever straight forward, usually for a reason.
- Concentrate on the main CPU at the start, so mainly R5900.h and R5900.cpp, it will naturally branch out from there.
- Forget the recompilers at the start, and go through the interpreter.
- Going through another emulator base like
Hpsx64 and Play! might give you better understanding than pcsx2 in some cases, but pcsx2 is the way to go almost all the time.