diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-06-20 22:03:16 -0700 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2017-06-20 22:03:16 -0700 |
commit | e235064ebc8bc17cb41eeed9e456f5b301433729 (patch) | |
tree | 2be9ea4e553663e14b59bc48c1a7064394dab7e8 | |
parent | 4ae72eeb6a790da0a26d174e52338dbe424fcef2 (diff) |
Remove baserom.gbc dependency. We made it!
-rwxr-xr-x | INSTALL.md | 4 | ||||
-rwxr-xr-x | Makefile | 19 | ||||
-rwxr-xr-x | compare.sh | 12 | ||||
-rwxr-xr-x | macros.asm | 4 | ||||
-rwxr-xr-x | rom.md5 | 1 |
5 files changed, 11 insertions, 29 deletions
@@ -21,8 +21,6 @@ Set up the repository. git submodule init git submodule update -Place a copy of Pokemon Pinball (U) [C][!].gb (`md5: fbe20570c2e52c937a9395024069ba3c`) in this directory and name it `baserom.gbc`. - To build `pokepinball.gbc`: make @@ -33,7 +31,7 @@ To remove all generated files by the build process: make clean -To compare the `md5` hashes of `baserom.gbc` and the built `pokepinball.gbc`: +To compare the built `pokepinball.gbc` to the original ROM: make compare @@ -5,19 +5,20 @@ .SECONDEXPANSION: # Build Pokemon Pinball. -ROMS := pokepinball.gbc +ROM := pokepinball.gbc OBJS := main.o wram.o sram.o # If your default python is 3, you may want to change this to python27. PYTHON := python PRET := pokemon-reverse-engineering-tools/pokemontools +MD5 := md5sum -c --quiet $(foreach obj, $(OBJS), \ $(eval $(obj:.o=)_dep := $(shell $(PYTHON) $(PRET)/scan_includes.py $(obj:.o=.asm))) \ ) # Link objects together to build a rom. -all: $(ROMS) compare +all: $(ROM) compare # Assemble source files into objects. # Use rgbasm -h to use halts without nops. @@ -27,19 +28,17 @@ $(OBJS): $$*.asm $$($$*_dep) @$(PYTHON) $(PRET)/pcm.py pcm $(pcmq) rgbasm -h -o $@ $< -$(ROMS): $(OBJS) - rgblink -n $(ROMS:.gbc=.sym) -m $(ROMS:.gbc=.map) -o $@ $^ +$(ROM): $(OBJS) + rgblink -n $(ROM:.gbc=.sym) -m $(ROM:.gbc=.map) -o $@ $^ rgbfix -jsvc -k 01 -l 0x33 -m 0x1e -p 0 -r 02 -t "POKEPINBALL" -i VPHE $@ -# The compare target is a shortcut to check that the build matches the original roms exactly. -# This is for contributors to make sure a change didn't affect the contents of the rom. -# More thorough comparison can be made by diffing the output of hexdump -C against both roms. -compare: $(ROMS) baserom.gbc - cmp $^ +# For contributors to make sure a change didn't affect the contents of the rom. +compare: $(ROM) + @$(MD5) rom.md5 # Remove files generated by the build process. tidy: - rm -f $(ROMS) $(OBJS) $(ROMS:.gbc=.sym) + rm -f $(ROM) $(OBJS) $(ROM:.gbc=.sym) clean: tidy find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pcm' \) -exec rm {} + diff --git a/compare.sh b/compare.sh deleted file mode 100755 index 60e8d34..0000000 --- a/compare.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Compares baserom.gbc and pokepinball.gbc - -# create baserom.txt if necessary - -if [ ! -f baserom.txt ]; then - hexdump -C baserom.gbc > baserom.txt -fi - -hexdump -C pokepinball.gbc > pokepinball.txt - -diff -u baserom.txt pokepinball.txt | less @@ -42,10 +42,6 @@ dn: MACRO endr ENDM -dr: MACRO -INCBIN "baserom.gbc", \1, \2 - \1 - ENDM - dx: MACRO x = 8 * ((\1) - 1) rept \1 @@ -0,0 +1 @@ +fbe20570c2e52c937a9395024069ba3c pokepinball.gbc |