Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Syphurith
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Syphurith/abbce0f38354218667cf to your computer and use it in GitHub Desktop.
Save Syphurith/abbce0f38354218667cf to your computer and use it in GitHub Desktop.
Guide for starter dev to rpcs3

###Notice

  • This is a long article, please have patience reading. If you really wanna to be one in the team, you would have to read a long document sometime.
  • Everyone from RPCS3 team could help improve this guide and distribute this freely.

###Breif There may be some guys think that help developing an emulator is a extremely hard job maybe, not totally and needs plenty luck maybe, not totally to get something to commit.

And, it is never too hard/cool/blabla especially for one eager to learn.

You don't need to know much about C++ well, better if you did so, especially you don't need to know much about this Advanced Features those are for Advanced Users, so think first why you need it badly and whether it could not be work around, only having experience for C or Java or C# or other alike is OK. For one really learned Programming: Language is only a tool. So Advanced Features are not very relevant to what you do, exactly.

For most cases of Software Development in reality world, the understanding of the project arrangement of source, archtecture, software mechanism.. etc make the mose sense.

Unfortunately for some reasons i can not tell you about these understanding those should be formed by yourself, not directly accepted from others without think twice. But i would tell you how to get yourself in this project and your very early stage for development.


###How to get started? The easiest way? I would never just tell you to read this/this/this, learn assembly/C/C++/Shell/etc.. I know the pain when you've been forced into reading quite plenty plus, difficult documents/books. Those hurt your enthusiasm in learning. If you really need to know about something and you're a good learner i believe you would find yourself a way to learn.

However, to make beginning easier, you should learn some about C or C++. C++ is developed from C and Java from C++, and C# from Java. I sugguest C because it is quite easier than C++, simpler than the rest.

Well then where should i start? There are several types of guys in the team.

  • Those eager to deal the most difficult job, and work as a genius.
  • Those follow the document to implement a part of the core.
  • Those develop or implement a small feature for rpcs3.
  • Those maintain the repo, and review the pull requests.
  • Those trying to find bugs or to solve easy issues.

Puzzled? Those above are only jobs. Someone can do most of the jobs.

For a starter, i suggest the easiest of those all - find bugs/mistakes/typos and help solving those. Dispite been listed in the end, it not only helps development and review, but also help you to understand the whole project, and finally helps you when developing seriously.

Cause rpcs3 itself is not a small project that could easily read throughout, I have a special way for you - read the build log.


###Travis log, clang build Travis build issue is solved recently and it continue to build rpcs3 after LLVM..

I suggest you to read the "clang build logs" on Travis for rpcs3, those ????.1 jobs - if changed you can refer to the .travis.yml file to find its new order. Clang is more sensitive by default than gcc when building. So you could easily find plenty of weird compilation warnings.. But please ignore all those problem files in LLVM/wxWidgets folder since those are not rpcs3's own. Most of the compilation messages have already been analysized by others so just google for those. Such as:

/home/travis/build/RPCS3/rpcs3/rpcs3/Crypto/unself.cpp:611:6:
warning: comparison of array 'klicensee_key' not equal to a null pointer is always true [-Wtautological-pointer-compare]
        if (klicensee_key != NULL)

You could just google "not equal to a null pointer is always" or "-Wtautological-pointer-compare" warning mark for hint or even solution.

If you need to read Travis logs offline, tap the "Download" button with the log and save the file to disk. Open any terminal-like xterm,gnome-terminal,mintty include the one from Msys2, and you can use cat or more to view it do not use less.


###Setup Environment Once you know about how to correct the mistake, get your git and your build tools. You would have to test it locally before commit or push.

You should already know that rpcs3 can only run on a 64 bits OS. If not i'm so sorry for that.

It is suggested to follow the Official version of Guide to get required software.

#####Windows For windows users, you would need msysgit (or PortableGit), Visual Studio 2013 (and TortoiseGit), and a stable network. I suggest the PortableGit which don't need any compilation before use yep just extract and that's ok, it is a 7z and can be found on MsysGit repo. Or else you can use Github for Windows which Github offers.

You would have a little time studying how to set up your git environment Just google for the how-to since you can find those on Github. ####Linux For Linux it is much easier, git can be compiled or just found from your distribution repo. You can find yourself a good UI to operate that if you haven't get used to git commands. You should have GCC and CMake. GCC is above 4.8.0, and Cmake version higher than 2.8.0. #####OSX OSX users would have to use Github offers or use HomeBrew to install it. I suggest you Homebrew since it's opensource and it is much useful than github client. You should have Clang and CMake. Clang is above 3.5.1, and Cmake version higher than 2.8.0. #####After that Don't forget to get a github account, needed when you push and create pull requests. You would have to fork rpcs3 to get a remote url for pushing.


###Notes before anything changed

  • Clone the main repo: git clone https://github.com/RPCS3/rpcs3.git
  • Get submodules: git submodule init --update and git submodule update --recursive. Rpcs3 have 5 submodules.
  • Create your own git branch! then checkout: git branch $YOUR_BRANCH_NAME. You can change $YOUR_BRANCH_NAME to whatever you like. Never change master branch except merging. Well you can reset your master branch easily.
  • Create new branch instead of Backup your code inside repo. Git is designed for this.
  • Remember to commit when you think something finished or would operate your repo.
  • Make your changes, and follow the Guide or FAQ to compile it.
  • When it failed, try to fix it or ask others. Tip: Search Google first, that's Quick.
  • You can help yourself to learn abot git if you want to be an advanced user of git.
  • Don't forget you are in a team (Orz).

###Ready to make a pull request if all ok Review and ensure your code doesn't break the multi-platform support. Rpcs3 supports Windows/Linux/OSX, so please use some macro if you have to use some OS-Specified solutions. Also please take care of original intention of code if you are making a patch.

Set your own forked repo of rpcs3 as your remote url for pushing. Push the needed branch to remote, then head to your repo on Github to compare and create a pull.

I suggest you not create pull for a single small mistake like fix a word typo, it isn't important. And please not merge commits with unrelated intent into one single pull.

You can discuss about your edits on issue page, pull request page and IRC to get reviewed.


###Merged? Once your pull request is accepted, your code enters main repo. You can then delete the merged branch, and git pull --progress --all -v -p to update your local repo, and start a new branch from newest master commit.

Have your good time fighting against bugs/typos!


###Implement something After gained some knowledge you may want to implement something not present.

To find where you can implement, you can use tools as grep, AstroGrep, ag.. to search for TODO and "Stub". You can also check current implemented functions against the API list you can get from API Doc. Search for the doc on IRC

Try following the API or actual behavior that analyzed to implement your function. You can ask for help on IRC or make your test with SDK if you don't know what to do.

Implemented functions would also need review before merged. If you are earge to do such things let me thank you for such hardwork first.

It may be better when you know who implmeneted something recently. You can add activate contributors' repos to your local git remote-branches, then use git pull --progress --all -v -p to fetch their commits use one single command.


###The end You can follow other's guide to reach further development. Our IRC is on EFNET.org, channel #rpcs3. Don't be afraid of asking questions about development, just be polite enough. You can also find some tips from PS3DevWiki, and from Development Info.

@danilaml
Copy link

https://gist.github.com/Syphurith/abbce0f38354218667cf#breif - brief, wanna - want to.
For one really learned Programming - for someone who learned
and etc.
lot's of small mistakes. I suggest you using something like MS Word and spell-check it. (it also helps get rid of redundant/ ill constructed words/sentences)

@Syphurith
Copy link
Author

@danilaml Thanks. I'm not a native English speaker, and merely i do use Word and spell-checking. I hoped someone could edit this article and post it somewhere as his. Well..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment