ref: ddc4a929058ff103cac5743ca39bb8e4b520ee90
parent: c61b3d42ad4e88b32e9c321b7fcc559ec0220e64
parent: 94f5f61265b9654925b66dca7c3256668435eeea
author: Bryan Bishop <[email protected]>
date: Tue Aug 27 07:18:30 EDT 2013
Merge pull request #161 from kanzure/remove-extras This merges branch 'remove-extras' into master. The extras/ path is now replaced by a git submodule that is independently version controlled and separate from the pokecrystal project. The git submodule is a reference to v1.1.0 of this repository: https://github.com/kanzure/pokemon-reverse-engineering-tools It's also available as a generic python module now: https://pypi.python.org/pypi/pokemontools https://github.com/kanzure/pokecrystal/pull/161
--- /dev/null
+++ b/.gitmodules
@@ -1,0 +1,3 @@
+[submodule "extras"]
+ path = extras
+ url = git://github.com/kanzure/pokemon-reverse-engineering-tools.git
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -9,13 +9,10 @@
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.
-
-
# Windows
If you're on Windows and can't install Linux, **Cygwin** is a great alternative.
@@ -39,7 +36,6 @@
* **python-setuptools**
* **unzip**
-
## Using Cygwin
Launch the **Cygwin terminal**.
@@ -56,7 +52,6 @@
cd /away/we/go
```
-
## Getting up and running
We need three things to assemble the source into a rom.
@@ -65,8 +60,6 @@
2. a **pokecrystal** repository
3. a **base rom**
--
-
We use **rgbds** to spit out a Game Boy rom from source.
```bash
cd /usr/local/bin
@@ -96,10 +89,17 @@
Name it **baserom.gbc**.
--
+**pokecrystal** only compiles with the use of a git submodule. To activate the submodule type:
+```
+git submodule init
+git submodule update
+```
+
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
make
```
@@ -112,8 +112,6 @@
After that, **only modified source files have to be processed again**,
so compiling again should be a few seconds faster.
-
-
# Linux
```bash
@@ -131,7 +129,16 @@
# download pokecrystal
git clone git://github.com/kanzure/pokecrystal.git
cd pokecrystal
-pip install -r requirements.txt
+
+# grab extras/ which is required for compiling
+git submodule init
+git submodule update
+
+# install python requirements
+pip install -r extras/requirements.txt
+
+# use hexdump to diff binary files
+git config diff.hex.textconv hexdump
```
Put your base rom in the pokecrystal repository. Name it **baserom.gbc**.
@@ -145,7 +152,6 @@
If you see `cmp baserom.gbc pokecrystal.gbc` as the last line, the build was successful! Rejoice!
-
# Now what?
**[pokecrystal.asm](https://github.com/kanzure/pokecrystal/blob/master/pokecrystal.asm)** is a good starting point.
@@ -169,3 +175,10 @@
**[nucleus.kafuka.org #skeetendo](https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo)**.
+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.
--- a/Makefile
+++ b/Makefile
@@ -25,21 +25,22 @@
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
pngs:
- cd extras && python gfx.py mass-decompress && python gfx.py dump-pngs
+ python extras/pokemontools/gfx.py mass-decompress
+ python extras/pokemontools/gfx.py dump-pngs
lzs: $(LZ_GFX) $(TWOBPP_GFX)
@:
gfx/pics/%/front.lz: gfx/pics/%/tiles.2bpp gfx/pics/%/front.png
- python extras/gfx.py png-to-lz --front $^
+ python extras/pokemontools/gfx.py png-to-lz --front $^
gfx/pics/%/tiles.2bpp: gfx/pics/%/tiles.png
- python extras/gfx.py png-to-2bpp $<
+ python extras/pokemontools/gfx.py png-to-2bpp $<
gfx/pics/%/back.lz: gfx/pics/%/back.png
- python extras/gfx.py png-to-lz --vert $<
+ python extras/pokemontools/gfx.py png-to-lz --vert $<
gfx/trainers/%.lz: gfx/trainers/%.png
- python extras/gfx.py png-to-lz --vert $<
+ python extras/pokemontools/gfx.py png-to-lz --vert $<
.png.lz:
- python extras/gfx.py png-to-lz $<
+ python extras/pokemontools/gfx.py png-to-lz $<
.png.2bpp:
- python extras/gfx.py png-to-lz $<
+ python extras/pokemontools/gfx.py png-to-lz $<