forums.PPSSPP.org
Where start from? - Printable Version

+- forums.PPSSPP.org (https://forums.ppsspp.org)
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Development (/forumdisplay.php?fid=3)
+--- Thread: Where start from? (/showthread.php?tid=23685)



Where start from? - GuilhermeGS2 - 11-25-2017 03:44 PM

Hey guys! I recently learned the basics of progamming, and I wish to become a great programmer like you PPSSPP devs, I really appreciate your work guys. Well, I'm insterested in understanding how PPSSPP works, I do not know how PSP works and don't know much about C/C++, so maybe I will not understand everything, but I'd like to understand the basic to get more knowledge in programming, maybe I might even help with something soon when I get more experient.

I took a look arround the codes, and I got lost, too many variables that I don't know where they came from. So, where should I start? What's the main thing in the emulator? I think would be better if I had the codes of first PPSSPP version to undestand how it began, but I guess it's now available anymore (it has been 5 years).

Thank you for the great job guys. Smile


RE: Where start from? - [Unknown] - 11-26-2017 05:11 AM

The nice thing about GitHub is it actually keeps track of the code from the beginning. You can browse the first committed code here:

https://github.com/hrydgard/ppsspp/tree/4f7ad157585c0f1a8e7f7f854d477d003507be50

On any file you can also select "Blame" to see where different parts come from, and the commits usually say why, for example:

https://github.com/hrydgard/ppsspp/blame/master/Core/HW/SasAudio.cpp#L831

Which shows a message explaining some of the code on that line:

https://github.com/hrydgard/ppsspp/commit/684caa01ec96a19c16f2b30966afb7830bd47ad9

It's often useful to search all the code for a variable name and look at blame to better understand what it is, if it's not making sense.

There's several main components, but it depends on what you want to start understanding first. For example, graphics are a pretty major part of PPSSPP, you could look at GPUCommon.cpp. This code is run whenever the game sends a "list", which runs a list of "operations":

https://github.com/hrydgard/ppsspp/blob/2b271db79025a0670860a0f1be5e6e8893472430/GPU/GPUCommon.cpp#L841

The operations either do things (like drawing a triangle) or remember things (like which way the camera's pointing.) You can also see this in the GE debugger. This would be a good place to start.

-[Unknown]


RE: Where start from? - GuilhermeGS2 - 11-26-2017 01:31 PM

Thank you, I'll take a look later with more attention! Smile