mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Merge pull request #164 from yenatch/fix-install
rework install instructions
This commit is contained in:
commit
c9ea43345e
135
INSTALL.md
135
INSTALL.md
@ -1,6 +1,6 @@
|
|||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
Compiling **pokecrystal.gbc** requires a certain **Pokemon Crystal** rom:
|
Assembling **pokecrystal.gbc** requires a certain **Pokemon Crystal** rom:
|
||||||
|
|
||||||
```
|
```
|
||||||
Pokemon - Crystal Version (UE) (V1.0) [C][!].gbc
|
Pokemon - Crystal Version (UE) (V1.0) [C][!].gbc
|
||||||
@ -10,11 +10,16 @@ md5: 9f2922b235a5eeb78d65594e82ef5dde
|
|||||||
Save it as **baserom.gbc** in the repository.
|
Save it as **baserom.gbc** in the repository.
|
||||||
|
|
||||||
|
|
||||||
Feel free to ask us on **[nucleus.kafuka.org #skeetendo](https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo)** if something goes wrong!
|
Feel free to ask us on
|
||||||
|
**[nucleus.kafuka.org #skeetendo](https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo)**
|
||||||
|
if something goes wrong.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
|
|
||||||
If you are on Windows and can't install Linux, **Cygwin** is a great alternative.
|
If you're on Windows and can't install Linux, **Cygwin** is a great alternative.
|
||||||
|
|
||||||
|
|
||||||
## Installing Cygwin
|
## Installing Cygwin
|
||||||
|
|
||||||
@ -25,15 +30,21 @@ Cygwin provides a virtual Linux environment on Windows systems. Just get **setup
|
|||||||
During the install:
|
During the install:
|
||||||
|
|
||||||
* Keep the defaults.
|
* Keep the defaults.
|
||||||
|
|
||||||
* Most mirrors are molasses. Use **http://mirrors.kernel.org**.
|
* Most mirrors are molasses. Use **http://mirrors.kernel.org**.
|
||||||
|
* From the package selection, pick:
|
||||||
* From the package selection, select **wget**.
|
* **wget**
|
||||||
|
* **make**
|
||||||
|
* **git**
|
||||||
|
* **python**
|
||||||
|
* **python-setuptools**
|
||||||
|
* **unzip**
|
||||||
|
|
||||||
|
|
||||||
## Using Cygwin
|
## Using Cygwin
|
||||||
|
|
||||||
Launch the **Cygwin terminal**. Maybe you know your way around the Linux terminal, **bash**. If not, a crash course:
|
Launch the **Cygwin terminal**.
|
||||||
|
Maybe you know your way around the Linux terminal ( **bash** ).
|
||||||
|
If not, a crash course:
|
||||||
```bash
|
```bash
|
||||||
# list files in current directory
|
# list files in current directory
|
||||||
ls
|
ls
|
||||||
@ -48,119 +59,113 @@ cd /away/we/go
|
|||||||
|
|
||||||
## Getting up and running
|
## Getting up and running
|
||||||
|
|
||||||
We need a couple more things to be able to compile.
|
We need three things to assemble the source into a rom.
|
||||||
|
|
||||||
|
1. **rgbds**
|
||||||
|
2. a **pokecrystal** repository
|
||||||
|
3. a **base rom**
|
||||||
|
|
||||||
If you're feeling lazy, just paste these commands into your terminal.
|
-
|
||||||
|
|
||||||
|
|
||||||
**apt-cyg** lets you install new packages without running Cygwin setup.
|
|
||||||
|
|
||||||
|
We use **rgbds** to spit out a Game Boy rom from source.
|
||||||
```bash
|
```bash
|
||||||
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
|
cd /usr/local/bin
|
||||||
chmod +x apt-cyg
|
wget http://iimarck.us/etc/rgbds-20130811.zip
|
||||||
mv apt-cyg /usr/local/bin/
|
unzip -j rgbds-20130811.zip
|
||||||
|
rm rgbds-20130811.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Now we can use apt-cyg to install everything else.
|
The **pokecrystal** repository contains the source files used to create the rom.
|
||||||
|
|
||||||
```bash
|
|
||||||
apt-cyg install make git python python-setuptools unzip
|
|
||||||
easy_install pip
|
|
||||||
```
|
|
||||||
|
|
||||||
**rgbds** will let you compile Game Boy roms.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
wget http://diyhpl.us/~bryan/irc/pokered/rgbds/rgbds-0.0.1.zip
|
|
||||||
unzip rgbds-0.0.1.zip
|
|
||||||
mv rgbds-0.0.1/* /usr/local/bin
|
|
||||||
rm -r rgbds-0.0.1*
|
|
||||||
```
|
|
||||||
|
|
||||||
Set up the **pokecrystal** repository:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cd ~
|
||||||
git clone https://github.com/kanzure/pokecrystal
|
git clone https://github.com/kanzure/pokecrystal
|
||||||
cd pokecrystal
|
cd pokecrystal
|
||||||
|
|
||||||
# install python requirements
|
# install python requirements
|
||||||
|
easy_install pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
## Don't forget baserom.gbc!!
|
Not everything is included in the source yet.
|
||||||
|
Missing patches are copied from a **base rom** (not included).
|
||||||
|
|
||||||
Make sure you downloaded a base rom. Name it **baserom.gbc**.
|
```
|
||||||
|
Pokemon - Crystal Version (UE) (V1.0) [C][!].gbc
|
||||||
|
md5: 9f2922b235a5eeb78d65594e82ef5dde
|
||||||
|
```
|
||||||
|
|
||||||
|
Name it **baserom.gbc**.
|
||||||
|
|
||||||
|
-
|
||||||
|
|
||||||
Now you should be able to build **pokecrystal.gbc** for the first time.
|
Now you should be able to build **pokecrystal.gbc** for the first time.
|
||||||
|
This assembles a new rom from the source code.
|
||||||
This compiles a new rom from the source code, with any patches filled in from the base rom.
|
|
||||||
```bash
|
```bash
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
This ought to take **between 3 and 15 seconds**, depending on your computer.
|
This ought to take **between 3 and 15 seconds**, depending on your computer.
|
||||||
|
|
||||||
If you see `cmp baserom.gbc pokecrystal.gbc` as the last line, the build was successful!
|
If the last line is `cmp baserom.gbc pokecrystal.gbc`, the build was successful!
|
||||||
|
|
||||||
Your first compile processes every source file at once. After that, **only modified source files have to be reprocessed**, so compiling again should be a few seconds faster.
|
Your first build processes every source file at once.
|
||||||
|
After that, **only modified source files have to be processed again**,
|
||||||
|
so compiling again should be a few seconds faster.
|
||||||
|
|
||||||
Other **make targets** that may come in handy:
|
|
||||||
|
|
||||||
`make clean` deletes any preprocessed source files (.tx), rgbds object files and pokecrystal.gbc, in case something goes wrong.
|
|
||||||
|
|
||||||
`make pngs` decompresses any **lz** files in gfx/ and then exports any graphics files to **png**.
|
|
||||||
|
|
||||||
`make lzs` does the reverse. This is already part of the build process, so **modified pngs will automatically be converted to 2bpp and lz-compressed** without any additional work.
|
|
||||||
|
|
||||||
|
|
||||||
# Linux
|
# Linux
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get install make gcc bison git python python-setuptools
|
sudo apt-get install make gcc bison git python python-setuptools
|
||||||
|
|
||||||
# unittest2 is required if using python2.6
|
|
||||||
sudo easy_install unittest2
|
|
||||||
sudo easy_install pip
|
sudo easy_install pip
|
||||||
|
|
||||||
# download rgbds source code
|
# install rgbds
|
||||||
git clone git://github.com/bentley/rgbds.git
|
git clone git://github.com/bentley/rgbds.git
|
||||||
|
|
||||||
# compile rgbds
|
|
||||||
cd rgbds
|
cd rgbds
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
# check if rgbasm is installed now
|
cd ..
|
||||||
which rgbasm
|
|
||||||
|
|
||||||
# download pokecrystal
|
# download pokecrystal
|
||||||
git clone git://github.com/kanzure/pokecrystal.git
|
git clone git://github.com/kanzure/pokecrystal.git
|
||||||
cd pokecrystal
|
cd pokecrystal
|
||||||
|
|
||||||
# install python requirements
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# use hexdump to diff binary files
|
|
||||||
git config diff.hex.textconv hexdump
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To compile the rom from asm source:
|
Put your base rom in the pokecrystal repository. Name it **baserom.gbc**.
|
||||||
|
|
||||||
|
To compile the rom from source:
|
||||||
```bash
|
```bash
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
That will take between 3 and 15 seconds, depending on your computer. If you see `cmp baserom.gbc pokecrystal.gbc` as the last line, the build was successful! Rejoice!
|
That will take between 3 and 15 seconds, depending on your computer.
|
||||||
|
If you see `cmp baserom.gbc pokecrystal.gbc` as the last line, the build was successful! Rejoice!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Now what?
|
# Now what?
|
||||||
|
|
||||||
**main.asm** is a good starting point. The structure of the source is laid out here.
|
**[pokecrystal.asm](https://github.com/kanzure/pokecrystal/blob/master/pokecrystal.asm)** is a good starting point.
|
||||||
|
The structure of the source is laid out here.
|
||||||
|
|
||||||
* **Can't find something?** Anyone can add to the source. There's lots to be uncovered.
|
|
||||||
|
|
||||||
* **Do your own thing!** The asm source is hack-friendly, and the supplementary scripts in extras/ can be used for other projects.
|
* Other **make targets** that may come in handy:
|
||||||
|
|
||||||
|
* `make clean` deletes any preprocessed source files (.tx), rgbds object files and pokecrystal.gbc.
|
||||||
|
* `make pngs` decompresses any **lz** files in gfx/ and then exports any graphics files to **png**.
|
||||||
|
* `make lzs` does the reverse. This is already part of the build process, so **modified pngs will automatically be converted to 2bpp and lz-compressed** without any additional work.
|
||||||
|
|
||||||
|
|
||||||
|
* **Can't find something?**
|
||||||
|
Anyone can add to the source. There's lots to be uncovered.
|
||||||
|
|
||||||
|
* **Do your own thing!**
|
||||||
|
The asm source is hack-friendly, and the supplementary scripts in extras/ can be used for other projects.
|
||||||
|
|
||||||
|
We'll be happy to answer any **questions** on
|
||||||
|
**[nucleus.kafuka.org #skeetendo](https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo)**.
|
||||||
|
|
||||||
* We'll be happy to answer any **questions** on **[nucleus.kafuka.org #skeetendo](https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo)**.
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user