Skip to content

Commit

Permalink
Squash all Git history into a single commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andiemmadavieswilcox committed Sep 5, 2019
0 parents commit e1661bd
Show file tree
Hide file tree
Showing 2,857 changed files with 185,230 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitattributes
@@ -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
35 changes: 35 additions & 0 deletions .gitignore
@@ -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
Empty file added .gitmodules
Empty file.
24 changes: 24 additions & 0 deletions .travis.yml
@@ -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 -j2
- make compare
- check_status
60 changes: 60 additions & 0 deletions INSTALL.md
@@ -0,0 +1,60 @@
# Linux

sudo apt-get install make git gcc

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 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 https://github.com/pret/pokered
cd pokered

To build **pokered.gbc** and **pokeblue.gbc**:

make


# Windows

Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit.

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/): 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**.

In the **Cygwin terminal**, enter these commands:

git clone https://github.com/pret/pokered
cd pokered

To build **pokered.gbc** and **pokeblue.gbc**:

make
102 changes: 102 additions & 0 deletions Makefile
@@ -0,0 +1,102 @@
roms := pokered.gbc pokeblue.gbc

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


### Build tools

MD5 := md5sum -c

RGBDS ?=
RGBASM ?= $(RGBDS)rgbasm
RGBFIX ?= $(RGBDS)rgbfix
RGBGFX ?= $(RGBDS)rgbgfx
RGBLINK ?= $(RGBDS)rgblink


### Build targets

.SUFFIXES:
.SECONDEXPANSION:
.PRECIOUS:
.SECONDARY:
.PHONY: all red blue clean tidy compare tools

all: $(roms)
red: pokered.gbc
blue: pokeblue.gbc

# For contributors to make sure a change didn't affect the contents of the rom.
compare: $(roms)
@$(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 {} +
$(MAKE) clean -C tools/

tidy:
rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.sym)
$(MAKE) clean -C tools/

tools:
$(MAKE) -C tools/


# Build tools when building the rom.
# This has to happen before the rules are processed, since that's when scan_includes is run.
ifeq (,$(filter clean tools,$(MAKECMDGOALS)))
$(info $(shell $(MAKE) -C tools))
endif


%.asm: ;

%_red.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
$(pokered_obj): %_red.o: %.asm $$(dep)
$(RGBASM) -D _RED -h -o $@ $*.asm

%_blue.o: dep = $(shell tools/scan_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) -d -n $*.sym -l pokered.link -o $@ $^
$(RGBFIX) $($*_opt) $@
sort $*.sym -o $*.sym


### Misc file-specific graphics rules

gfx/blue/intro_purin_1.2bpp: $(RGBGFX) += -h
gfx/blue/intro_purin_2.2bpp: $(RGBGFX) += -h
gfx/blue/intro_purin_3.2bpp: $(RGBGFX) += -h
gfx/red/intro_nido_1.2bpp: $(RGBGFX) += -h
gfx/red/intro_nido_2.2bpp: $(RGBGFX) += -h
gfx/red/intro_nido_3.2bpp: $(RGBGFX) += -h

gfx/game_boy.2bpp: tools/gfx += --remove-duplicates
gfx/theend.2bpp: tools/gfx += --interleave --png=$<
gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace


### Catch-all graphics rules

%.png: ;

%.2bpp: %.png
$(RGBGFX) $(rgbgfx) -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) -o $@ $@)

%.1bpp: %.png
$(RGBGFX) -d1 $(rgbgfx) -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) -d1 -o $@ $@)

%.pic: %.2bpp
tools/pkmncompress $< $@
35 changes: 35 additions & 0 deletions README.md
@@ -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/6EuWgX9
[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret

0 comments on commit e1661bd

Please sign in to comment.