Adding CONTRIBUTING.md so that github shows it on issues.

This commit is contained in:
Ben Vanik 2015-08-28 14:16:38 -07:00
parent 45816d801b
commit a79ef87889
10 changed files with 120 additions and 64 deletions

View file

@ -1,45 +0,0 @@
# Building
You must have a 64-bit machine for building and running the project. Always
run your system updater before building and make sure you have the latest
video drivers for your card.
## Setup
### Windows
* Windows 8 or 8.1
* Visual Studio 2015
* [Python 2.7](http://www.python.org/download/releases/2.7.6/)
* If you are on Windows 8, you will also need the [Windows 8.1 SDK](http://msdn.microsoft.com/en-us/windows/desktop/bg162891)
Ensure Python is in your PATH (`C:\Python27\`).
I recommend using [Cmder](http://bliker.github.io/cmder/) for git and command
line usage.
#### Debugging
VS behaves oddly with the debug paths. Open the xenia project properties
and set the 'Command' to `$(SolutionDir)$(TargetPath)` and the
'Working Directory' to `$(SolutionDir)..\..`. You can specify flags and
the file to run in the 'Command Arguments' field (or use `--flagfile=flags.txt`).
To redirect output, use the following command flags:
`--flagfile=$(SolutionDir)scratch\flags.txt 2>&1 1>$(SolutionDir)scratch\stdout.txt`
### Linux
Linux support is extremely experimental and incomplete.
Only tested with GCC 4.9 on Ubuntu 14. [CodeLite](http://codelite.org) is the
IDE of choice and `xb premake` will spit out files for that. Make also works via
`xb build`.
Currently building requires that CC == CXX == g++. If you know a way around this
(to force .c files to be built with g++) let me know.
## Running
To make life easier you can use `--flagfile=myflags.txt` to specify all
arguments, including using `--target=my.xex` to pick an executable.

View file

@ -1,9 +1,5 @@
# CPU Documentation
## Alloy
TODO
## Memory Management
TODO

View file

@ -16,15 +16,6 @@ will relocate the x64 when placing it in memory, which will be at a different
location each time. Instead it would be nice to have the xbyak `calcJmpAddress`
that performs the relocations use the address of our choosing.
### Stack Walking
Currently the Windows/VC++ dbghelp stack walking is relied on, however this is
not portable, is slow, and cannot resolve JIT'ed symbols properly. Having our
own stack walking code that could fall back to dbghelp (via some pluggable
system) for host symbols would let us quickly get stacks through host and guest
code and make things like sampling profilers, kernel callstack tracing, and
other features possible.
### Sampling Profiler
Once we have stack walking it'd be nice to take something like

View file

@ -1,37 +0,0 @@
# Debugger
## Protocol
Framed messages:
```
[4b type] (0=request, 1=notification, etc)
[4b content source id]
[4b request/response id]
[4b size]
[payload]
```
## Content Sources
### `xe::dbg::sources::MemorySource`
[ ] Paged view into memory
[ ] Search operations
[ ] Live streaming updates
[ ] Writes
### `xe::dbg::sources::ProcessorSource`
[ ] Thread list
[ ] State read/write (per thread)
[ ] Modules
[ ] Statistics
[ ] Basic control (pause/resume)
[ ] Breakpoints/checkpoints/traces
[ ] Trace stream
### `xe::dbg::sources::ModuleSource`
[ ] Paged view into all symbols
[ ] Get function contents (data, disasm, llvm, x86, etc)

View file

@ -1,63 +0,0 @@
# Style Guide
The style guide can be summed up as 'clang-format with the Google style set'.
In addition, the [Google Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml)
is followed and cpplint is the source of truth.
Base rules:
* 80 column line length max
* LF (Unix-style) line endings
* 2-space soft tabs, no TABs!
* [Google Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml) for naming/casing/etc
Code that really breaks from the formatting rules will not be accepted, as then
no one else can use clang-format on the code without also touching all your
lines.
The buildbot runs `xb lint --all` on the master branch, and will run
`xb lint --origin` on pull requests. Run `xb format` before you commit each
local change so that you are consistently clean, otherwise you may have to
rebase. If you forget, run `xb format --origin` and rebase your changes (so you
don't end up with 5 changes and then a 6th 'whoops' one - that's nasty).
The buildbot is running LLVM 3.6.1. If you are noticing style differences
between your local lint/format and the buildbot, ensure you are running that
version.
## Tools
### clang-format
clang-format with the Google style is used to format all files. I recommend
installing/wiring it up to your editor of choice so that you don't even have to
think about tabs and wrapping and such.
#### Command Line
To use the `xb format` auto-formatter, you need to have a `clang-format` on your
PATH. If you're on Windows you can do this by installing an LLVM binary package
from [the LLVM downloads page](http://llvm.org/releases/download.html). If you
install it to the default location the `xb format` command will find it
automatically even if you don't choose to put all of LLVM onto your PATH.
#### Visual Studio
Grab the official [experimental Visual Studio plugin](http://llvm.org/builds/).
To switch to the Google style go Tools -> Options -> LLVM/Clang -> ClangFormat
and set Style to Google. Then use ctrl-r/ctrl-f to trigger the formatting.
Unfortunately it only does the cursor by default, so you'll have to select the
whole doc and invoke it to get it all done.
If you have a better option, let me know!
#### Xcode
Install [Alcatraz](http://alcatraz.io/) to get the [ClangFormat](https://github.com/travisjeffery/ClangFormat-Xcode)
package. Set it to use the Google style and format on save. Never think about
tabs or linefeeds or whatever again.
### cpplint
TODO(benvanik): write a cool script to do this/editor plugins.
In the future, the linter will run as a git commit hook and on travis.