1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-13 04:39:36 +00:00

Ido Static Recomp (#337)

* Ido Recomp test

* try 2

* Recomp by default

* Fix Jenkinsfile

* Fix 2

* CFE errors

* CFE fix -O2

* Update Makefile

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update README.md

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update README.md

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* PR suggestions

* PR updates

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Ethan Roseman 2020-08-22 19:06:52 -04:00 committed by GitHub
parent 3cb03b2b2f
commit 6f54edd365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 2557 additions and 19 deletions

18
Jenkinsfile vendored
View file

@ -11,13 +11,25 @@ pipeline {
steps {
echo 'Setting up...'
sh 'cp /usr/local/etc/roms/baserom_oot.z64 baserom_original.z64'
sh 'make -j`nproc` setup'
sh 'make -j setup'
}
}
stage('Build (qemu-irix)') {
when {
branch 'master'
}
steps {
sh 'ORIG_COMPILER=1 make -j'
}
}
stage('Build') {
when {
not {
branch 'master'
}
}
steps {
echo 'Building...'
sh 'make -j`nproc`'
sh 'make -j'
}
}
stage('Report Progress') {

View file

@ -6,6 +6,8 @@
COMPARE ?= 1
# If NON_MATCHING is 1, define the NON_MATCHING C flag when building
NON_MATCHING ?= 0
# If ORIG_COMPILER is 1, compile with QEMU_IRIX and the original compiler
ORIG_COMPILER ?= 0
ifeq ($(NON_MATCHING),1)
CFLAGS := -DNON_MATCHING
@ -21,12 +23,19 @@ else
$(error Please install or build mips-linux-gnu)
endif
# check that either QEMU_IRIX is set or qemu-irix package installed
ifndef QEMU_IRIX
QEMU_IRIX := $(shell which qemu-irix)
ifeq (, $(QEMU_IRIX))
$(error Please install qemu-irix package or set QEMU_IRIX env var to the full qemu-irix binary path)
CC := tools/ido_recomp/linux/7.1/cc
CC_OLD := tools/ido_recomp/linux/5.3/cc
# if ORIG_COMPILER is 1, check that either QEMU_IRIX is set or qemu-irix package installed
ifeq ($(ORIG_COMPILER),1)
ifndef QEMU_IRIX
QEMU_IRIX := $(shell which qemu-irix)
ifeq (, $(QEMU_IRIX))
$(error Please install qemu-irix package or set QEMU_IRIX env var to the full qemu-irix binary path)
endif
endif
CC = $(QEMU_IRIX) -L tools/ido7.1_compiler tools/ido7.1_compiler/usr/bin/cc
CC_OLD = $(QEMU_IRIX) -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc
endif
AS := $(MIPS_BINUTILS_PREFIX)as
@ -34,9 +43,6 @@ LD := $(MIPS_BINUTILS_PREFIX)ld
OBJCOPY := $(MIPS_BINUTILS_PREFIX)objcopy
OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump
CC := $(QEMU_IRIX) -L tools/ido7.1_compiler tools/ido7.1_compiler/usr/bin/cc
CC_OLD := $(QEMU_IRIX) -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc
# Check code syntax with host compiler
CC_CHECK := gcc -fno-builtin -fsyntax-only -fsigned-char -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces -D _LANGUAGE_C -D NON_MATCHING -Iinclude -Isrc -include stdarg.h

View file

@ -55,22 +55,22 @@ sudo apt-get update
sudo apt-get install git build-essential binutils-mips-linux-gnu python3
```
#### 2. Download qemu-irix
#### 2. Download and set up qemu-irix (optional)
Note: We are currently testing a recompiled version of the compiler that does not require qemu-irix.
This step allows you to build with qemu-irix and the original compiler by adding `ORIG_COMPILER=1` to the `make` command in step 6, for example if you experience issues with the recompiled version.
Download qemu-irix from the Releases section in the repository. Place it at a location of your choosing.
#### 3. Set environment variables
Open up your .bashrc file (~/.bashrc), scroll to the bottom, and add the following, replacing the paths as necessary:
```text
export QEMU_IRIX="path/to/your/qemu-irix"
export MIPS_BINUTILS_PREFIX=mips-linux-gnu-
```
Save and close/reopen your terminal window.
#### 4. Clone the repository
#### 3. Clone the repository
Clone `https://github.com/zeldaret/oot.git` where you wish to have the project, with a command such as:
@ -78,12 +78,12 @@ Clone `https://github.com/zeldaret/oot.git` where you wish to have the project,
git clone https://github.com/zeldaret/oot.git
```
#### 5. Prepare a base ROM
#### 4. Prepare a base ROM
Copy over your copy of the Master Quest (Debug) ROM inside the root of this new project directory.
Rename the file to "baserom_original.z64" or "baserom_original.n64", depending on the original extension.
#### 6. Setup the ROM and build process
#### 5. Setup the ROM and build process
Setup and extract everything from your ROM with the following command:
@ -94,7 +94,7 @@ make setup
This will generate a new ROM called "baserom.z64" that will have the overdump removed and the header patched.
It will also extract the individual assets from the ROM.
#### 7. Build the ROM
#### 6. Build the ROM
Run make to build the ROM.
Make sure your path to the project is not too long, otherwise this process may error.

BIN
tools/ido_recomp/linux/5.3/as1 Executable file

Binary file not shown.

BIN
tools/ido_recomp/linux/5.3/cc Executable file

Binary file not shown.

BIN
tools/ido_recomp/linux/5.3/cfe Executable file

Binary file not shown.

File diff suppressed because it is too large Load diff

BIN
tools/ido_recomp/linux/5.3/ugen Executable file

Binary file not shown.

BIN
tools/ido_recomp/linux/5.3/uopt Executable file

Binary file not shown.

BIN
tools/ido_recomp/linux/7.1/as1 Executable file

Binary file not shown.

BIN
tools/ido_recomp/linux/7.1/cc Executable file

Binary file not shown.

BIN
tools/ido_recomp/linux/7.1/cfe Executable file

Binary file not shown.

File diff suppressed because it is too large Load diff

BIN
tools/ido_recomp/linux/7.1/ugen Executable file

Binary file not shown.

BIN
tools/ido_recomp/linux/7.1/uopt Executable file

Binary file not shown.