diff options
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | INSTALL.md | 19 | ||||
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | asm/pokemon_summary_screen.s | 8 | ||||
-rw-r--r-- | berry_fix/Makefile | 7 | ||||
-rw-r--r-- | berry_fix/payload/Makefile | 8 | ||||
-rw-r--r-- | berry_fix/payload/src/agb_flash.c | 4 |
7 files changed, 37 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml index d12c7ddcb..9897e37b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,8 @@ cache: apt: true install: - pushd $HOME - - travis_retry git clone https://github.com/luckytyphlosion/agbcc.git -b new_layout_with_libs - - cd agbcc && make && make install prefix=$TRAVIS_BUILD_DIR + - travis_retry git clone https://github.com/pret/agbcc.git + - cd agbcc && sh build.sh && sh install.sh $TRAVIS_BUILD_DIR - popd matrix: include: diff --git a/INSTALL.md b/INSTALL.md index 1b2ba259e..fcc4601ac 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,12 +21,11 @@ In the case of Cygwin, [include](https://cygwin.com/cygwin-ug-net/setup-net.html To set up the repository: git clone https://github.com/pret/pokefirered - git clone https://github.com/luckytyphlosion/agbcc -b new_layout_with_libs + git clone https://github.com/pret/agbcc cd ./agbcc - make - make install prefix=../pokefirered - make install-sdk prefix=../pokefirered + sh build.sh + sh install.sh ../pokefirered cd ../pokefirered @@ -56,3 +55,15 @@ To confirm these match the respective official ROM images, prefix `compare_` to make -j$(nproc) compare_leafgreen **Note:** If the build command is not recognized on Linux, including the Linux environment used within Windows, run `nproc` and replace `$(nproc)` with the returned value (e.g.: `make -j4`). Because `nproc` is not available on macOS, the alternative is `sysctl -n hw.ncpu`. + +###Note for Mac users + +The BSD make that comes with Mac XCode can be buggy, so obtain GNU make and sed using [Homebrew](https://brew.sh): + + brew install make gnu-sed + +When compiling agbcc, substitute the `build.sh` line for + + gsed 's/^make/gmake/g' build.sh | sh + +Finally, use `gmake` instead of `make` to compile the ROM(s). @@ -1,9 +1,9 @@ +include $(DEVKITARM)/base_tools + COMPARE ?= 0 -AS := tools/binutils/bin/arm-none-eabi-as CPP := $(CC) -E -LD := tools/binutils/bin/arm-none-eabi-ld -OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy +LD := $(DEVKITARM)/bin/arm-none-eabi-ld include config.mk @@ -182,7 +182,7 @@ endif $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep) @$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i @$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s - @echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s + @echo -e ".text\n\t.align\t2, 0 @ Don't pad with nop\n" >> $(C_BUILDDIR)/$*.s $(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s ifeq ($(NODEP),1) @@ -224,7 +224,7 @@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_comm cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld $(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) - cd $(OBJ_DIR) && ../../$(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(LIB) + cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(LIB) $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(GAME_REVISION) --silent $(ROM): $(ELF) diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s index d14d64ee4..d6c3f548f 100644 --- a/asm/pokemon_summary_screen.s +++ b/asm/pokemon_summary_screen.s @@ -10503,7 +10503,9 @@ _08139BA0: movs r0, 0x2 b _08139C16 .align 2, 0 -_08139BD8: .double 0.8 +@ _08139BD8: .double 0.8 +_08139BD8: .4byte 0x3fe99999 +_08139BDC: .4byte 0x9999999a _08139BE0: .4byte gUnknown_203B170 _08139BE4: ldr r3, _08139C04+4 @ =0x33333333 @@ -10521,7 +10523,9 @@ _08139BE4: movs r0, 0x1 b _08139C16 .align 2, 0 -_08139C04: .double 0.6 +@ _08139C04: .double 0.6 +_08139C04: .4byte 0x3fe33333 +_08139C08: .4byte 0x33333333 _08139C0C: .4byte gUnknown_203B170 _08139C10: ldr r0, _08139C38 @ =gUnknown_203B170 diff --git a/berry_fix/Makefile b/berry_fix/Makefile index 44e816c52..1e0f3ee25 100644 --- a/berry_fix/Makefile +++ b/berry_fix/Makefile @@ -1,9 +1,8 @@ +include $(DEVKITARM)/base_tools COMPARE ?= 0 -AS := ../tools/binutils/bin/arm-none-eabi-as CPP := $(CC) -E -LD := ../tools/binutils/bin/arm-none-eabi-ld -OBJCOPY := ../tools/binutils/bin/arm-none-eabi-objcopy +LD := $(DEVKITARM)/bin/arm-none-eabi-ld ifeq ($(OS),Windows_NT) EXE := .exe @@ -160,7 +159,7 @@ $(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s $(AS) $(ASFLAGS) -I sound -o $@ $< $(ELF): ld_script.txt $(OBJS) - cd $(OBJ_DIR) && ../$(LD) $(LDFLAGS) -T ../ld_script.txt -o ../$@ + cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../ld_script.txt -o ../$@ $(ROM): $(ELF) $(OBJCOPY) -O binary $< $@ diff --git a/berry_fix/payload/Makefile b/berry_fix/payload/Makefile index dabbe4582..c87a06c41 100644 --- a/berry_fix/payload/Makefile +++ b/berry_fix/payload/Makefile @@ -1,9 +1,8 @@ +include $(DEVKITARM)/base_tools COMPARE ?= 0 -AS := ../../tools/binutils/bin/arm-none-eabi-as CPP := $(CC) -E -LD := ../../tools/binutils/bin/arm-none-eabi-ld -OBJCOPY := ../../tools/binutils/bin/arm-none-eabi-objcopy +LD := $(DEVKITARM)/bin/arm-none-eabi-ld ifeq ($(OS),Windows_NT) EXE := .exe @@ -131,6 +130,7 @@ endif $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep) @$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i @$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CC1FLAGS) -o $(C_BUILDDIR)/$*.s + @echo -e ".text\n\t.align 2, 0 @ Don't pad with nop\n" >> $(C_BUILDDIR)/$*.s $(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s ifeq ($(NODEP),1) @@ -167,7 +167,7 @@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_comm cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../$< | sed "s#tools/#../tools/#g" > ld_script.ld $(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) - cd $(OBJ_DIR) && ../$(LD) $(LDFLAGS) -T ld_script.ld -o ../$@ $(LIB) + cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../$@ $(LIB) $(ROM): $(ELF) $(OBJCOPY) -O binary $< $@ diff --git a/berry_fix/payload/src/agb_flash.c b/berry_fix/payload/src/agb_flash.c index cda3b73f6..2c2c96e6e 100644 --- a/berry_fix/payload/src/agb_flash.c +++ b/berry_fix/payload/src/agb_flash.c @@ -1,5 +1,5 @@ -#include <gba/gba.h> -#include <gba/flash_internal.h> +#include "gba/gba.h" +#include "gba/flash_internal.h" static u8 sTimerNum; static u16 sTimerCount; |