This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial import
- Loading branch information
0 parents
commit 8d37293
Showing
2,949 changed files
with
217,202 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text eol=lf | ||
|
||
# Explicitly declare text files you want to always be normalized and converted | ||
# to native line endings on checkout. | ||
*.asm text | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.2bpp binary | ||
*.1bpp binary | ||
*.rle binary | ||
*.tilecoll binary | ||
*.bst binary | ||
*.map binary | ||
*.wav binary | ||
*.blk binary | ||
*.pic binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# precompiled python | ||
*.pyc | ||
|
||
# compiled object file | ||
*.o | ||
|
||
# no binaries | ||
*.exe | ||
|
||
# roms | ||
*.gbc | ||
*.gb | ||
|
||
# rgbds extras | ||
*.sym | ||
|
||
# converted image data | ||
*.2bpp | ||
*.1bpp | ||
*.pic | ||
|
||
# swap files for vim | ||
.*.swp | ||
|
||
# no data from extras/ | ||
*.json | ||
|
||
# for any of the poor souls with save game files in their working directory | ||
*.sgm | ||
*.sav | ||
*.sys | ||
|
||
# for vim configuration | ||
# url: http://www.vim.org/scripts/script.php?script_id=441 | ||
.lvimrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "extras"] | ||
path = extras | ||
url = git://github.com/kanzure/pokemon-reverse-engineering-tools.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: c | ||
install: | ||
- |- | ||
path="$(pwd)"; cd; | ||
wget https://github.com/rednex/rgbds/archive/v0.3.3.tar.gz -O rgbds.tar.gz && | ||
tar xf rgbds.tar.gz && | ||
cd rgbds-0.3.3 && | ||
sudo make install && | ||
cd - && | ||
rm -rf rgbds && | ||
cd "$path" | ||
before_script: | ||
- |- | ||
function check_status() { | ||
if ! git diff-index --quiet --ignore-submodules=all HEAD --; then | ||
echo 'Uncommitted changes detected:'; | ||
git diff-index HEAD --; | ||
return 1; | ||
fi; | ||
} | ||
script: | ||
- make | ||
- make compare | ||
- check_status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Linux | ||
|
||
sudo apt-get install make git python | ||
|
||
sudo apt-get install byacc flex pkg-config libpng-dev | ||
git clone https://github.com/rednex/rgbds | ||
cd rgbds | ||
sudo make install | ||
cd .. | ||
|
||
git clone --recursive https://github.com/pret/pokered | ||
cd pokered | ||
|
||
To build **pokered.gbc** and **pokeblue.gbc**: | ||
|
||
make | ||
|
||
To build them individually: | ||
|
||
make red | ||
make blue | ||
|
||
|
||
# Mac | ||
|
||
Get [**Homebrew**](http://brew.sh/). | ||
|
||
Then in **Terminal**, run: | ||
|
||
xcode-select --install | ||
brew install rgbds | ||
|
||
git clone --recursive https://github.com/pret/pokered | ||
cd pokered | ||
|
||
make | ||
|
||
|
||
# Windows | ||
|
||
To build on Windows, use [**Cygwin**](http://cygwin.com/install.html) (64-bit). Use the default settings. | ||
|
||
In the installer, select the following packages: | ||
- `make` | ||
- `git` | ||
- `python` | ||
|
||
Then download [**rgbds**](https://github.com/bentley/rgbds/releases). | ||
Extract the archive. Inside should be `rgbasm.exe`, `rgblink.exe`, `rgbfix.exe`, `rgbgfx.exe` and some `.dll` files. Put each file in `C:\cygwin64\usr\local\bin\`. If your Cygwin installation directory differs, ensure the `bin` directory is present in the PATH variable. | ||
|
||
In the **Cygwin terminal**: | ||
|
||
git clone --recursive https://github.com/pret/pokered | ||
cd pokered | ||
|
||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
PYTHON := python | ||
MD5 := md5sum -c --quiet | ||
|
||
2bpp := $(PYTHON) extras/pokemontools/gfx.py 2bpp | ||
1bpp := $(PYTHON) extras/pokemontools/gfx.py 1bpp | ||
pic := $(PYTHON) extras/pokemontools/pic.py compress | ||
includes := $(PYTHON) extras/pokemontools/scan_includes.py | ||
|
||
pokered_obj := audio_red.o main_red.o text_red.o wram_red.o | ||
pokeblue_obj := audio_blue.o main_blue.o text_blue.o wram_blue.o | ||
|
||
.SUFFIXES: | ||
.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic | ||
.SECONDEXPANSION: | ||
# Suppress annoying intermediate file deletion messages. | ||
.PRECIOUS: %.2bpp | ||
.PHONY: all clean red blue compare | ||
|
||
roms := pokered.gbc pokeblue.gbc | ||
|
||
all: $(roms) | ||
red: pokered.gbc | ||
blue: pokeblue.gbc | ||
|
||
# For contributors to make sure a change didn't affect the contents of the rom. | ||
compare: red blue | ||
@$(MD5) roms.md5 | ||
|
||
clean: | ||
rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.sym) | ||
find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} + | ||
|
||
%.asm: ; | ||
|
||
%_red.o: dep = $(shell $(includes) $(@D)/$*.asm) | ||
$(pokered_obj): %_red.o: %.asm $$(dep) | ||
rgbasm -D _RED -h -o $@ $*.asm | ||
|
||
%_blue.o: dep = $(shell $(includes) $(@D)/$*.asm) | ||
$(pokeblue_obj): %_blue.o: %.asm $$(dep) | ||
rgbasm -D _BLUE -h -o $@ $*.asm | ||
|
||
pokered_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON RED" | ||
pokeblue_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE" | ||
|
||
%.gbc: $$(%_obj) | ||
rgblink -n $*.sym -l pokered.link -o $@ $^ | ||
rgbfix $($*_opt) $@ | ||
sort $*.sym -o $*.sym | ||
|
||
%.png: ; | ||
%.2bpp: %.png ; @$(2bpp) $< | ||
%.1bpp: %.png ; @$(1bpp) $< | ||
%.pic: %.2bpp ; @$(pic) $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Pokémon Red and Blue | ||
|
||
This is a disassembly of Pokémon Red and Blue. | ||
|
||
It builds the following roms: | ||
|
||
* 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 Yellow**][pokeyellow] | ||
* Disassembly of [**Pokémon Gold**][pokegold] | ||
* Disassembly of [**Pokémon Crystal**][pokecrystal] | ||
* Disassembly of [**Pokémon Pinball**][pokepinball] | ||
* Disassembly of [**Pokémon TCG**][poketcg] | ||
* Disassembly of [**Pokémon Ruby**][pokeruby] | ||
* Disassembly of [**Pokémon Fire Red**][pokefirered] | ||
* Disassembly of [**Pokémon Emerald**][pokeemerald] | ||
* Discord: [**pret**][Discord] | ||
* irc: **irc.freenode.net** [**#pret**][irc] | ||
|
||
[pokeyellow]: https://github.com/pret/pokeyellow | ||
[pokegold]: https://github.com/pret/pokegold | ||
[pokecrystal]: https://github.com/pret/pokecrystal | ||
[pokepinball]: https://github.com/pret/pokepinball | ||
[poketcg]: https://github.com/pret/poketcg | ||
[pokeruby]: https://github.com/pret/pokeruby | ||
[pokefirered]: https://github.com/pret/pokefirered | ||
[pokeemerald]: https://github.com/pret/pokeemerald | ||
[Discord]: https://discord.gg/cJxDDVP | ||
[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret |
Oops, something went wrong.