Merge pull request #223 from PikalaxALT/pret_agbcc
Revert agbcc dependency to pret master
This commit is contained in:
+8
-2
@@ -1,6 +1,10 @@
|
|||||||
language: generic
|
language: generic
|
||||||
dist: bionic
|
dist: bionic
|
||||||
sudo: false
|
sudo: false
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- DEVKITPRO=$HOME
|
||||||
|
- DEVKITARM=$DEVKITPRO/devkitARM
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -11,8 +15,10 @@ cache:
|
|||||||
apt: true
|
apt: true
|
||||||
install:
|
install:
|
||||||
- pushd $HOME
|
- pushd $HOME
|
||||||
- travis_retry git clone https://github.com/luckytyphlosion/agbcc.git -b new_layout_with_libs
|
- travis_retry wget https://github.com/devkitPro/buildscripts/releases/download/devkitARM_r50/devkitARM_r50-linux.tar.xz
|
||||||
- cd agbcc && make && make install prefix=$TRAVIS_BUILD_DIR
|
- tar xJf devkitARM*.tar.xz
|
||||||
|
- travis_retry git clone https://github.com/pret/agbcc.git
|
||||||
|
- cd agbcc && sh build.sh && sh install.sh $TRAVIS_BUILD_DIR
|
||||||
- popd
|
- popd
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|||||||
+29
-10
@@ -15,32 +15,39 @@ Make sure that the `build-essential`, `git`, and `libpng-dev` packages are insta
|
|||||||
|
|
||||||
In the case of Cygwin, [include](https://cygwin.com/cygwin-ug-net/setup-net.html#setup-packages) the `make`, `git`, `gcc-core`, `gcc-g++`, and `libpng-devel` packages.
|
In the case of Cygwin, [include](https://cygwin.com/cygwin-ug-net/setup-net.html#setup-packages) the `make`, `git`, `gcc-core`, `gcc-g++`, and `libpng-devel` packages.
|
||||||
|
|
||||||
|
Install the **devkitARM** toolchain of [devkitPro](https://devkitpro.org/wiki/Getting_Started) and add its environment variables. For Windows versions without the Linux subsystem, the devkitPro [graphical installer](https://github.com/devkitPro/installer/releases) includes a preconfigured MSYS2 environment, thus the steps below are not required.
|
||||||
|
|
||||||
|
sudo (dkp-)pacman -S gba-dev
|
||||||
|
export DEVKITPRO=/opt/devkitpro
|
||||||
|
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc
|
||||||
|
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||||
|
echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To set up the repository:
|
To set up the repository:
|
||||||
|
|
||||||
git clone https://github.com/pret/pokefirered
|
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
|
cd ./agbcc
|
||||||
make
|
sh build.sh
|
||||||
make install prefix=../pokefirered
|
sh install.sh ../pokefirered
|
||||||
make install-sdk prefix=../pokefirered
|
|
||||||
|
|
||||||
cd ../pokefirered
|
cd ../pokefirered
|
||||||
|
|
||||||
To build **pokefirered.gba**:
|
To build **pokefirered.gba**:
|
||||||
|
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|
||||||
To confirm it matches the official ROM image while building, do this instead:
|
To confirm it matches the official ROM image while building, do this instead:
|
||||||
|
|
||||||
make compare -j$(nproc)
|
make compare -j$(nproc)
|
||||||
|
|
||||||
If only `.c` or `.s` files were changed, turn off the dependency scanning temporarily. Changes to any other files will be ignored and the build will either fail or not reflect those changes.
|
If only `.c` or `.s` files were changed, turn off the dependency scanning temporarily. Changes to any other files will be ignored and the build will either fail or not reflect those changes.
|
||||||
|
|
||||||
make -j$(nproc) NODEP=1
|
make -j$(nproc) NODEP=1
|
||||||
|
|
||||||
Convenient targets have been defined to build Pokémon LeafGreen and the 1.1 revisions of both games:
|
Convenient targets have been defined to build Pokémon LeafGreen and the 1.1 revisions of both games:
|
||||||
|
|
||||||
@@ -56,3 +63,15 @@ To confirm these match the respective official ROM images, prefix `compare_` to
|
|||||||
make -j$(nproc) compare_leafgreen
|
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:** 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
|
COMPARE ?= 0
|
||||||
|
|
||||||
AS := tools/binutils/bin/arm-none-eabi-as
|
|
||||||
CPP := $(CC) -E
|
CPP := $(CC) -E
|
||||||
LD := tools/binutils/bin/arm-none-eabi-ld
|
LD := $(DEVKITARM)/bin/arm-none-eabi-ld
|
||||||
OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy
|
|
||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ endif
|
|||||||
$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
|
$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
|
||||||
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
|
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
|
||||||
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
|
@$(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
|
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
|
||||||
|
|
||||||
ifeq ($(NODEP),1)
|
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
|
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
|
||||||
|
|
||||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
$(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
|
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(GAME_REVISION) --silent
|
||||||
|
|
||||||
$(ROM): $(ELF)
|
$(ROM): $(ELF)
|
||||||
|
|||||||
@@ -10503,7 +10503,9 @@ _08139BA0:
|
|||||||
movs r0, 0x2
|
movs r0, 0x2
|
||||||
b _08139C16
|
b _08139C16
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_08139BD8: .double 0.8
|
@ _08139BD8: .double 0.8
|
||||||
|
_08139BD8: .4byte 0x3fe99999
|
||||||
|
_08139BDC: .4byte 0x9999999a
|
||||||
_08139BE0: .4byte gUnknown_203B170
|
_08139BE0: .4byte gUnknown_203B170
|
||||||
_08139BE4:
|
_08139BE4:
|
||||||
ldr r3, _08139C04+4 @ =0x33333333
|
ldr r3, _08139C04+4 @ =0x33333333
|
||||||
@@ -10521,7 +10523,9 @@ _08139BE4:
|
|||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
b _08139C16
|
b _08139C16
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_08139C04: .double 0.6
|
@ _08139C04: .double 0.6
|
||||||
|
_08139C04: .4byte 0x3fe33333
|
||||||
|
_08139C08: .4byte 0x33333333
|
||||||
_08139C0C: .4byte gUnknown_203B170
|
_08139C0C: .4byte gUnknown_203B170
|
||||||
_08139C10:
|
_08139C10:
|
||||||
ldr r0, _08139C38 @ =gUnknown_203B170
|
ldr r0, _08139C38 @ =gUnknown_203B170
|
||||||
|
|||||||
+3
-4
@@ -1,9 +1,8 @@
|
|||||||
|
include $(DEVKITARM)/base_tools
|
||||||
COMPARE ?= 0
|
COMPARE ?= 0
|
||||||
|
|
||||||
AS := ../tools/binutils/bin/arm-none-eabi-as
|
|
||||||
CPP := $(CC) -E
|
CPP := $(CC) -E
|
||||||
LD := ../tools/binutils/bin/arm-none-eabi-ld
|
LD := $(DEVKITARM)/bin/arm-none-eabi-ld
|
||||||
OBJCOPY := ../tools/binutils/bin/arm-none-eabi-objcopy
|
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
EXE := .exe
|
EXE := .exe
|
||||||
@@ -160,7 +159,7 @@ $(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
|||||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||||
|
|
||||||
$(ELF): ld_script.txt $(OBJS)
|
$(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)
|
$(ROM): $(ELF)
|
||||||
$(OBJCOPY) -O binary $< $@
|
$(OBJCOPY) -O binary $< $@
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
|
include $(DEVKITARM)/base_tools
|
||||||
COMPARE ?= 0
|
COMPARE ?= 0
|
||||||
|
|
||||||
AS := ../../tools/binutils/bin/arm-none-eabi-as
|
|
||||||
CPP := $(CC) -E
|
CPP := $(CC) -E
|
||||||
LD := ../../tools/binutils/bin/arm-none-eabi-ld
|
LD := $(DEVKITARM)/bin/arm-none-eabi-ld
|
||||||
OBJCOPY := ../../tools/binutils/bin/arm-none-eabi-objcopy
|
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
EXE := .exe
|
EXE := .exe
|
||||||
@@ -131,6 +130,7 @@ endif
|
|||||||
$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
|
$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
|
||||||
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
|
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
|
||||||
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CC1FLAGS) -o $(C_BUILDDIR)/$*.s
|
@$(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
|
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
|
||||||
|
|
||||||
ifeq ($(NODEP),1)
|
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
|
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../$< | sed "s#tools/#../tools/#g" > ld_script.ld
|
||||||
|
|
||||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
$(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)
|
$(ROM): $(ELF)
|
||||||
$(OBJCOPY) -O binary $< $@
|
$(OBJCOPY) -O binary $< $@
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include <gba/gba.h>
|
#include "gba/gba.h"
|
||||||
#include <gba/flash_internal.h>
|
#include "gba/flash_internal.h"
|
||||||
|
|
||||||
static u8 sTimerNum;
|
static u8 sTimerNum;
|
||||||
static u16 sTimerCount;
|
static u16 sTimerCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user