Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed NON_MATCHING & ROM Comparecode + Further fixes/sanity to pisetup.sh #268

Open
wants to merge 4 commits into
base: nightly
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ RUN apt-get update && \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*

RUN wget \
https://github.com/n64decomp/qemu-irix/releases/download/v2.11-deb/qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb \
-O qemu.deb && \
echo 8170f37cf03a08cc2d7c1c58f10d650ea0d158f711f6916da9364f6d8c85f741 qemu.deb | sha256sum --check && \
dpkg -i qemu.deb && \
rm qemu.deb

RUN git clone --depth 1 https://github.com/emscripten-core/emsdk.git && \
./emsdk/emsdk install latest && \
./emsdk/emsdk activate latest
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = NON_MATCHING AVOID_UB
PREDEFINED = AVOID_UB

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pipeline {
git clean -fd .
git checkout -- .
echo 'y' | tools/apply_patch.sh "$f"
make -j4 VERSION=us COMPARE=0
make -j4 VERSION=us
done
'''
}
Expand Down
36 changes: 13 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ default: all
VERSION ?= us
# Graphics microcode used
GRUCODE ?= f3d_old
# If COMPARE is 1, check the output sha1sum when building 'all'
COMPARE ?= 1
# If NON_MATCHING is 1, define the NON_MATCHING and AVOID_UB macros when building (recommended)
NON_MATCHING ?= 1

# define AVOID_UB macros when building (recommended)

# Build and optimize for Raspberry Pi(s)
TARGET_RPI ?= 0
Expand All @@ -28,25 +26,32 @@ TARGET_WEB ?= 0
# Makeflag to enable OSX fixes
OSX_BUILD ?= 0

# Makeflag to enable Windows fixes
WINDOWS_BUILD ?= 0

# Specify the target you are building for, TARGET_BITS=0 means native
TARGET_ARCH ?= native
TARGET_BITS ?= 0

# Disable better camera by default
BETTERCAMERA ?= 0

# Disable no drawing distance by default
NODRAWINGDISTANCE ?= 0

# Disable texture fixes by default (helps with them purists)
TEXTURE_FIX ?= 0

# Enable extended options menu by default
EXT_OPTIONS_MENU ?= 1

# Disable text-based save-files by default
TEXTSAVES ?= 0

# Load textures from external PNG files
EXTERNAL_TEXTURES ?= 0

# Various workarounds for weird toolchains

NO_BZERO_BCOPY ?= 0
NO_LDIV ?= 0

Expand All @@ -56,9 +61,7 @@ LEGACY_GL ?= 0

# Automatic settings for PC port(s)

NON_MATCHING := 1
GRUCODE := f3dex2e
WINDOWS_BUILD ?= 0

ifeq ($(TARGET_WEB),0)
ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -139,31 +142,26 @@ ifeq ($(GRUCODE),f3dex) # Fast3DEX
GRUCODE_CFLAGS := -DF3DEX_GBI
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1 --defsym F3DEX_GBI=1
TARGET := $(TARGET).f3dex
COMPARE := 0
else
ifeq ($(GRUCODE), f3dex2) # Fast3DEX2
GRUCODE_CFLAGS := -DF3DEX_GBI_2
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1 --defsym F3DEX_GBI_2=1
TARGET := $(TARGET).f3dex2
COMPARE := 0
else
ifeq ($(GRUCODE), f3dex2e) # Fast3DEX2 Extended (PC default)
GRUCODE_CFLAGS := -DF3DEX_GBI_2E
TARGET := $(TARGET).f3dex2e
COMPARE := 0
else
ifeq ($(GRUCODE),f3d_new) # Fast3D 2.0H (Shindou)
GRUCODE_CFLAGS := -DF3D_NEW
GRUCODE_ASFLAGS := --defsym F3D_NEW=1
TARGET := $(TARGET).f3d_new
COMPARE := 0
else
ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.0J / Animal Forest - Dōbutsu no Mori)
$(warning Fast3DZEX is experimental. Try at your own risk.)
GRUCODE_CFLAGS := -DF3DEX_GBI_2
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1 --defsym F3DZEX_GBI=1
TARGET := $(TARGET).f3dzex
COMPARE := 0
endif
endif
endif
Expand All @@ -182,7 +180,6 @@ ifeq ($(OSX_BUILD),1) # Modify GFX & SDL2 for OSX GL
endif

VERSION_ASFLAGS := --defsym AVOID_UB=1
COMPARE := 0

ifeq ($(TARGET_WEB),1)
VERSION_CFLAGS := $(VERSION_CFLAGS) -DTARGET_WEB
Expand Down Expand Up @@ -593,7 +590,6 @@ export LANG := C
# N64 conversion tools
TOOLS_DIR = tools
MIO0TOOL = $(TOOLS_DIR)/mio0
N64CKSUM = $(TOOLS_DIR)/n64cksum
N64GRAPHICS = $(TOOLS_DIR)/n64graphics
N64GRAPHICS_CI = $(TOOLS_DIR)/n64graphics_ci
TEXTCONV = $(TOOLS_DIR)/textconv
Expand Down Expand Up @@ -640,12 +636,6 @@ distclean:
$(RM) -r $(BUILD_DIR_BASE)
./extract_assets.py --clean

test: $(ROM)
$(EMULATOR) $(EMU_FLAGS) $<

load: $(ROM)
$(LOADER) $(LOADER_FLAGS) $<

libultra: $(BUILD_DIR)/libultra.a

asm/boot.s: $(BUILD_DIR)/lib/bin/ipl3_font.bin
Expand Down Expand Up @@ -861,9 +851,9 @@ $(BUILD_DIR)/src/audio/%.copt: $(BUILD_DIR)/src/audio/%.acpp
$(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/copt -signed -I=$< -CMP=$@ -cp=i -scalaroptimize=1
endif

# Rebuild files with 'GLOBAL_ASM' if the NON_MATCHING flag changes.
$(GLOBAL_ASM_O_FILES): $(GLOBAL_ASM_DEP).$(NON_MATCHING)
$(GLOBAL_ASM_DEP).$(NON_MATCHING):
# Rebuild files with 'GLOBAL_ASM' if something happens?
$(GLOBAL_ASM_O_FILES): $(GLOBAL_ASM_DEP)
$(GLOBAL_ASM_DEP):
@rm -f $(GLOBAL_ASM_DEP).*
touch $@

Expand Down
46 changes: 0 additions & 46 deletions asm/rom_header.s

This file was deleted.

6 changes: 0 additions & 6 deletions include/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
#define GLOBAL_ASM(...)
#endif

#if !defined(__sgi) && (!defined(NON_MATCHING) || !defined(AVOID_UB))
// asm-process isn't supported outside of IDO, and undefined behavior causes
// crashes.
#error Matching build is only possible on IDO; please build with NON_MATCHING=1.
#endif

#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))

#define GLUE(a, b) a ## b
Expand Down
Loading