Skip to content

Commit a79ef87

Browse files
committed
Adding CONTRIBUTING.md so that github shows it on issues.
1 parent 45816d8 commit a79ef87

File tree

10 files changed

+120
-64
lines changed

10 files changed

+120
-64
lines changed

CONTRIBUTING.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Content Guidelines
2+
3+
The issue tracker is exclusively for filing and discussing bugs, feature
4+
requests, and tracking work items. It is not for technical support or general
5+
discussion. Avoid discussing any illegal activity, such as downloading games.
6+
7+
**Repeated misuses will result in a permanent project ban.**
8+
9+
## Information Sourcing
10+
11+
All information in xenia has been derived from reverse engineering legally-owned
12+
games, hardware, and tools made public by Microsoft (such as the XNA Game Studio
13+
tooling), scouring documentation made public by Microsoft (such as slide decks
14+
and other presentations at conferences), and information from code made public
15+
by 3rd party companies (like the Valve SDKs).
16+
17+
The official Microsoft Xbox Development Kits (XDKs) are not to be used for any
18+
information added to the project. The contributors do not want the XDKs, nor do
19+
they want any information derived from them. The challenge of the project is
20+
what makes it fun! Poisoning the codebase with code obtained by shady means
21+
could result in the project being terminated, so just don't do it.
22+
23+
**Posting any information directly from an XDK will result in a project ban.**
24+
25+
# Contributing Code
26+
27+
## Style Guide
28+
29+
Please read over [style_guide.md](style_guide.md) before sending pull requests
30+
and ensure your code is clean as the buildbot (or I) will make you to fix it :)
31+
[style_guide.md](style_guide.md) has information about using `xb format` and
32+
various IDE auto formatting tools so that you can avoid having to clean things
33+
up later, so be sure to check it out.
34+
35+
Basically: run `xb format` before you add a commit and you won't have a problem.
36+
37+
## Clean Git History
38+
39+
Tools such as `git bisect` are used on the repository regularly to check for and
40+
identify regressions. Such tools require a clean git history to function
41+
properly. Incoming pull requests must follow good git rules, the most basic of
42+
which is that individual commits add functionality in somewhat working form and
43+
fully compile and run on their own. Small pull requests with a single commit are
44+
best, however multiple commits in a pull request are allowed only if they are
45+
kept clean. If not, you will be asked to rebase them (and if you don't know what
46+
that means, avoid getting into that situation ;).
47+
48+
Example of a bad commit history:
49+
50+
* Adding audio callback, random file loading, networking, etc. (+2000 lines)
51+
* Whoops.
52+
* Fixing build break.
53+
* Fixing lint errors.
54+
* Adding audio callback, second attempt.
55+
* ...
56+
57+
Histories like this make it extremely difficult to check out any individual
58+
commit and know that the repository is in a good state. Rebasing,
59+
cherry-picking, or splitting your commits into separate branches will help keep
60+
things clean and easy.
61+
62+
# License
63+
64+
All xenia code is licensed under the 3-clause BSD license as detailed in
65+
[LICENSE](LICENSE). Code under `third_party/` is licensed under its original
66+
license.
67+
68+
Incoming code in pull requests are subject to the xenia [LICENSE](LICENSE).
69+
Once code comes into the codebase it is very difficult to ever fully remove so
70+
copyright is ascribed to the project to prevent future disputes such as what
71+
occurred in [Dolphin](https://dolphin-emu.org/blog/2015/05/25/relicensing-dolphin/).
72+
That said: xenia will never be sold, never be made closed source, and never
73+
change to a fundamentally incompatible license.
74+
75+
Any `third_party/` code added will be reviewed for conformance with the license.
76+
In general, GPL code is forbidden unless it is used exclusively for
77+
development-time tooling (like compiling). LGPL code is strongly discouraged as
78+
it complicates building. Unless extremely trivial (such as )

CONTRIBUTORS.md

-7
This file was deleted.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013, Ben Vanik.
1+
Copyright (c) 2015, Ben Vanik.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Please check the [frequently asked questions](http://xenia.jp/faq/) page before
1616
asking questions. We've got jobs/lives/etc, so don't expect instant answers.
1717
Discussing illegal activities will get you banned. No warnings.
1818

19+
**Before contributing code or issues be sure to read [CONTRIBUTING.md](CONTRIBUTING.md).**
20+
1921
## Status
2022

2123
Buildbot:
@@ -25,7 +27,9 @@ Project tracker:
2527
[![Stories in Ready](https://badge.waffle.io/benvanik/xenia.svg?label=ready&title=Ready)](http://waffle.io/benvanik/xenia)
2628
[![Stories in In Progress](https://badge.waffle.io/benvanik/xenia.svg?label=in%20progress&title=In%20Progress)](http://waffle.io/benvanik/xenia)
2729

28-
Some real games run. Most don't. Don't ask if GTA or whatever runs. [Game compatibility list](https://github.com/xenia-project/game-compatibility/issues).
30+
Some real games run. Most don't. Don't ask if GTA or whatever runs.
31+
See the [Game compatibility list](https://github.com/xenia-project/game-compatibility/issues)
32+
for currently tracked games.
2933

3034
## Disclaimer
3135

@@ -42,20 +46,29 @@ Windows 8.1+ with Python 2.7 and [Visual Studio 2015](https://www.visualstudio.c
4246
> git clone https://github.com/benvanik/xenia.git
4347
> cd xenia
4448
> xb setup
49+
50+
# Pull latest changes, rebase, and update submodules and premake:
51+
> xb pull
52+
4553
# Build on command line:
4654
> xb build
55+
4756
# Run premake and open Visual Studio (run the 'xenia-app' project):
4857
> xb devenv
58+
4959
# Run premake to update the sln/vcproj's:
5060
> xb premake
5161

62+
# Format code to the style guide:
63+
> xb format
64+
5265
When fetching updates use `xb pull` to automatically fetch everything and
5366
run premake for project files/etc.
5467

5568
## Building
5669

57-
See [building](docs/building.md) for setup and information about the
58-
`xb` script. When writing code, check the [style guide](docs/style_guide.md)
70+
See [building.md](building.md) for setup and information about the
71+
`xb` script. When writing code, check the [style guide](style_guide.md)
5972
and be sure to run clang-format!
6073

6174
## Contributors Wanted!
@@ -69,6 +82,7 @@ that there are some major work areas still untouched:
6982

7083
* Help work through missing functionality/bugs in game [compat](https://github.com/benvanik/xenia/issues?labels=compat)
7184
* Add input drivers for [PS4 controllers](https://github.com/benvanik/xenia/issues/60) (or anything else)
85+
* Skilled with Linux? A strong contributor is needed to [help with porting](https://github.com/benvanik/xenia/labels/cross%20platform)
7286

7387
See more projects [good for contributors](https://github.com/benvanik/xenia/issues?labels=good+for+contributors&page=1&state=open). It's a good idea to ask on IRC/the bugs before beginning work
7488
on something.
File renamed without changes.

docs/cpu.md

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# CPU Documentation
22

3-
## Alloy
4-
5-
TODO
6-
73
## Memory Management
84

95
TODO

docs/cpu_todo.md

-9
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ will relocate the x64 when placing it in memory, which will be at a different
1616
location each time. Instead it would be nice to have the xbyak `calcJmpAddress`
1717
that performs the relocations use the address of our choosing.
1818

19-
### Stack Walking
20-
21-
Currently the Windows/VC++ dbghelp stack walking is relied on, however this is
22-
not portable, is slow, and cannot resolve JIT'ed symbols properly. Having our
23-
own stack walking code that could fall back to dbghelp (via some pluggable
24-
system) for host symbols would let us quickly get stacks through host and guest
25-
code and make things like sampling profilers, kernel callstack tracing, and
26-
other features possible.
27-
2819
### Sampling Profiler
2920

3021
Once we have stack walking it'd be nice to take something like

docs/debugger.md

-37
This file was deleted.

src/xenia/hid/winkey/premake5.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ project("xenia-hid-winkey")
1313
defines({
1414
})
1515
includedirs({
16-
project_root.."/third_party/elemental-forms/src",
16+
project_root.."/third_party/elemental-forms/src",
1717
})
1818
local_platform_files()

docs/style_guide.md renamed to style_guide.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,47 @@
22

33
The style guide can be summed up as 'clang-format with the Google style set'.
44
In addition, the [Google Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml)
5-
is followed and cpplint is the source of truth.
5+
is followed and cpplint is the source of truth. When in doubt, defer to what
6+
code in the project already does.
67

78
Base rules:
89

910
* 80 column line length max
1011
* LF (Unix-style) line endings
1112
* 2-space soft tabs, no TABs!
1213
* [Google Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml) for naming/casing/etc
14+
* Sort includes according to the [style guide rules](http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Names_and_Order_of_Includes)
15+
* Comments are properly punctuated (that means capitalization and periods, etc)
16+
* TODO's must be attributed like `// TODO(yourgithubname): foo.`
1317

1418
Code that really breaks from the formatting rules will not be accepted, as then
1519
no one else can use clang-format on the code without also touching all your
1620
lines.
1721

22+
### Why?
23+
24+
To quote the [Google Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml):
25+
26+
```
27+
One way in which we keep the code base manageable is by enforcing consistency.
28+
It is very important that any programmer be able to look at another's code and
29+
quickly understand it. Maintaining a uniform style and following conventions
30+
means that we can more easily use "pattern-matching" to infer what various
31+
symbols are and what invariants are true about them. Creating common, required
32+
idioms and patterns makes code much easier to understand. In some cases there
33+
might be good arguments for changing certain style rules, but we nonetheless
34+
keep things as they are in order to preserve consistency.
35+
```
36+
37+
## Buildbot Verification
38+
1839
The buildbot runs `xb lint --all` on the master branch, and will run
1940
`xb lint --origin` on pull requests. Run `xb format` before you commit each
2041
local change so that you are consistently clean, otherwise you may have to
2142
rebase. If you forget, run `xb format --origin` and rebase your changes (so you
2243
don't end up with 5 changes and then a 6th 'whoops' one - that's nasty).
2344

24-
The buildbot is running LLVM 3.6.1. If you are noticing style differences
45+
The buildbot is running LLVM 3.8.0. If you are noticing style differences
2546
between your local lint/format and the buildbot, ensure you are running that
2647
version.
2748

0 commit comments

Comments
 (0)