Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where to begin and GSDX wont compile
I see that I can not post on development forum section so here I go. Feel free to move the thread.
So, except the gsdx, all others compile fine. How to make this work?
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.

Sponsored links

Maybe you can post some useful info, like your compilation error. Otherwise, we can only reply, "dunno, it works on my PC".

Which feature do you want to add ? improve ? You need a concrete goal before reading the code.
(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.
The compilation error:
Overall log:

I wish to understand pcsx2 overall. Specifically I wish to know how the game's binary(XXXXX.xx format) is feed into the VM and the nature of the VM. If possible I wish to implement custom shader effects on the final frame buffer as post processing effect.
Yeah somebody changed it so the zx folder was "mirrored" but it doesn't work very well and never checks out when you check out the repository (whoever came up with it, it was a stupid idea).

You need to check this out then manually put the folders in the right place

The folder you need is under tree/master/

Just copy the "src" folder (including that folder itself) to D:\em\pcsx2\pcsx2\3rdparty\xz\
[Image: ref_sig_anim.gif]
Like our Facebook Page and visit our Facebook Group!
Actually you can use git directly, here the 2 magical commands
git submodule init
git submodule update

Edit: for motivated people

Edit2: if we have a doc/how-to to explain the git checkout process, it could be a good idea to add those 2 commands.
Compiled at last, thanks guys. I took K.F.'s advice and went into R5900.h until I came across "R5900cpu" structure. The definition of "Execute()" is apparently no where to be found yet by me. Creepy!!
Honestly the EE recompiler isn't the nicest code. And it isn't useful to implement a post-processing shader. From the top of my head, Execute is a function pointer that is either recExecute (recompiler) or intExecute (interpreter).

And to answer you initial question on the binary uploading. The binary is an elf program so VM will read it from the the virtual disk, relocate it and copy it into the EE memory. It behaves like a standard PC but here the hardware is virtual.
hmm, you are right. the FPs are initialized at Interpreter.cpp line no 600, I guess in case if the interpreter mode is active. and the definition of the pointed function in this case is "intExecute" at line no 507 of Interpreter.cpp.

If everything is correct aka state is "GAME_RUNNING", then "execI()" runs inside an finite loop like an ordinary video game loop, well sort of. Interesting. Guys, can't the dev forum be unlocked for all? Here in our office, I will be having pretty much handful amount of time recently because of low work pressure, on going. So I decided to give some time on pcsx2 codes. I think I will be bugging you guys a lot. So just asking....

Edit: and K.F. is right. PS2's actual hardware internals info is necessary in many cases. I am having a bit hard time on "cpuRegisters" structure. I guess it has something to do with ps2's multi cpu internal organs, xD. I know here things go grey. But I will have to do some dirty thing. who is gonna care about a dead machine anyway.? xD
Thread can be moved in the dev forum. I don't think it is an issue.

execI executes a single EE instruction. I did a small doc on the wiki to explain some stuff of the recompiler. However, I don't think it is a good idea to start with the ugly/complicated stuff.

Users browsing this thread: 1 Guest(s)