Add docs
diff --git a/docs/content/CNAME b/docs/content/CNAME
new file mode 100644
index 0000000..14ec71f
--- /dev/null
+++ b/docs/content/CNAME
@@ -0,0 +1 @@
+6502.swisschili.sh
\ No newline at end of file
diff --git a/docs/content/building.md b/docs/content/building.md
new file mode 100644
index 0000000..fea14ff
--- /dev/null
+++ b/docs/content/building.md
@@ -0,0 +1,29 @@
+@parent = page.html
+@title = Building
+
+# Building from source
+
+You need the following libraries installed to build the emulator:
+
+`pthread` `rt` `m` `SDL2` `GL` `GLEW` `GLU` `readline`
+
+The first three will be included on any POSIX compliant operating system (OS X, Linux, BSD, etc).
+To install SDL2, visit its <a href="https://www.libsdl.org/">website</a> or use your distributions
+package manager.
+
+<br>
+You also need `awk` installed if you want to modify the `6502.csv` file from which parts of the
+emulator are generated. If you don't want to do this, run cmake with `-DGEN_INSTRUCTIONS_HEADER=OFF`
+
+<br>
+You may be able to build this on Windows using Cygwin or MinGW, but I haven't tested that.
+
+<br>
+Run the usual commands to build with cmake:
+```
+$ mkdir build
+$ cd build
+$ cmake ..
+$ make -j
+$ ./6502 # you built it, nice
+```
diff --git a/docs/content/colors.dat b/docs/content/colors.dat
new file mode 100644
index 0000000..aea5970
--- /dev/null
+++ b/docs/content/colors.dat
Binary files differ
diff --git a/docs/content/demo.webm b/docs/content/demo.webm
new file mode 100644
index 0000000..fba477a
--- /dev/null
+++ b/docs/content/demo.webm
Binary files differ
diff --git a/docs/content/disco.dat b/docs/content/disco.dat
new file mode 100644
index 0000000..b004f7a
--- /dev/null
+++ b/docs/content/disco.dat
Binary files differ
diff --git a/docs/content/examples.md b/docs/content/examples.md
new file mode 100644
index 0000000..9b8e1c2
--- /dev/null
+++ b/docs/content/examples.md
@@ -0,0 +1,56 @@
+@parent = page.html
+@title = Examples
+
+# Example Programs
+
+Download the compiled programs and try them out in the emulator!
+
+### Colors
+
+Draws every supported color on the screen.
+<a href="colors.dat" download>Download</a>
+
+```
+ LDY #$0
+loop:
+ TYA
+ STA $200, Y
+ STA $300, Y
+ STA $400, Y
+ STA $500, Y
+ INY
+ CMP #$ff
+ BCC loop
+ BRK
+```
+
+### Disco
+
+Epilepsy warning: lots of flashing colors. Due to how much faster this emulator is
+than the one this program was written for, it's more of just flashing colors than
+what it originally looked like.
+<a href="disco.dat" download>Download</a>
+
+```
+; Taken from 6502asm.com
+
+start:
+ inx
+ txa
+ sta $200, y
+ sta $300, y
+ sta $400, y
+ sta $500, y
+ iny
+ tya
+ cmp 16
+ bne do
+ iny
+ jmp start
+do:
+ iny
+ iny
+ iny
+ iny
+ jmp start
+```
diff --git a/docs/content/index.md b/docs/content/index.md
new file mode 100644
index 0000000..48d4508
--- /dev/null
+++ b/docs/content/index.md
@@ -0,0 +1,42 @@
+@parent = page.html
+@title = Home
+
+# 6502 Toolchain
+
+<center>
+ <video controls="true">
+ <source src="demo.webm" type="video/webm">
+ </video>
+</center>
+
+This project aims to create a fast, powerful, and easy to use toolchain for writing, debugging,
+and running programs for the 6502 processor. It features a graphical and CLI debugger, disassembler,
+and emulator.
+
+
+## Features
+
+### 8 bit color
+
+That's 16 times more colors than <a href="http://6502asm.com/" target="_blank">the competition</a>!
+
+### Graphical debugger
+
+Easily step through, run, and debug your programs using a fast graphical debugger. A traditional
+CLI debugger is also available.
+
+### Fully multithreaded
+
+The graphical debugger, cli debugger, and screen are all fully asynchronous. That means your
+debugger stays fast, even when the emulator is running at full capacity.
+It will soon be possible to even debug an already running instance of the emulator!
+
+### *Fast*
+
+This emulator is incredibly fast. So fast that programs written for other emulators don't work
+properly half the time because of how fast it is! At some point I will add an option to slow
+the emulator down so it is comparable to other emulators.
+
+<br>
+
+So what are you waiting for? Download the emulator now, or build it from source.
\ No newline at end of file
diff --git a/docs/content/styles.scss b/docs/content/styles.scss
new file mode 100644
index 0000000..dfd1940
--- /dev/null
+++ b/docs/content/styles.scss
@@ -0,0 +1,68 @@
+html,
+body
+{
+ font-family: /*'Segoe UI', 'Roboto', 'San Francisco', 'IBM Plex Sans',*/ sans-serif;
+}
+
+body
+{
+ display: grid;
+ place-items: center center
+}
+
+
+h4 code
+{
+ font-size: 1.5em;
+}
+
+code
+{
+ background: #f2f4f4;
+ border-radius: 5px;
+ padding: 3px 5px 3px 5px;
+}
+
+.container
+{
+ width: 60em;
+}
+
+.nav
+{
+ font-size: 1.5rem;
+ display: flex;
+ flex-direction: row;
+
+ .wide
+ {
+ flex: 1;
+ font-weight: bold;
+ }
+}
+
+.split
+{
+ display: grid;
+ grid-template-columns: 16em auto;
+}
+
+video
+{
+ width: 100%;
+}
+
+@media screen and (max-width: 58em)
+{
+ .split
+ {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .container
+ {
+ width: calc(100% - 2em);
+ margin: 1em;
+ }
+}
diff --git a/docs/content/usage.md b/docs/content/usage.md
new file mode 100644
index 0000000..fb18254
--- /dev/null
+++ b/docs/content/usage.md
@@ -0,0 +1,46 @@
+@parent = page.html
+@title = Usage
+
+# Basic Usage
+
+The `6502` command takes some arguments that control how it functions. Each flag is documented
+here. Note that only UNIX style flags are supported, not GNU style. This uses the standard
+`getopt()` function, so flags work the same as any UNIX command.
+
+#### `-g`
+
+Opens a GUI debugger window.
+
+#### `-s`
+
+Opens a window that shows the emulators screen. Cannot be used in conjunction with `-g`.
+
+#### `-H`
+
+Keep the emulator running after the CPU halts (after an interrupt is triggered). Useful
+for debugging short programs. Does nothing when used with `-D`.
+
+#### `-d`
+
+Disassemble the input file, printing the whole disassembly to `stdout`. You probably want
+to use this with `-n`
+
+#### `-r`
+
+Run the input file. Can be used in conjunction with `-s` to run and display the output.
+
+#### `-D`
+
+Open CLI debugger. Can be used with `-s` to view screen while debugging.
+
+#### `-i input`
+
+Read `input` into the CPUs memory.
+
+#### `-n number_of_instructions`
+
+Disassemble only `number_of_instructions` instructions.
+
+#### `-h, -?`
+
+Print a help message.