diff options
-rw-r--r-- | INSTALL.md | 58 | ||||
-rw-r--r-- | Makefile | 21 | ||||
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | audio.asm | 9 | ||||
-rw-r--r-- | blue.asm | 1 | ||||
-rw-r--r-- | constants.asm | 4 | ||||
-rwxr-xr-x | init.sh | 17 | ||||
-rw-r--r-- | red.asm | 3 | ||||
-rw-r--r-- | roms.md5 | 2 | ||||
-rw-r--r-- | version.asm | 20 |
10 files changed, 91 insertions, 60 deletions
@@ -1,36 +1,72 @@ # Linux -Linux dependencies. OSX users already have these after installing Xcode. +Dependencies: sudo apt-get install make gcc bison git python python-setuptools + sudo easy_install pip +The assembler used is [**rgbds**](https://github.com/bentley/rgbds). -Set up the **pokered** repository: + git clone git://github.com/bentley/rgbds.git + cd rgbds + sudo mkdir -p /usr/local/man/man{1,7} + sudo make install + cd .. + rm -rf rgbds + +Set up the repository. git clone git://github.com/iimarckus/pokered.git cd pokered + git submodule init + git submodule update + sudo pip install -r extras/requirements.txt + +To build **pokered.gbc** and **pokeblue.gbc**: - sudo ./init.sh + make +This should take about 10 seconds. Subsequent builds are faster. -Now **pokered.gbc** can be built from source. +To build them individually: make red + make blue -This should take about 10-15 seconds. Subsequent builds are faster. +# OS X -To build Pokémon Blue: +Download and install **Command Line Tools for Xcode**. +Then open a terminal and follow the Linux instructions. - make blue +# Windows -# OSX +It's recommended that you use a virtual machine running Linux or OS X. -Download and install **Xcode**. Then follow the Linux instructions. +If you insist on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit). +Dependencies are downloaded in the installer rather than the command line. +Select the following packages: +* make +* git +* python +* python-setuptools -# Windows +To install rgbds, extract the contents of +**http://iimarck.us/etc/rgbds.zip** +and put them in `C:\cygwin\usr\local\bin`. + +Then set up the repository. In the **Cygwin terminal**: + + git clone git://github.com/iimarckus/pokered.git + cd pokered + git submodule init + git submodule update + sudo easy_install pip + sudo pip install -r extras/requirements.txt + +To build: -Not yet. + make @@ -26,18 +26,13 @@ ROMS := pokered.gbc pokeblue.gbc # generate dependencies for each object $(shell $(foreach obj, $(OBJS), \ $(eval $(obj:.o=)_DEPENDENCIES := $(shell $(PYTHON) extras/pokemontools/scan_includes.py $(obj:.o=.asm))) \ - $(eval ALL_DEPENDENCIES += $($(obj:.o=)_DEPENDENCIES)) \ )) all: $(ROMS) red: pokered.gbc blue: pokeblue.gbc -compare: baserom.gbc pokered.gbc - cmp $^ - -redrle: extras/redtools/redrle.c - ${CC} -o $@ $> - +compare: + @md5sum -c --quiet roms.md5 clean: rm -f $(ROMS) rm -f $(OBJS) @@ -45,8 +40,9 @@ clean: rm -f redrle -baserom.gbc: ; - @echo "Wait! Need baserom.gbc first. Check README for details." && false +redrle: extras/redtools/redrle.c + ${CC} -o $@ $< + %.asm: ; .asm.tx: @@ -58,11 +54,14 @@ $(OBJS): $$*.tx $$(patsubst %.asm, %.tx, $$($$*_DEPENDENCIES)) @$(eval TEXTQUEUE :=) rgbasm -o $@ $*.tx + +OPTIONS = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 + pokered.gbc: $(RED_OBJS) rgblink -n $*.sym -m $*.map -o $@ $^ - rgbfix -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON RED" $@ + rgbfix $(OPTIONS) -t "POKEMON RED" $@ pokeblue.gbc: $(BLUE_OBJS) rgblink -n $*.sym -m $*.map -o $@ $^ - rgbfix -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE" $@ + rgbfix $(OPTIONS) -t "POKEMON BLUE" $@ @@ -1,18 +1,20 @@ -# Pokémon Red +# Pokémon Red and Blue -This is a disassembly of Pokémon Red. +This is a disassembly of Pokémon Red and Blue. -It uses the following ROM as a base: +It builds the following roms: - Pokemon Red (UE) [S][!].gb - (MD5: 3d45c1ee9abd5738df46d2bdda8b57dc) +* Pokemon Red (UE) [S][!].gb `md5: 3d45c1ee9abd5738df46d2bdda8b57dc` +* Pokemon Blue (UE) [S][!].gb `md5: 50927e843568814f7ed45ec4f944bd8b` To set up the repository, see [**INSTALL.md**](INSTALL.md). ## See also -* Disassembly of [**Pokémon Crystal**](https://github.com/kanzure/pokecrystal) +* Disassembly of [**Pokémon Crystal**][pokecrystal] +* irc: **nucleus.kafuka.org** [**#skeetendo**][irc] -* irc: **nucleus.kafuka.org** [**#skeetendo**](https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo) +[pokecrystal]: https://github.com/kanzure/pokecrystal +[irc]: https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo @@ -3,14 +3,7 @@ AUDIO_1 EQU $2 AUDIO_2 EQU $8 AUDIO_3 EQU $1f -INCLUDE "macros.asm" -INCLUDE "constants/music_constants.asm" -INCLUDE "constants/trainer_constants.asm" - -; PC -INCLUDE "hram.asm" -INCLUDE "constants/move_constants.asm" - +INCLUDE "constants.asm" SECTION "Sound Effect Headers 1", ROMX, BANK[AUDIO_1] @@ -1,2 +1 @@ _BLUE EQU 1 -_RED EQU 0 diff --git a/constants.asm b/constants.asm index 3496aa6a..85990c48 100644 --- a/constants.asm +++ b/constants.asm @@ -1,6 +1,4 @@ -_JAPAN EQU 0 -_GREEN EQU 0 -_YELLOW EQU 0 +INCLUDE "version.asm" INCLUDE "macros.asm" diff --git a/init.sh b/init.sh deleted file mode 100755 index 2106f64a..00000000 --- a/init.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# install rgbds -git clone git://github.com/bentley/rgbds.git && \ -cd rgbds && \ -make && \ -mkdir -p /usr/local/man/man{1,7} && \ -make install && \ -cd .. && \ -rm -rf rgbds - -# set up the submodule (extras/) -git submodule init && \ -git submodule update && \ -easy_install pip && \ -pip install -r extras/requirements.txt - @@ -1,2 +1 @@ -_RED EQU 1 -_BLUE EQU 0 +_RED EQU 1 diff --git a/roms.md5 b/roms.md5 new file mode 100644 index 00000000..c4128cfd --- /dev/null +++ b/roms.md5 @@ -0,0 +1,2 @@ +3d45c1ee9abd5738df46d2bdda8b57dc pokered.gbc +50927e843568814f7ed45ec4f944bd8b pokeblue.gbc diff --git a/version.asm b/version.asm new file mode 100644 index 00000000..6f80aa1c --- /dev/null +++ b/version.asm @@ -0,0 +1,20 @@ +if !def(_RED) +_RED EQU 0 +endc + +if !def(_BLUE) +_BLUE EQU 0 +endc + +if !def(_JAPAN) +_JAPAN EQU 0 +endc + +if !def(_GREEN) +_GREEN EQU 0 +endc + +if !def(_YELLOW) +_YELLOW EQU 0 +endc + |