ref: f0ab09125493f91d66af836e0abb977459a0d801
parent: 047c8e4bc079140b2e88b27e4ed8a6ca2ae9533d
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Tue Dec 12 13:50:39 EST 2017
Add an FAQ, and ive a bit more detail in Windows install instructions
--- /dev/null
+++ b/FAQ.md
@@ -1,0 +1,32 @@
+# FAQ
+
+## What is pokecrystal11.gbc?
+
+Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `CRYSTAL11` so the assembly builds the changed version.
+
+## Can't build ROM; "ERROR: `UNION` already defined"
+
+Download [**rgbds 0.3.3**](rgbds). Earlier versions will not work.
+
+## Can't build ROM; "Segmentation fault" from `rgbgfx`
+
+If you are using 64-bit Windows, download [**64-bit Cygwin**](cygwin) and [**64-bit rgbds**](rgbds).
+
+## Can't build ROM; "Section is too big" or "Unable to place section in bank"
+
+If you have not changed any of the asm, make sure you have the latest version of pokecrystal and the correct version of rgbds (see [INSTALL.md](INSTALL.md)).
+
+If you added or changed any code, it has to fit in the **memory banks**. The 2MB ROM is divided into 128 banks of 4KB each, numbered $00 to $7F. The linkerscript **pokecrystal.link** lists which **`SECTION`**s go in which banks. Try moving some code into a new section.
+
+## How do I edit maps?
+
+For `asm` scripts, read [docs/map_scripts.md](docs/map_scripts.md). For `blk` layouts, try [crowdmap](crowdmap) or [Polished Map](polished-map).
+
+## I need more help!
+
+Try asking on IRC or Discord (see [README.md](README.md)).
+
+[cygwin]: https://cygwin.com/install.html
+[rgbds]: https://github.com/rednex/rgbds/releases
+[crowdmap]: https://github.com/yenatch/crowdmap/
+[polished-map]: https://github.com/roukaour/polished-map
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,10 +1,12 @@
-The source files are assembled into a rom using [**rgbds**](https://github.com/rednex/rgbds).
+# Instructions
+
+The source files are assembled into a ROM using [**rgbds**](https://github.com/rednex/rgbds).
These instructions explain how to set up the tools required to build.
-If you run into trouble, ask for help on irc or discord (see [README.md](README.md)).
+If you run into trouble, ask for help on IRC or Discord (see [README.md](README.md)).
-# Linux
+## Linux
```bash
sudo apt-get install make gcc bison git libpng-dev
@@ -25,7 +27,7 @@
```
-# Mac
+## Mac
In **Terminal**, run:
@@ -48,24 +50,23 @@
```
-# Windows
+## Windows
-To build on Windows, install [**Cygwin**](http://cygwin.com/install.html) with the default settings.
+Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit.
-In the installer, select the following packages:
+Run setup and leave the default settings. At "Select Packages", choose to install the following:
+
- `make`
- `git`
- `gcc-core`
-Then download [**rgbds**](https://github.com/rednex/rgbds/releases/).
-Extract rgbds-0.3.3-win64.tar.gz and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**. If you are using 32-bit Windows and Cygwin, extract **rgbds-0.3.3-win32.tar.gz** to **C:\Cygwin\usr\local\bin**.
+Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.tar.gz** or **win32.tar.gz** release. Extract it and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**.
**Note: If you have an older rgbds, you will need to update to 0.3.3 or newer.** Ignore this if you have never installed rgbds before.
-In the **Cygwin terminal**:
+In the **Cygwin terminal**, enter these commands:
```bash
-
git clone https://github.com/pret/pokecrystal
cd pokecrystal
```
@@ -74,4 +75,10 @@
```bash
make
+```
+
+To build **pokecrystal11.gbc**:
+
+```bash
+make crystal11
```
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@
To set up the repository, see [INSTALL.md](INSTALL.md).
## See also
+
* Disassembly of [**Pokémon Red/Blue**][pokered]
* Disassembly of [**Pokémon Yellow**][pokeyellow]
* Disassembly of [**Pokémon Pinball**][pokepinball]
--- a/docs/text_commands.md
+++ b/docs/text_commands.md
@@ -38,8 +38,9 @@
## `$02`: `text_bcd` *address*, *flags*
-Write [BCD](https://en.wikipedia.org/wiki/Binary-coded_decimal) from an address,
-typically RAM.
+Write [BCD](bcd) from an address, typically RAM.
+
+[bcd]: https://en.wikipedia.org/wiki/Binary-coded_decimal
## `$03`: `text_move` *address*