diff --git a/.gitignore b/.gitignore
index 5870ab2d3..25733828b 100755
--- a/.gitignore
+++ b/.gitignore
@@ -87,3 +87,8 @@ expected/*
# Doxygen
docs/html/*
+
+# windows build
+mingw64/
+.ash_history
+!tools/ido-recomp/*/*
\ No newline at end of file
diff --git a/Makefile b/Makefile
index ac1c730b7..52682667f 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,6 @@ default: all
# Preprocessor definitions
DEFINES :=
-UNAME_S := $(shell uname -s)
#==============================================================================#
# Build Options #
@@ -73,23 +72,7 @@ else ifeq ($(GRUCODE),f3dex2) # Fast3DEX2
DEFINES += F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
endif
-
-
-# USE_QEMU_IRIX - when ido is selected, select which way to emulate IRIX programs
-# 1 - use qemu-irix
-# 0 - statically recompile the IRIX programs
-USE_QEMU_IRIX ?= 0
-$(eval $(call validate-option,USE_QEMU_IRIX,0 1))
-
ifeq ($(COMPILER),ido)
- ifeq ($(USE_QEMU_IRIX),1)
- # Verify that qemu-irix exists
- QEMU_IRIX := $(call find-command,qemu-irix)
- ifeq (,$(QEMU_IRIX))
- $(error Using the IDO compiler requires qemu-irix. Please install qemu-irix package or set the QEMU_IRIX environment variable to the full qemu-irix binary path)
- endif
- endif
-
MIPSISET := -mips2
else ifeq ($(COMPILER),gcc)
NON_MATCHING := 1
@@ -134,7 +117,18 @@ endif
# Whether to colorize build messages
COLOR ?= 1
-
+ifeq ($(OS),Windows_NT)
+ DETECTED_OS=windows
+ # Set Windows temporary directory to its environment variable
+ export TMPDIR=$(TEMP)
+else
+ UNAME_S := $(shell uname -s)
+ ifeq ($(UNAME_S),Linux)
+ DETECTED_OS=linux
+ else ifeq ($(UNAME_S),Darwin)
+ DETECTED_OS=macos
+ endif
+endif
# display selected options unless 'make clean' or 'make distclean' is run
ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
@@ -155,8 +149,6 @@ ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
$(info =======================)
endif
-
-
#==============================================================================#
# Universal Dependencies #
#==============================================================================#
@@ -166,12 +158,33 @@ TOOLS_DIR := tools
# (This is a bit hacky, but a lot of rules implicitly depend
# on tools and assets, and we use directory globs further down
# in the makefile that we want should cover assets.)
+ifeq ($(DETECTED_OS),windows)
+# because python3 is a command to trigger windows store, and python on windows it's just called python
+ ifneq ($(PYTHON),)
+ else ifneq ($(call find-command,python),)
+ PYTHON := python
+ else ifneq ($(call find-command,python3),)
+ PYTHON := python3
+ endif
+else
+ PYTHON ?= python3
+endif
-PYTHON := python3
+DUMMY != $(PYTHON) --version || echo FAIL
+ifeq ($(DUMMY),FAIL)
+ $(error Unable to find python)
+endif
ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
-# Make sure assets exist
+ # Make tools if out of date
+ DUMMY != make -C $(TOOLS_DIR)
+ ifeq ($(DUMMY),FAIL)
+ $(error Failed to build tools)
+ endif
+ $(info Building ROM...)
+
+ # Make sure assets exist
NOEXTRACT ?= 0
ifeq ($(NOEXTRACT),0)
DUMMY != $(PYTHON) extract_assets.py $(VERSION) >&2 || echo FAIL
@@ -179,14 +192,6 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
$(error Failed to extract assets)
endif
endif
-
- # Make tools if out of date
- DUMMY != make -s -C $(TOOLS_DIR) $(if $(filter-out ido0,$(COMPILER)$(USE_QEMU_IRIX)),all-except-recomp,) >&2 || echo FAIL
- ifeq ($(DUMMY),FAIL)
- $(error Failed to build tools)
- endif
- $(info Building ROM...)
-
endif
@@ -259,27 +264,23 @@ GLOBAL_ASM_RACING_O_FILES = $(foreach file,$(GLOBAL_ASM_RACING_C_FILES),$(BUILD_
#==============================================================================#
# detect prefix for MIPS toolchain
-ifneq ($(call find-command,mips-linux-gnu-ld),)
- CROSS := mips-linux-gnu-
+ifneq ($(CROSS),)
+else ifneq ($(call find-command,mips-linux-gnu-ld),)
+ CROSS := mips-linux-gnu-
else ifneq ($(call find-command,mips64-linux-gnu-ld),)
- CROSS := mips64-linux-gnu-
+ CROSS := mips64-linux-gnu-
else ifneq ($(call find-command,mips64-elf-ld),)
- CROSS := mips64-elf-
+ CROSS := mips64-elf-
else
- $(error Unable to detect a suitable MIPS toolchain installed)
+ $(error Unable to detect a suitable MIPS toolchain installed)
endif
AS := $(CROSS)as
ifeq ($(COMPILER),gcc)
CC := $(CROSS)gcc
else
- ifeq ($(USE_QEMU_IRIX),1)
- IRIX_ROOT := $(TOOLS_DIR)/ido5.3_compiler
- CC := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc
- else
- IDO_ROOT := $(TOOLS_DIR)/ido5.3_recomp
- CC := $(IDO_ROOT)/cc
- endif
+ IDO_ROOT := $(TOOLS_DIR)/ido-recomp/$(DETECTED_OS)
+ CC := $(IDO_ROOT)/cc
endif
LD := $(CROSS)ld
AR := $(CROSS)ar
@@ -305,13 +306,15 @@ DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
ifneq (,$(call find-command,clang))
CPP := clang
CPPFLAGS := -E -P -x c -Wno-trigraphs $(DEF_INC_CFLAGS)
-else
+else ifneq (,$(call find-command,cpp))
CPP := cpp
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
+else
+ $(error Unable to find cpp or clang)
endif
# Check code syntax with host compiler
-CC_CHECK := gcc
+CC_CHECK ?= gcc
CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) -std=gnu90 -Wall -Wempty-body -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(DEF_INC_CFLAGS)
# C compiler options
@@ -330,13 +333,8 @@ OBJCOPYFLAGS = --pad-to=0xC00000 --gap-fill=0xFF
LDFLAGS = -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/$(TARGET).map --no-check-sections
-ifeq ($(shell getconf LONG_BIT), 32)
- # Work around memory allocation bug in QEMU
- export QEMU_GUEST_BASE := 1
-else
- # Ensure that gcc treats the code as 32-bit
- CC_CHECK += -m32
-endif
+# Ensure that gcc treats the code as 32-bit
+CC_CHECK += -m32
# Prevent a crash with -sopt
export LANG := C
@@ -359,8 +357,10 @@ EMULATOR = mupen64plus
EMU_FLAGS = --noosd
LOADER = loader64
LOADER_FLAGS = -vwf
-SHA1SUM = sha1sum
-PRINT = printf
+SHA1SUM ?= sha1sum
+FALSE ?= false
+PRINT ?= printf
+TOUCH ?= touch
ifeq ($(COLOR),1)
NO_COL := \033[0m
@@ -390,12 +390,12 @@ endef
all: $(ROM)
ifeq ($(COMPARE),1)
@$(PRINT) "$(GREEN)Checking if ROM matches.. $(NO_COL)\n"
- @$(SHA1SUM) --quiet -c $(TARGET).sha1 && $(PRINT) "$(TARGET): $(GREEN)OK$(NO_COL)\n" || ($(PRINT) "$(YELLOW)Building the ROM file has succeeded, but does not match the original ROM.\nThis is expected, and not an error, if you are making modifications.\nTo silence this message, use 'make COMPARE=0.' $(NO_COL)\n" && false)
+ @$(SHA1SUM) -c $(TARGET).sha1 > $(NULL_OUT) && $(PRINT) "$(TARGET): $(GREEN)OK$(NO_COL)\n" || ($(PRINT) "$(YELLOW)Building the ROM file has succeeded, but does not match the original ROM.\nThis is expected, and not an error, if you are making modifications.\nTo silence this message, use 'make COMPARE=0.' $(NO_COL)\n" && $(FALSE))
endif
doc:
- $(PYTHON) tools/doxygen_symbol_gen.py
- doxygen
+ $(PYTHON) $(TOOLS_DIR)/doxygen_symbol_gen.py
+ doxygen
@$(PRINT) "$(GREEN)Documentation generated in docs/html$(NO_COL)\n"
@$(PRINT) "$(GREEN)Results can be viewed by opening docs/html/index.html in a web browser$(NO_COL)\n"
@@ -405,7 +405,7 @@ clean:
distclean: distclean_assets
$(RM) -r $(BUILD_DIR_BASE)
./extract_assets.py --clean
- make -C tools clean
+ make -C $(TOOLS_DIR) clean
distclean_assets: ;
@@ -418,8 +418,6 @@ load: $(ROM)
# Make sure build directory exists before compiling anything
DUMMY != mkdir -p $(ALL_DIRS)
-
-
#==============================================================================#
# Texture Generation #
#==============================================================================#
@@ -451,14 +449,14 @@ $(BUILD_DIR)/%.mio0.o: $(BUILD_DIR)/%.mio0.s
$(BUILD_DIR)/%.mio0.s: $(BUILD_DIR)/%.mio0
$(call print,Generating mio0 asm:,$<,$@)
- printf ".section .data\n\n.balign 4\n\n.incbin \"$<\"\n" > $@
+ $(PRINT) ".section .data\n\n.balign 4\n\n.incbin \"$<\"\n" > $@
$(BUILD_DIR)/src/crash_screen.o: src/crash_screen.c
@$(PRINT) "$(GREEN)Compiling Crash Screen: $(BLUE)$@ $(NO_COL)\n"
$(V)$(N64GRAPHICS) -i $(BUILD_DIR)/textures/crash_screen/crash_screen_font.ia1.inc.c -g textures/crash_screen/crash_screen_font.ia1.png -f ia1 -s u8
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(V)$(CC) -c $(CFLAGS) -o $@ $<
- $(PYTHON) tools/set_o32abi_bit.py $@
+ $(PYTHON) $(TOOLS_DIR)/set_o32abi_bit.py $@
#==============================================================================#
# Common Textures Segment Generation #
@@ -481,7 +479,7 @@ $(BUILD_DIR)/src/data/common_textures.inc.o: src/data/common_textures.inc.c $(TE
@$(PRINT) "$(GREEN)Compiling Common Textures: $(BLUE)$@ $(NO_COL)\n"
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(V)$(CC) -c $(CFLAGS) -o $@ $<
- $(PYTHON) tools/set_o32abi_bit.py $@
+ $(PYTHON) $(TOOLS_DIR)/set_o32abi_bit.py $@
@@ -493,7 +491,7 @@ $(BUILD_DIR)/src/data/common_textures.inc.o: src/data/common_textures.inc.c $(TE
%/course_textures.linkonly.c %/course_textures.linkonly.h: %/course_offsets.inc.c
$(V)$(LINKONLY_GENERATOR) $(lastword $(subst /, ,$*))
-# Its unclear why this is necessary. Everything I undesrtand about `make` says that just
+# Its unclear why this is necessary. Everything I undesrtand about `make` says that just
# `$(BUILD_DIR)/%/course_displaylists.inc.o: %/course_textures.linkonly.h`
# Should work identical to this. But in practice it doesn't :(
COURSE_DISPLAYLIST_OFILES := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_displaylists.inc.o)
@@ -508,7 +506,7 @@ $(COURSE_DISPLAYLIST_OFILES): $(BUILD_DIR)/%/course_displaylists.inc.o: %/course
%/course_displaylists.inc.bin: %/course_displaylists.inc.elf
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
-# Displaylists are packed using a custom format
+# Displaylists are packed using a custom format
%/course_displaylists_packed.inc.bin: %/course_displaylists.inc.bin
@$(PRINT) "$(GREEN)Compressing Course Displaylists: $(BLUE)$@ $(NO_COL)\n"
$(V)$(DLPACKER) $< $@
@@ -533,8 +531,7 @@ COURSE_GEOGRAPHY_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/cou
# Course vertices and displaylists are included together due to no alignment between the two files.
%/course_geography.inc.mio0.s: %/course_vertices.inc.mio0 %/course_displaylists_packed.inc.bin
- printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_vertex\n\n.incbin \"$(@D)/course_vertices.inc.mio0\"\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_packed\n\n.incbin \"$(@D)/course_displaylists_packed.inc.bin\"\n\n.balign 0x10\n" > $@
-
+ $(PRINT) ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_vertex\n\n.incbin \"$(@D)/course_vertices.inc.mio0\"\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_packed\n\n.incbin \"$(@D)/course_displaylists_packed.inc.bin\"\n\n.balign 0x10\n" > $@
#==============================================================================#
@@ -557,8 +554,7 @@ COURSE_DATA_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_d
$(V)$(MIO0TOOL) -c $< $@
%/course_data.inc.mio0.s: %/course_data.inc.mio0
- printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$<\"\n\n" > $@
-
+ $(PRINT) ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$<\"\n\n" > $@
#==============================================================================#
@@ -572,7 +568,7 @@ $(BUILD_DIR)/%.o: %.c
$(call print,Compiling:,$<,$@)
$(V)$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(V)$(CC) -c $(CFLAGS) -o $@ $<
- $(PYTHON) tools/set_o32abi_bit.py $@
+ $(PYTHON) $(TOOLS_DIR)/set_o32abi_bit.py $@
$(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
$(call print,Compiling:,$<,$@)
@@ -582,15 +578,15 @@ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
$(BUILD_DIR)/%.o: %.s $(MIO0_FILES) $(RAW_TEXTURE_FILES)
$(AS) $(ASFLAGS) -o $@ $<
-$(EUC_JP_FILES:%.c=$(BUILD_DIR)/%.jp.o): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
+$(EUC_JP_FILES:%.c=$(BUILD_DIR)/%.jp.o): CC := $(PYTHON) $(TOOLS_DIR)/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
-$(GLOBAL_ASM_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
+$(GLOBAL_ASM_O_FILES): CC := $(PYTHON) $(TOOLS_DIR)/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
-$(GLOBAL_ASM_OS_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
+$(GLOBAL_ASM_OS_O_FILES): CC := $(PYTHON) $(TOOLS_DIR)/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
-$(GLOBAL_ASM_AUDIO_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
+$(GLOBAL_ASM_AUDIO_O_FILES): CC := $(PYTHON) $(TOOLS_DIR)/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
-$(GLOBAL_ASM_RACING_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
+$(GLOBAL_ASM_RACING_O_FILES): CC := $(PYTHON) $(TOOLS_DIR)/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
#==============================================================================#
# Libultra Definitions #
@@ -636,7 +632,8 @@ LDFLAGS += -R $(BUILD_DIR)/src/ending/ceremony_data.inc.elf
$(V)$(MIO0TOOL) -c $< $@
%/ceremony_data.inc.mio0.s: %/ceremony_data.inc.mio0
- printf ".include \"macros.inc\"\n\n.data\n\n.balign 4\n\nglabel ceremony_data\n\n.incbin \"$<\"\n\n.balign 16\nglabel ceremonyData_end\n" > $@
+ $(PRINT) ".include \"macros.inc\"\n\n.data\n\n.balign 4\n\nglabel ceremony_data\n\n.incbin \"$<\"\n\n.balign 16\nglabel ceremonyData_end\n" > $@
+
#==============================================================================#
# Compile Startup Logo #
@@ -655,7 +652,7 @@ LDFLAGS += -R $(BUILD_DIR)/src/data/startup_logo.inc.elf
$(V)$(MIO0TOOL) -c $< $@
%/startup_logo.inc.mio0.s: %/startup_logo.inc.mio0
- printf ".include \"macros.inc\"\n\n.data\n\n.balign 4\n\nglabel startup_logo\n\n.incbin \"$<\"\n\n.balign 16\n\nglabel startupLogo_end\n" > $@
+ $(PRINT) ".include \"macros.inc\"\n\n.data\n\n.balign 4\n\nglabel startup_logo\n\n.incbin \"$<\"\n\n.balign 16\n\nglabel startupLogo_end\n" > $@
#==============================================================================#
# Compile Common Textures #
@@ -674,7 +671,7 @@ LDFLAGS += -R $(BUILD_DIR)/src/data/common_textures.inc.elf
$(V)$(MIO0TOOL) -c $< $@
%/common_textures.inc.mio0.s: %/common_textures.inc.mio0
- printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$<\"\n\n" > $@
+ $(PRINT) ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$<\"\n\n" > $@
@@ -697,12 +694,12 @@ $(ROM): $(ELF)
$(call print,Building ROM:,$<,$@)
$(V)$(OBJCOPY) $(OBJCOPYFLAGS) $< $(@:.z64=.bin) -O binary
$(V)$(N64CKSUM) $(@:.z64=.bin) $@
- $(PYTHON) tools/doxygen_symbol_gen.py
+ $(PYTHON) $(TOOLS_DIR)/doxygen_symbol_gen.py
$(BUILD_DIR)/$(TARGET).hex: $(TARGET).z64
xxd $< > $@
-$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
+$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
$(OBJDUMP) -D $< > $@
diff --git a/assets/include/blueshell.mk b/assets/include/blueshell.mk
index 57c8b128d..02251ab6a 100644
--- a/assets/include/blueshell.mk
+++ b/assets/include/blueshell.mk
@@ -31,7 +31,7 @@ $(BLUESHELL_FRAMES) $(BLUESHELL_PALETTE): $(BLUESHELL_EXPORT_SENTINEL) ;
$(BLUESHELL_EXPORT_SENTINEL): $(ASSET_DIR)/blueshell.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_blueshell
distclean_blueshell:
diff --git a/assets/include/bomb.mk b/assets/include/bomb.mk
index 12c48df46..54bdf7ce5 100644
--- a/assets/include/bomb.mk
+++ b/assets/include/bomb.mk
@@ -22,7 +22,7 @@ $(BOMB_FRAMES) $(BOMB_PALETTE): $(BOMB_EXPORT_SENTINEL) ;
$(BOMB_EXPORT_SENTINEL): $(ASSET_DIR)/bomb.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_bomb
distclean_bomb:
diff --git a/assets/include/character_portraits.mk b/assets/include/character_portraits.mk
index 2154aaaf9..7ba69c314 100644
--- a/assets/include/character_portraits.mk
+++ b/assets/include/character_portraits.mk
@@ -50,7 +50,7 @@ $(PORTRAIT_PNG) $(SPECIAL_PORTRAIT_PNG) $(PORTRAIT_PALETTES) $(SPECIAL_PORTRAIT_
$(PORTRAIT_EXPORT_SENTINEL): $(ASSET_DIR)/character_portraits.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_character_portraits
distclean_character_portraits:
diff --git a/assets/include/character_select/bowser_select.mk b/assets/include/character_select/bowser_select.mk
index 23a48ede1..29def4fae 100644
--- a/assets/include/character_select/bowser_select.mk
+++ b/assets/include/character_select/bowser_select.mk
@@ -33,7 +33,7 @@ $(BOWSER_SELECT_PNG): $(BOWSER_SELECT_EXPORT_SENTINEL) ;
$(BOWSER_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/bowser_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_bowser_select
distclean_bowser_select:
diff --git a/assets/include/character_select/donkeykong_select.mk b/assets/include/character_select/donkeykong_select.mk
index c83d89d8c..fd9b1c8fa 100644
--- a/assets/include/character_select/donkeykong_select.mk
+++ b/assets/include/character_select/donkeykong_select.mk
@@ -33,7 +33,7 @@ $(DONKEYKONG_SELECT_PNG): $(DONKEYKONG_SELECT_EXPORT_SENTINEL) ;
$(DONKEYKONG_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/donkeykong_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_donkeykong_select
distclean_donkeykong_select:
diff --git a/assets/include/character_select/luigi_select.mk b/assets/include/character_select/luigi_select.mk
index f023e9dd5..0cff1075c 100644
--- a/assets/include/character_select/luigi_select.mk
+++ b/assets/include/character_select/luigi_select.mk
@@ -33,7 +33,7 @@ $(LUIGI_SELECT_PNG): $(LUIGI_SELECT_EXPORT_SENTINEL) ;
$(LUIGI_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/luigi_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_luigi_select
distclean_luigi_select:
diff --git a/assets/include/character_select/mario_select.mk b/assets/include/character_select/mario_select.mk
index 5e0a71d39..fba5ae712 100644
--- a/assets/include/character_select/mario_select.mk
+++ b/assets/include/character_select/mario_select.mk
@@ -33,7 +33,7 @@ $(MARIO_SELECT_PNG): $(MARIO_SELECT_EXPORT_SENTINEL) ;
$(MARIO_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/mario_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_mario_select
distclean_mario_select:
diff --git a/assets/include/character_select/peach_select.mk b/assets/include/character_select/peach_select.mk
index 89cd265f6..8694d5108 100644
--- a/assets/include/character_select/peach_select.mk
+++ b/assets/include/character_select/peach_select.mk
@@ -33,7 +33,7 @@ $(PEACH_SELECT_PNG): $(PEACH_SELECT_EXPORT_SENTINEL) ;
$(PEACH_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/peach_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_peach_select
distclean_peach_select:
diff --git a/assets/include/character_select/toad_select.mk b/assets/include/character_select/toad_select.mk
index 7973dff64..362b3ab5d 100644
--- a/assets/include/character_select/toad_select.mk
+++ b/assets/include/character_select/toad_select.mk
@@ -33,7 +33,7 @@ $(TOAD_SELECT_PNG): $(TOAD_SELECT_EXPORT_SENTINEL) ;
$(TOAD_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/toad_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_toad_select
distclean_toad_select:
diff --git a/assets/include/character_select/wario_select.mk b/assets/include/character_select/wario_select.mk
index 1a1c2ecee..a82b444af 100644
--- a/assets/include/character_select/wario_select.mk
+++ b/assets/include/character_select/wario_select.mk
@@ -33,7 +33,7 @@ $(WARIO_SELECT_PNG): $(WARIO_SELECT_EXPORT_SENTINEL) ;
$(WARIO_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/wario_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_wario_select
distclean_wario_select:
diff --git a/assets/include/character_select/yoshi_select.mk b/assets/include/character_select/yoshi_select.mk
index 9bc903f37..a61ea6c10 100644
--- a/assets/include/character_select/yoshi_select.mk
+++ b/assets/include/character_select/yoshi_select.mk
@@ -33,7 +33,7 @@ $(YOSHI_SELECT_PNG): $(YOSHI_SELECT_EXPORT_SENTINEL) ;
$(YOSHI_SELECT_EXPORT_SENTINEL): $(ASSET_DIR)/character_select/yoshi_select.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_yoshi_select
distclean_yoshi_select:
diff --git a/assets/include/course_outlines.mk b/assets/include/course_outlines.mk
index 84f489a49..382255106 100644
--- a/assets/include/course_outlines.mk
+++ b/assets/include/course_outlines.mk
@@ -36,7 +36,7 @@ $(COURSE_OUTLINE_PNG): $(COURSE_OUTLINE_EXPORT_SENTINEL) ;
$(COURSE_OUTLINE_EXPORT_SENTINEL): $(ASSET_DIR)/course_outlines.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_course_outlines
distclean_course_outlines:
diff --git a/assets/include/course_previews.mk b/assets/include/course_previews.mk
index bfa5acdf6..1d6f84149 100644
--- a/assets/include/course_previews.mk
+++ b/assets/include/course_previews.mk
@@ -36,7 +36,7 @@ $(COURSE_PREVIEW_PNG): $(COURSE_PREVIEW_EXPORT_SENTINEL) ;
$(COURSE_PREVIEW_EXPORT_SENTINEL): $(ASSET_DIR)/course_previews.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_course_previews
distclean_course_previews:
diff --git a/assets/include/courses/banshee_boardwalk.mk b/assets/include/courses/banshee_boardwalk.mk
index 063b34341..6479abfbc 100644
--- a/assets/include/courses/banshee_boardwalk.mk
+++ b/assets/include/courses/banshee_boardwalk.mk
@@ -57,8 +57,10 @@ $(BANSHEE_BOARDWALK_DIR)/boo_frames.mio0: $(BANSHEE_BOARDWALK_DIR)/boo_frames.bi
# $(DATA_DIR)/boo_frames.bin: $(DATA_DIR)/boo_frames.o
# $(OBJCOPY) --only-section=.data -O binary $@ $<
# cat'ing the files together is easier though
+CAT ?= cat
+
$(BANSHEE_BOARDWALK_DIR)/boo_frames.bin: $(BANSHEE_BOARDWALK_BOO_FRAMES:%.png=%.bin)
- cat $^ > $@
+ $(CAT) $^ > $@
$(BANSHEE_BOARDWALK_BOO_FRAMES:%.png=%.bin): %.bin : %.png
$(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(BANSHEE_BOARDWALK_BOO_PALETTE)
@@ -79,7 +81,7 @@ $(BANSHEE_BOARDWALK_PNG): $(BANSHEE_BOARDWALK_EXPORT_SENTINEL) ;
$(BANSHEE_BOARDWALK_EXPORT_SENTINEL): $(ASSET_DIR)/courses/banshee_boardwalk.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_banshee_boardwalk
distclean_banshee_boardwalk:
diff --git a/assets/include/courses/bowsers_castle.mk b/assets/include/courses/bowsers_castle.mk
index ca71568e2..eb4b81a01 100644
--- a/assets/include/courses/bowsers_castle.mk
+++ b/assets/include/courses/bowsers_castle.mk
@@ -27,7 +27,7 @@ $(THWOMP_PALETTE) $(THWOMP_FACE_FRAMES) $(THOWMP_SIDE_PNG): $(BOWSERS_CASTLE_EXP
$(BOWSERS_CASTLE_EXPORT_SENTINEL): $(ASSET_DIR)/courses/bowsers_castle.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_bowsers_castle
distclean_bowsers_castle:
diff --git a/assets/include/courses/choco_mountain.mk b/assets/include/courses/choco_mountain.mk
index 4c87cdaf4..cd7efbb4f 100644
--- a/assets/include/courses/choco_mountain.mk
+++ b/assets/include/courses/choco_mountain.mk
@@ -15,7 +15,7 @@ $(CHOCO_MOUNTAIN_PNG): $(CHOCO_MOUNTAIN_EXPORT_SENTINEL) ;
$(CHOCO_MOUNTAIN_EXPORT_SENTINEL): $(ASSET_DIR)/courses/choco_mountain.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_choco_mountain
distclean_choco_mountain:
diff --git a/assets/include/courses/dks_jungle_parkway.mk b/assets/include/courses/dks_jungle_parkway.mk
index eab271a13..88e5cd706 100644
--- a/assets/include/courses/dks_jungle_parkway.mk
+++ b/assets/include/courses/dks_jungle_parkway.mk
@@ -43,7 +43,7 @@ $(DKS_JUNGLE_PARKWAY_PNG): $(DKS_JUNGLE_PARKWAY_EXPORT_SENTINEL) ;
$(DKS_JUNGLE_PARKWAY_EXPORT_SENTINEL): $(ASSET_DIR)/courses/dks_jungle_parkway.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_dks_junk_parkway
distclean_dks_junk_parkway:
diff --git a/assets/include/courses/frappe_snowland.mk b/assets/include/courses/frappe_snowland.mk
index 93d8b371b..b9dd2a139 100644
--- a/assets/include/courses/frappe_snowland.mk
+++ b/assets/include/courses/frappe_snowland.mk
@@ -43,7 +43,7 @@ $(FRAPPE_SNOWLAND_SNOWMAN_PALETTE) $(FRAPPE_SNOWLAND_SNOW_PALETTE) $(FRAPPE_SNOW
$(FRAPPE_SNOWLAND_EXPORT_SENTINEL): $(ASSET_DIR)/courses/frappe_snowland.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_frappe_snowland
distclean_frappe_snowland:
diff --git a/assets/include/courses/kalimari_desert.mk b/assets/include/courses/kalimari_desert.mk
index 46d776dc6..879dac2a3 100644
--- a/assets/include/courses/kalimari_desert.mk
+++ b/assets/include/courses/kalimari_desert.mk
@@ -58,7 +58,7 @@ $(KALIMARI_DESERT_PNG): $(KALIMARI_DESERT_EXPORT_SENTINEL) ;
$(KALIMARI_DESERT_EXPORT_SENTINEL): $(ASSET_DIR)/courses/kalimari_desert.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_kalimari_desert
distclean_kalimari_desert:
diff --git a/assets/include/courses/koopa_troopa_beach.mk b/assets/include/courses/koopa_troopa_beach.mk
index 7d6a66e00..06fdaa198 100644
--- a/assets/include/courses/koopa_troopa_beach.mk
+++ b/assets/include/courses/koopa_troopa_beach.mk
@@ -33,7 +33,7 @@ $(KOOPA_TROOPA_BEACH_CRAB_PALETTE) $(KOOPA_TROOPA_BEACH_CRAB_FRAMES) $(KOOPA_TRO
$(KOOPA_TROOPA_BEACH_EXPORT_SENTINEL): $(ASSET_DIR)/courses/koopa_troopa_beach.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_koopa_troopa_beach
distclean_koopa_troopa_beach:
diff --git a/assets/include/courses/luigi_raceway.mk b/assets/include/courses/luigi_raceway.mk
index 6504d9709..1e21e29d2 100644
--- a/assets/include/courses/luigi_raceway.mk
+++ b/assets/include/courses/luigi_raceway.mk
@@ -17,7 +17,7 @@ $(LUIGI_RACEWAY_PNG): $(LUIGI_RACEWAY_EXPORT_SENTINEL) ;
$(LUIGI_RACEWAY_EXPORT_SENTINEL): $(ASSET_DIR)/courses/luigi_raceway.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_luigi_raceway
distclean_luigi_raceway:
diff --git a/assets/include/courses/mario_raceway.mk b/assets/include/courses/mario_raceway.mk
index 42c41be17..97140fcfc 100644
--- a/assets/include/courses/mario_raceway.mk
+++ b/assets/include/courses/mario_raceway.mk
@@ -36,7 +36,7 @@ $(PIRANHA_PLANT_FRAMES) $(MARIO_RACEWAY_PIRANHA_PLANT_PALETTE) $(MARIO_RACEWAY_S
$(PIRANHA_PLANT_EXPORT_SENTINEL): $(ASSET_DIR)/courses/mario_raceway.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_mario_raceway
distclean_mario_raceway:
diff --git a/assets/include/courses/moo_moo_farm.mk b/assets/include/courses/moo_moo_farm.mk
index 3a6a8fb6d..60661f221 100644
--- a/assets/include/courses/moo_moo_farm.mk
+++ b/assets/include/courses/moo_moo_farm.mk
@@ -74,7 +74,7 @@ $(MOO_MOO_FARM_SIGN_PNG) $(MOO_MOO_FARM_DIRT_PNG): $(MOO_MOO_FARM_EXPORT_SENTINE
$(MOO_MOO_FARM_EXPORT_SENTINEL): $(ASSET_DIR)/courses/moo_moo_farm.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_moo_moo_farm
distclean_moo_moo_farm:
diff --git a/assets/include/courses/rainbow_road.mk b/assets/include/courses/rainbow_road.mk
index 312fe65df..682eeb4c6 100644
--- a/assets/include/courses/rainbow_road.mk
+++ b/assets/include/courses/rainbow_road.mk
@@ -99,7 +99,7 @@ $(RAINBOW_ROAD_PNG): $(RAINBOW_ROAD_EXPORT_SENTINEL) ;
$(RAINBOW_ROAD_EXPORT_SENTINEL): $(ASSET_DIR)/courses/rainbow_road.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_rainbow_road
distclean_rainbow_road:
diff --git a/assets/include/courses/royal_raceway.mk b/assets/include/courses/royal_raceway.mk
index 9d7da1932..b5f48ae91 100644
--- a/assets/include/courses/royal_raceway.mk
+++ b/assets/include/courses/royal_raceway.mk
@@ -13,7 +13,7 @@ $(ROYAL_RACEWAY_PIRANHA_PLANT_PALETTE): $(ROYAL_RACEWAY_EXPORT_SENTINEL) ;
$(ROYAL_RACEWAY_EXPORT_SENTINEL): $(ASSET_DIR)/courses/royal_raceway.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_royal_raceway
distclean_royal_raceway:
diff --git a/assets/include/courses/sherbet_land.mk b/assets/include/courses/sherbet_land.mk
index 8fb047494..0cb240700 100644
--- a/assets/include/courses/sherbet_land.mk
+++ b/assets/include/courses/sherbet_land.mk
@@ -20,7 +20,7 @@ $(SHERBET_LAND_PNG) $(PENGUIN_PNG) $(SHERBET_LAND_ICE): $(SHERBET_LAND_EXPORT_SE
$(SHERBET_LAND_EXPORT_SENTINEL): $(ASSET_DIR)/courses/sherbet_land.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_sherbet_land
distclean_sherbet_land:
diff --git a/assets/include/courses/toads_turnpike.mk b/assets/include/courses/toads_turnpike.mk
index 129a5f13f..3f9613d33 100644
--- a/assets/include/courses/toads_turnpike.mk
+++ b/assets/include/courses/toads_turnpike.mk
@@ -47,7 +47,7 @@ $(TOADS_TURNPIKE_PNG): $(TOADS_TURNPIKE_EXPORT_SENTINEL) ;
$(TOADS_TURNPIKE_EXPORT_SENTINEL): $(ASSET_DIR)/courses/toads_turnpike.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_toads_turnpike
distclean_toads_turnpike:
diff --git a/assets/include/courses/wario_stadium.mk b/assets/include/courses/wario_stadium.mk
index 7bd46d938..1d168be9f 100644
--- a/assets/include/courses/wario_stadium.mk
+++ b/assets/include/courses/wario_stadium.mk
@@ -17,7 +17,7 @@ $(WARIO_STADIUM_SIGN): $(WARIO_STADIUM_EXPORT_SENTINEL) ;
$(WARIO_STADIUM_EXPORT_SENTINEL): $(ASSET_DIR)/courses/wario_stadium.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_wario_stadium
distclean_wario_stadium:
diff --git a/assets/include/courses/yoshi_valley.mk b/assets/include/courses/yoshi_valley.mk
index e55b86ff9..188cfc3a5 100644
--- a/assets/include/courses/yoshi_valley.mk
+++ b/assets/include/courses/yoshi_valley.mk
@@ -24,7 +24,7 @@ $(YOSHI_VALLEY_PNG): $(YOSHI_VALLEY_EXPORT_SENTINEL) ;
$(YOSHI_VALLEY_EXPORT_SENTINEL): $(ASSET_DIR)/courses/yoshi_valley.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_yoshi_valley
distclean_yoshi_valley:
diff --git a/assets/include/debug_font.mk b/assets/include/debug_font.mk
index 8f66d1765..99eb902f1 100644
--- a/assets/include/debug_font.mk
+++ b/assets/include/debug_font.mk
@@ -18,7 +18,7 @@ $(DEBUG_FONT_PNG) $(DEBUG_FONT_PALETTE): $(DEBUG_FONT_EXPORT_SENTINEL) ;
$(DEBUG_FONT_EXPORT_SENTINEL): $(ASSET_DIR)/debug_font.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_debug_font
distclean_debug_font:
diff --git a/assets/include/ending_ceremony.mk b/assets/include/ending_ceremony.mk
index b5aad5ffe..758b58ffb 100644
--- a/assets/include/ending_ceremony.mk
+++ b/assets/include/ending_ceremony.mk
@@ -21,7 +21,7 @@ $(TROHPY_PNG) $(PODIUM_PNG): $(ENDING_CEREMONY_EXPORT_SENTINEL) ;
$(ENDING_CEREMONY_EXPORT_SENTINEL): $(ASSET_DIR)/ending_ceremony.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_ending_ceremony
distclean_ending_ceremony:
diff --git a/assets/include/finish_line_banner.mk b/assets/include/finish_line_banner.mk
index a2d3b1886..08fa6c6f3 100644
--- a/assets/include/finish_line_banner.mk
+++ b/assets/include/finish_line_banner.mk
@@ -31,7 +31,7 @@ $(FINISH_LINE_BANNER_PNG) $(FINISH_LINE_BANNER_PALETTE): $(FINISH_LINE_BANNER_EX
$(FINISH_LINE_BANNER_EXPORT_SENTINEL): $(ASSET_DIR)/finish_line_banner.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_finish_line_banner
distclean_finish_line_banner:
diff --git a/assets/include/greenshell.mk b/assets/include/greenshell.mk
index e329db203..f63e0743f 100644
--- a/assets/include/greenshell.mk
+++ b/assets/include/greenshell.mk
@@ -31,7 +31,7 @@ $(GREENSHELL_FRAMES) $(GREENSHELL_PALETTE): $(GREENSHELL_EXPORT_SENTINEL) ;
$(GREENSHELL_EXPORT_SENTINEL): $(ASSET_DIR)/greenshell.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_greenshell
distclean_greenshell:
diff --git a/assets/include/hud_type_c.mk b/assets/include/hud_type_c.mk
index c9e1e06db..8041d6080 100644
--- a/assets/include/hud_type_c.mk
+++ b/assets/include/hud_type_c.mk
@@ -55,7 +55,7 @@ $(HUD_TYPE_C_PORTRAIT_BORDER_PNG): $(HUD_TYPE_C_EXPORT_SENTINEL) ;
$(HUD_TYPE_C_EXPORT_SENTINEL): $(ASSET_DIR)/hud_type_c.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_hud_type_c
distclean_hud_type_c:
diff --git a/assets/include/item_window.mk b/assets/include/item_window.mk
index cd41b2a9e..d396f4352 100644
--- a/assets/include/item_window.mk
+++ b/assets/include/item_window.mk
@@ -50,7 +50,7 @@ $(ITEM_WINDOW_PNG) $(ITEM_WINDOW_PALETTES): $(ITEM_WINDOW_EXPORT_SENTINEL) ;
$(ITEM_WINDOW_EXPORT_SENTINEL): $(ASSET_DIR)/item_window.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_item_window
distclean_item_window:
diff --git a/assets/include/karts/bowser_kart.mk b/assets/include/karts/bowser_kart.mk
index 95733c727..301f21925 100644
--- a/assets/include/karts/bowser_kart.mk
+++ b/assets/include/karts/bowser_kart.mk
@@ -1499,7 +1499,7 @@ $(BOWSER_KART_FRAME_PNG) $(BOWSER_KART_PALETTE_PNG): $(BOWSER_EXPORT_SENTINEL) ;
$(BOWSER_EXPORT_SENTINEL): $(ASSET_DIR)/karts/bowser_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_bowser_kart
distclean_bowser_kart:
diff --git a/assets/include/karts/donkeykong_kart.mk b/assets/include/karts/donkeykong_kart.mk
index a6b2e69d4..a90ab5fff 100644
--- a/assets/include/karts/donkeykong_kart.mk
+++ b/assets/include/karts/donkeykong_kart.mk
@@ -1499,7 +1499,7 @@ $(DONKEYKONG_KART_FRAME_PNG) $(DONKEYKONG_KART_PALETTE_PNG): $(DONKEYKONG_EXPORT
$(DONKEYKONG_EXPORT_SENTINEL): $(ASSET_DIR)/karts/donkeykong_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_donkeykong_kart
distclean_donkeykong_kart:
diff --git a/assets/include/karts/luigi_kart.mk b/assets/include/karts/luigi_kart.mk
index 05f882d93..bd2dedb69 100644
--- a/assets/include/karts/luigi_kart.mk
+++ b/assets/include/karts/luigi_kart.mk
@@ -1499,7 +1499,7 @@ $(LUIGI_KART_FRAME_PNG) $(LUIGI_KART_PALETTE_PNG): $(LUIGI_EXPORT_SENTINEL) ;
$(LUIGI_EXPORT_SENTINEL): $(ASSET_DIR)/karts/luigi_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_luigi_kart
distclean_luigi_kart:
diff --git a/assets/include/karts/mario_kart.mk b/assets/include/karts/mario_kart.mk
index 54aea1140..9a3f320c4 100644
--- a/assets/include/karts/mario_kart.mk
+++ b/assets/include/karts/mario_kart.mk
@@ -1499,7 +1499,7 @@ $(MARIO_KART_FRAME_PNG) $(MARIO_KART_PALETTE_PNG): $(MARIO_EXPORT_SENTINEL) ;
$(MARIO_EXPORT_SENTINEL): $(ASSET_DIR)/karts/mario_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_mario_kart
distclean_mario_kart:
diff --git a/assets/include/karts/peach_kart.mk b/assets/include/karts/peach_kart.mk
index 1712ea1db..9d7504cdf 100644
--- a/assets/include/karts/peach_kart.mk
+++ b/assets/include/karts/peach_kart.mk
@@ -1499,7 +1499,7 @@ $(PEACH_KART_FRAME_PNG) $(PEACH_KART_PALETTE_PNG): $(PEACH_EXPORT_SENTINEL) ;
$(PEACH_EXPORT_SENTINEL): $(ASSET_DIR)/karts/peach_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_peach_kart
distclean_peach_kart:
diff --git a/assets/include/karts/toad_kart.mk b/assets/include/karts/toad_kart.mk
index e1199663e..6cb9195f1 100644
--- a/assets/include/karts/toad_kart.mk
+++ b/assets/include/karts/toad_kart.mk
@@ -1499,7 +1499,7 @@ $(TOAD_KART_FRAME_PNG) $(TOAD_KART_PALETTE_PNG): $(TOAD_EXPORT_SENTINEL) ;
$(TOAD_EXPORT_SENTINEL): $(ASSET_DIR)/karts/toad_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_toad_kart
distclean_toad_kart:
diff --git a/assets/include/karts/wario_kart.mk b/assets/include/karts/wario_kart.mk
index c808699cb..6cc96c0c4 100644
--- a/assets/include/karts/wario_kart.mk
+++ b/assets/include/karts/wario_kart.mk
@@ -1499,7 +1499,7 @@ $(WARIO_KART_FRAME_PNG) $(WARIO_KART_PALETTE_PNG): $(WARIO_EXPORT_SENTINEL) ;
$(WARIO_EXPORT_SENTINEL): $(ASSET_DIR)/karts/wario_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_wario_kart
distclean_wario_kart:
diff --git a/assets/include/karts/yoshi_kart.mk b/assets/include/karts/yoshi_kart.mk
index d30e220a7..09057bd03 100644
--- a/assets/include/karts/yoshi_kart.mk
+++ b/assets/include/karts/yoshi_kart.mk
@@ -1499,7 +1499,7 @@ $(YOSHI_KART_FRAME_PNG) $(YOSHI_KART_PALETTE_PNG): $(YOSHI_EXPORT_SENTINEL) ;
$(YOSHI_EXPORT_SENTINEL): $(ASSET_DIR)/karts/yoshi_kart.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_yoshi_kart
distclean_yoshi_kart:
diff --git a/assets/include/lakitu/bluelight.mk b/assets/include/lakitu/bluelight.mk
index df498e765..eccbaef75 100644
--- a/assets/include/lakitu/bluelight.mk
+++ b/assets/include/lakitu/bluelight.mk
@@ -28,7 +28,7 @@ $(BLUELIGHT_FRAMES) $(BLUELIGHT_PALETTE): $(BLUELIGHT_EXPORT_SENTINEL) ;
$(BLUELIGHT_EXPORT_SENTINEL): assets/lakitu/bluelight.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_bluelight
distclean_lakitu_bluelight:
diff --git a/assets/include/lakitu/checkeredflag.mk b/assets/include/lakitu/checkeredflag.mk
index 9fb4ab99b..e288914e3 100644
--- a/assets/include/lakitu/checkeredflag.mk
+++ b/assets/include/lakitu/checkeredflag.mk
@@ -52,7 +52,7 @@ $(CHECKEREDFLAG_FRAMES) $(CHECKEREDFLAG_PALETTE): $(CHECKEREDFLAG_EXPORT_SENTINE
$(CHECKEREDFLAG_EXPORT_SENTINEL): assets/lakitu/checkeredflag.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_checkeredflag
distclean_lakitu_checkeredflag:
diff --git a/assets/include/lakitu/finallap.mk b/assets/include/lakitu/finallap.mk
index 153af322f..51d216c39 100644
--- a/assets/include/lakitu/finallap.mk
+++ b/assets/include/lakitu/finallap.mk
@@ -36,7 +36,7 @@ $(FINALLAP_FRAMES) $(FINALLAP_PALETTE): $(FINALLAP_EXPORT_SENTINEL) ;
$(FINALLAP_EXPORT_SENTINEL): assets/lakitu/finallap.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_finallap
distclean_lakitu_finallap:
diff --git a/assets/include/lakitu/fishing.mk b/assets/include/lakitu/fishing.mk
index fe20afb80..b7986e069 100644
--- a/assets/include/lakitu/fishing.mk
+++ b/assets/include/lakitu/fishing.mk
@@ -24,7 +24,7 @@ $(FISHING_FRAMES) $(FISHING_PALETTE): $(FISHING_EXPORT_SENTINEL) ;
$(FISHING_EXPORT_SENTINEL): assets/lakitu/fishing.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_fishing
distclean_lakitu_fishing:
diff --git a/assets/include/lakitu/nolights.mk b/assets/include/lakitu/nolights.mk
index 90ad06933..758f178bb 100644
--- a/assets/include/lakitu/nolights.mk
+++ b/assets/include/lakitu/nolights.mk
@@ -28,7 +28,7 @@ $(NOLIGHTS_FRAMES) $(NOLIGHTS_PALETTE): $(NOLIGHTS_EXPORT_SENTINEL) ;
$(NOLIGHTS_EXPORT_SENTINEL): assets/lakitu/nolights.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_nolights
distclean_lakitu_nolights:
diff --git a/assets/include/lakitu/redlights.mk b/assets/include/lakitu/redlights.mk
index dd8a4976b..e39f2e7b5 100644
--- a/assets/include/lakitu/redlights.mk
+++ b/assets/include/lakitu/redlights.mk
@@ -36,7 +36,7 @@ $(REDLIGHTS_FRAMES) $(REDLIGHTS_PALETTE): $(REDLIGHTS_EXPORT_SENTINEL) ;
$(REDLIGHTS_EXPORT_SENTINEL): assets/lakitu/redlights.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_redlights
distclean_lakitu_redlights:
diff --git a/assets/include/lakitu/reverse.mk b/assets/include/lakitu/reverse.mk
index 74aadbf95..a4ba4101e 100644
--- a/assets/include/lakitu/reverse.mk
+++ b/assets/include/lakitu/reverse.mk
@@ -36,7 +36,7 @@ $(REVERSE_FRAMES) $(REVERSE_PALETTE): $(REVERSE_EXPORT_SENTINEL) ;
$(REVERSE_EXPORT_SENTINEL): assets/lakitu/reverse.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_reverse
distclean_lakitu_reverse:
diff --git a/assets/include/lakitu/secondlap.mk b/assets/include/lakitu/secondlap.mk
index d31d3be99..1bb5b6da2 100644
--- a/assets/include/lakitu/secondlap.mk
+++ b/assets/include/lakitu/secondlap.mk
@@ -36,7 +36,7 @@ $(SECONDLAP_FRAMES) $(SECONDLAP_PALETTE): $(SECONDLAP_EXPORT_SENTINEL) ;
$(SECONDLAP_EXPORT_SENTINEL): assets/lakitu/secondlap.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_lakitu_secondlap
distclean_lakitu_secondlap:
diff --git a/assets/include/minimap_icons.mk b/assets/include/minimap_icons.mk
index b1fb9c298..e14a8f9f8 100644
--- a/assets/include/minimap_icons.mk
+++ b/assets/include/minimap_icons.mk
@@ -23,7 +23,7 @@ $(MINIMAP_ICONS_PNG): $(MINIMAP_ICONS_EXPORT_SENTINEL) ;
$(MINIMAP_ICONS_EXPORT_SENTINEL): $(ASSET_DIR)/minimap_icons.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_minimap_icons
distclean_minimap_icons:
diff --git a/assets/include/onomatopoeia.mk b/assets/include/onomatopoeia.mk
index 43e612d80..e49ebbee1 100644
--- a/assets/include/onomatopoeia.mk
+++ b/assets/include/onomatopoeia.mk
@@ -29,7 +29,7 @@ $(ONOMATOPOEIA_PNG) $(ONOMATOPOEIA_PALETTE): $(ONOMATOPOEIA_EXPORT_SENTINEL) ;
$(ONOMATOPOEIA_EXPORT_SENTINEL): $(ASSET_DIR)/onomatopoeia.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_onomatopoeia
distclean_onomatopoeia:
diff --git a/assets/include/player_emblems.mk b/assets/include/player_emblems.mk
index e1578cadd..f5f6ae5d7 100644
--- a/assets/include/player_emblems.mk
+++ b/assets/include/player_emblems.mk
@@ -22,7 +22,7 @@ $(PLAYER_EMBLEM_PNGS) $(PLAYER_EMBLEM_PALETTE): $(PLAYER_EMBLEM_EXPORT_SENTINEL)
$(PLAYER_EMBLEM_EXPORT_SENTINEL): $(ASSET_DIR)/player_emblems.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_player_emblems
distclean_player_emblems:
diff --git a/assets/include/startup_logo.mk b/assets/include/startup_logo.mk
index b3880b302..2a16f3ad4 100644
--- a/assets/include/startup_logo.mk
+++ b/assets/include/startup_logo.mk
@@ -13,7 +13,7 @@ $(REFLECTION_MAP): $(STARTUP_LOGO_EXPORT_SENTINEL) ;
$(STARTUP_LOGO_EXPORT_SENTINEL): $(ASSET_DIR)/startup_logo.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_startup_logo
distclean_startup_logo:
diff --git a/assets/include/trees.mk b/assets/include/trees.mk
index a75ff5614..238797cf1 100644
--- a/assets/include/trees.mk
+++ b/assets/include/trees.mk
@@ -38,7 +38,7 @@ $(TREES_PNG) $(TREES_PALETTE) $(TREES_PALETTE_IMPORT): $(TREES_EXPORT_SENTINEL)
$(TREES_EXPORT_SENTINEL): $(ASSET_DIR)/trees.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_trees
distclean_trees:
diff --git a/assets/include/unused_traffic_light.mk b/assets/include/unused_traffic_light.mk
index 673de4f47..4608e903d 100644
--- a/assets/include/unused_traffic_light.mk
+++ b/assets/include/unused_traffic_light.mk
@@ -28,7 +28,7 @@ $(UNUSED_TRAFFIC_LIGHT_PNG) $(UNUSED_TRAFFIC_LIGHT_PALETTE): $(UNUSED_TRAFFIC_LI
$(UNUSED_TRAFFIC_LIGHT_EXPORT_SENTINEL): $(ASSET_DIR)/unused_traffic_light.json
$(ASSET_EXTRACT) $(BASEROM) $<
- touch $@
+ $(TOUCH) $@
.PHONY: distclean_unused_traffic_light
distclean_unused_traffic_light:
diff --git a/docs/basics/BUILD_WINDOWS.md b/docs/basics/BUILD_WINDOWS.md
deleted file mode 100644
index cb7fdafe8..000000000
--- a/docs/basics/BUILD_WINDOWS.md
+++ /dev/null
@@ -1,101 +0,0 @@
-@page buildwindows Compiling for Windows
-## Compiling mk64 Decomp In Windows
-
-***This method is not recommended nor supported. However, it is the only solution to build in W7/W8. WSL is the path of least resistance, use that not this***
-
-> Building decomp using msys on Windows is a journey.. A journey akin to crawling over broken glass in the dark.
-- leogames
-
-The extraneous and convoluted process to building mk64 decomp on Windows begins with disabling your anti-virus program or adding an exception to the mk64 decomp folder and the msys2 installation folder.
-Please note that this action may impact the security of your system. Prior to proceeding, make sure to understand the increased security risks that may result from this step. Nobody except you, is responsible and liable for your system and its security.
-
-### Preamble
-Any misteps may require a complete uninstall of `MSYS2 MinGW x64` and restarting from the very beginning.
-It is unknown if `MSYS MinGW x32` is supported (most likely not).
-
-### Step 1: Download MSYS2 MinGW x64
-
-https://www.msys2.org/
-
-Follow the initial instructions to update the base packages. Ignore installing any extra packages in-case they conflict with the below steps.
-
-MinGW is a separate program from Msys2. However, it must be wrapped right into msys2.
-Compiling recomp requires steps using
`MSYS2 MSYS` *and* `MSYS2 MinGW x64`. The instructions will clearly differentiate which terminal program to launch and run in the section titles.
-
-##### *Why flip-flop between both?*
-Compiling the recomp executable that generates the source files for compiling the compiler requires capstone. A disassembly, analysis, and reverse-engineering framework. Capstone is only available on `MSYS2 MinGW x64`. It is not available on `MSYS2 MSYS`. However, compiling the compiler itself requires
-`MSYS2 MSYS` because it contains an equivallent dependency for `mman`. A memory mapping library. `MSYS2 MinGW x64` does not contain an equivallent dependancy.
-
-
-### Step 2: Install Dependancies in MSYS2 MinGW x64
-```
-pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-capstone pkgconf make python3 git
-```
-
-### Step 3: Install Dependencies in MSYS2 MSYS
-```
-pacman -S gcc
-```
-
-### Step 3.5: Rename include in recomp.cpp
-For some reason on Windows capstone is inside of a capstone folder.
-```
-#include
-```
-
-
-### Step 4: Get Binutils
-Download and install the mips64 tool chain:
-https://github.com/N64-tools/mips64-gcc-toolchain
-
-Merge the inner folders (bin, share, etc.) with the respective folders in `C:\msys64\mingw64\`
-
-### Step 5: Compiling recomp.exe in MSYS2 MinGW x64
-In `MSYS2 MinGW x64` run in `mk64/tools/ido5.3_recomp/`:
-```
-g++ recomp.cpp -o recomp -g -lcapstone -Dugen53
-```
-
-### Step 6: Generate Recomp Source Files in MSYS2 MinGW x64
-
-Generate the .c files which will compile into the recomp binaries.
-mk64 requires the following compiler binaries: `as1, cc, cfe, copt, ugen, ujoin, uld, umerge, uopt`
-
-In `MSYS2 MinGW x64` run in the directory `mk64/tools/ido5.3_recomp/`:
-```
-./recomp ../ido5.3_compiler/usr/lib/as1 > as1_c.c
-./recomp ../ido5.3_compiler/usr/lib/cc > cc_c.c
-./recomp ../ido5.3_compiler/usr/lib/cfe > cfe_c.c
-./recomp ../ido5.3_compiler/usr/lib/copt > copt_c.c
-./recomp ../ido5.3_compiler/usr/lib/ugen > ugen_c.c
-./recomp ../ido5.3_compiler/usr/lib/ujoin > ujoin_c.c
-./recomp ../ido5.3_compiler/usr/lib/uld > uld_c.c
-./recomp ../ido5.3_compiler/usr/lib/umerge > umerge_c.c
-./recomp ../ido5.3_compiler/usr/lib/uopt > uopt_c.c
-```
-If you get an assertion failed error. Then the directory to the compiler is incorrect.
-The binary for cc is in `/ido5.3_compiler/usr/bin/` so do:
-```
-./recomp ../ido5.3_compiler/usr/bin/cc > cc_c.c
-```
-### Step 7: Compiling the recomp compiler in MSYS2 MSYS
-In `MSYS2 MSYS` run in the directory `mk64/tools/ido5.3_recomp/`:
-```
-gcc libc_impl.c as1_c.c -o as1 -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c cc_c.c -o cc -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c cfe_c.c -o cfe -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c copt_c.c -o copt -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c ugen_c.c -o ugen -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c ujoin_c.c -o ujoin -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c uld_c.c -o uld -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c umerge_c.c -o umerge -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-gcc libc_impl.c uopt_c.c -o uopt -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
-```
-`-O2` is an optional optimization flag.
-
-### Step 8: Compile mk64 in MSYS2 MinGW x64
-In `/mk64/` run:
-```
-make -j#
-```
-Replace # with your number of CPU cores for quicker compilation.
diff --git a/docs/basics/compiling.md b/docs/basics/compiling.md
index 59ade96da..f8495f980 100644
--- a/docs/basics/compiling.md
+++ b/docs/basics/compiling.md
@@ -27,9 +27,16 @@ Review the [n64decomp/sm64](https://github.com/n64decomp/sm64) readme for instru
# Windows
-Not recommended. Use WSL unless this is your only option.
+*N64 decomp does not mesh well with Windows. However, this process has been refined to be as painless as possible. WSL is a great alternative if issues arise.*
-[Instructions here](buildwindows.html)
+### Requirements
+- Clone the repo or download the zip on your computer
+- Dowload toolchain from [here](https://github.com/coco875/mk64-tools/releases/download/v0.0.6/mips-tools-chain-windows.zip)
+
+### Setup
+1. copy from mips-tools-chain-windows.zip the folder `mingw64` into tools folder in the repo
+2. Open a terminal (cmd or powershell) in the repo folder and run `"tools\mingw64\w64devkit.exe"` and after `make`
+3. Wait for the build to finish and Enjoy!
# macOS
@@ -55,7 +62,6 @@ docker run --rm -v .:/mk64 mk64
For example:
```bash
-docker run --rm -v .:/mk64 mk64 make -C tools
docker run --rm -v .:/mk64 mk64 make
```
@@ -65,7 +71,6 @@ Place a US version of Mario Kart 64 called `baserom.us.z64` into the project fol
Run the following commands after pulling:
```bash
-make -C tools
make -j
```
diff --git a/extract_assets.py b/extract_assets.py
index e3df08800..c5b964463 100755
--- a/extract_assets.py
+++ b/extract_assets.py
@@ -137,11 +137,6 @@ def main():
print(fname + " has the wrong hash! Found " + sha1 + ", expected " + expected_sha1)
sys.exit(1)
- # Make sure tools exist
- subprocess.check_call(
- ["make", "-s", "-C", "tools/", "mio0", "n64graphics", "tkmk00"]
- )
-
# Go through the assets in roughly alphabetical order (but assets in the same
# compressed block still go together).
keys = sorted(list(todo.keys()), key=lambda k: todo[k][0][0])
@@ -212,7 +207,9 @@ def main():
input = image[pos : pos + size]
os.makedirs(os.path.dirname(asset), exist_ok=True)
if asset.endswith(".png"):
- with tempfile.NamedTemporaryFile(prefix="asset") as tex_file:
+ name_file = ""
+ with tempfile.NamedTemporaryFile(prefix="asset", delete=False) as tex_file:
+ name_file = tex_file.name
tex_file.write(input)
tex_file.flush()
cmd = [
@@ -250,7 +247,8 @@ def main():
"-c", ci_fmt,
"-p", tmp_pal.name
])
- subprocess.run(cmd, check=True)
+ subprocess.run(cmd, check=True)
+ os.remove(name_file)
else:
with open(asset, "wb") as f:
f.write(input)
diff --git a/gfxdsm.js b/gfxdsm.js
deleted file mode 100644
index 6ed4e572d..000000000
--- a/gfxdsm.js
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/bin/node
-const fs = require('fs');
-const { exit } = require('process');
-
-/**
- * Call this script like
- *
- * node app.js input_file_here output_file_here
- */
-if (process.argv.length !== 4 && process.argv.length !== 5 ) {
- console.error(`Error! Usage: ./${process.argv[1].split('/').slice(-1)[0]} input_file output_file`)
- exit(1);
-}
-// get the name of the file to read
-const f = fs.readFileSync(process.argv[2]);
-
-let type;
-if (Number(process.argv[4]) > -1 && Number(process.argv[4]) < 3) {
- type = Number(process.argv[4]);
-} else {
- type = 2;
-}
-
-// offset, type
-arr = [
- {o: "0x0", t: 3},
- {o: "0x19D0", t: 0}, // path
- {o: "0x1CF8", t: 0}, // more path? or spawn?
- // 0x5400
-];
-
-let iter = 8;
-// spawn, vtx, ptr, gfx
-switch(type) {
- case 0: // Actor Spawn
- iter = 8;
- break;
- case 1: // Vtx
- iter = 16;
- break;
- case 2: // Ptr Addr
- iter = 8;
- break;
-}
-
-// parse data to s16
-function p(offset) {
- const byteA = f[offset];
- const byteB = f[offset + 1];
- let sign = byteA & (1 << 7);
- let x = (((byteA & 0xFF) << 8) | (byteB & 0xFF));
- if (sign) {
- return 0xFFFF0000 | x; // fill in most significant bits with 1's
- } else {
- return x;
- }
-}
-
-// parse s8 to hex
-function s8(b) {
- if (typeof b === "undefined") {
- return "";
- }
- let res = b.toString(16).toUpperCase();
- if (res.length == 1) {
- return "0x0"+String(res);
- }
- return "0x"+res;
-}
-
-function s32_h(b, offset) { // helper
- let str = f[b + offset].toString(16).toUpperCase()
- if (str.length == 1) {
- return "0"+str;
- } else {
- return str;
- }
-}
-
-// parse s32 to hex
-function s32(b) {
- return res = "0x"+s32_h(b, 0) +
- s32_h(b, 1) +
- s32_h(b, 2) +
- s32_h(b, 3);
-}
-
-// lines to output
-let k = [];
-switch(type) {
- case 0:
- k.push("struct ActorSpawnData d_course__dl[] = {");
- break;
- case 1:
- k.push("Vtx_t d_course__dl[] = {");
- break;
- case 2:
- k.push("TrackSections d_course__dl[] = {");
- break;
-}
-for (i = 0; i < f.length; i += iter) {
- // X Y Z
-
- switch(type) {
- case 0: // Spawn location { x, y, z}, { flag }
- k.push(" {{ "+p(i + 0)+", "+p(i + 2)+", "+p(i + 4)+" }, { "+p(i + 6)+" }},");
- break;
- case 1: // Vtx {x, y, z}, { flag }, { t1, t2 }, { r, g, b, a }
- k.push(" {{ "+p(i + 0)+", "+p(i + 2)+", "+p(i + 4)+" }, { "+p(i + 6)+" }, { "+p(i + 8)+", "+p(i + 10)+" }, {"+s8(f[i + 12], 16)+", "+s8(f[i + 13], 16)+", "+s8(f[i + 14])+", "+s8(f[i + 15])+" }},");
- break;
- case 2: // Ptr addr
- k.push(" {{ "+s32(i + 0)+" }, { "+s32(i + 4)+" }},");
- break;
- }
-
- // check if this is a glabel line
- //let n = i.match(/glabel D_([0-9A-F]*)$/);
- // if it is
- //if (n) {
- // the number will be in the second? item in the array - convert it to a numbers
- // let newLast = Number(`0x${n[1]}`)
- //if (last != 0) { // not the first line? add the skip info
- // k.push(`.skip ${newLast-last}`) // .skip ##
- // k.push('') // blank line
- //}
- //last = newLast; // save what the last glbael line was
- //k.push(i) // glabel D_###
- //}
- //if (i > 100) {break;}
-}
-// might need additional logical here to output the last lines after the last glabel?
-// for now, just copy the last line from the original file
-//k.push(b.slice(-1)[0])
-k.push("};");
-// write this to the file name in the second arg
-//fs.writeFileSync(process.argv[3], k.join("\n")+"\n");
-console.log(k.join("\n")+"\n");
-exit(0);
\ No newline at end of file
diff --git a/permuter b/permuter
deleted file mode 100755
index d8ddaf374..000000000
--- a/permuter
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-# note, this quick hack only works with three arguments.
-# if you're trying to use four arguments, you need to add another `$4` etc.
-
-python3 tools/decomp-permuter/permuter.py $1 $2 $3
-
diff --git a/tools/Makefile b/tools/Makefile
index b509a3b08..f9ad01726 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -7,8 +7,6 @@ CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s
# Tools to compile
PROGRAMS := mio0 n64graphics displaylist_packer n64cksum tkmk00 extract_data_for_mio
-
-
#==============================================================================#
# Source Files and Flags for Each Tool #
#==============================================================================#
@@ -30,18 +28,12 @@ n64cksum_CFLAGS := -DN64CKSUM_STANDALONE
extract_data_for_mio_SOURCES := extract_data_for_mio.c
-
# Build tools and recomp
-all: $(PROGRAMS) subsystem
-
-# Build recomp
-subsystem:
- $(MAKE) -C ido5.3_recomp
+all: $(PROGRAMS)
# Remove generated files
clean:
$(RM) $(PROGRAMS)
- $(MAKE) -C ido5.3_recomp clean
diff --git a/tools/asm_processor/asm-processor.py b/tools/asm_processor/asm-processor.py
deleted file mode 100644
index b7ddbdf26..000000000
--- a/tools/asm_processor/asm-processor.py
+++ /dev/null
@@ -1,868 +0,0 @@
-#!/usr/bin/env python3
-import argparse
-import tempfile
-import struct
-import copy
-import sys
-import re
-import os
-
-MAX_FN_SIZE = 100
-
-EI_NIDENT = 16
-EI_CLASS = 4
-EI_DATA = 5
-EI_VERSION = 6
-EI_OSABI = 7
-EI_ABIVERSION = 8
-STN_UNDEF = 0
-
-SHN_UNDEF = 0
-SHN_ABS = 0xfff1
-SHN_COMMON = 0xfff2
-SHN_XINDEX = 0xffff
-SHN_LORESERVE = 0xff00
-
-STT_NOTYPE = 0
-STT_OBJECT = 1
-STT_FUNC = 2
-STT_SECTION = 3
-STT_FILE = 4
-STT_COMMON = 5
-STT_TLS = 6
-
-STB_LOCAL = 0
-STB_GLOBAL = 1
-STB_WEAK = 2
-
-STV_DEFAULT = 0
-STV_INTERNAL = 1
-STV_HIDDEN = 2
-STV_PROTECTED = 3
-
-SHT_NULL = 0
-SHT_PROGBITS = 1
-SHT_SYMTAB = 2
-SHT_STRTAB = 3
-SHT_RELA = 4
-SHT_HASH = 5
-SHT_DYNAMIC = 6
-SHT_NOTE = 7
-SHT_NOBITS = 8
-SHT_REL = 9
-SHT_SHLIB = 10
-SHT_DYNSYM = 11
-SHT_INIT_ARRAY = 14
-SHT_FINI_ARRAY = 15
-SHT_PREINIT_ARRAY = 16
-SHT_GROUP = 17
-SHT_SYMTAB_SHNDX = 18
-SHT_MIPS_GPTAB = 0x70000003
-SHT_MIPS_DEBUG = 0x70000005
-SHT_MIPS_REGINFO = 0x70000006
-SHT_MIPS_OPTIONS = 0x7000000d
-
-SHF_WRITE = 0x1
-SHF_ALLOC = 0x2
-SHF_EXECINSTR = 0x4
-SHF_MERGE = 0x10
-SHF_STRINGS = 0x20
-SHF_INFO_LINK = 0x40
-SHF_LINK_ORDER = 0x80
-SHF_OS_NONCONFORMING = 0x100
-SHF_GROUP = 0x200
-SHF_TLS = 0x400
-
-R_MIPS_32 = 2
-R_MIPS_26 = 4
-R_MIPS_HI16 = 5
-R_MIPS_LO16 = 6
-
-
-class ElfHeader:
- """
- typedef struct {
- unsigned char e_ident[EI_NIDENT];
- Elf32_Half e_type;
- Elf32_Half e_machine;
- Elf32_Word e_version;
- Elf32_Addr e_entry;
- Elf32_Off e_phoff;
- Elf32_Off e_shoff;
- Elf32_Word e_flags;
- Elf32_Half e_ehsize;
- Elf32_Half e_phentsize;
- Elf32_Half e_phnum;
- Elf32_Half e_shentsize;
- Elf32_Half e_shnum;
- Elf32_Half e_shstrndx;
- } Elf32_Ehdr;
- """
-
- def __init__(self, data):
- self.e_ident = data[:EI_NIDENT]
- self.e_type, self.e_machine, self.e_version, self.e_entry, self.e_phoff, self.e_shoff, self.e_flags, self.e_ehsize, self.e_phentsize, self.e_phnum, self.e_shentsize, self.e_shnum, self.e_shstrndx = struct.unpack('>HHIIIIIHHHHHH', data[EI_NIDENT:])
- assert self.e_ident[EI_CLASS] == 1 # 32-bit
- assert self.e_ident[EI_DATA] == 2 # big-endian
- assert self.e_type == 1 # relocatable
- assert self.e_machine == 8 # MIPS I Architecture
- assert self.e_phoff == 0 # no program header
- assert self.e_shoff != 0 # section header
- assert self.e_shstrndx != SHN_UNDEF
-
- def to_bin(self):
- return self.e_ident + struct.pack('>HHIIIIIHHHHHH', self.e_type,
- self.e_machine, self.e_version, self.e_entry, self.e_phoff,
- self.e_shoff, self.e_flags, self.e_ehsize, self.e_phentsize,
- self.e_phnum, self.e_shentsize, self.e_shnum, self.e_shstrndx)
-
-
-class Symbol:
- """
- typedef struct {
- Elf32_Word st_name;
- Elf32_Addr st_value;
- Elf32_Word st_size;
- unsigned char st_info;
- unsigned char st_other;
- Elf32_Half st_shndx;
- } Elf32_Sym;
- """
-
- def __init__(self, data, strtab):
- self.st_name, self.st_value, self.st_size, st_info, self.st_other, self.st_shndx = struct.unpack('>IIIBBH', data)
- assert self.st_shndx != SHN_XINDEX, "too many sections (SHN_XINDEX not supported)"
- self.bind = st_info >> 4
- self.type = st_info & 15
- self.name = strtab.lookup_str(self.st_name)
- self.visibility = self.st_other & 3
-
- def to_bin(self):
- st_info = (self.bind << 4) | self.type
- return struct.pack('>IIIBBH', self.st_name, self.st_value, self.st_size, st_info, self.st_other, self.st_shndx)
-
-
-class Relocation:
- def __init__(self, data, sh_type):
- self.sh_type = sh_type
- if sh_type == SHT_REL:
- self.r_offset, self.r_info = struct.unpack('>II', data)
- else:
- self.r_offset, self.r_info, self.r_addend = struct.unpack('>III', data)
- self.sym_index = self.r_info >> 8
- self.rel_type = self.r_info & 0xff
-
- def to_bin(self):
- self.r_info = (self.sym_index << 8) | self.rel_type
- if self.sh_type == SHT_REL:
- return struct.pack('>II', self.r_offset, self.r_info)
- else:
- return struct.pack('>III', self.r_offset, self.r_info, self.r_addend)
-
-
-class Section:
- """
- typedef struct {
- Elf32_Word sh_name;
- Elf32_Word sh_type;
- Elf32_Word sh_flags;
- Elf32_Addr sh_addr;
- Elf32_Off sh_offset;
- Elf32_Word sh_size;
- Elf32_Word sh_link;
- Elf32_Word sh_info;
- Elf32_Word sh_addralign;
- Elf32_Word sh_entsize;
- } Elf32_Shdr;
- """
-
- def __init__(self, header, data, index):
- self.sh_name, self.sh_type, self.sh_flags, self.sh_addr, self.sh_offset, self.sh_size, self.sh_link, self.sh_info, self.sh_addralign, self.sh_entsize = struct.unpack('>IIIIIIIIII', header)
- assert not self.sh_flags & SHF_LINK_ORDER
- if self.sh_entsize != 0:
- assert self.sh_size % self.sh_entsize == 0
- if self.sh_type == SHT_NOBITS:
- self.data = ''
- else:
- self.data = data[self.sh_offset:self.sh_offset + self.sh_size]
- self.index = index
- self.relocated_by = []
-
- @staticmethod
- def from_parts(sh_name, sh_type, sh_flags, sh_link, sh_info, sh_addralign, sh_entsize, data, index):
- header = struct.pack('>IIIIIIIIII', sh_name, sh_type, sh_flags, 0, 0, len(data), sh_link, sh_info, sh_addralign, sh_entsize)
- return Section(header, data, index)
-
- def lookup_str(self, index):
- assert self.sh_type == SHT_STRTAB
- to = self.data.find(b'\0', index)
- assert to != -1
- return self.data[index:to].decode('utf-8')
-
- def add_str(self, string):
- assert self.sh_type == SHT_STRTAB
- ret = len(self.data)
- self.data += bytes(string, 'utf-8') + b'\0'
- return ret
-
- def is_rel(self):
- return self.sh_type == SHT_REL or self.sh_type == SHT_RELA
-
- def header_to_bin(self):
- if self.sh_type != SHT_NOBITS:
- self.sh_size = len(self.data)
- return struct.pack('>IIIIIIIIII', self.sh_name, self.sh_type, self.sh_flags, self.sh_addr, self.sh_offset, self.sh_size, self.sh_link, self.sh_info, self.sh_addralign, self.sh_entsize)
-
- def late_init(self, sections):
- if self.sh_type == SHT_SYMTAB:
- self.init_symbols(sections)
- elif self.is_rel():
- self.rel_target = sections[self.sh_info]
- self.rel_target.relocated_by.append(self)
- self.init_relocs()
-
- def find_symbol(self, name):
- assert self.sh_type == SHT_SYMTAB
- for s in self.symbol_entries:
- if s.name == name:
- return (s.st_shndx, s.st_value)
- return None
-
- def init_symbols(self, sections):
- assert self.sh_type == SHT_SYMTAB
- assert self.sh_entsize == 16
- self.strtab = sections[self.sh_link]
- entries = []
- for i in range(0, self.sh_size, self.sh_entsize):
- entries.append(Symbol(self.data[i:i+self.sh_entsize], self.strtab))
- self.symbol_entries = entries
-
- def init_relocs(self):
- assert self.is_rel()
- entries = []
- for i in range(0, self.sh_size, self.sh_entsize):
- entries.append(Relocation(self.data[i:i+self.sh_entsize], self.sh_type))
- self.relocations = entries
-
- def local_symbols(self):
- assert self.sh_type == SHT_SYMTAB
- return self.symbol_entries[:self.sh_info]
-
- def global_symbols(self):
- assert self.sh_type == SHT_SYMTAB
- return self.symbol_entries[self.sh_info:]
-
-
-class ElfFile:
- def __init__(self, data):
- self.data = data
- assert data[:4] == b'\x7fELF', "not an ELF file"
-
- self.elf_header = ElfHeader(data[0:52])
-
- offset, size = self.elf_header.e_shoff, self.elf_header.e_shentsize
- null_section = Section(data[offset:offset + size], data, 0)
- num_sections = self.elf_header.e_shnum or null_section.sh_size
-
- self.sections = [null_section]
- for i in range(1, num_sections):
- ind = offset + i * size
- self.sections.append(Section(data[ind:ind + size], data, i))
-
- symtab = None
- for s in self.sections:
- if s.sh_type == SHT_SYMTAB:
- assert not symtab
- symtab = s
- assert symtab is not None
- self.symtab = symtab
-
- shstr = self.sections[self.elf_header.e_shstrndx]
- for s in self.sections:
- s.name = shstr.lookup_str(s.sh_name)
- s.late_init(self.sections)
-
- def find_section(self, name):
- for s in self.sections:
- if s.name == name:
- return s
- return None
-
- def add_section(self, name, sh_type, sh_flags, sh_link, sh_info, sh_addralign, sh_entsize, data):
- shstr = self.sections[self.elf_header.e_shstrndx]
- sh_name = shstr.add_str(name)
- s = Section.from_parts(sh_name=sh_name, sh_type=sh_type,
- sh_flags=sh_flags, sh_link=sh_link, sh_info=sh_info,
- sh_addralign=sh_addralign, sh_entsize=sh_entsize, data=data,
- index=len(self.sections))
- self.sections.append(s)
- s.name = name
- s.late_init(self.sections)
- return s
-
- def drop_irrelevant_sections(self):
- # We can only drop sections at the end, since otherwise section
- # references might be wrong. Luckily, these sections typically are.
- while self.sections[-1].sh_type in [SHT_MIPS_DEBUG, SHT_MIPS_GPTAB]:
- self.sections.pop()
-
- def write(self, filename):
- outfile = open(filename, 'wb')
- outidx = 0
- def write_out(data):
- nonlocal outidx
- outfile.write(data)
- outidx += len(data)
- def pad_out(align):
- if align and outidx % align:
- write_out(b'\0' * (align - outidx % align))
-
- self.elf_header.e_shnum = len(self.sections)
- write_out(self.elf_header.to_bin())
-
- for s in self.sections:
- if s.sh_type != SHT_NOBITS and s.sh_type != SHT_NULL:
- pad_out(s.sh_addralign)
- s.sh_offset = outidx
- write_out(s.data)
-
- pad_out(4)
- self.elf_header.e_shoff = outidx
- for s in self.sections:
- write_out(s.header_to_bin())
-
- outfile.seek(0)
- outfile.write(self.elf_header.to_bin())
- outfile.close()
-
-
-def is_temp_name(name):
- return name.startswith('_asmpp_')
-
-class GlobalState:
- def __init__(self, min_instr_count, skip_instr_count):
- # A value that hopefully never appears as a 32-bit rodata constant (or we
- # miscompile late rodata). Increases by 1 in each step.
- self.late_rodata_hex = 0xE0123456
- self.namectr = 0
- self.min_instr_count = min_instr_count
- self.skip_instr_count = skip_instr_count
-
- def make_name(self, cat):
- self.namectr += 1
- return '_asmpp_{}{}'.format(cat, self.namectr)
-
-class GlobalAsmBlock:
- def __init__(self):
- self.cur_section = '.text'
- self.asm_conts = []
- self.late_rodata_asm_conts = []
- self.late_rodata_alignment = 0
- self.text_glabels = []
- self.fn_section_sizes = {
- '.text': 0,
- '.data': 0,
- '.bss': 0,
- '.rodata': 0,
- '.late_rodata': 0,
- }
- self.fn_ins_inds = []
- self.num_lines = 0
-
- def add_sized(self, size, line):
- if self.cur_section in ['.text', '.late_rodata']:
- assert size % 4 == 0, "size must be a multiple of 4 on line: " + line
- assert size >= 0
- self.fn_section_sizes[self.cur_section] += size
- if self.cur_section == '.text':
- assert self.text_glabels, ".text block without an initial glabel"
- self.fn_ins_inds.append((self.num_lines, size // 4))
-
- def process_line(self, line):
- line = re.sub(r'/\*.*?\*/', '', line)
- line = re.sub(r'#.*', '', line)
- line = line.strip()
- changed_section = False
- if line.startswith('glabel ') and self.cur_section == '.text':
- self.text_glabels.append(line.split()[1])
- if not line:
- pass # empty line
- elif line.startswith('glabel ') or (' ' not in line and line.endswith(':')):
- pass # label
- elif line.startswith('.section') or line in ['.text', '.data', '.rdata', '.rodata', '.bss', '.late_rodata']:
- # section change
- self.cur_section = '.rodata' if line == '.rdata' else line.split(',')[0].split()[-1]
- assert self.cur_section in ['.data', '.text', '.rodata', '.late_rodata', '.bss'], \
- "unrecognized .section directive"
- changed_section = True
- elif line.startswith('.late_rodata_alignment'):
- assert self.cur_section == '.late_rodata'
- self.late_rodata_alignment = int(line.split()[1])
- assert self.late_rodata_alignment in [4, 8]
- changed_section = True
- elif line.startswith('.incbin'):
- self.add_sized(int(line.split(',')[-1].strip(), 0), line)
- elif line.startswith('.word') or line.startswith('.float'):
- self.add_sized(4 * len(line.split(',')), line)
- elif line.startswith('.double'):
- self.add_sized(8 * len(line.split(',')), line)
- elif line.startswith('.space'):
- self.add_sized(int(line.split()[1], 0), line)
- elif line.startswith('.'):
- # .macro, .ascii, .asciiz, .balign, .align, ...
- assert False, 'not supported yet: ' + line
- else:
- # Unfortunately, macros are hard to support for .rodata --
- # we don't know how how space they will expand to before
- # running the assembler, but we need that information to
- # construct the C code. So if we need that we'll either
- # need to run the assembler twice (at least in some rare
- # cases), or change how this program is invoked.
- # Similarly, we can't currently deal with pseudo-instructions
- # that expand to several real instructions.
- assert self.cur_section == '.text', "instruction or macro call in non-.text section? not supported: " + line
- self.add_sized(4, line)
- if self.cur_section == '.late_rodata':
- if not changed_section:
- self.late_rodata_asm_conts.append(line)
- else:
- self.asm_conts.append(line)
- self.num_lines += 1
-
- def finish(self, state):
- src = [''] * (self.num_lines + 1)
- late_rodata = []
- late_rodata_fn_output = []
-
- if self.fn_section_sizes['.late_rodata'] > 0:
- # Generate late rodata by emitting unique float constants.
- # This requires 3 instructions for each 4 bytes of rodata.
- # If we know alignment, we can use doubles, which give 3
- # instructions for 8 bytes of rodata.
- size = self.fn_section_sizes['.late_rodata'] // 4
- skip_next = False
- for i in range(size):
- if skip_next:
- skip_next = False
- continue
- if (state.late_rodata_hex & 0xffff) == 0:
- # Avoid lui
- state.late_rodata_hex += 1
- dummy_bytes = struct.pack('>I', state.late_rodata_hex)
- state.late_rodata_hex += 1
- late_rodata.append(dummy_bytes)
- if self.late_rodata_alignment == 4 * ((i + 1) % 2 + 1) and i + 1 < size:
- late_rodata.append(dummy_bytes)
- fval, = struct.unpack('>d', dummy_bytes * 2)
- late_rodata_fn_output.append('*(volatile double*)0 = {};'.format(fval))
- skip_next = True
- else:
- fval, = struct.unpack('>f', dummy_bytes)
- late_rodata_fn_output.append('*(volatile float*)0 = {}f;'.format(fval))
- late_rodata_fn_output.append('')
- late_rodata_fn_output.append('')
-
- text_name = None
- if self.fn_section_sizes['.text'] > 0 or late_rodata_fn_output:
- text_name = state.make_name('func')
- src[0] = 'void {}(void) {{'.format(text_name)
- src[self.num_lines] = '}'
- instr_count = self.fn_section_sizes['.text'] // 4
- assert instr_count >= state.min_instr_count, "too short .text block"
- tot_emitted = 0
- tot_skipped = 0
- fn_emitted = 0
- fn_skipped = 0
- rodata_stack = late_rodata_fn_output[::-1]
- for (line, count) in self.fn_ins_inds:
- for _ in range(count):
- if (fn_emitted > MAX_FN_SIZE and instr_count - tot_emitted > state.min_instr_count and
- (not rodata_stack or rodata_stack[-1])):
- # Don't let functions become too large. When a function reaches 284
- # instructions, and -O2 -framepointer flags are passed, the IRIX
- # compiler decides it is a great idea to start optimizing more.
- fn_emitted = 0
- fn_skipped = 0
- src[line] += ' }} void {}(void) {{ '.format(state.make_name('large_func'))
- if fn_skipped < state.skip_instr_count:
- fn_skipped += 1
- tot_skipped += 1
- elif rodata_stack:
- src[line] += rodata_stack.pop()
- else:
- src[line] += '*(volatile int*)0 = 0;'
- tot_emitted += 1
- fn_emitted += 1
- if rodata_stack:
- size = len(late_rodata_fn_output) // 3
- available = instr_count - tot_skipped
- print("late rodata to text ratio is too high: {} / {} must be <= 1/3"
- .format(size, available), file=sys.stderr)
- print("add a .late_rodata_alignment (4|8) to the .late_rodata "
- "block to double the allowed ratio.", file=sys.stderr)
- exit(1)
-
- rodata_name = None
- if self.fn_section_sizes['.rodata'] > 0:
- rodata_name = state.make_name('rodata')
- output_line += ' const char {}[{}] = {{1}};'.format(rodata_name, self.fn_section_sizes['.rodata'])
-
- data_name = None
- if self.fn_section_sizes['.data'] > 0:
- data_name = state.make_name('data')
- output_line += ' char {}[{}] = {{1}};'.format(data_name, self.fn_section_sizes['.data'])
-
- bss_name = None
- if self.fn_section_sizes['.bss'] > 0:
- bss_name = state.make_name('bss')
- output_line += ' char {}[{}];'.format(bss_name, self.fn_section_sizes['.bss'])
-
- fn = (self.text_glabels, self.asm_conts, late_rodata, self.late_rodata_asm_conts,
- {
- '.text': (text_name, self.fn_section_sizes['.text']),
- '.data': (data_name, self.fn_section_sizes['.data']),
- '.rodata': (rodata_name, self.fn_section_sizes['.rodata']),
- '.bss': (bss_name, self.fn_section_sizes['.bss']),
- })
- return src, fn
-
-def parse_source(f, print_source, opt, framepointer):
- if opt == 'O2':
- if framepointer:
- min_instr_count = 6
- skip_instr_count = 5
- else:
- min_instr_count = 2
- skip_instr_count = 1
- elif opt == 'g':
- if framepointer:
- min_instr_count = 7
- skip_instr_count = 7
- else:
- min_instr_count = 4
- skip_instr_count = 4
- else:
- assert opt == 'g3'
- if framepointer:
- min_instr_count = 4
- skip_instr_count = 4
- else:
- min_instr_count = 2
- skip_instr_count = 2
-
- state = GlobalState(min_instr_count, skip_instr_count)
-
- global_asm = None
- asm_functions = []
- output_lines = []
-
- for raw_line in f:
- raw_line = raw_line.rstrip()
- line = raw_line.lstrip()
-
- # Print exactly one output line per source line, to make compiler
- # errors have correct line numbers. These will be overridden with
- # reasonable content further down.
- output_lines.append('')
-
- if global_asm is not None:
- if line.startswith(')'):
- src, fn = global_asm.finish(state)
- for i, line2 in enumerate(src):
- output_lines[start_index + i] = line2
- asm_functions.append(fn)
- global_asm = None
- else:
- global_asm.process_line(line)
- else:
- if line == 'GLOBAL_ASM(':
- global_asm = GlobalAsmBlock()
- start_index = len(output_lines)
- elif line.startswith('GLOBAL_ASM("') and line.endswith('")'):
- global_asm = GlobalAsmBlock()
- fname = line[len('GLOBAL_ASM') + 2 : -2]
- with open(fname) as f:
- for line2 in f:
- global_asm.process_line(line2)
- src, fn = global_asm.finish(state)
- output_lines[-1] = ''.join(src)
- asm_functions.append(fn)
- global_asm = None
- else:
- output_lines[-1] = raw_line
-
- if print_source:
- for line in output_lines:
- print(line)
-
- return asm_functions
-
-def fixup_objfile(objfile_name, functions, asm_prelude, assembler):
- SECTIONS = ['.data', '.text', '.rodata', '.bss']
-
- with open(objfile_name, 'rb') as f:
- objfile = ElfFile(f.read())
-
- prev_locs = {
- '.text': 0,
- '.data': 0,
- '.rodata': 0,
- '.bss': 0,
- }
- to_copy = {
- '.text': [],
- '.data': [],
- '.rodata': [],
- }
- asm = []
- late_rodata = []
- late_rodata_asm = []
- late_rodata_source_name = None
-
- # Generate an assembly file with all the assembly we need to fill in. For
- # simplicity we pad with nops/.space so that addresses match exactly, so we
- # don't have to fix up relocations/symbol references.
- all_text_glabels = set()
- for (text_glabels, body, fn_late_rodata, fn_late_rodata_body, data) in functions:
- ifdefed = False
- for sectype, (temp_name, size) in data.items():
- if temp_name is None:
- continue
- assert size > 0
- loc = objfile.symtab.find_symbol(temp_name)
- if loc is None:
- ifdefed = True
- break
- loc = loc[1]
- prev_loc = prev_locs[sectype]
- assert loc >= prev_loc, sectype
- if loc != prev_loc:
- asm.append('.section ' + sectype)
- if sectype == '.text':
- for i in range((loc - prev_loc) // 4):
- asm.append('nop')
- else:
- asm.append('.space {}'.format(loc - prev_loc))
- if sectype != '.bss':
- to_copy[sectype].append((loc, size))
- prev_locs[sectype] = loc + size
- if not ifdefed:
- all_text_glabels.update(text_glabels)
- late_rodata.extend(fn_late_rodata)
- late_rodata_asm.extend(fn_late_rodata_body)
- asm.append('.text')
- for line in body:
- asm.append(line)
- if late_rodata_asm:
- late_rodata_source_name = '_asmpp_late_rodata'
- asm.append('.rdata')
- asm.append('glabel {}'.format(late_rodata_source_name))
- asm.extend(late_rodata_asm)
-
- o_file = tempfile.NamedTemporaryFile(prefix='asm-processor', suffix='.o', delete=False)
- o_name = o_file.name
- o_file.close()
- s_file = tempfile.NamedTemporaryFile(prefix='asm-processor', suffix='.s', delete=False)
- s_name = s_file.name
- try:
- s_file.write(asm_prelude + b'\n')
- for line in asm:
- s_file.write(line.encode('utf-8') + b'\n')
- s_file.close()
- ret = os.system(assembler + " " + s_name + " -o " + o_name)
- if ret != 0:
- raise Exception("failed to assemble")
- with open(o_name, 'rb') as f:
- asm_objfile = ElfFile(f.read())
-
- # Remove some clutter from objdump output
- objfile.drop_irrelevant_sections()
-
- # Unify reginfo sections
- target_reginfo = objfile.find_section('.reginfo')
- source_reginfo_data = list(asm_objfile.find_section('.reginfo').data)
- data = list(target_reginfo.data)
- for i in range(20):
- data[i] |= source_reginfo_data[i]
- target_reginfo.data = bytes(data)
-
- # Move over section contents
- modified_text_positions = set()
- last_rodata_pos = 0
- for sectype in SECTIONS:
- if sectype == '.bss':
- continue
- source = asm_objfile.find_section(sectype)
- target = objfile.find_section(sectype)
- if source is None or not to_copy[sectype]:
- continue
- assert target is not None, "must have a section to overwrite: " + sectype
- data = list(target.data)
- for (pos, count) in to_copy[sectype]:
- data[pos:pos + count] = source.data[pos:pos + count]
- if sectype == '.text':
- assert count % 4 == 0
- assert pos % 4 == 0
- for i in range(count // 4):
- modified_text_positions.add(pos + 4 * i)
- elif sectype == '.rodata':
- last_rodata_pos = pos + count
- target.data = bytes(data)
-
- # Move over late rodata. This is heuristic, sadly, since I can't think
- # of another way of doing it.
- moved_late_rodata = {}
- if late_rodata:
- source = asm_objfile.find_section('.rodata')
- target = objfile.find_section('.rodata')
- source_pos = asm_objfile.symtab.find_symbol(late_rodata_source_name)
- assert source_pos is not None and source_pos[0] == source.index
- source_pos = source_pos[1]
- new_data = list(target.data)
- for dummy_bytes in late_rodata:
- pos = target.data.index(dummy_bytes, last_rodata_pos)
- new_data[pos:pos+4] = source.data[source_pos:source_pos+4]
- moved_late_rodata[source_pos] = pos
- last_rodata_pos = pos + 4
- source_pos += 4
- target.data = bytes(new_data)
-
- # Merge strtab data.
- strtab_adj = len(objfile.symtab.strtab.data)
- objfile.symtab.strtab.data += asm_objfile.symtab.strtab.data
-
- # Find relocated symbols
- relocated_symbols = set()
- for sectype in SECTIONS:
- for obj in [asm_objfile, objfile]:
- sec = obj.find_section(sectype)
- if sec is None:
- continue
- for reltab in sec.relocated_by:
- for rel in reltab.relocations:
- relocated_symbols.add(obj.symtab.symbol_entries[rel.sym_index])
-
- # Move over symbols, deleting the temporary function labels.
- # Sometimes this naive procedure results in duplicate symbols, or UNDEF
- # symbols that are also defined the same .o file. Hopefully that's fine.
- # Skip over local symbols that aren't used relocated against, to avoid
- # conflicts.
- new_local_syms = [s for s in objfile.symtab.local_symbols() if not is_temp_name(s.name)]
- new_global_syms = [s for s in objfile.symtab.global_symbols() if not is_temp_name(s.name)]
- for i, s in enumerate(asm_objfile.symtab.symbol_entries):
- is_local = (i < asm_objfile.symtab.sh_info)
- if is_local and s not in relocated_symbols:
- continue
- if is_temp_name(s.name):
- continue
- if s.st_shndx not in [SHN_UNDEF, SHN_ABS]:
- section_name = asm_objfile.sections[s.st_shndx].name
- assert section_name in SECTIONS, "Generated assembly .o must only have symbols for .text, .data, .rodata, ABS and UNDEF, but found {}".format(section_name)
- s.st_shndx = objfile.find_section(section_name).index
- # glabel's aren't marked as functions, making objdump output confusing. Fix that.
- if s.name in all_text_glabels:
- s.type = STT_FUNC
- if objfile.sections[s.st_shndx].name == '.rodata' and s.st_value in moved_late_rodata:
- s.st_value = moved_late_rodata[s.st_value]
- s.st_name += strtab_adj
- if is_local:
- new_local_syms.append(s)
- else:
- new_global_syms.append(s)
- new_syms = new_local_syms + new_global_syms
- for i, s in enumerate(new_syms):
- s.new_index = i
- objfile.symtab.data = b''.join(s.to_bin() for s in new_syms)
- objfile.symtab.sh_info = len(new_local_syms)
-
- # Move over relocations
- for sectype in SECTIONS:
- source = asm_objfile.find_section(sectype)
- target = objfile.find_section(sectype)
-
- if target is not None:
- # fixup relocation symbol indices, since we butchered them above
- for reltab in target.relocated_by:
- nrels = []
- for rel in reltab.relocations:
- if sectype == '.text' and rel.r_offset in modified_text_positions:
- # don't include relocations for late_rodata dummy code
- continue
- # hopefully we don't have relocations for local or
- # temporary symbols, so new_index exists
- rel.sym_index = objfile.symtab.symbol_entries[rel.sym_index].new_index
- nrels.append(rel)
- reltab.relocations = nrels
- reltab.data = b''.join(rel.to_bin() for rel in nrels)
-
- if not source:
- continue
-
- target_reltab = objfile.find_section('.rel' + sectype)
- target_reltaba = objfile.find_section('.rela' + sectype)
- for reltab in source.relocated_by:
- for rel in reltab.relocations:
- rel.sym_index = asm_objfile.symtab.symbol_entries[rel.sym_index].new_index
- if sectype == '.rodata' and rel.r_offset in moved_late_rodata:
- rel.r_offset = moved_late_rodata[rel.r_offset]
- new_data = b''.join(rel.to_bin() for rel in reltab.relocations)
- if reltab.sh_type == SHT_REL:
- if not target_reltab:
- target_reltab = objfile.add_section('.rel' + sectype,
- sh_type=SHT_REL, sh_flags=0,
- sh_link=objfile.symtab.index, sh_info=target.index,
- sh_addralign=4, sh_entsize=8, data=b'')
- target_reltab.data += new_data
- else:
- if not target_reltaba:
- target_reltaba = objfile.add_section('.rela' + sectype,
- sh_type=SHT_RELA, sh_flags=0,
- sh_link=objfile.symtab.index, sh_info=target.index,
- sh_addralign=4, sh_entsize=12, data=b'')
- target_reltaba.data += new_data
-
- objfile.write(objfile_name)
- finally:
- s_file.close()
- os.remove(s_name)
- try:
- os.remove(o_name)
- except:
- pass
-
-def main():
- parser = argparse.ArgumentParser(description="Pre-process .c files and post-process .o files to enable embedding assembly into C.")
- parser.add_argument('filename', help="path to .c code")
- parser.add_argument('--post-process', dest='objfile', help="path to .o file to post-process")
- parser.add_argument('--assembler', dest='assembler', help="assembler command (e.g. \"mips-linux-gnu-as -march=vr4300 -mabi=32\")")
- parser.add_argument('--asm-prelude', dest='asm_prelude', help="path to a file containing a prelude to the assembly file (with .set and .macro directives, e.g.)")
- parser.add_argument('-framepointer', dest='framepointer', action='store_true')
- parser.add_argument('-g3', dest='g3', action='store_true')
- group = parser.add_mutually_exclusive_group(required=True)
- group.add_argument('-O2', dest='o2', action='store_true')
- group.add_argument('-g', dest='o2', action='store_false')
- args = parser.parse_args()
- opt = 'O2' if args.o2 else 'g'
- if args.g3:
- if opt != 'O2':
- print("-g3 is only supported together with -O2", file=sys.stderr)
- exit(1)
- opt = 'g3'
-
- if args.objfile is None:
- with open(args.filename) as f:
- parse_source(f, print_source=True, opt=opt, framepointer=args.framepointer)
- else:
- assert args.assembler is not None, "must pass assembler command"
- with open(args.filename) as f:
- functions = parse_source(f, print_source=False, opt=opt, framepointer=args.framepointer)
- if not functions:
- return
- asm_prelude = b''
- if args.asm_prelude:
- with open(args.asm_prelude, 'rb') as f:
- asm_prelude = f.read()
- fixup_objfile(args.objfile, functions, asm_prelude, args.assembler)
-
-if __name__ == "__main__":
- main()
diff --git a/tools/asm_processor/build.py b/tools/asm_processor/build.py
index a8638fd76..e27788e2f 100644
--- a/tools/asm_processor/build.py
+++ b/tools/asm_processor/build.py
@@ -5,6 +5,8 @@ import shlex
import subprocess
import tempfile
import uuid
+import sys
+sys.path.append("tools/asm_processor")
import asm_processor
# Boolean for debugging purposes
diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md
index 27775c5f7..f340e8eb8 100644
--- a/tools/doxygen_syms.md
+++ b/tools/doxygen_syms.md
@@ -2580,10 +2580,10 @@ Variable Name | Memory Address
[rspF3DBootStart](@ref rspF3DBootStart) | 0x800D8F70
[rspF3DBootEnd](@ref rspF3DBootEnd) | 0x800D9040
[gspF3DEXTextStart](@ref gspF3DEXTextStart) | 0x800D9040
-[gspF3DEXTextEnd](@ref gspF3DEXTextEnd) | 0x800DA420
[gspF3DLXTextStart](@ref gspF3DLXTextStart) | 0x800DA420
-[gspF3DLXTextEnd](@ref gspF3DLXTextEnd) | 0x800DB830
+[gspF3DEXTextEnd](@ref gspF3DEXTextEnd) | 0x800DA420
[rspAspMainStart](@ref rspAspMainStart) | 0x800DB830
+[gspF3DLXTextEnd](@ref gspF3DLXTextEnd) | 0x800DB830
[rspAspMainEnd](@ref rspAspMainEnd) | 0x800DC4A0
[gVblankHandler1](@ref gVblankHandler1) | 0x800DC4A0
[gVblankHandler2](@ref gVblankHandler2) | 0x800DC4A4
@@ -3746,8 +3746,8 @@ Variable Name | Memory Address
[gspF3DEXDataStart](@ref gspF3DEXDataStart) | 0x800F3D00
[gspF3DEXDataEnd](@ref gspF3DEXDataEnd) | 0x800F4500
[gspF3DLXDataStart](@ref gspF3DLXDataStart) | 0x800F4500
-[rspAspMainDataStart](@ref rspAspMainDataStart) | 0x800F4D00
[gspF3DLXDataEnd](@ref gspF3DLXDataEnd) | 0x800F4D00
+[rspAspMainDataStart](@ref rspAspMainDataStart) | 0x800F4D00
[rspAspMainDataEnd](@ref rspAspMainDataEnd) | 0x800F5000
[sSawtoothWaves](@ref sSawtoothWaves) | 0x800F5000
[sTriangleWaves](@ref sTriangleWaves) | 0x800F5200
@@ -18733,66 +18733,66 @@ Variable Name | Memory Address
[gCosineTable](@ref gCosineTable) | 0x802BB370
[gArctanTable](@ref gArctanTable) | 0x802BF370
[gTextureMarioFace00](@ref gTextureMarioFace00) | 0x0A000000
-[gTextureMarioFace00_end](@ref gTextureMarioFace00_end) | 0x0A000CD4
[gTextureMarioFace01](@ref gTextureMarioFace01) | 0x0A000CD4
-[gTextureMarioFace01_end](@ref gTextureMarioFace01_end) | 0x0A001994
+[gTextureMarioFace00_end](@ref gTextureMarioFace00_end) | 0x0A000CD4
[gTextureMarioFace02](@ref gTextureMarioFace02) | 0x0A001994
-[gTextureMarioFace02_end](@ref gTextureMarioFace02_end) | 0x0A002650
+[gTextureMarioFace01_end](@ref gTextureMarioFace01_end) | 0x0A001994
[gTextureMarioFace03](@ref gTextureMarioFace03) | 0x0A002650
-[gTextureMarioFace04](@ref gTextureMarioFace04) | 0x0A0032BC
+[gTextureMarioFace02_end](@ref gTextureMarioFace02_end) | 0x0A002650
[gTextureMarioFace03_end](@ref gTextureMarioFace03_end) | 0x0A0032BC
-[gTextureMarioFace04_end](@ref gTextureMarioFace04_end) | 0x0A003F08
+[gTextureMarioFace04](@ref gTextureMarioFace04) | 0x0A0032BC
[gTextureMarioFace05](@ref gTextureMarioFace05) | 0x0A003F08
-[gTextureMarioFace05_end](@ref gTextureMarioFace05_end) | 0x0A004B48
+[gTextureMarioFace04_end](@ref gTextureMarioFace04_end) | 0x0A003F08
[gTextureMarioFace06](@ref gTextureMarioFace06) | 0x0A004B48
+[gTextureMarioFace05_end](@ref gTextureMarioFace05_end) | 0x0A004B48
[gTextureMarioFace07](@ref gTextureMarioFace07) | 0x0A00585C
[gTextureMarioFace06_end](@ref gTextureMarioFace06_end) | 0x0A00585C
[gTextureMarioFace08](@ref gTextureMarioFace08) | 0x0A006568
[gTextureMarioFace07_end](@ref gTextureMarioFace07_end) | 0x0A006568
-[gTextureMarioFace09](@ref gTextureMarioFace09) | 0x0A00726C
[gTextureMarioFace08_end](@ref gTextureMarioFace08_end) | 0x0A00726C
-[gTextureMarioFace10](@ref gTextureMarioFace10) | 0x0A007F4C
+[gTextureMarioFace09](@ref gTextureMarioFace09) | 0x0A00726C
[gTextureMarioFace09_end](@ref gTextureMarioFace09_end) | 0x0A007F4C
+[gTextureMarioFace10](@ref gTextureMarioFace10) | 0x0A007F4C
[gTextureMarioFace11](@ref gTextureMarioFace11) | 0x0A008C48
[gTextureMarioFace10_end](@ref gTextureMarioFace10_end) | 0x0A008C48
-[gTextureMarioFace12](@ref gTextureMarioFace12) | 0x0A009944
[gTextureMarioFace11_end](@ref gTextureMarioFace11_end) | 0x0A009944
+[gTextureMarioFace12](@ref gTextureMarioFace12) | 0x0A009944
[gTextureMarioFace13](@ref gTextureMarioFace13) | 0x0A00A688
[gTextureMarioFace12_end](@ref gTextureMarioFace12_end) | 0x0A00A688
-[gTextureMarioFace13_end](@ref gTextureMarioFace13_end) | 0x0A00B3DC
[gTextureMarioFace14](@ref gTextureMarioFace14) | 0x0A00B3DC
-[gTextureMarioFace14_end](@ref gTextureMarioFace14_end) | 0x0A00C180
+[gTextureMarioFace13_end](@ref gTextureMarioFace13_end) | 0x0A00B3DC
[gTextureMarioFace15](@ref gTextureMarioFace15) | 0x0A00C180
-[gTextureMarioFace15_end](@ref gTextureMarioFace15_end) | 0x0A00CF20
+[gTextureMarioFace14_end](@ref gTextureMarioFace14_end) | 0x0A00C180
[gTextureMarioFace16](@ref gTextureMarioFace16) | 0x0A00CF20
+[gTextureMarioFace15_end](@ref gTextureMarioFace15_end) | 0x0A00CF20
[gTextureLuigiFace00](@ref gTextureLuigiFace00) | 0x0A00DA64
[gTextureMarioFace16_end](@ref gTextureMarioFace16_end) | 0x0A00DA64
-[gTextureLuigiFace01](@ref gTextureLuigiFace01) | 0x0A00E680
[gTextureLuigiFace00_end](@ref gTextureLuigiFace00_end) | 0x0A00E680
+[gTextureLuigiFace01](@ref gTextureLuigiFace01) | 0x0A00E680
[gTextureLuigiFace01_end](@ref gTextureLuigiFace01_end) | 0x0A00F2A0
[gTextureLuigiFace02](@ref gTextureLuigiFace02) | 0x0A00F2A0
-[gTextureLuigiFace02_end](@ref gTextureLuigiFace02_end) | 0x0A00FEC0
[gTextureLuigiFace03](@ref gTextureLuigiFace03) | 0x0A00FEC0
+[gTextureLuigiFace02_end](@ref gTextureLuigiFace02_end) | 0x0A00FEC0
[gTextureLuigiFace03_end](@ref gTextureLuigiFace03_end) | 0x0A010AA8
[gTextureLuigiFace04](@ref gTextureLuigiFace04) | 0x0A010AA8
-[gTextureLuigiFace04_end](@ref gTextureLuigiFace04_end) | 0x0A011690
[gTextureLuigiFace05](@ref gTextureLuigiFace05) | 0x0A011690
+[gTextureLuigiFace04_end](@ref gTextureLuigiFace04_end) | 0x0A011690
[gTextureLuigiFace06](@ref gTextureLuigiFace06) | 0x0A01225C
[gTextureLuigiFace05_end](@ref gTextureLuigiFace05_end) | 0x0A01225C
[gTextureLuigiFace06_end](@ref gTextureLuigiFace06_end) | 0x0A012E84
[gTextureLuigiFace07](@ref gTextureLuigiFace07) | 0x0A012E84
-[gTextureLuigiFace08](@ref gTextureLuigiFace08) | 0x0A013AB8
[gTextureLuigiFace07_end](@ref gTextureLuigiFace07_end) | 0x0A013AB8
-[gTextureLuigiFace09](@ref gTextureLuigiFace09) | 0x0A014744
+[gTextureLuigiFace08](@ref gTextureLuigiFace08) | 0x0A013AB8
[gTextureLuigiFace08_end](@ref gTextureLuigiFace08_end) | 0x0A014744
-[gTextureLuigiFace10](@ref gTextureLuigiFace10) | 0x0A0153C4
+[gTextureLuigiFace09](@ref gTextureLuigiFace09) | 0x0A014744
[gTextureLuigiFace09_end](@ref gTextureLuigiFace09_end) | 0x0A0153C4
-[gTextureLuigiFace10_end](@ref gTextureLuigiFace10_end) | 0x0A016054
+[gTextureLuigiFace10](@ref gTextureLuigiFace10) | 0x0A0153C4
[gTextureLuigiFace11](@ref gTextureLuigiFace11) | 0x0A016054
+[gTextureLuigiFace10_end](@ref gTextureLuigiFace10_end) | 0x0A016054
[gTextureLuigiFace11_end](@ref gTextureLuigiFace11_end) | 0x0A016D14
[gTextureLuigiFace12](@ref gTextureLuigiFace12) | 0x0A016D14
-[gTextureLuigiFace12_end](@ref gTextureLuigiFace12_end) | 0x0A017A44
[gTextureLuigiFace13](@ref gTextureLuigiFace13) | 0x0A017A44
+[gTextureLuigiFace12_end](@ref gTextureLuigiFace12_end) | 0x0A017A44
[gTextureLuigiFace14](@ref gTextureLuigiFace14) | 0x0A018770
[gTextureLuigiFace13_end](@ref gTextureLuigiFace13_end) | 0x0A018770
[gTextureLuigiFace15](@ref gTextureLuigiFace15) | 0x0A0194B8
@@ -18801,68 +18801,68 @@ Variable Name | Memory Address
[gTextureLuigiFace16](@ref gTextureLuigiFace16) | 0x0A01A20C
[gTextureLuigiFace16_end](@ref gTextureLuigiFace16_end) | 0x0A01AC44
[gTexturePeachFace00](@ref gTexturePeachFace00) | 0x0A01AC44
-[gTexturePeachFace00_end](@ref gTexturePeachFace00_end) | 0x0A01BAFC
[gTexturePeachFace01](@ref gTexturePeachFace01) | 0x0A01BAFC
+[gTexturePeachFace00_end](@ref gTexturePeachFace00_end) | 0x0A01BAFC
[gTexturePeachFace01_end](@ref gTexturePeachFace01_end) | 0x0A01C9A8
[gTexturePeachFace02](@ref gTexturePeachFace02) | 0x0A01C9A8
-[gTexturePeachFace02_end](@ref gTexturePeachFace02_end) | 0x0A01D864
[gTexturePeachFace03](@ref gTexturePeachFace03) | 0x0A01D864
+[gTexturePeachFace02_end](@ref gTexturePeachFace02_end) | 0x0A01D864
[gTexturePeachFace04](@ref gTexturePeachFace04) | 0x0A01E71C
[gTexturePeachFace03_end](@ref gTexturePeachFace03_end) | 0x0A01E71C
-[gTexturePeachFace05](@ref gTexturePeachFace05) | 0x0A01F5A4
[gTexturePeachFace04_end](@ref gTexturePeachFace04_end) | 0x0A01F5A4
-[gTexturePeachFace06](@ref gTexturePeachFace06) | 0x0A020444
+[gTexturePeachFace05](@ref gTexturePeachFace05) | 0x0A01F5A4
[gTexturePeachFace05_end](@ref gTexturePeachFace05_end) | 0x0A020444
-[gTexturePeachFace07](@ref gTexturePeachFace07) | 0x0A02130C
+[gTexturePeachFace06](@ref gTexturePeachFace06) | 0x0A020444
[gTexturePeachFace06_end](@ref gTexturePeachFace06_end) | 0x0A02130C
-[gTexturePeachFace07_end](@ref gTexturePeachFace07_end) | 0x0A0221FC
+[gTexturePeachFace07](@ref gTexturePeachFace07) | 0x0A02130C
[gTexturePeachFace08](@ref gTexturePeachFace08) | 0x0A0221FC
+[gTexturePeachFace07_end](@ref gTexturePeachFace07_end) | 0x0A0221FC
[gTexturePeachFace08_end](@ref gTexturePeachFace08_end) | 0x0A02310C
[gTexturePeachFace09](@ref gTexturePeachFace09) | 0x0A02310C
[gTexturePeachFace09_end](@ref gTexturePeachFace09_end) | 0x0A0240C0
[gTexturePeachFace10](@ref gTexturePeachFace10) | 0x0A0240C0
-[gTexturePeachFace10_end](@ref gTexturePeachFace10_end) | 0x0A0250A4
[gTexturePeachFace11](@ref gTexturePeachFace11) | 0x0A0250A4
+[gTexturePeachFace10_end](@ref gTexturePeachFace10_end) | 0x0A0250A4
[gTexturePeachFace11_end](@ref gTexturePeachFace11_end) | 0x0A0260F0
[gTexturePeachFace12](@ref gTexturePeachFace12) | 0x0A0260F0
[gTexturePeachFace13](@ref gTexturePeachFace13) | 0x0A027128
[gTexturePeachFace12_end](@ref gTexturePeachFace12_end) | 0x0A027128
-[gTexturePeachFace14](@ref gTexturePeachFace14) | 0x0A02810C
[gTexturePeachFace13_end](@ref gTexturePeachFace13_end) | 0x0A02810C
-[gTexturePeachFace15](@ref gTexturePeachFace15) | 0x0A0290A0
+[gTexturePeachFace14](@ref gTexturePeachFace14) | 0x0A02810C
[gTexturePeachFace14_end](@ref gTexturePeachFace14_end) | 0x0A0290A0
-[gTexturePeachFace15_end](@ref gTexturePeachFace15_end) | 0x0A02A028
+[gTexturePeachFace15](@ref gTexturePeachFace15) | 0x0A0290A0
[gTexturePeachFace16](@ref gTexturePeachFace16) | 0x0A02A028
+[gTexturePeachFace15_end](@ref gTexturePeachFace15_end) | 0x0A02A028
[gTexturePeachFace16_end](@ref gTexturePeachFace16_end) | 0x0A02AED0
[gTextureToadFace00](@ref gTextureToadFace00) | 0x0A02AED0
-[gTextureToadFace00_end](@ref gTextureToadFace00_end) | 0x0A02B88C
[gTextureToadFace01](@ref gTextureToadFace01) | 0x0A02B88C
+[gTextureToadFace00_end](@ref gTextureToadFace00_end) | 0x0A02B88C
[gTextureToadFace02](@ref gTextureToadFace02) | 0x0A02C240
[gTextureToadFace01_end](@ref gTextureToadFace01_end) | 0x0A02C240
[gTextureToadFace02_end](@ref gTextureToadFace02_end) | 0x0A02CBFC
[gTextureToadFace03](@ref gTextureToadFace03) | 0x0A02CBFC
-[gTextureToadFace03_end](@ref gTextureToadFace03_end) | 0x0A02D5B4
[gTextureToadFace04](@ref gTextureToadFace04) | 0x0A02D5B4
-[gTextureToadFace05](@ref gTextureToadFace05) | 0x0A02DF70
+[gTextureToadFace03_end](@ref gTextureToadFace03_end) | 0x0A02D5B4
[gTextureToadFace04_end](@ref gTextureToadFace04_end) | 0x0A02DF70
+[gTextureToadFace05](@ref gTextureToadFace05) | 0x0A02DF70
[gTextureToadFace06](@ref gTextureToadFace06) | 0x0A02E910
[gTextureToadFace05_end](@ref gTextureToadFace05_end) | 0x0A02E910
[gTextureToadFace06_end](@ref gTextureToadFace06_end) | 0x0A02F2A8
[gTextureToadFace07](@ref gTextureToadFace07) | 0x0A02F2A8
[gTextureToadFace07_end](@ref gTextureToadFace07_end) | 0x0A02FC74
[gTextureToadFace08](@ref gTextureToadFace08) | 0x0A02FC74
-[gTextureToadFace09](@ref gTextureToadFace09) | 0x0A030628
[gTextureToadFace08_end](@ref gTextureToadFace08_end) | 0x0A030628
-[gTextureToadFace10](@ref gTextureToadFace10) | 0x0A031010
+[gTextureToadFace09](@ref gTextureToadFace09) | 0x0A030628
[gTextureToadFace09_end](@ref gTextureToadFace09_end) | 0x0A031010
-[gTextureToadFace11](@ref gTextureToadFace11) | 0x0A031A24
+[gTextureToadFace10](@ref gTextureToadFace10) | 0x0A031010
[gTextureToadFace10_end](@ref gTextureToadFace10_end) | 0x0A031A24
+[gTextureToadFace11](@ref gTextureToadFace11) | 0x0A031A24
[gTextureToadFace12](@ref gTextureToadFace12) | 0x0A03247C
[gTextureToadFace11_end](@ref gTextureToadFace11_end) | 0x0A03247C
[gTextureToadFace13](@ref gTextureToadFace13) | 0x0A032EDC
[gTextureToadFace12_end](@ref gTextureToadFace12_end) | 0x0A032EDC
-[gTextureToadFace14](@ref gTextureToadFace14) | 0x0A03395C
[gTextureToadFace13_end](@ref gTextureToadFace13_end) | 0x0A03395C
+[gTextureToadFace14](@ref gTextureToadFace14) | 0x0A03395C
[gTextureToadFace15](@ref gTextureToadFace15) | 0x0A0343D0
[gTextureToadFace14_end](@ref gTextureToadFace14_end) | 0x0A0343D0
[gTextureToadFace15_end](@ref gTextureToadFace15_end) | 0x0A034E30
@@ -18871,94 +18871,94 @@ Variable Name | Memory Address
[gTextureToadFace16_end](@ref gTextureToadFace16_end) | 0x0A035794
[gTextureYoshiFace00_end](@ref gTextureYoshiFace00_end) | 0x0A036280
[gTextureYoshiFace01](@ref gTextureYoshiFace01) | 0x0A036280
-[gTextureYoshiFace01_end](@ref gTextureYoshiFace01_end) | 0x0A036D64
[gTextureYoshiFace02](@ref gTextureYoshiFace02) | 0x0A036D64
-[gTextureYoshiFace02_end](@ref gTextureYoshiFace02_end) | 0x0A037844
+[gTextureYoshiFace01_end](@ref gTextureYoshiFace01_end) | 0x0A036D64
[gTextureYoshiFace03](@ref gTextureYoshiFace03) | 0x0A037844
+[gTextureYoshiFace02_end](@ref gTextureYoshiFace02_end) | 0x0A037844
[gTextureYoshiFace04](@ref gTextureYoshiFace04) | 0x0A0382F8
[gTextureYoshiFace03_end](@ref gTextureYoshiFace03_end) | 0x0A0382F8
[gTextureYoshiFace04_end](@ref gTextureYoshiFace04_end) | 0x0A038D68
[gTextureYoshiFace05](@ref gTextureYoshiFace05) | 0x0A038D68
[gTextureYoshiFace05_end](@ref gTextureYoshiFace05_end) | 0x0A0397B0
[gTextureYoshiFace06](@ref gTextureYoshiFace06) | 0x0A0397B0
-[gTextureYoshiFace07](@ref gTextureYoshiFace07) | 0x0A03A2D4
[gTextureYoshiFace06_end](@ref gTextureYoshiFace06_end) | 0x0A03A2D4
-[gTextureYoshiFace08](@ref gTextureYoshiFace08) | 0x0A03AD00
+[gTextureYoshiFace07](@ref gTextureYoshiFace07) | 0x0A03A2D4
[gTextureYoshiFace07_end](@ref gTextureYoshiFace07_end) | 0x0A03AD00
-[gTextureYoshiFace08_end](@ref gTextureYoshiFace08_end) | 0x0A03B6BC
+[gTextureYoshiFace08](@ref gTextureYoshiFace08) | 0x0A03AD00
[gTextureYoshiFace09](@ref gTextureYoshiFace09) | 0x0A03B6BC
-[gTextureYoshiFace09_end](@ref gTextureYoshiFace09_end) | 0x0A03C068
+[gTextureYoshiFace08_end](@ref gTextureYoshiFace08_end) | 0x0A03B6BC
[gTextureYoshiFace10](@ref gTextureYoshiFace10) | 0x0A03C068
-[gTextureYoshiFace10_end](@ref gTextureYoshiFace10_end) | 0x0A03CA28
+[gTextureYoshiFace09_end](@ref gTextureYoshiFace09_end) | 0x0A03C068
[gTextureYoshiFace11](@ref gTextureYoshiFace11) | 0x0A03CA28
-[gTextureYoshiFace12](@ref gTextureYoshiFace12) | 0x0A03D438
+[gTextureYoshiFace10_end](@ref gTextureYoshiFace10_end) | 0x0A03CA28
[gTextureYoshiFace11_end](@ref gTextureYoshiFace11_end) | 0x0A03D438
-[gTextureYoshiFace13](@ref gTextureYoshiFace13) | 0x0A03DE94
+[gTextureYoshiFace12](@ref gTextureYoshiFace12) | 0x0A03D438
[gTextureYoshiFace12_end](@ref gTextureYoshiFace12_end) | 0x0A03DE94
+[gTextureYoshiFace13](@ref gTextureYoshiFace13) | 0x0A03DE94
[gTextureYoshiFace14](@ref gTextureYoshiFace14) | 0x0A03E974
[gTextureYoshiFace13_end](@ref gTextureYoshiFace13_end) | 0x0A03E974
-[gTextureYoshiFace14_end](@ref gTextureYoshiFace14_end) | 0x0A03F47C
[gTextureYoshiFace15](@ref gTextureYoshiFace15) | 0x0A03F47C
+[gTextureYoshiFace14_end](@ref gTextureYoshiFace14_end) | 0x0A03F47C
[gTextureYoshiFace15_end](@ref gTextureYoshiFace15_end) | 0x0A03FF94
[gTextureYoshiFace16](@ref gTextureYoshiFace16) | 0x0A03FF94
[gTextureYoshiFace16_end](@ref gTextureYoshiFace16_end) | 0x0A040ABC
[gTextureDkFace00](@ref gTextureDkFace00) | 0x0A040ABC
-[gTextureDkFace00_end](@ref gTextureDkFace00_end) | 0x0A0418A8
[gTextureDkFace01](@ref gTextureDkFace01) | 0x0A0418A8
-[gTextureDkFace02](@ref gTextureDkFace02) | 0x0A0426B0
+[gTextureDkFace00_end](@ref gTextureDkFace00_end) | 0x0A0418A8
[gTextureDkFace01_end](@ref gTextureDkFace01_end) | 0x0A0426B0
-[gTextureDkFace03](@ref gTextureDkFace03) | 0x0A043490
+[gTextureDkFace02](@ref gTextureDkFace02) | 0x0A0426B0
[gTextureDkFace02_end](@ref gTextureDkFace02_end) | 0x0A043490
-[gTextureDkFace04](@ref gTextureDkFace04) | 0x0A044240
+[gTextureDkFace03](@ref gTextureDkFace03) | 0x0A043490
[gTextureDkFace03_end](@ref gTextureDkFace03_end) | 0x0A044240
+[gTextureDkFace04](@ref gTextureDkFace04) | 0x0A044240
[gTextureDkFace05](@ref gTextureDkFace05) | 0x0A044FE8
[gTextureDkFace04_end](@ref gTextureDkFace04_end) | 0x0A044FE8
-[gTextureDkFace05_end](@ref gTextureDkFace05_end) | 0x0A045DCC
[gTextureDkFace06](@ref gTextureDkFace06) | 0x0A045DCC
+[gTextureDkFace05_end](@ref gTextureDkFace05_end) | 0x0A045DCC
[gTextureDkFace06_end](@ref gTextureDkFace06_end) | 0x0A046BF8
[gTextureDkFace07](@ref gTextureDkFace07) | 0x0A046BF8
-[gTextureDkFace07_end](@ref gTextureDkFace07_end) | 0x0A047A8C
[gTextureDkFace08](@ref gTextureDkFace08) | 0x0A047A8C
-[gTextureDkFace08_end](@ref gTextureDkFace08_end) | 0x0A048968
+[gTextureDkFace07_end](@ref gTextureDkFace07_end) | 0x0A047A8C
[gTextureDkFace09](@ref gTextureDkFace09) | 0x0A048968
+[gTextureDkFace08_end](@ref gTextureDkFace08_end) | 0x0A048968
[gTextureDkFace10](@ref gTextureDkFace10) | 0x0A0498B0
[gTextureDkFace09_end](@ref gTextureDkFace09_end) | 0x0A0498B0
[gTextureDkFace10_end](@ref gTextureDkFace10_end) | 0x0A04A7E8
[gTextureDkFace11](@ref gTextureDkFace11) | 0x0A04A7E8
-[gTextureDkFace11_end](@ref gTextureDkFace11_end) | 0x0A04B76C
[gTextureDkFace12](@ref gTextureDkFace12) | 0x0A04B76C
+[gTextureDkFace11_end](@ref gTextureDkFace11_end) | 0x0A04B76C
[gTextureDkFace13](@ref gTextureDkFace13) | 0x0A04C770
[gTextureDkFace12_end](@ref gTextureDkFace12_end) | 0x0A04C770
[gTextureDkFace13_end](@ref gTextureDkFace13_end) | 0x0A04D730
[gTextureDkFace14](@ref gTextureDkFace14) | 0x0A04D730
-[gTextureDkFace14_end](@ref gTextureDkFace14_end) | 0x0A04E67C
[gTextureDkFace15](@ref gTextureDkFace15) | 0x0A04E67C
-[gTextureDkFace16](@ref gTextureDkFace16) | 0x0A04F57C
+[gTextureDkFace14_end](@ref gTextureDkFace14_end) | 0x0A04E67C
[gTextureDkFace15_end](@ref gTextureDkFace15_end) | 0x0A04F57C
-[gTextureDkFace16_end](@ref gTextureDkFace16_end) | 0x0A0504D0
+[gTextureDkFace16](@ref gTextureDkFace16) | 0x0A04F57C
[gTextureWarioFace00](@ref gTextureWarioFace00) | 0x0A0504D0
-[gTextureWarioFace01](@ref gTextureWarioFace01) | 0x0A051630
+[gTextureDkFace16_end](@ref gTextureDkFace16_end) | 0x0A0504D0
[gTextureWarioFace00_end](@ref gTextureWarioFace00_end) | 0x0A051630
+[gTextureWarioFace01](@ref gTextureWarioFace01) | 0x0A051630
[gTextureWarioFace01_end](@ref gTextureWarioFace01_end) | 0x0A052774
[gTextureWarioFace02](@ref gTextureWarioFace02) | 0x0A052774
[gTextureWarioFace03](@ref gTextureWarioFace03) | 0x0A0538C8
[gTextureWarioFace02_end](@ref gTextureWarioFace02_end) | 0x0A0538C8
-[gTextureWarioFace04](@ref gTextureWarioFace04) | 0x0A054A30
[gTextureWarioFace03_end](@ref gTextureWarioFace03_end) | 0x0A054A30
+[gTextureWarioFace04](@ref gTextureWarioFace04) | 0x0A054A30
[gTextureWarioFace05](@ref gTextureWarioFace05) | 0x0A055B84
[gTextureWarioFace04_end](@ref gTextureWarioFace04_end) | 0x0A055B84
[gTextureWarioFace05_end](@ref gTextureWarioFace05_end) | 0x0A056CE0
[gTextureWarioFace06](@ref gTextureWarioFace06) | 0x0A056CE0
-[gTextureWarioFace06_end](@ref gTextureWarioFace06_end) | 0x0A057E54
[gTextureWarioFace07](@ref gTextureWarioFace07) | 0x0A057E54
-[gTextureWarioFace07_end](@ref gTextureWarioFace07_end) | 0x0A05902C
+[gTextureWarioFace06_end](@ref gTextureWarioFace06_end) | 0x0A057E54
[gTextureWarioFace08](@ref gTextureWarioFace08) | 0x0A05902C
+[gTextureWarioFace07_end](@ref gTextureWarioFace07_end) | 0x0A05902C
[gTextureWarioFace09](@ref gTextureWarioFace09) | 0x0A05A254
[gTextureWarioFace08_end](@ref gTextureWarioFace08_end) | 0x0A05A254
[gTextureWarioFace09_end](@ref gTextureWarioFace09_end) | 0x0A05B4C0
[gTextureWarioFace10](@ref gTextureWarioFace10) | 0x0A05B4C0
-[gTextureWarioFace11](@ref gTextureWarioFace11) | 0x0A05C7A0
[gTextureWarioFace10_end](@ref gTextureWarioFace10_end) | 0x0A05C7A0
+[gTextureWarioFace11](@ref gTextureWarioFace11) | 0x0A05C7A0
[gTextureWarioFace11_end](@ref gTextureWarioFace11_end) | 0x0A05DAA8
[gTextureWarioFace12](@ref gTextureWarioFace12) | 0x0A05DAA8
[gTextureWarioFace12_end](@ref gTextureWarioFace12_end) | 0x0A05ED8C
@@ -18967,34 +18967,34 @@ Variable Name | Memory Address
[gTextureWarioFace14](@ref gTextureWarioFace14) | 0x0A0600B0
[gTextureWarioFace14_end](@ref gTextureWarioFace14_end) | 0x0A06139C
[gTextureWarioFace15](@ref gTextureWarioFace15) | 0x0A06139C
-[gTextureWarioFace16](@ref gTextureWarioFace16) | 0x0A062668
[gTextureWarioFace15_end](@ref gTextureWarioFace15_end) | 0x0A062668
+[gTextureWarioFace16](@ref gTextureWarioFace16) | 0x0A062668
[gTextureWarioFace16_end](@ref gTextureWarioFace16_end) | 0x0A0637E0
[gTextureBowserFace00](@ref gTextureBowserFace00) | 0x0A0637E0
[gTextureBowserFace00_end](@ref gTextureBowserFace00_end) | 0x0A064AC8
[gTextureBowserFace01](@ref gTextureBowserFace01) | 0x0A064AC8
-[gTextureBowserFace01_end](@ref gTextureBowserFace01_end) | 0x0A065D7C
[gTextureBowserFace02](@ref gTextureBowserFace02) | 0x0A065D7C
-[gTextureBowserFace02_end](@ref gTextureBowserFace02_end) | 0x0A067044
+[gTextureBowserFace01_end](@ref gTextureBowserFace01_end) | 0x0A065D7C
[gTextureBowserFace03](@ref gTextureBowserFace03) | 0x0A067044
+[gTextureBowserFace02_end](@ref gTextureBowserFace02_end) | 0x0A067044
[gTextureBowserFace03_end](@ref gTextureBowserFace03_end) | 0x0A068310
[gTextureBowserFace04](@ref gTextureBowserFace04) | 0x0A068310
-[gTextureBowserFace05](@ref gTextureBowserFace05) | 0x0A0695B4
[gTextureBowserFace04_end](@ref gTextureBowserFace04_end) | 0x0A0695B4
+[gTextureBowserFace05](@ref gTextureBowserFace05) | 0x0A0695B4
[gTextureBowserFace06](@ref gTextureBowserFace06) | 0x0A06A840
[gTextureBowserFace05_end](@ref gTextureBowserFace05_end) | 0x0A06A840
-[gTextureBowserFace07](@ref gTextureBowserFace07) | 0x0A06BB1C
[gTextureBowserFace06_end](@ref gTextureBowserFace06_end) | 0x0A06BB1C
+[gTextureBowserFace07](@ref gTextureBowserFace07) | 0x0A06BB1C
[gTextureBowserFace08](@ref gTextureBowserFace08) | 0x0A06CE04
[gTextureBowserFace07_end](@ref gTextureBowserFace07_end) | 0x0A06CE04
-[gTextureBowserFace08_end](@ref gTextureBowserFace08_end) | 0x0A06E0F4
[gTextureBowserFace09](@ref gTextureBowserFace09) | 0x0A06E0F4
+[gTextureBowserFace08_end](@ref gTextureBowserFace08_end) | 0x0A06E0F4
[gTextureBowserFace09_end](@ref gTextureBowserFace09_end) | 0x0A06F410
[gTextureBowserFace10](@ref gTextureBowserFace10) | 0x0A06F410
[gTextureBowserFace10_end](@ref gTextureBowserFace10_end) | 0x0A0706DC
[gTextureBowserFace11](@ref gTextureBowserFace11) | 0x0A0706DC
-[gTextureBowserFace12](@ref gTextureBowserFace12) | 0x0A071A18
[gTextureBowserFace11_end](@ref gTextureBowserFace11_end) | 0x0A071A18
+[gTextureBowserFace12](@ref gTextureBowserFace12) | 0x0A071A18
[gTextureBowserFace13](@ref gTextureBowserFace13) | 0x0A072DBC
[gTextureBowserFace12_end](@ref gTextureBowserFace12_end) | 0x0A072DBC
[gTextureBowserFace14](@ref gTextureBowserFace14) | 0x0A074138
@@ -19029,12 +19029,12 @@ Variable Name | Memory Address
[gTextureTrophySilver](@ref gTextureTrophySilver) | 0x0A0AEFEC
[gTextureTrophySilver_end](@ref gTextureTrophySilver_end) | 0x0A0AF614
[gTextureTrophyBronze](@ref gTextureTrophyBronze) | 0x0A0AF614
-[gTextureTrophyBronze_end](@ref gTextureTrophyBronze_end) | 0x0A0AFC00
[gTextureCupGold](@ref gTextureCupGold) | 0x0A0AFC00
+[gTextureTrophyBronze_end](@ref gTextureTrophyBronze_end) | 0x0A0AFC00
[gTextureCupSilver](@ref gTextureCupSilver) | 0x0A0B058C
[gTextureCupGold_end](@ref gTextureCupGold_end) | 0x0A0B058C
-[gTextureCupSilver_end](@ref gTextureCupSilver_end) | 0x0A0B0F10
[gTextureCupBronze](@ref gTextureCupBronze) | 0x0A0B0F10
+[gTextureCupSilver_end](@ref gTextureCupSilver_end) | 0x0A0B0F10
[gTextureCupBronze_end](@ref gTextureCupBronze_end) | 0x0A0B17B4
[gTexturePushStartButton](@ref gTexturePushStartButton) | 0x0A0B17B4
[gTextureCopyright1996](@ref gTextureCopyright1996) | 0x0A0B2B94
@@ -19046,16 +19046,16 @@ Variable Name | Memory Address
[gTexture7E56E4](@ref gTexture7E56E4) | 0x0A0BBCB4
[gTexture7E56E4_end](@ref gTexture7E56E4_end) | 0x0A0BCE1F
[gTextureSmallFont0](@ref gTextureSmallFont0) | 0x0A0BCE20
-[gTextureSmallFont0_end](@ref gTextureSmallFont0_end) | 0x0A0BCEB0
[gTextureSmallFont1](@ref gTextureSmallFont1) | 0x0A0BCEB0
+[gTextureSmallFont0_end](@ref gTextureSmallFont0_end) | 0x0A0BCEB0
[gTextureSmallFont2](@ref gTextureSmallFont2) | 0x0A0BCF08
[gTextureSmallFont1_end](@ref gTextureSmallFont1_end) | 0x0A0BCF08
-[gTextureSmallFont3](@ref gTextureSmallFont3) | 0x0A0BCFA0
[gTextureSmallFont2_end](@ref gTextureSmallFont2_end) | 0x0A0BCFA0
+[gTextureSmallFont3](@ref gTextureSmallFont3) | 0x0A0BCFA0
[gTextureSmallFont3_end](@ref gTextureSmallFont3_end) | 0x0A0BD034
[gTextureSmallFont4](@ref gTextureSmallFont4) | 0x0A0BD034
-[gTextureSmallFont4_end](@ref gTextureSmallFont4_end) | 0x0A0BD0BC
[gTextureSmallFont5](@ref gTextureSmallFont5) | 0x0A0BD0BC
+[gTextureSmallFont4_end](@ref gTextureSmallFont4_end) | 0x0A0BD0BC
[gTextureSmallFont6](@ref gTextureSmallFont6) | 0x0A0BD154
[gTextureSmallFont5_end](@ref gTextureSmallFont5_end) | 0x0A0BD154
[gTextureSmallFont6_end](@ref gTextureSmallFont6_end) | 0x0A0BD1F0
@@ -19064,52 +19064,52 @@ Variable Name | Memory Address
[gTextureSmallFont7_end](@ref gTextureSmallFont7_end) | 0x0A0BD260
[gTextureSmallFont9](@ref gTextureSmallFont9) | 0x0A0BD2F0
[gTextureSmallFont8_end](@ref gTextureSmallFont8_end) | 0x0A0BD2F0
-[gTextureN64ControllerPakDataSelect](@ref gTextureN64ControllerPakDataSelect) | 0x0A0BD390
[gTextureSmallFont9_end](@ref gTextureSmallFont9_end) | 0x0A0BD390
-[gTextureEraseDataRecordConfirmation](@ref gTextureEraseDataRecordConfirmation) | 0x0A0BE4B8
+[gTextureN64ControllerPakDataSelect](@ref gTextureN64ControllerPakDataSelect) | 0x0A0BD390
[gTextureN64ControllerPakDataSelect_end](@ref gTextureN64ControllerPakDataSelect_end) | 0x0A0BE4B8
+[gTextureEraseDataRecordConfirmation](@ref gTextureEraseDataRecordConfirmation) | 0x0A0BE4B8
[gTextureEraseDataRecordConfirmation_end](@ref gTextureEraseDataRecordConfirmation_end) | 0x0A0BF4AC
[gTextureRecordNotErased](@ref gTextureRecordNotErased) | 0x0A0BF4AC
-[gTexturePlaceN64ControllerPakIntoController1](@ref gTexturePlaceN64ControllerPakIntoController1) | 0x0A0BFD7C
[gTextureRecordNotErased_end](@ref gTextureRecordNotErased_end) | 0x0A0BFD7C
-[gTexturePleaseReinsertOriginalN64ControllerPak](@ref gTexturePleaseReinsertOriginalN64ControllerPak) | 0x0A0C09C8
+[gTexturePlaceN64ControllerPakIntoController1](@ref gTexturePlaceN64ControllerPakIntoController1) | 0x0A0BFD7C
[gTexturePlaceN64ControllerPakIntoController1_end](@ref gTexturePlaceN64ControllerPakIntoController1_end) | 0x0A0C09C8
-[gTexturePleaseReinsertOriginalN64ControllerPak_end](@ref gTexturePleaseReinsertOriginalN64ControllerPak_end) | 0x0A0C16A0
+[gTexturePleaseReinsertOriginalN64ControllerPak](@ref gTexturePleaseReinsertOriginalN64ControllerPak) | 0x0A0C09C8
[gTextureErasingSelectedRecord](@ref gTextureErasingSelectedRecord) | 0x0A0C16A0
+[gTexturePleaseReinsertOriginalN64ControllerPak_end](@ref gTexturePleaseReinsertOriginalN64ControllerPak_end) | 0x0A0C16A0
[gTextureSelectRecord](@ref gTextureSelectRecord) | 0x0A0C22A4
[gTextureErasingSelectedRecord_end](@ref gTextureErasingSelectedRecord_end) | 0x0A0C22A4
[gTextureTextEnd](@ref gTextureTextEnd) | 0x0A0C261C
[gTextureSelectRecord_end](@ref gTextureSelectRecord_end) | 0x0A0C261C
-[gTextureTextEnd_end](@ref gTextureTextEnd_end) | 0x0A0C274C
[gTextureTableOfContents](@ref gTextureTableOfContents) | 0x0A0C274C
-[gTextureTableOfContents_end](@ref gTextureTableOfContents_end) | 0x0A0C2B78
+[gTextureTextEnd_end](@ref gTextureTextEnd_end) | 0x0A0C274C
[gTextureTextHash](@ref gTextureTextHash) | 0x0A0C2B78
+[gTextureTableOfContents_end](@ref gTextureTableOfContents_end) | 0x0A0C2B78
[gTextureTextHash_end](@ref gTextureTextHash_end) | 0x0A0C2BF8
[gTextureTextGameData](@ref gTextureTextGameData) | 0x0A0C2BF8
-[gTextureTextPages](@ref gTextureTextPages) | 0x0A0C2EBC
[gTextureTextGameData_end](@ref gTextureTextGameData_end) | 0x0A0C2EBC
-[gTextureTextPagesFree](@ref gTextureTextPagesFree) | 0x0A0C307C
+[gTextureTextPages](@ref gTextureTextPages) | 0x0A0C2EBC
[gTextureTextPages_end](@ref gTextureTextPages_end) | 0x0A0C307C
+[gTextureTextPagesFree](@ref gTextureTextPagesFree) | 0x0A0C307C
[gTextureTextPagesFree_end](@ref gTextureTextPagesFree_end) | 0x0A0C3340
[gTextureTextErase](@ref gTextureTextErase) | 0x0A0C3340
-[gTextureTextErase_end](@ref gTextureTextErase_end) | 0x0A0C34E0
[gTextureTextQuit](@ref gTextureTextQuit) | 0x0A0C34E0
+[gTextureTextErase_end](@ref gTextureTextErase_end) | 0x0A0C34E0
[gTextureTextQuit_end](@ref gTextureTextQuit_end) | 0x0A0C3628
[gTexture7ED058](@ref gTexture7ED058) | 0x0A0C3628
[gTexture7ED290](@ref gTexture7ED290) | 0x0A0C3860
[gTexture7ED058_end](@ref gTexture7ED058_end) | 0x0A0C3860
[gTexture7ED50C](@ref gTexture7ED50C) | 0x0A0C3ADC
[gTexture7ED290_end](@ref gTexture7ED290_end) | 0x0A0C3ADC
-[gTexture7ED6A4](@ref gTexture7ED6A4) | 0x0A0C3C74
[gTexture7ED50C_end](@ref gTexture7ED50C_end) | 0x0A0C3C74
-[gTextureTinyFont0](@ref gTextureTinyFont0) | 0x0A0C4004
+[gTexture7ED6A4](@ref gTexture7ED6A4) | 0x0A0C3C74
[gTexture7ED6A4_end](@ref gTexture7ED6A4_end) | 0x0A0C4004
+[gTextureTinyFont0](@ref gTextureTinyFont0) | 0x0A0C4004
[gTextureTinyFont0_end](@ref gTextureTinyFont0_end) | 0x0A0C4078
[gTextureTinyFont1](@ref gTextureTinyFont1) | 0x0A0C4078
[gTextureTinyFont1_end](@ref gTextureTinyFont1_end) | 0x0A0C40C0
[gTextureTinyFont2](@ref gTextureTinyFont2) | 0x0A0C40C0
-[gTextureTinyFont3](@ref gTextureTinyFont3) | 0x0A0C4134
[gTextureTinyFont2_end](@ref gTextureTinyFont2_end) | 0x0A0C4134
+[gTextureTinyFont3](@ref gTextureTinyFont3) | 0x0A0C4134
[gTextureTinyFont3_end](@ref gTextureTinyFont3_end) | 0x0A0C41A4
[gTextureTinyFont4](@ref gTextureTinyFont4) | 0x0A0C41A4
[gTextureTinyFont5](@ref gTextureTinyFont5) | 0x0A0C4200
@@ -19120,70 +19120,70 @@ Variable Name | Memory Address
[gTextureTinyFont7](@ref gTextureTinyFont7) | 0x0A0C42E8
[gTextureTinyFont8](@ref gTextureTinyFont8) | 0x0A0C4348
[gTextureTinyFont7_end](@ref gTextureTinyFont7_end) | 0x0A0C4348
-[gTextureTinyFont9](@ref gTextureTinyFont9) | 0x0A0C43C0
[gTextureTinyFont8_end](@ref gTextureTinyFont8_end) | 0x0A0C43C0
-[gTextureTinyFont9_end](@ref gTextureTinyFont9_end) | 0x0A0C4434
+[gTextureTinyFont9](@ref gTextureTinyFont9) | 0x0A0C43C0
[gTextureTinyFontA](@ref gTextureTinyFontA) | 0x0A0C4434
+[gTextureTinyFont9_end](@ref gTextureTinyFont9_end) | 0x0A0C4434
[gTextureTinyFontA_end](@ref gTextureTinyFontA_end) | 0x0A0C44A0
[gTextureTinyFontB](@ref gTextureTinyFontB) | 0x0A0C44A0
[gTextureTinyFontC](@ref gTextureTinyFontC) | 0x0A0C451C
[gTextureTinyFontB_end](@ref gTextureTinyFontB_end) | 0x0A0C451C
[gTextureTinyFontD](@ref gTextureTinyFontD) | 0x0A0C4590
[gTextureTinyFontC_end](@ref gTextureTinyFontC_end) | 0x0A0C4590
-[gTextureTinyFontE](@ref gTextureTinyFontE) | 0x0A0C4600
[gTextureTinyFontD_end](@ref gTextureTinyFontD_end) | 0x0A0C4600
-[gTextureTinyFontF](@ref gTextureTinyFontF) | 0x0A0C4674
+[gTextureTinyFontE](@ref gTextureTinyFontE) | 0x0A0C4600
[gTextureTinyFontE_end](@ref gTextureTinyFontE_end) | 0x0A0C4674
-[gTextureTinyFontG](@ref gTextureTinyFontG) | 0x0A0C46D8
+[gTextureTinyFontF](@ref gTextureTinyFontF) | 0x0A0C4674
[gTextureTinyFontF_end](@ref gTextureTinyFontF_end) | 0x0A0C46D8
-[gTextureTinyFontH](@ref gTextureTinyFontH) | 0x0A0C474C
+[gTextureTinyFontG](@ref gTextureTinyFontG) | 0x0A0C46D8
[gTextureTinyFontG_end](@ref gTextureTinyFontG_end) | 0x0A0C474C
-[gTextureTinyFontH_end](@ref gTextureTinyFontH_end) | 0x0A0C47C4
+[gTextureTinyFontH](@ref gTextureTinyFontH) | 0x0A0C474C
[gTextureTinyFontI](@ref gTextureTinyFontI) | 0x0A0C47C4
-[gTextureTinyFontI_end](@ref gTextureTinyFontI_end) | 0x0A0C480C
+[gTextureTinyFontH_end](@ref gTextureTinyFontH_end) | 0x0A0C47C4
[gTextureTinyFontJ](@ref gTextureTinyFontJ) | 0x0A0C480C
+[gTextureTinyFontI_end](@ref gTextureTinyFontI_end) | 0x0A0C480C
[gTextureTinyFontK](@ref gTextureTinyFontK) | 0x0A0C4860
[gTextureTinyFontJ_end](@ref gTextureTinyFontJ_end) | 0x0A0C4860
-[gTextureTinyFontL](@ref gTextureTinyFontL) | 0x0A0C48D0
[gTextureTinyFontK_end](@ref gTextureTinyFontK_end) | 0x0A0C48D0
-[gTextureTinyFontM](@ref gTextureTinyFontM) | 0x0A0C491C
+[gTextureTinyFontL](@ref gTextureTinyFontL) | 0x0A0C48D0
[gTextureTinyFontL_end](@ref gTextureTinyFontL_end) | 0x0A0C491C
-[gTextureTinyFontN](@ref gTextureTinyFontN) | 0x0A0C4998
+[gTextureTinyFontM](@ref gTextureTinyFontM) | 0x0A0C491C
[gTextureTinyFontM_end](@ref gTextureTinyFontM_end) | 0x0A0C4998
-[gTextureTinyFontN_end](@ref gTextureTinyFontN_end) | 0x0A0C4A14
+[gTextureTinyFontN](@ref gTextureTinyFontN) | 0x0A0C4998
[gTextureTinyFontO](@ref gTextureTinyFontO) | 0x0A0C4A14
-[gTextureTinyFontP](@ref gTextureTinyFontP) | 0x0A0C4A8C
+[gTextureTinyFontN_end](@ref gTextureTinyFontN_end) | 0x0A0C4A14
[gTextureTinyFontO_end](@ref gTextureTinyFontO_end) | 0x0A0C4A8C
-[gTextureTinyFontP_end](@ref gTextureTinyFontP_end) | 0x0A0C4AF8
+[gTextureTinyFontP](@ref gTextureTinyFontP) | 0x0A0C4A8C
[gTextureTinyFontQ](@ref gTextureTinyFontQ) | 0x0A0C4AF8
+[gTextureTinyFontP_end](@ref gTextureTinyFontP_end) | 0x0A0C4AF8
[gTextureTinyFontQ_end](@ref gTextureTinyFontQ_end) | 0x0A0C4B70
[gTextureTinyFontR](@ref gTextureTinyFontR) | 0x0A0C4B70
[gTextureTinyFontR_end](@ref gTextureTinyFontR_end) | 0x0A0C4BE4
[gTextureTinyFontS](@ref gTextureTinyFontS) | 0x0A0C4BE4
-[gTextureTinyFontS_end](@ref gTextureTinyFontS_end) | 0x0A0C4C54
[gTextureTinyFontT](@ref gTextureTinyFontT) | 0x0A0C4C54
+[gTextureTinyFontS_end](@ref gTextureTinyFontS_end) | 0x0A0C4C54
[gTextureTinyFontU](@ref gTextureTinyFontU) | 0x0A0C4CA8
[gTextureTinyFontT_end](@ref gTextureTinyFontT_end) | 0x0A0C4CA8
-[gTextureTinyFontV](@ref gTextureTinyFontV) | 0x0A0C4D0C
[gTextureTinyFontU_end](@ref gTextureTinyFontU_end) | 0x0A0C4D0C
+[gTextureTinyFontV](@ref gTextureTinyFontV) | 0x0A0C4D0C
[gTextureTinyFontW](@ref gTextureTinyFontW) | 0x0A0C4D6C
[gTextureTinyFontV_end](@ref gTextureTinyFontV_end) | 0x0A0C4D6C
-[gTextureTinyFontX](@ref gTextureTinyFontX) | 0x0A0C4DE8
[gTextureTinyFontW_end](@ref gTextureTinyFontW_end) | 0x0A0C4DE8
+[gTextureTinyFontX](@ref gTextureTinyFontX) | 0x0A0C4DE8
[gTextureTinyFontX_end](@ref gTextureTinyFontX_end) | 0x0A0C4E54
[gTextureTinyFontY](@ref gTextureTinyFontY) | 0x0A0C4E54
[gTextureTinyFontY_end](@ref gTextureTinyFontY_end) | 0x0A0C4EA4
[gTextureTinyFontZ](@ref gTextureTinyFontZ) | 0x0A0C4EA4
-[gTextureTinyFontExclamationMark](@ref gTextureTinyFontExclamationMark) | 0x0A0C4F0C
[gTextureTinyFontZ_end](@ref gTextureTinyFontZ_end) | 0x0A0C4F0C
+[gTextureTinyFontExclamationMark](@ref gTextureTinyFontExclamationMark) | 0x0A0C4F0C
[gTextureTinyFontDoubleQuote](@ref gTextureTinyFontDoubleQuote) | 0x0A0C4F54
[gTextureTinyFontExclamationMark_end](@ref gTextureTinyFontExclamationMark_end) | 0x0A0C4F54
-[gTextureTinyFontDoubleQuote_end](@ref gTextureTinyFontDoubleQuote_end) | 0x0A0C4F8C
[gTextureTinyFontHash](@ref gTextureTinyFontHash) | 0x0A0C4F8C
+[gTextureTinyFontDoubleQuote_end](@ref gTextureTinyFontDoubleQuote_end) | 0x0A0C4F8C
[gTextureTinyFontHash_end](@ref gTextureTinyFontHash_end) | 0x0A0C4FFC
[gTextureTinyFontSingleQuote](@ref gTextureTinyFontSingleQuote) | 0x0A0C4FFC
-[gTextureTinyFontAsterisk](@ref gTextureTinyFontAsterisk) | 0x0A0C502C
[gTextureTinyFontSingleQuote_end](@ref gTextureTinyFontSingleQuote_end) | 0x0A0C502C
+[gTextureTinyFontAsterisk](@ref gTextureTinyFontAsterisk) | 0x0A0C502C
[gTextureTinyFontPlus](@ref gTextureTinyFontPlus) | 0x0A0C5098
[gTextureTinyFontAsterisk_end](@ref gTextureTinyFontAsterisk_end) | 0x0A0C5098
[gTextureTinyFontPlus_end](@ref gTextureTinyFontPlus_end) | 0x0A0C50E8
@@ -19194,60 +19194,60 @@ Variable Name | Memory Address
[gTextureTinyFontMinus_end](@ref gTextureTinyFontMinus_end) | 0x0A0C514C
[gTextureTinyFontForwardSlash](@ref gTextureTinyFontForwardSlash) | 0x0A0C517C
[gTextureTinyFontComma_end](@ref gTextureTinyFontComma_end) | 0x0A0C517C
-[gTextureTinyFontForwardSlash_end](@ref gTextureTinyFontForwardSlash_end) | 0x0A0C51CC
[gTextureTinyFontColon](@ref gTextureTinyFontColon) | 0x0A0C51CC
-[gTextureTinyFontColon_end](@ref gTextureTinyFontColon_end) | 0x0A0C5204
+[gTextureTinyFontForwardSlash_end](@ref gTextureTinyFontForwardSlash_end) | 0x0A0C51CC
[gTexture7EEC34](@ref gTexture7EEC34) | 0x0A0C5204
-[gTextureTinyFontQuestion](@ref gTextureTinyFontQuestion) | 0x0A0C5254
+[gTextureTinyFontColon_end](@ref gTextureTinyFontColon_end) | 0x0A0C5204
[gTexture7EEC34_end](@ref gTexture7EEC34_end) | 0x0A0C5254
-[gTexture7EECE4](@ref gTexture7EECE4) | 0x0A0C52B4
+[gTextureTinyFontQuestion](@ref gTextureTinyFontQuestion) | 0x0A0C5254
[gTextureTinyFontQuestion_end](@ref gTextureTinyFontQuestion_end) | 0x0A0C52B4
+[gTexture7EECE4](@ref gTexture7EECE4) | 0x0A0C52B4
[gTexture7EECE4_end](@ref gTexture7EECE4_end) | 0x0A0C5344
[gTexture7EED74](@ref gTexture7EED74) | 0x0A0C5344
-[gTexture7EED74_end](@ref gTexture7EED74_end) | 0x0A0C5380
[gTexture7EEDB0](@ref gTexture7EEDB0) | 0x0A0C5380
-[gTexture7EEDB0_end](@ref gTexture7EEDB0_end) | 0x0A0C53B8
+[gTexture7EED74_end](@ref gTexture7EED74_end) | 0x0A0C5380
[gTexture7EEDE8](@ref gTexture7EEDE8) | 0x0A0C53B8
-[gTexture7EEE20](@ref gTexture7EEE20) | 0x0A0C53F0
+[gTexture7EEDB0_end](@ref gTexture7EEDB0_end) | 0x0A0C53B8
[gTexture7EEDE8_end](@ref gTexture7EEDE8_end) | 0x0A0C53F0
+[gTexture7EEE20](@ref gTexture7EEE20) | 0x0A0C53F0
[gTexture7EEE7C](@ref gTexture7EEE7C) | 0x0A0C544C
[gTexture7EEE20_end](@ref gTexture7EEE20_end) | 0x0A0C544C
-[gTexture7EEE7C_end](@ref gTexture7EEE7C_end) | 0x0A0C54A0
[gTexture7EEED0](@ref gTexture7EEED0) | 0x0A0C54A0
-[gTexture7EEED0_end](@ref gTexture7EEED0_end) | 0x0A0C550C
+[gTexture7EEE7C_end](@ref gTexture7EEE7C_end) | 0x0A0C54A0
[gTexture7EEF3C](@ref gTexture7EEF3C) | 0x0A0C550C
-[gTexture7EEF90](@ref gTexture7EEF90) | 0x0A0C5560
+[gTexture7EEED0_end](@ref gTexture7EEED0_end) | 0x0A0C550C
[gTexture7EEF3C_end](@ref gTexture7EEF3C_end) | 0x0A0C5560
-[gTexture7EEFF4](@ref gTexture7EEFF4) | 0x0A0C55C4
+[gTexture7EEF90](@ref gTexture7EEF90) | 0x0A0C5560
[gTexture7EEF90_end](@ref gTexture7EEF90_end) | 0x0A0C55C4
-[gTexture7EEFF4_end](@ref gTexture7EEFF4_end) | 0x0A0C5628
+[gTexture7EEFF4](@ref gTexture7EEFF4) | 0x0A0C55C4
[gTexture7EF058](@ref gTexture7EF058) | 0x0A0C5628
-[gTexture7EF0B4](@ref gTexture7EF0B4) | 0x0A0C5684
+[gTexture7EEFF4_end](@ref gTexture7EEFF4_end) | 0x0A0C5628
[gTexture7EF058_end](@ref gTexture7EF058_end) | 0x0A0C5684
-[gTexture7EF110](@ref gTexture7EF110) | 0x0A0C56E0
+[gTexture7EF0B4](@ref gTexture7EF0B4) | 0x0A0C5684
[gTexture7EF0B4_end](@ref gTexture7EF0B4_end) | 0x0A0C56E0
+[gTexture7EF110](@ref gTexture7EF110) | 0x0A0C56E0
[gTexture7EF17C](@ref gTexture7EF17C) | 0x0A0C574C
[gTexture7EF110_end](@ref gTexture7EF110_end) | 0x0A0C574C
-[gTexture7EF1F0](@ref gTexture7EF1F0) | 0x0A0C57C0
[gTexture7EF17C_end](@ref gTexture7EF17C_end) | 0x0A0C57C0
-[gTexture7EF250](@ref gTexture7EF250) | 0x0A0C5820
+[gTexture7EF1F0](@ref gTexture7EF1F0) | 0x0A0C57C0
[gTexture7EF1F0_end](@ref gTexture7EF1F0_end) | 0x0A0C5820
-[gTexture7EF250_end](@ref gTexture7EF250_end) | 0x0A0C5888
+[gTexture7EF250](@ref gTexture7EF250) | 0x0A0C5820
[gTexture7EF2B8](@ref gTexture7EF2B8) | 0x0A0C5888
+[gTexture7EF250_end](@ref gTexture7EF250_end) | 0x0A0C5888
[gTexture7EF314](@ref gTexture7EF314) | 0x0A0C58E4
[gTexture7EF2B8_end](@ref gTexture7EF2B8_end) | 0x0A0C58E4
[gTexture7EF388](@ref gTexture7EF388) | 0x0A0C5958
[gTexture7EF314_end](@ref gTexture7EF314_end) | 0x0A0C5958
[gTexture7EF388_end](@ref gTexture7EF388_end) | 0x0A0C59C8
[gTexture7EF3F8](@ref gTexture7EF3F8) | 0x0A0C59C8
-[gTexture7EF3F8_end](@ref gTexture7EF3F8_end) | 0x0A0C5A40
[gTexture7EF470](@ref gTexture7EF470) | 0x0A0C5A40
-[gTexture7EF4E4](@ref gTexture7EF4E4) | 0x0A0C5AB4
+[gTexture7EF3F8_end](@ref gTexture7EF3F8_end) | 0x0A0C5A40
[gTexture7EF470_end](@ref gTexture7EF470_end) | 0x0A0C5AB4
+[gTexture7EF4E4](@ref gTexture7EF4E4) | 0x0A0C5AB4
[gTexture7EF554](@ref gTexture7EF554) | 0x0A0C5B24
[gTexture7EF4E4_end](@ref gTexture7EF4E4_end) | 0x0A0C5B24
-[gTexture7EF554_end](@ref gTexture7EF554_end) | 0x0A0C5B90
[gTexture7EF5C0](@ref gTexture7EF5C0) | 0x0A0C5B90
+[gTexture7EF554_end](@ref gTexture7EF554_end) | 0x0A0C5B90
[gTexture7EF620](@ref gTexture7EF620) | 0x0A0C5BF0
[gTexture7EF5C0_end](@ref gTexture7EF5C0_end) | 0x0A0C5BF0
[gTexture7EF620_end](@ref gTexture7EF620_end) | 0x0A0C5C64
@@ -19258,20 +19258,20 @@ Variable Name | Memory Address
[gTexture7EF77C](@ref gTexture7EF77C) | 0x0A0C5D4C
[gTexture7EF7E8](@ref gTexture7EF7E8) | 0x0A0C5DB8
[gTexture7EF77C_end](@ref gTexture7EF77C_end) | 0x0A0C5DB8
-[gTexture7EF7E8_end](@ref gTexture7EF7E8_end) | 0x0A0C5E2C
[gTexture7EF85C](@ref gTexture7EF85C) | 0x0A0C5E2C
+[gTexture7EF7E8_end](@ref gTexture7EF7E8_end) | 0x0A0C5E2C
[gTexture7EF8C8](@ref gTexture7EF8C8) | 0x0A0C5E98
[gTexture7EF85C_end](@ref gTexture7EF85C_end) | 0x0A0C5E98
[gTexture7EF93C](@ref gTexture7EF93C) | 0x0A0C5F0C
[gTexture7EF8C8_end](@ref gTexture7EF8C8_end) | 0x0A0C5F0C
-[gTexture7EF93C_end](@ref gTexture7EF93C_end) | 0x0A0C5F84
[gTexture7EF9B4](@ref gTexture7EF9B4) | 0x0A0C5F84
-[gTexture7EF9B4_end](@ref gTexture7EF9B4_end) | 0x0A0C5FFC
+[gTexture7EF93C_end](@ref gTexture7EF93C_end) | 0x0A0C5F84
[gTexture7EFA2C](@ref gTexture7EFA2C) | 0x0A0C5FFC
+[gTexture7EF9B4_end](@ref gTexture7EF9B4_end) | 0x0A0C5FFC
[gTexture7EFA2C_end](@ref gTexture7EFA2C_end) | 0x0A0C6078
[gTexture7EFAA8](@ref gTexture7EFAA8) | 0x0A0C6078
-[gTexture7EFB00](@ref gTexture7EFB00) | 0x0A0C60D0
[gTexture7EFAA8_end](@ref gTexture7EFAA8_end) | 0x0A0C60D0
+[gTexture7EFB00](@ref gTexture7EFB00) | 0x0A0C60D0
[gTexture7EFB00_end](@ref gTexture7EFB00_end) | 0x0A0C6134
[gTexture7EFB64](@ref gTexture7EFB64) | 0x0A0C6134
[gTexture7EFB64_end](@ref gTexture7EFB64_end) | 0x0A0C618C
@@ -19282,68 +19282,68 @@ Variable Name | Memory Address
[gTexture7EFCAC](@ref gTexture7EFCAC) | 0x0A0C627C
[gTexture7EFD00](@ref gTexture7EFD00) | 0x0A0C62D0
[gTexture7EFCAC_end](@ref gTexture7EFCAC_end) | 0x0A0C62D0
-[gTexture7EFD00_end](@ref gTexture7EFD00_end) | 0x0A0C6330
[gTexture7EFD60](@ref gTexture7EFD60) | 0x0A0C6330
+[gTexture7EFD00_end](@ref gTexture7EFD00_end) | 0x0A0C6330
[gTexture7EFDD4](@ref gTexture7EFDD4) | 0x0A0C63A4
[gTexture7EFD60_end](@ref gTexture7EFD60_end) | 0x0A0C63A4
[gTexture7EFE48](@ref gTexture7EFE48) | 0x0A0C6418
[gTexture7EFDD4_end](@ref gTexture7EFDD4_end) | 0x0A0C6418
[gTexture7EFE48_end](@ref gTexture7EFE48_end) | 0x0A0C6470
[gTexture7EFEA0](@ref gTexture7EFEA0) | 0x0A0C6470
-[gTexture7EFF2C](@ref gTexture7EFF2C) | 0x0A0C64FC
[gTexture7EFEA0_end](@ref gTexture7EFEA0_end) | 0x0A0C64FC
-[gTexture7EFF90](@ref gTexture7EFF90) | 0x0A0C6560
+[gTexture7EFF2C](@ref gTexture7EFF2C) | 0x0A0C64FC
[gTexture7EFF2C_end](@ref gTexture7EFF2C_end) | 0x0A0C6560
-[gTexture7F0000](@ref gTexture7F0000) | 0x0A0C65D0
+[gTexture7EFF90](@ref gTexture7EFF90) | 0x0A0C6560
[gTexture7EFF90_end](@ref gTexture7EFF90_end) | 0x0A0C65D0
-[gTexture7F0000_end](@ref gTexture7F0000_end) | 0x0A0C663C
+[gTexture7F0000](@ref gTexture7F0000) | 0x0A0C65D0
[gTexture7F006C](@ref gTexture7F006C) | 0x0A0C663C
+[gTexture7F0000_end](@ref gTexture7F0000_end) | 0x0A0C663C
[gTexture7F00D8](@ref gTexture7F00D8) | 0x0A0C66A8
[gTexture7F006C_end](@ref gTexture7F006C_end) | 0x0A0C66A8
[gTexture7F00D8_end](@ref gTexture7F00D8_end) | 0x0A0C6728
[gTexture7F0158](@ref gTexture7F0158) | 0x0A0C6728
[gTexture7F01D0](@ref gTexture7F01D0) | 0x0A0C67A0
[gTexture7F0158_end](@ref gTexture7F0158_end) | 0x0A0C67A0
-[gTexture7F023C](@ref gTexture7F023C) | 0x0A0C680C
[gTexture7F01D0_end](@ref gTexture7F01D0_end) | 0x0A0C680C
-[gTexture7F02B4](@ref gTexture7F02B4) | 0x0A0C6884
+[gTexture7F023C](@ref gTexture7F023C) | 0x0A0C680C
[gTexture7F023C_end](@ref gTexture7F023C_end) | 0x0A0C6884
+[gTexture7F02B4](@ref gTexture7F02B4) | 0x0A0C6884
[gTexture7F02B4_end](@ref gTexture7F02B4_end) | 0x0A0C68FC
[gTexture7F032C](@ref gTexture7F032C) | 0x0A0C68FC
-[gTexture7F0390](@ref gTexture7F0390) | 0x0A0C6960
[gTexture7F032C_end](@ref gTexture7F032C_end) | 0x0A0C6960
+[gTexture7F0390](@ref gTexture7F0390) | 0x0A0C6960
[gTexture7F0404](@ref gTexture7F0404) | 0x0A0C69D4
[gTexture7F0390_end](@ref gTexture7F0390_end) | 0x0A0C69D4
[gTexture7F0470](@ref gTexture7F0470) | 0x0A0C6A40
[gTexture7F0404_end](@ref gTexture7F0404_end) | 0x0A0C6A40
-[gTexture7F04EC](@ref gTexture7F04EC) | 0x0A0C6ABC
[gTexture7F0470_end](@ref gTexture7F0470_end) | 0x0A0C6ABC
-[gTexture7F055C](@ref gTexture7F055C) | 0x0A0C6B2C
+[gTexture7F04EC](@ref gTexture7F04EC) | 0x0A0C6ABC
[gTexture7F04EC_end](@ref gTexture7F04EC_end) | 0x0A0C6B2C
-[gTexture7F055C_end](@ref gTexture7F055C_end) | 0x0A0C6BC0
+[gTexture7F055C](@ref gTexture7F055C) | 0x0A0C6B2C
[gTexture7F05F0](@ref gTexture7F05F0) | 0x0A0C6BC0
+[gTexture7F055C_end](@ref gTexture7F055C_end) | 0x0A0C6BC0
[gTexture7F0670](@ref gTexture7F0670) | 0x0A0C6C40
[gTexture7F05F0_end](@ref gTexture7F05F0_end) | 0x0A0C6C40
-[gTexture7F0670_end](@ref gTexture7F0670_end) | 0x0A0C6CBC
[gTexture7F06EC](@ref gTexture7F06EC) | 0x0A0C6CBC
+[gTexture7F0670_end](@ref gTexture7F0670_end) | 0x0A0C6CBC
[gTexture7F06EC_end](@ref gTexture7F06EC_end) | 0x0A0C6D38
[gTexture7F0768](@ref gTexture7F0768) | 0x0A0C6D38
-[gTexture7F0768_end](@ref gTexture7F0768_end) | 0x0A0C6DB0
[gTexture7F07E0](@ref gTexture7F07E0) | 0x0A0C6DB0
+[gTexture7F0768_end](@ref gTexture7F0768_end) | 0x0A0C6DB0
[gTexture7F07E0_end](@ref gTexture7F07E0_end) | 0x0A0C6E28
[gTexture7F0858](@ref gTexture7F0858) | 0x0A0C6E28
-[gTexture7F0858_end](@ref gTexture7F0858_end) | 0x0A0C6EA8
[gTexture7F08D8](@ref gTexture7F08D8) | 0x0A0C6EA8
+[gTexture7F0858_end](@ref gTexture7F0858_end) | 0x0A0C6EA8
[gTexture7F0948](@ref gTexture7F0948) | 0x0A0C6F18
[gTexture7F08D8_end](@ref gTexture7F08D8_end) | 0x0A0C6F18
-[gTexture7F09D0](@ref gTexture7F09D0) | 0x0A0C6FA0
[gTexture7F0948_end](@ref gTexture7F0948_end) | 0x0A0C6FA0
+[gTexture7F09D0](@ref gTexture7F09D0) | 0x0A0C6FA0
[gTexture7F09D0_end](@ref gTexture7F09D0_end) | 0x0A0C700C
[gTexture7F0A3C](@ref gTexture7F0A3C) | 0x0A0C700C
[gTexture7F0A3C_end](@ref gTexture7F0A3C_end) | 0x0A0C708C
[gTexture7F0ABC](@ref gTexture7F0ABC) | 0x0A0C708C
-[gTexture7F0ABC_end](@ref gTexture7F0ABC_end) | 0x0A0C7104
[gTexture7F0B34](@ref gTexture7F0B34) | 0x0A0C7104
+[gTexture7F0ABC_end](@ref gTexture7F0ABC_end) | 0x0A0C7104
[gTexture7F0B34_end](@ref gTexture7F0B34_end) | 0x0A0C7180
[gTexture7F0BB0](@ref gTexture7F0BB0) | 0x0A0C7180
[gTexture7F0BB0_end](@ref gTexture7F0BB0_end) | 0x0A0C71F4
@@ -19352,24 +19352,24 @@ Variable Name | Memory Address
[gTexture7F0C24_end](@ref gTexture7F0C24_end) | 0x0A0C7264
[gTexture7F0C94_end](@ref gTexture7F0C94_end) | 0x0A0C72DC
[gTexture7F0D0C](@ref gTexture7F0D0C) | 0x0A0C72DC
-[gTexture7F0D0C_end](@ref gTexture7F0D0C_end) | 0x0A0C735C
[gTexture7F0D8C](@ref gTexture7F0D8C) | 0x0A0C735C
-[gTexture7F0DEC](@ref gTexture7F0DEC) | 0x0A0C73BC
+[gTexture7F0D0C_end](@ref gTexture7F0D0C_end) | 0x0A0C735C
[gTexture7F0D8C_end](@ref gTexture7F0D8C_end) | 0x0A0C73BC
+[gTexture7F0DEC](@ref gTexture7F0DEC) | 0x0A0C73BC
[gTexture7F0E5C](@ref gTexture7F0E5C) | 0x0A0C742C
[gTexture7F0DEC_end](@ref gTexture7F0DEC_end) | 0x0A0C742C
-[gTexture7F0E5C_end](@ref gTexture7F0E5C_end) | 0x0A0C74B4
[gTexture7F0EE4](@ref gTexture7F0EE4) | 0x0A0C74B4
-[gTexture7F0F5C](@ref gTexture7F0F5C) | 0x0A0C752C
+[gTexture7F0E5C_end](@ref gTexture7F0E5C_end) | 0x0A0C74B4
[gTexture7F0EE4_end](@ref gTexture7F0EE4_end) | 0x0A0C752C
-[gTexture7F0F5C_end](@ref gTexture7F0F5C_end) | 0x0A0C75A8
+[gTexture7F0F5C](@ref gTexture7F0F5C) | 0x0A0C752C
[gTexture7F0FD8](@ref gTexture7F0FD8) | 0x0A0C75A8
+[gTexture7F0F5C_end](@ref gTexture7F0F5C_end) | 0x0A0C75A8
[gTexture7F0FD8_end](@ref gTexture7F0FD8_end) | 0x0A0C7608
[gTexture7F1038](@ref gTexture7F1038) | 0x0A0C7608
-[gTexture7F109C](@ref gTexture7F109C) | 0x0A0C766C
[gTexture7F1038_end](@ref gTexture7F1038_end) | 0x0A0C766C
-[gTexture7F109C_end](@ref gTexture7F109C_end) | 0x0A0C76F4
+[gTexture7F109C](@ref gTexture7F109C) | 0x0A0C766C
[gTexture7F1124](@ref gTexture7F1124) | 0x0A0C76F4
+[gTexture7F109C_end](@ref gTexture7F109C_end) | 0x0A0C76F4
[gTexture7F11F4](@ref gTexture7F11F4) | 0x0A0C77C4
[gTexture7F12C4](@ref gTexture7F12C4) | 0x0A0C7894
[gTexture7F1394](@ref gTexture7F1394) | 0x0A0C7964
@@ -19607,54 +19607,54 @@ Variable Name | Memory Address
[gTexturePlayerSelect](@ref gTexturePlayerSelect) | 0x0B000000
[gTexturePlayerSelect_end](@ref gTexturePlayerSelect_end) | 0x0B000C00
[gTextureOption](@ref gTextureOption) | 0x0B000C00
-[gTextureNameDK](@ref gTextureNameDK) | 0x0B001500
[gTextureOption_end](@ref gTextureOption_end) | 0x0B001500
-[gTextureNameDK_end](@ref gTextureNameDK_end) | 0x0B001700
+[gTextureNameDK](@ref gTextureNameDK) | 0x0B001500
[gTextureNameToad](@ref gTextureNameToad) | 0x0B001700
+[gTextureNameDK_end](@ref gTextureNameDK_end) | 0x0B001700
[gTextureNameToad_end](@ref gTextureNameToad_end) | 0x0B001900
[gTextureNameBowser](@ref gTextureNameBowser) | 0x0B001900
-[gTextureNameBowser_end](@ref gTextureNameBowser_end) | 0x0B001B00
[gTextureNameLuigi](@ref gTextureNameLuigi) | 0x0B001B00
-[gTextureNameMario](@ref gTextureNameMario) | 0x0B001D00
+[gTextureNameBowser_end](@ref gTextureNameBowser_end) | 0x0B001B00
[gTextureNameLuigi_end](@ref gTextureNameLuigi_end) | 0x0B001D00
-[gTextureNamePeach](@ref gTextureNamePeach) | 0x0B001F00
+[gTextureNameMario](@ref gTextureNameMario) | 0x0B001D00
[gTextureNameMario_end](@ref gTextureNameMario_end) | 0x0B001F00
-[gTextureNameWario](@ref gTextureNameWario) | 0x0B002100
+[gTextureNamePeach](@ref gTextureNamePeach) | 0x0B001F00
[gTextureNamePeach_end](@ref gTextureNamePeach_end) | 0x0B002100
+[gTextureNameWario](@ref gTextureNameWario) | 0x0B002100
[gTextureNameYoshi](@ref gTextureNameYoshi) | 0x0B002300
[gTextureNameWario_end](@ref gTextureNameWario_end) | 0x0B002300
-[gTextureNameYoshi_end](@ref gTextureNameYoshi_end) | 0x0B002500
[gTextureTitleMarioRaceway](@ref gTextureTitleMarioRaceway) | 0x0B002500
+[gTextureNameYoshi_end](@ref gTextureNameYoshi_end) | 0x0B002500
[gTextureTitleChocoMountain](@ref gTextureTitleChocoMountain) | 0x0B002A00
[gTextureTitleMarioRaceway_end](@ref gTextureTitleMarioRaceway_end) | 0x0B002A00
-[gTextureTitleChocoMountain_end](@ref gTextureTitleChocoMountain_end) | 0x0B002F00
[gTextureTitleBowsersCastle](@ref gTextureTitleBowsersCastle) | 0x0B002F00
+[gTextureTitleChocoMountain_end](@ref gTextureTitleChocoMountain_end) | 0x0B002F00
[gTextureTitleBowsersCastle_end](@ref gTextureTitleBowsersCastle_end) | 0x0B003400
[gTextureTitleBansheeBoardwalk](@ref gTextureTitleBansheeBoardwalk) | 0x0B003400
-[gTextureTitleBansheeBoardwalk_end](@ref gTextureTitleBansheeBoardwalk_end) | 0x0B003A00
[gTextureTitleYoshiValley](@ref gTextureTitleYoshiValley) | 0x0B003A00
+[gTextureTitleBansheeBoardwalk_end](@ref gTextureTitleBansheeBoardwalk_end) | 0x0B003A00
[gTextureTitleYoshiValley_end](@ref gTextureTitleYoshiValley_end) | 0x0B003E00
[gTextureTitleFrappeSnowland](@ref gTextureTitleFrappeSnowland) | 0x0B003E00
-[gTextureTitleKoopaTroopaBeach](@ref gTextureTitleKoopaTroopaBeach) | 0x0B004300
[gTextureTitleFrappeSnowland_end](@ref gTextureTitleFrappeSnowland_end) | 0x0B004300
+[gTextureTitleKoopaTroopaBeach](@ref gTextureTitleKoopaTroopaBeach) | 0x0B004300
[gTextureTitleKoopaTroopaBeach_end](@ref gTextureTitleKoopaTroopaBeach_end) | 0x0B004800
[gTextureTitleRoyalRaceway](@ref gTextureTitleRoyalRaceway) | 0x0B004800
[gTextureTitleRoyalRaceway_end](@ref gTextureTitleRoyalRaceway_end) | 0x0B004C00
[gTextureTitleLuigiRaceway](@ref gTextureTitleLuigiRaceway) | 0x0B004C00
[gTextureTitleMooMooFarm](@ref gTextureTitleMooMooFarm) | 0x0B005000
[gTextureTitleLuigiRaceway_end](@ref gTextureTitleLuigiRaceway_end) | 0x0B005000
-[gTextureTitleMooMooFarm_end](@ref gTextureTitleMooMooFarm_end) | 0x0B005400
[gTextureTitleToadsTurnpike](@ref gTextureTitleToadsTurnpike) | 0x0B005400
-[gTextureTitleKalimariDesert](@ref gTextureTitleKalimariDesert) | 0x0B005900
+[gTextureTitleMooMooFarm_end](@ref gTextureTitleMooMooFarm_end) | 0x0B005400
[gTextureTitleToadsTurnpike_end](@ref gTextureTitleToadsTurnpike_end) | 0x0B005900
-[gTextureTitleKalimariDesert_end](@ref gTextureTitleKalimariDesert_end) | 0x0B005D00
+[gTextureTitleKalimariDesert](@ref gTextureTitleKalimariDesert) | 0x0B005900
[gTextureTitleSherbetLand](@ref gTextureTitleSherbetLand) | 0x0B005D00
-[gTextureTitleSherbetLand_end](@ref gTextureTitleSherbetLand_end) | 0x0B006100
+[gTextureTitleKalimariDesert_end](@ref gTextureTitleKalimariDesert_end) | 0x0B005D00
[gTextureTitleRainbowRoad](@ref gTextureTitleRainbowRoad) | 0x0B006100
+[gTextureTitleSherbetLand_end](@ref gTextureTitleSherbetLand_end) | 0x0B006100
[gTextureTitleWarioStadium](@ref gTextureTitleWarioStadium) | 0x0B006500
[gTextureTitleRainbowRoad_end](@ref gTextureTitleRainbowRoad_end) | 0x0B006500
-[gTextureTitleWarioStadium_end](@ref gTextureTitleWarioStadium_end) | 0x0B006A00
[gTextureTitleBlockFort](@ref gTextureTitleBlockFort) | 0x0B006A00
+[gTextureTitleWarioStadium_end](@ref gTextureTitleWarioStadium_end) | 0x0B006A00
[gTextureTitleBlockFort_end](@ref gTextureTitleBlockFort_end) | 0x0B006D00
[gTextureTitleSkyscraper](@ref gTextureTitleSkyscraper) | 0x0B006D00
[gTextureTitleDoubleDeck](@ref gTextureTitleDoubleDeck) | 0x0B007100
@@ -19669,22 +19669,22 @@ Variable Name | Memory Address
[gTextureMapSelect_end](@ref gTextureMapSelect_end) | 0x0B008A00
[gTextureMenuMushroomCup](@ref gTextureMenuMushroomCup) | 0x0B008E00
[gTextureMenuFlowerCup_end](@ref gTextureMenuFlowerCup_end) | 0x0B008E00
-[gTextureMenuMushroomCup_end](@ref gTextureMenuMushroomCup_end) | 0x0B009200
[gTextureMenuStarCup](@ref gTextureMenuStarCup) | 0x0B009200
+[gTextureMenuMushroomCup_end](@ref gTextureMenuMushroomCup_end) | 0x0B009200
[gTextureMenuSpecialCup](@ref gTextureMenuSpecialCup) | 0x0B009600
[gTextureMenuStarCup_end](@ref gTextureMenuStarCup_end) | 0x0B009600
[gTextureGameSelect](@ref gTextureGameSelect) | 0x0B009A00
[gTextureMenuSpecialCup_end](@ref gTextureMenuSpecialCup_end) | 0x0B009A00
-[gTextureMenu1PGame](@ref gTextureMenu1PGame) | 0x0B00A600
[gTextureGameSelect_end](@ref gTextureGameSelect_end) | 0x0B00A600
-[gTextureMenu1PGame_end](@ref gTextureMenu1PGame_end) | 0x0B00AB00
+[gTextureMenu1PGame](@ref gTextureMenu1PGame) | 0x0B00A600
[gTextureMenu2PGame](@ref gTextureMenu2PGame) | 0x0B00AB00
-[gTextureMenu3PGame](@ref gTextureMenu3PGame) | 0x0B00B200
+[gTextureMenu1PGame_end](@ref gTextureMenu1PGame_end) | 0x0B00AB00
[gTextureMenu2PGame_end](@ref gTextureMenu2PGame_end) | 0x0B00B200
-[gTextureMenu4PGame](@ref gTextureMenu4PGame) | 0x0B00BC00
+[gTextureMenu3PGame](@ref gTextureMenu3PGame) | 0x0B00B200
[gTextureMenu3PGame_end](@ref gTextureMenu3PGame_end) | 0x0B00BC00
-[gTextureMenu4PGame_end](@ref gTextureMenu4PGame_end) | 0x0B00C700
+[gTextureMenu4PGame](@ref gTextureMenu4PGame) | 0x0B00BC00
[gTextureMenuModeBattle](@ref gTextureMenuModeBattle) | 0x0B00C700
+[gTextureMenu4PGame_end](@ref gTextureMenu4PGame_end) | 0x0B00C700
[gTextureMenuModeTimeTrials](@ref gTextureMenuModeTimeTrials) | 0x0B00CA00
[gTextureMenuModeBattle_end](@ref gTextureMenuModeBattle_end) | 0x0B00CA00
[gTextureMenuModeMarioGP](@ref gTextureMenuModeMarioGP) | 0x0B00CE00
@@ -19695,36 +19695,36 @@ Variable Name | Memory Address
[gTextureMenuModeVS_end](@ref gTextureMenuModeVS_end) | 0x0B00D500
[gTextureMenuLOption_end](@ref gTextureMenuLOption_end) | 0x0B00D800
[gTextureMenuRData](@ref gTextureMenuRData) | 0x0B00D800
-[gTextureMenuRData_end](@ref gTextureMenuRData_end) | 0x0B00DB00
[gTextureMenu50cc](@ref gTextureMenu50cc) | 0x0B00DB00
-[gTextureMenu50cc_end](@ref gTextureMenu50cc_end) | 0x0B00DD00
+[gTextureMenuRData_end](@ref gTextureMenuRData_end) | 0x0B00DB00
[gTextureMenu100cc](@ref gTextureMenu100cc) | 0x0B00DD00
-[gTextureMenu150cc](@ref gTextureMenu150cc) | 0x0B00DF00
+[gTextureMenu50cc_end](@ref gTextureMenu50cc_end) | 0x0B00DD00
[gTextureMenu100cc_end](@ref gTextureMenu100cc_end) | 0x0B00DF00
+[gTextureMenu150cc](@ref gTextureMenu150cc) | 0x0B00DF00
[gTextureMenuExtra](@ref gTextureMenuExtra) | 0x0B00E100
[gTextureMenu150cc_end](@ref gTextureMenu150cc_end) | 0x0B00E100
[gTextureMenuWithoutItem](@ref gTextureMenuWithoutItem) | 0x0B00E300
[gTextureMenuExtra_end](@ref gTextureMenuExtra_end) | 0x0B00E300
[gTextureMenuWithoutItem_end](@ref gTextureMenuWithoutItem_end) | 0x0B00E600
[gTextureMenuWithItem](@ref gTextureMenuWithItem) | 0x0B00E600
-[gTextureMenuWithItem_end](@ref gTextureMenuWithItem_end) | 0x0B00E900
[gTextureMenuBegin](@ref gTextureMenuBegin) | 0x0B00E900
+[gTextureMenuWithItem_end](@ref gTextureMenuWithItem_end) | 0x0B00E900
[gTextureMenuGhost](@ref gTextureMenuGhost) | 0x0B00EB00
[gTextureMenuBegin_end](@ref gTextureMenuBegin_end) | 0x0B00EB00
[gTextureMenuData](@ref gTextureMenuData) | 0x0B00ED00
[gTextureMenuGhost_end](@ref gTextureMenuGhost_end) | 0x0B00ED00
[gTextureMenuData_end](@ref gTextureMenuData_end) | 0x0B00EF00
[gTextureMenuOK](@ref gTextureMenuOK) | 0x0B00EF00
-[gTextureBackgroundBlueSky](@ref gTextureBackgroundBlueSky) | 0x0B00F100
[gTextureMenuOK_end](@ref gTextureMenuOK_end) | 0x0B00F100
+[gTextureBackgroundBlueSky](@ref gTextureBackgroundBlueSky) | 0x0B00F100
[gTextureBackgroundBlueSky_end](@ref gTextureBackgroundBlueSky_end) | 0x0B01BF00
[gTextureBackgroundSunset](@ref gTextureBackgroundSunset) | 0x0B01BF00
-[gTextureGreenGoldStripe](@ref gTextureGreenGoldStripe) | 0x0B025300
[gTextureBackgroundSunset_end](@ref gTextureBackgroundSunset_end) | 0x0B025300
-[gTextureGoldStripe](@ref gTextureGoldStripe) | 0x0B025F00
+[gTextureGreenGoldStripe](@ref gTextureGreenGoldStripe) | 0x0B025300
[gTextureGreenGoldStripe_end](@ref gTextureGreenGoldStripe_end) | 0x0B025F00
-[gTextureWhiteStripe](@ref gTextureWhiteStripe) | 0x0B026600
+[gTextureGoldStripe](@ref gTextureGoldStripe) | 0x0B025F00
[gTextureGoldStripe_end](@ref gTextureGoldStripe_end) | 0x0B026600
+[gTextureWhiteStripe](@ref gTextureWhiteStripe) | 0x0B026600
[gTexturePinkBar](@ref gTexturePinkBar) | 0x0B026700
[gTextureWhiteStripe_end](@ref gTextureWhiteStripe_end) | 0x0B026700
[gTexturePinkBar_end](@ref gTexturePinkBar_end) | 0x0B026C00
@@ -19819,64 +19819,64 @@ Variable Name | Memory Address
[d_course_big_donut_packed](@ref d_course_big_donut_packed) | 0x0F001B84
[music_sequence_table_header](@ref music_sequence_table_header) | 0x0025FD00
[music_sequence_table](@ref music_sequence_table) | 0x0025FD04
-[music_sequence_table_end](@ref music_sequence_table_end) | 0x0025FE00
[seq_00](@ref seq_00) | 0x0025FE00
+[music_sequence_table_end](@ref music_sequence_table_end) | 0x0025FE00
[seq_01](@ref seq_01) | 0x00262630
[seq_00_end](@ref seq_00_end) | 0x00262630
-[seq_02](@ref seq_02) | 0x00264160
[seq_01_end](@ref seq_01_end) | 0x00264160
+[seq_02](@ref seq_02) | 0x00264160
[seq_02_end](@ref seq_02_end) | 0x00264EC0
[seq_03](@ref seq_03) | 0x00264EC0
[seq_03_end](@ref seq_03_end) | 0x002668D0
[seq_04](@ref seq_04) | 0x002668D0
-[seq_04_end](@ref seq_04_end) | 0x00268570
[seq_05](@ref seq_05) | 0x00268570
+[seq_04_end](@ref seq_04_end) | 0x00268570
[seq_05_end](@ref seq_05_end) | 0x0026A4E0
[seq_06](@ref seq_06) | 0x0026A4E0
-[seq_06_end](@ref seq_06_end) | 0x0026C3C0
[seq_07](@ref seq_07) | 0x0026C3C0
+[seq_06_end](@ref seq_06_end) | 0x0026C3C0
[seq_07_end](@ref seq_07_end) | 0x0026DA90
[seq_08](@ref seq_08) | 0x0026DA90
-[seq_08_end](@ref seq_08_end) | 0x0026FE60
[seq_09](@ref seq_09) | 0x0026FE60
+[seq_08_end](@ref seq_08_end) | 0x0026FE60
[seq_09_end](@ref seq_09_end) | 0x00271660
[seq_0A](@ref seq_0A) | 0x00271660
[seq_0B](@ref seq_0B) | 0x00273140
[seq_0A_end](@ref seq_0A_end) | 0x00273140
[seq_0C](@ref seq_0C) | 0x00273730
[seq_0B_end](@ref seq_0B_end) | 0x00273730
-[seq_0D](@ref seq_0D) | 0x00273B00
[seq_0C_end](@ref seq_0C_end) | 0x00273B00
-[seq_0D_end](@ref seq_0D_end) | 0x00273E60
+[seq_0D](@ref seq_0D) | 0x00273B00
[seq_0E](@ref seq_0E) | 0x00273E60
+[seq_0D_end](@ref seq_0D_end) | 0x00273E60
[seq_0E_end](@ref seq_0E_end) | 0x00274140
[seq_0F](@ref seq_0F) | 0x00274140
[seq_0F_end](@ref seq_0F_end) | 0x00274600
[seq_10](@ref seq_10) | 0x00274600
[seq_10_end](@ref seq_10_end) | 0x00275A10
[seq_11](@ref seq_11) | 0x00275A10
-[seq_11_end](@ref seq_11_end) | 0x002760F0
[seq_12](@ref seq_12) | 0x002760F0
-[seq_13](@ref seq_13) | 0x002793E0
+[seq_11_end](@ref seq_11_end) | 0x002760F0
[seq_12_end](@ref seq_12_end) | 0x002793E0
+[seq_13](@ref seq_13) | 0x002793E0
[seq_14](@ref seq_14) | 0x00279AA0
[seq_13_end](@ref seq_13_end) | 0x00279AA0
[seq_15](@ref seq_15) | 0x00279F50
[seq_14_end](@ref seq_14_end) | 0x00279F50
-[seq_15_end](@ref seq_15_end) | 0x0027B0B0
[seq_16](@ref seq_16) | 0x0027B0B0
-[seq_17](@ref seq_17) | 0x0027B3C0
+[seq_15_end](@ref seq_15_end) | 0x0027B0B0
[seq_16_end](@ref seq_16_end) | 0x0027B3C0
+[seq_17](@ref seq_17) | 0x0027B3C0
[seq_17_end](@ref seq_17_end) | 0x0027C670
[seq_18](@ref seq_18) | 0x0027C670
[seq_19](@ref seq_19) | 0x0027CC70
[seq_18_end](@ref seq_18_end) | 0x0027CC70
-[seq_1A](@ref seq_1A) | 0x0027E350
[seq_19_end](@ref seq_19_end) | 0x0027E350
-[seq_1A_end](@ref seq_1A_end) | 0x0027EE20
+[seq_1A](@ref seq_1A) | 0x0027E350
[seq_1B](@ref seq_1B) | 0x0027EE20
-[seq_1B_end](@ref seq_1B_end) | 0x0027FAA0
+[seq_1A_end](@ref seq_1A_end) | 0x0027EE20
[seq_1C](@ref seq_1C) | 0x0027FAA0
+[seq_1B_end](@ref seq_1B_end) | 0x0027FAA0
[seq_1D](@ref seq_1D) | 0x002821F0
[seq_1C_end](@ref seq_1C_end) | 0x002821F0
[seq_1D_end](@ref seq_1D_end) | 0x00282E70
diff --git a/tools/ido-recomp/linux/acpp b/tools/ido-recomp/linux/acpp
new file mode 100755
index 000000000..4a6dc6d01
Binary files /dev/null and b/tools/ido-recomp/linux/acpp differ
diff --git a/tools/ido-recomp/linux/as0 b/tools/ido-recomp/linux/as0
new file mode 100755
index 000000000..95d53d805
Binary files /dev/null and b/tools/ido-recomp/linux/as0 differ
diff --git a/tools/ido-recomp/linux/as1 b/tools/ido-recomp/linux/as1
new file mode 100755
index 000000000..c337e343e
Binary files /dev/null and b/tools/ido-recomp/linux/as1 differ
diff --git a/tools/ido-recomp/linux/c++filt b/tools/ido-recomp/linux/c++filt
new file mode 100755
index 000000000..65c63d5b0
Binary files /dev/null and b/tools/ido-recomp/linux/c++filt differ
diff --git a/tools/ido-recomp/linux/cc b/tools/ido-recomp/linux/cc
new file mode 100755
index 000000000..711a8bc74
Binary files /dev/null and b/tools/ido-recomp/linux/cc differ
diff --git a/tools/ido-recomp/linux/cfe b/tools/ido-recomp/linux/cfe
new file mode 100755
index 000000000..015da1ab8
Binary files /dev/null and b/tools/ido-recomp/linux/cfe differ
diff --git a/tools/ido-recomp/linux/copt b/tools/ido-recomp/linux/copt
new file mode 100755
index 000000000..b0d4dd936
Binary files /dev/null and b/tools/ido-recomp/linux/copt differ
diff --git a/tools/ido5.3_compiler/usr/lib/crt1.o b/tools/ido-recomp/linux/crt1.o
similarity index 100%
rename from tools/ido5.3_compiler/usr/lib/crt1.o
rename to tools/ido-recomp/linux/crt1.o
diff --git a/tools/ido-recomp/linux/crtn.o b/tools/ido-recomp/linux/crtn.o
new file mode 100644
index 000000000..4c064d763
Binary files /dev/null and b/tools/ido-recomp/linux/crtn.o differ
diff --git a/tools/ido5.3_compiler/usr/lib/err.english.cc b/tools/ido-recomp/linux/err.english.cc
similarity index 100%
rename from tools/ido5.3_compiler/usr/lib/err.english.cc
rename to tools/ido-recomp/linux/err.english.cc
diff --git a/tools/ido-recomp/linux/ld b/tools/ido-recomp/linux/ld
new file mode 100755
index 000000000..4671f0724
Binary files /dev/null and b/tools/ido-recomp/linux/ld differ
diff --git a/tools/ido5.3_compiler/usr/lib/libc.so.1 b/tools/ido-recomp/linux/libc.so
similarity index 100%
rename from tools/ido5.3_compiler/usr/lib/libc.so.1
rename to tools/ido-recomp/linux/libc.so
diff --git a/tools/ido-recomp/linux/libc.so.1 b/tools/ido-recomp/linux/libc.so.1
new file mode 100644
index 000000000..17495ef6c
Binary files /dev/null and b/tools/ido-recomp/linux/libc.so.1 differ
diff --git a/tools/ido5.3_compiler/usr/lib/libexc.so b/tools/ido-recomp/linux/libexc.so
similarity index 100%
rename from tools/ido5.3_compiler/usr/lib/libexc.so
rename to tools/ido-recomp/linux/libexc.so
diff --git a/tools/ido5.3_compiler/usr/lib/libgen.so b/tools/ido-recomp/linux/libgen.so
similarity index 100%
rename from tools/ido5.3_compiler/usr/lib/libgen.so
rename to tools/ido-recomp/linux/libgen.so
diff --git a/tools/ido5.3_compiler/usr/lib/libm.so b/tools/ido-recomp/linux/libm.so
similarity index 100%
rename from tools/ido5.3_compiler/usr/lib/libm.so
rename to tools/ido-recomp/linux/libm.so
diff --git a/tools/ido-recomp/linux/strip b/tools/ido-recomp/linux/strip
new file mode 100755
index 000000000..7c69878b4
Binary files /dev/null and b/tools/ido-recomp/linux/strip differ
diff --git a/tools/ido-recomp/linux/ugen b/tools/ido-recomp/linux/ugen
new file mode 100755
index 000000000..1251ffd51
Binary files /dev/null and b/tools/ido-recomp/linux/ugen differ
diff --git a/tools/ido-recomp/linux/ujoin b/tools/ido-recomp/linux/ujoin
new file mode 100755
index 000000000..8984b5b08
Binary files /dev/null and b/tools/ido-recomp/linux/ujoin differ
diff --git a/tools/ido-recomp/linux/uld b/tools/ido-recomp/linux/uld
new file mode 100755
index 000000000..6f2e7ce6a
Binary files /dev/null and b/tools/ido-recomp/linux/uld differ
diff --git a/tools/ido-recomp/linux/umerge b/tools/ido-recomp/linux/umerge
new file mode 100755
index 000000000..e83f78c87
Binary files /dev/null and b/tools/ido-recomp/linux/umerge differ
diff --git a/tools/ido-recomp/linux/uopt b/tools/ido-recomp/linux/uopt
new file mode 100755
index 000000000..55dc556f1
Binary files /dev/null and b/tools/ido-recomp/linux/uopt differ
diff --git a/tools/ido-recomp/linux/upas b/tools/ido-recomp/linux/upas
new file mode 100755
index 000000000..912e7b477
Binary files /dev/null and b/tools/ido-recomp/linux/upas differ
diff --git a/tools/ido-recomp/linux/usplit b/tools/ido-recomp/linux/usplit
new file mode 100755
index 000000000..9c712e5ef
Binary files /dev/null and b/tools/ido-recomp/linux/usplit differ
diff --git a/tools/ido-recomp/macos/acpp b/tools/ido-recomp/macos/acpp
new file mode 100644
index 000000000..ed55a7d1b
Binary files /dev/null and b/tools/ido-recomp/macos/acpp differ
diff --git a/tools/ido-recomp/macos/as0 b/tools/ido-recomp/macos/as0
new file mode 100644
index 000000000..739ede252
Binary files /dev/null and b/tools/ido-recomp/macos/as0 differ
diff --git a/tools/ido-recomp/macos/as1 b/tools/ido-recomp/macos/as1
new file mode 100644
index 000000000..9eee3aa23
Binary files /dev/null and b/tools/ido-recomp/macos/as1 differ
diff --git a/tools/ido-recomp/macos/c++filt b/tools/ido-recomp/macos/c++filt
new file mode 100644
index 000000000..fb993836b
Binary files /dev/null and b/tools/ido-recomp/macos/c++filt differ
diff --git a/tools/ido-recomp/macos/cc b/tools/ido-recomp/macos/cc
new file mode 100644
index 000000000..3f2e2853d
Binary files /dev/null and b/tools/ido-recomp/macos/cc differ
diff --git a/tools/ido-recomp/macos/cfe b/tools/ido-recomp/macos/cfe
new file mode 100644
index 000000000..36a1e886c
Binary files /dev/null and b/tools/ido-recomp/macos/cfe differ
diff --git a/tools/ido-recomp/macos/copt b/tools/ido-recomp/macos/copt
new file mode 100644
index 000000000..33a2ba8dc
Binary files /dev/null and b/tools/ido-recomp/macos/copt differ
diff --git a/tools/ido-recomp/macos/crt1.o b/tools/ido-recomp/macos/crt1.o
new file mode 100644
index 000000000..3052ae273
Binary files /dev/null and b/tools/ido-recomp/macos/crt1.o differ
diff --git a/tools/ido-recomp/macos/crtn.o b/tools/ido-recomp/macos/crtn.o
new file mode 100644
index 000000000..4c064d763
Binary files /dev/null and b/tools/ido-recomp/macos/crtn.o differ
diff --git a/tools/ido-recomp/macos/err.english.cc b/tools/ido-recomp/macos/err.english.cc
new file mode 100644
index 000000000..6976e38a9
--- /dev/null
+++ b/tools/ido-recomp/macos/err.english.cc
@@ -0,0 +1,1260 @@
+@
+ 358 358 358
+ 6464 6482 6553
+ 6553 6593 6728
+ 6728 6746 6803
+ 6803 6808 6808
+ 6808 6818 6818
+ 6818 6826 6826
+ 6826 6847 6847
+ 6847 6875 6922
+ 6922 6930 6930
+ 6930 6939 6939
+ 6939 6948 6948
+ 6948 6974 7120
+ 7120 7149 7204
+ 7210 7248 7311
+ 7317 7350 7442
+ 7450 7497 7627
+ 7635 7709 7930
+ 7938 7975 8063
+ 8071 8113 8253
+ 8261 8289 8289
+ 8298 8338 8445
+ 8460 8502 8635
+ 8650 8690 8819
+ 8834 8857 8965
+ 8965 9008 9113
+ 9119 9142 9227
+ 9235 9282 9451
+ 9451 9462 9462
+ 9462 9477 9477
+ 9477 9497 9497
+ 9497 9545 9545
+ 9545 9584 9584
+ 9584 9604 9662
+ 9662 9682 9720
+ 9720 9749 9749
+ 9749 9788 9788
+ 9788 9802 9802
+ 9802 9829 9829
+ 9829 9861 9861
+ 9861 9904 9904
+ 9904 9920 9920
+ 9920 9962 9962
+ 9962 9988 9988
+ 9988 10014 10014
+10014 10035 10035
+10035 10054 10097
+10097 10115 10115
+10115 10147 10147
+10147 10183 10183
+10183 10208 10208
+10208 10236 10236
+10236 10269 10269
+10269 10304 10304
+10304 10328 10328
+10328 10351 10351
+10351 10371 10371
+10371 10402 10402
+10402 10447 10447
+10447 10497 10497
+10497 10533 10533
+10533 10598 10598
+10606 10630 10630
+10640 10671 10671
+10690 10719 10719
+10728 10752 10795
+10795 10837 10837
+10837 10876 10876
+10876 10900 10900
+10900 10948 10948
+10960 11021 11103
+11103 11128 11128
+11128 11153 11153
+11153 11216 11216
+11216 11239 11239
+11239 11303 11303
+11303 11347 11347
+11357 11393 11393
+11393 11432 11432
+11442 11494 11494
+11494 11536 11536
+11536 11595 11595
+11595 11622 11622
+11622 11684 11684
+11684 11726 11726
+11738 11778 11778
+11782 11813 11813
+11813 11850 11850
+11850 11900 12087
+12111 12120 12120
+12120 12129 12129
+12129 12158 12158
+12158 12192 12192
+12192 12237 12237
+12237 12273 12273
+12273 12326 12326
+12330 12366 12366
+12366 12423 12423
+12427 12482 12482
+12486 12560 12560
+12568 12631 12631
+12637 12691 12691
+12691 12743 12743
+12743 12785 12785
+12785 12826 12826
+12826 12865 12865
+12865 12883 12883
+12883 12946 12946
+12956 12995 12995
+13005 13066 13066
+13077 13163 13163
+13163 13211 13211
+13211 13270 13270
+13270 13318 13318
+13318 13350 13350
+13350 13387 13387
+13387 13428 13428
+13428 13464 13533
+13533 13580 13737
+13737 13776 13854
+13854 13913 13913
+13913 13950 13950
+13950 14118 14118
+14118 14150 14150
+14150 14163 14194
+14194 14224 14255
+14255 14275 14319
+14319 14353 14458
+14466 14484 14530
+14534 14567 14567
+14567 14635 14682
+14690 14742 14742
+14742 14789 14789
+14801 14875 14875
+14886 14947 14947
+14947 14992 14992
+14992 15035 15085
+15085 15134 15205
+15214 15267 15448
+15454 15496 16810
+16822 16875 16960
+16972 17053 17179
+17191 17236 17332
+17344 17491 17841
+17853 17939 18304
+18316 18471 18774
+18786 18952 19323
+19335 19364 19496
+19500 19527 19598
+19598 19613 19776
+19797 19808 19837
+19837 19862 19862
+19868 19927 20026
+20034 20075 20179
+20187 20223 20223
+20223 20290 20382
+20392 20441 20589
+20601 20656 20656
+20656 20699 20818
+20826 20860 21038
+21046 21094 21191
+21203 21236 21314
+21326 21395 21457
+21469 21502 21502
+21502 21587 21731
+21756 21789 21864
+21875 21901 21976
+22013 22059 22220
+22257 22397 22561
+22561 22595 22595
+22603 22623 22623
+22631 22667 22828
+22865 22919 22994
+23031 23059 23120
+23132 23201 23201
+23212 23274 23274
+23285 23345 23345
+23356 23393 23393
+23399 23431 23532
+23542 23587 23646
+23656 23697 23745
+23755 23796 23844
+23854 23876 23928
+23942 23971 24153
+24160 24243 24243
+24247 24273 24743
+24755 24784 24984
+24996 25034 25034
+25034 25075 25273
+25281 25332 25410
+25420 25467 25544
+25554 25583 25744
+25754 25783 26061
+26071 26111 26185
+26194 26239 26525
+26535 26568 26914
+26924 26951 26998
+27008 27035 27082
+27093 27120 27167
+27178 27206 27251
+27261 27289 27334
+27345 27391 27931
+27938 27959 28007
+28019 28037 28037
+28043 28069 28069
+28077 28147 28199
+28207 28266 28266
+28274 28306 28306
+28314 28339 28339
+28347 28404 28510
+28518 28567 28682
+28690 28728 28728
+28736 28782 29023
+29033 29085 29234
+29246 29303 29383
+29395 29432 29570
+29592 29631 29644
+29644 29693 29758
+29767 29810 29875
+29875 29911 29976
+29984 30014 30014
+30027 30086 30151
+30157 30223 30293
+30301 30369 30445
+30457 30511 30568
+30580 30630 30743
+30755 30812 30874
+30886 30959 31035
+31043 31076 31175
+31183 31243 31243
+31251 31323 31323
+31331 31433 31433
+31445 31544 31686
+31698 31740 31740
+31740 31783 31783
+31783 31824 31824
+31824 31873 31996
+32008 32056 32164
+32176 32210 32210
+32229 32271 32271
+32279 32323 32569
+32581 32642 32718
+32739 32779 32916
+32926 32953 33047
+33057 33116 33315
+33325 33373 33373
+33373 33407 33469
+33494 33527 33527
+33536 33573 33573
+33584 33650 33697
+33705 33763 33763
+33763 33797 33797
+33797 33829 33906
+33915 33976 33976
+33985 34016 34098
+34098 34133 34198
+34198 34261 34261
+34269 34312 34312
+34324 34363 34438
+34444 34530 34530
+34538 34596 34626
+34636 34675 34754
+34764 34821 34821
+34821 34867 34950
+34959 35016 35135
+35145 35198 35198
+35208 35266 35344
+35355 35382 35537
+35547 35576 35629
+35637 35705 35705
+35713 35764 35764
+35764 35784 35876
+35888 35932 35950
+35950 36013 36138
+36150 36191 36280
+36286 36314 36419
+36431 36516 36516
+36516 36554 36642
+36642 36689 36808
+36818 36881 37105
+37113 37183 37204
+37204 37225 37225
+37225 37255 37348
+37348 37388 37388
+37388 37454 37454
+37454 37518 37518
+37518 37584 37584
+37584 37717 37717
+37717 37752 37752
+37752 37783 37889
+37901 37928 38034
+38046 38115 38115
+38115 38140 38187
+38195 38219 38339
+38351 38422 38422
+38422 38486 38486
+38486 38555 38555
+38555 38619 38619
+38619 38641 38641
+38641 38758 38758
+38758 38929 38929
+38929 38975 39043
+39055 39084 39133
+39133 39175 39265
+39275 39310 39494
+39504 39547 39576
+39587 39614 39668
+39674 39697 39797
+39797 39845 40094
+40094 40158 40264
+40264 40369 40523
+40523 40593 40593
+40593 40629 40876
+40876 40911 40971
+40977 41026 41026
+41038 41077 41077
+41077 41116 41116
+41116 41156 41156
+41156 41195 41195
+41195 41237 41237
+41237 41285 41285
+41285 41304 41304
+41304 41371 41371
+41371 41429 41429
+41429 41491 41491
+41491 41519 41519
+41519 41572 41572
+41572 41642 41642
+41642 41676 41676
+41676 41713 41713
+41713 41751 41751
+41751 41792 41792
+41792 41856 41856
+41856 41881 41881
+41881 41936 41936
+41936 41977 41977
+41977 42018 42018
+42018 42090 42090
+42090 42162 42162
+42162 42205 42205
+42205 42267 42267
+42267 42294 42294
+42294 42309 42309
+42309 42338 42386
+42393 42425 42522
+42530 42577 42577
+42577 42623 42623
+42623 42643 42725
+42725 42748 42748
+42748 42829 42897
+42901 42952 42952
+42952 42978 43025
+43025 43116 43116
+43116 43171 43171
+43171 43204 43376
+43386 43453 43471
+43471 43547 43780
+43798 43921 44116
+44120 44120 44120
+Out of memory: %s
+There is no more memory left in the system for compiling this program.
+Internal Error Unknown Error Message %s
+1) An internal error, while attempting to print an unavailable message
+2) The error message file is inaccessible or has other problems
+Unknown Signal %s
+1) An unknown signal has been caught
+2) 2 Nested signals
+line
+Warning:
+Fatal:
+Source not available
+Too many errors... goodbye.
+There is a limit of 30 errors before aborting.
+Error:
+reserved
+reserved
+Unknown Control Statement
+1) The line begins with a '#' and is not of the form:
+ # ""
+2) Please compile this program with the preprocessor enabled.
+Unknown character %s ignored
+The character is not part of the source character set.
+2.2.1
+Unknown control character \%s ignored
+The control character is not part of the source character set.
+2.2.1
+Illegal character %s in exponent
+1) Digits or sign expected after 'e' or 'E'.
+2) Digits are expected after sign in exponent.
+3.1.3.1
+Constant is out of range and may be truncated.
+The constant is too large to be accurately represented and may be
+truncated. The limits are in the system include file limits.h.
+2.2.4.2
+Constant is out of range for a 32-bit data type, but accepted as written.
+The constant is too large to fit in a 32-bit data type, but will be
+accurately represented in a wider data type. The value may be truncated,
+depending on its context. The limits are in the system include file
+limits.h.
+2.2.4.2
+Character constant size out of range
+1) No characters in a character constant.
+2) More than 4 bytes in a character constant.
+3.1.3.4
+Wide character constant size out of range
+1) No characters in the multibyte sequence (0 assumed).
+2) More than 1 byte in the multi-byte sequence (only the first byte was converted).
+3.1.3.4
+Invalid multibyte character
+4.10.7.2
+Newline in string or character constant
+1) Terminate your string or character constant with closing quotes.
+2) Put a backslash before the newline.
+3.1.3.4, 3.1.4
+Octal character escape too large: %s > %s
+1) Terminate end of octal sequence with a non-octal character.
+2) Select a character value within the limits.
+Value may be truncated
+3.1.3.4, 3.1.4
+Hex character escape too large: %s > %s
+1) Terminate end of hex sequence with a non-hex character.
+2) Select a character value within the limits.
+Value may be truncated
+3.1.3.4, 3.1.4
+Unexpected End-of-file
+1) Unterminated string or character constant
+2) Missing closing comment marker (*/)
+3) File system problems
+Unrecognized escape sequence in string \%s
+Recognized escape sequences are \a, \b, \f, \n, \r, \t, and \v.
+Character will be treated as un-escaped.
+3.9.2
+Illegal octal digit %s
+Octal constants, beginning with 0, must only have digits between 0 and 7,
+inclusive.
+3.1.3.2
+Unable to open temporary file for compiling %s
+1) TMPDIR environment variable is set to a directory that you have no
+ permissions for.
+2) The file system is full.
+3) System errors beyond the scope of the compiler.
+%s: Hangup
+%s: Interrupt
+%s: Quit (ASCII FS)
+%s: Illegal instruction (not reset when caught)
+%s: Trace trap (not reset when caught)
+%s: IOT instruction
+Also SIGABRT, used by abort, replace SIGIOT in the future
+%s: EMT instruction
+Also SIGXCPU, Exceeded CPU time limit
+%s: Floating point exception
+%s: Kill (cannot be caught or ignored)
+%s: Bus error
+%s: Segmentation violation
+%s: Bad argument to system call
+%s: Write on a pipe with no one to read it
+%s: Alarm clock
+%s: Software termination signal from kill
+%s: User defined signal 1
+%s: User defined signal 2
+%s: Death of a child
+Power-fail restart
+%s: Also SIGXFSZ, exceeded file size limit
+%s: Window change
+%s: Handset, line status change
+%s: Sendablestop signalnot from tty
+%s: Stop signal from tty
+%s: Pollable event occurred
+%s: Input/Output possible signal
+%s: Urgent condition on IO channel
+%s: Window size changes
+%s: Virtual time alarm
+%s: Profiling alarm
+%s: Continue a stopped process
+%s: To readers pgrp upon background tty read
+%s: Like TTIN for output if (tp->t_local<OSTOP)
+%s: Resource lost (eg, record-lock)
+'auto' and 'register' are not allowed in an external declaration
+3.7(10)
+must have function type
+3.7.1(30)
+Functions cannot return arrays
+3.7.1(33), 3.3.2.2
+Declaration list not allowed
+3.7.1(5)
+Too many input files %s
+The command line may contain only one file
+cpp internal error: input stack underflow
+cpp internal error: if stack underflow
+Cannot open the file %s
+No new-line character at the end of the file %s
+2.1.1.2(30)
+Fatal: Exceeded the limit of nesting level for #include file
+Fatal: Exceeded the limit of nesting level for #include file. This limit
+is 200.
+Fail to read the file %s
+Cannot write the file %s
+%s: %s: An if directive is not terminated properly in the file
+%s: %s: nested comment
+%s:%s: Illegal macro name %s; macro name shall be an identifier
+%s:%s: Illegal preprocessing token sequence
+3.8.3(35)
+%s:%s: Illegal macro parameter name
+%s:%s: Non-unique macro parameter name
+3.8.3(18)
+%s:%s: Missing ')' in parameter list for #define %s
+%s:%s: Missing ')' in macro instantiation
+%s:%s: Bad punctuator in the parameter list for #define %s
+%s:%s: Macro %s redefined.
+%s:%s: # operator should be followed by a macro argument name
+%s:%s: Badly formed constant expression%s
+3.4(9), 3.8
+%s:%s: Division by zero in #if or #elif
+3.8
+unknown command line option %s
+extraneous input/output file name %s
+%s: %s: Unterminated string or character constant
+A preprocessing string or character constant token was not
+terminated. Note that preprocessing directives are processed
+after the source file has been divided into preprocessing tokens.
+2.1.1.2(30) 3.1(18) 3.8
+%s: %s:
+%s: %s:
+%s: %s: Unterminated comment
+%s: %s: Unknown directive type %s
+%s: %s: #elif or #else after #else directive
+%s: %s: Bad identifier after the %s
+%s: %s: #%s accepts only one identifier as parameter
+3.8
+%s: %s: Bad identifier after the %s
+%s: %s: text following #%s violates the ANSI C standard.
+3.8
+%s: %s: Bad character %s occurs after the # directive.
+3.8
+%s: %s: the ## operator shall not be the %s token in the replacement list
+3.8.3.3
+%s: %s: the defined operator takes identifier as operand only.
+3.8.1
+%s: %s: Not in a conditional directive while using %s
+%s: %s: Illegal filename specification for #include
+%s: %s: Invalid file name %s for #include
+%s: %s: Cannot open file %s for #include
+%s: %s: Bad argument for #line command
+%s: %s: #error %s
+%s: %s: Tried to redefine predefined macro %s, attempt ignored
+3.8.7(22)
+%s: %s: Undefining predefined macro %s
+3.8.7(22)
+%s: %s: Undefined the ANSI standard library defined macro %s
+4.1.2.1(9)
+%s: %s: The number of arguments in the macro invocation does not match the definition
+%s: %s: Illegal character %s in preprocessor if
+%s: %s: Illegal character %s for number in preprocessor if
+%s: %s: No string is allowed in preprocessor if
+%s: %s: Not supported pragma %s
+%s: %s: Not supported #pragma format
+%s: %s: ANSI C does not allow #ident; %s
+%s: %s: Not supported #ident format
+This cpp extension accepts the following format:
+#ident "any string"
+%s: %s: Not supported #assert/#unassert format
+This cpp extension accepts the following format:
+#assert identifier
+#assert identifier ( pp-tokens )
+#unassert identifier
+#unassert identifier ( pp-tokens )
+%s: %s: Bad assertion predicate format
+The correct syntax for this cpp extension is:
+#assert identifier ( pp-token )
+%s: %s: directive is an upward-compatible ANSI C extension
+%s: This option requires an argument
+%s: %s: A macro has expanded recursively more than %s times. Further expansion will be disabled! Use command-line option: -Wp,-max_rec_depth=depth to recurse deeper.
+A status return from cpp to cfe
+Syntax Error
+The token read was unexpected.
+Syntax Error -- cannot backup
+The token read was unexpected.
+Yacc stack overflow
+The expression is too complicated to parse.
+Trailing comma in enumerator list
+The use of a trailing comma in an enumerator list is not standard C. There
+may be portability problems.
+3.5.2.2
+Empty declaration
+Empty declarations are invalid in standard C.
+3.5
+%s declared, but not referenced.
+redeclaration of '%s'; previous declaration at line %s in file '%s'
+Identifier redeclared in the same scope/block.
+3.1.2.3
+'%s' undefined; reoccurrences will not be reported.
+Non-function name referenced in function call.
+3.3.2.2(18)
+The number of arguments doesn't agree with the number in the declaration.
+3.3.2.2(5)
+'%s' section name longer than 8 characters. Name truncated.
+'%s' is already placed by pragma alloc_text.
+Cannot write ucode file while compiling %s
+1) The file system is full
+2) Permissions problem
+Must have corresponding formal argument for '%s'
+Parameter found in the declaration part, but not in the argument list.
+3.7.1(7)
+Non-prototype declaration is an obsolescent feature.
+The use of function definitions with separate parameter identifier
+and declaration lists (not prototype-format parameter type and
+identifier declarators) is an obsolescent feature.
+3.9.5
+Incompatible function declarations for %s
+For two function types to be compatible, both shall specify compatible
+return types. Moreover, the parameter type lists, if both are present,
+shall agree in the number of parameters and in use of the ellipsis
+terminator; corresponding parameters shall have compatible types. If
+one type has a parameter type list and the other type is specified by
+a function declarator that is not part of a function definition and
+contains an empty identifier list, the parameter list shall not have
+an ellipsis terminator and the type of each parameter shall be
+compatible with they type that results from application of the default
+argument promotions. If one type has a parameter type list and the
+other is specified by a function definition that contains a (possibly
+empty) identifier list, both shall agree in the number of parameters,
+and the type of each prototype parameter shall be compatible with the
+type that results from application of the default argument promotions
+to the type of the corresponding identifier. (For each parameter
+declared with function or array type, its type for these comparisons
+is the one that results from conversion to a pointer type. For each
+parameter declared with qualified type, its type for these comparisons
+is the unqualified version of its declared type.) There you have it!
+3.5.4.3(15)
+Incompatible function return type for this function.
+For two function types to be compatible, both shall specify compatible
+return types.
+3.5.4.3(15)
+The number of parameters for function is different from the previous declaration
+The parameter type lists, if both are present, shall agree in the
+number of parameters and in use of the ellipsis terminator.
+3.5.4.3(15)
+Incompatible type for the function parameter
+If both parameter type lists are present, corresponding
+parameters shall have compatible types.
+3.5.4.3(15)
+Function %s is redeclared with an incompatible argument type (after default argument promotion), which could lead to undefined run-time behaviour.
+The redeclaration could cause arguments at a call site to be passed
+inconsistently with what the function implementation expects, and
+parameters would therefore be accessed erroneously when executing the
+function body. Note that a float argument is promoted to a double
+when passed (potentially through fp registers) to an unprototyped
+function.
+3.5.4.3(15)
+prototype and non-prototype declaration found for %s, ellipsis terminator not allowed
+If one type has a parameter type list and the other type is specified
+by a function declarator that is not part of a function definition and
+contains an empty identifier list, the parameter list shall not have
+an ellipsis terminator and the type of each parameter shall be
+compatible with they type that results from application of the default
+argument promotions.
+3.5.4.3(15)
+prototype and non-prototype declaration found for %s, the type of this parameter is not compatible with the type after applying default argument promotion
+If one type has a parameter type list and the other type is specified
+by a function declarator that is not part of a function definition and
+contains an empty identifier list, the type of each parameter shall be
+compatible with the type that results from application of the default
+argument promotions.
+3.5.4.3(15)
+prototype declaration and non-prototype definition found for %s, the type of this parameter is not compatible with the type after applying default argument promotion
+If one type has a parameter type list and the other is specified by a
+function definition that contains a (possibly empty) identifier list,
+both shall agree in the number of parameters, and the type of each
+prototype parameter shall be compatible with the type that results
+from application of the default argument promotions to the type of the
+corresponding identifier.
+3.5.4.3(15)
+Empty declaration specifiers
+Standard C requires at least a storage class specifier, type specifier,
+or a type qualifier in declarations. 'extern int' assumed.
+3.5
+Can't write to the file %s
+1) The output file cannot be opened for writing.
+2) Out of file space.
+Duplicate '%s'
+typedef, extern, static, auto, register, const, volatile may not
+appear more than once in the same specifier list or qualifier list.
+Duplicate occurrence ignored.
+3.5.1(10) , 3.5.3(5)
+Null input
+There is nothing to compile.
+Illegal type combination
+3.5.2
+Missing ';' at end of structure / union member declaration
+In standard C, each member declaration must be terminated by a ';'. A
+terminating ';' is assumed.
+3.5.2.1
+Missing member name in structure / union
+In standard C, each member declaration have a member name. The missing
+member is assumed to not exist.
+3.5.2.1
+This variable is initialized twice.
+Neither 'const' or 'volatile' have any effect on function results.
+Qualifiers only apply to expressions designating an object that
+can be altered or examined.
+3.5.3(10)
+An integer constant expression is required here.
+The expression that defines the value of an enumeration constant
+shall be an integral constant expression that has a value
+representable as an int.
+3.5.2.2(28)
+(previous declaration of '%s' at line %s in file '%s')
+Must be an integer type greater than zero.
+The array size must be either a char, signed or unsigned integer or
+an enumerated type with a value greater than zero.
+3.5.4.2
+Array size cannot be a long long.
+Arrays with more than 2^32 elements are not yet supported.
+The array size must be either a char, signed or unsigned integer or
+an enumerated type with a value greater than zero.
+3.5.4.2
+bit-field '%s' width is not an integer constant
+The expression that specifies the width of a bit-field shall be an
+integral constant expression.
+3.5.2.1(15)
+bit-field '%s' width is negative
+The expression that specifies the width of a bit-field shall be
+non-negative.
+3.5.2.1(15)
+bit-field '%s' type required to be int, unsigned int, or signed int.
+A bit-field shall have type int, unsigned int, or signed int.
+3.5.2.1(30)
+bit-field %s's type not integer.
+Non-scalar type or pointer type to a non-object for increment or decrement operator.
+The operand of the prefix/postfix increment or decrement operator shall have scalar type; if it is of pointer type, it must point to an object.
+3.3.2.4(37), 3.3.3.1(25)
+Assign value to a function type.
+An assignment operator shall have a modifiable lvalue as its left operand.
+3.2.2.1(5)
+Assign value to an array.
+An assignment operator shall have a modifiable lvalue as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+Change value for variable of incomplete type.
+The operand of increment and decrement operator shall be a modifiable
+scalar lvalue. An assignment operator shall have a modifiable lvalue
+as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+The left-hand side of the '.' operator must be an addressable lvalue, when a bit-field is not contained within a unit of 32 bits alignment.
+This is a restriction in our implementation, which can be worked
+around by always accessing long long bit-fields indirectly (i.e.
+by means of the '->' operator).
+This expression is not an lvalue.
+3.2.2.1
+Modified an rvalue.
+3.2.2.1
+Change value for constant variable.
+The operand of increment and decrement operators shall be modifiable
+scalar lvalues. An assignment operator shall have a modifiable lvalue
+as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+Change value for constant field of a struct or union.
+An assignment operator shall have a modifiable lvalue as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+Dereferenced a non-pointer.
+The operand of the unary * operator shall have pointer type.
+3.3.3.2(39)
+The operand of the unary + or - operator shall have arithmetic type.
+3.3.3.3(6)
+The operand of the unary ~ operator shall have integral type.
+3.3.3.3(6)
+The operand of the unary ! operator shall have scalar type.
+3.3.3.3(6)
+Constants must have arithmetic type.
+3.1.3
+Bad type name for cast operator
+The type name for the cast operator should either be void or a
+qualified or unqualified scalar type.
+3.3.4(22)
+Improper cast of non-scalar type expression.
+The operand for the cast operator shall be of scalar type.
+3.3.4(23)
+Cast a pointer into a non-integral type.
+A pointer may be converted to an integral type.
+3.3.4(31)
+Cast a non-integral type into a pointer.
+An integral type may be converted to a pointer.
+3.3.4(31)
+Duplicate member '%s'
+Two members of a struct may not have the same name.
+3.1.2.2(7,25)
+Invalid constant expression.
+Constant expressions shall not contain assignment, increment, decrement,
+function-call, or comma operators, except when they are contained within
+the operand of the sizeof operator.
+3.4(9)
+Constant expressions must be derived from a constant value or a constant
+variable.
+3.4
+Dangerous operand of '&'.
+The operand of the unary & operator shall be either a function
+designator or an lvalue that designates an object that is not a
+bit-field and is not declared with the register storage-class
+specifier. This operand is NOT an lvalue, but we let it pass.
+Note that a segmentation error with possible core dump will result
+when the resulting address does not denote a valid (declared)
+storage location. This feature will be discontinued in future
+releases of the compiler!
+3.3.3.2(36)
+Unacceptable operand of '&'.
+The operand of the unary & operator shall be either a function
+designator or an lvalue that designates an object that is not a
+bit-field and is not declared with the register storage-class
+specifier.
+3.3.3.2(36)
+'&' before array or function; ignored
+Unacceptable operand of sizeof operator.
+The sizeof operator shall not be applied to an expression that has
+function type or an incomplete type, to the parenthesized name of such
+a type, or to an lvalue that designates a bit-field object.
+3.3.3.4
+Unacceptable operand of a multiplicative operator.
+Each of the operands of a multiplicative operator shall have arithmetic type.
+3.3.5(18)
+Unacceptable operand of the remainder operator
+Each of the operands of the remainder (%) operator shall have integral type.
+3.3.5(18)
+Unacceptable operand of '+'.
+For the + operator, either both operands shall have arithmetic type, or
+one operand shall be a pointer to an object type and the other shall
+have integral type.
+3.3.6(39)
+Unacceptable operand of '-'.
+For the subtraction operator, one of the following shall hold: both operands
+have arithmetic type; operands are pointers to qualified or unqualified
+versions of compatible object types; or the left operand is a pointer
+to an object type and the right operand has integral type.
+3.3.6(39)
+Unacceptable operand of shift operator.
+Each of the operands of bitwise shift operators shall have integral type.
+3.3.7(9)
+Unacceptable operand of relational operator.
+For relational operators, one of the following shall hold: both
+operands have arithmetic type; both operands are pointers to qualified
+or unqualified versions of compatible object types; or both operands
+are pointers to qualified or unqualified versions of compatible
+incomplete types.
+3.3.8(32)
+Unacceptable operand of == or !=
+For the == or != operator, one of the following shall hold: both operands
+are pointers to qualified or unqualified versions of compatible types; one
+operand is a pointer to an object or incomplete type and the other is a
+pointer to a qualified or unqualified version of void; or one operand is
+a pointer and the other is a null pointer constant.
+3.3.9(21)
+Unacceptable operand of &.
+Each of the operands shall have integral type.
+3.3.10(7)
+Unacceptable operand of ^.
+Each of the operands shall have integral type.
+3.3.11(18)
+Unacceptable operand of |.
+Each of the operands shall have integral type.
+3.3.12(30)
+Unacceptable operand of &&.
+Each of the operands shall have scalar type.
+3.3.13(7)
+Unacceptable operand of ||.
+Each of the operands shall have scalar type.
+3.3.14(20)
+Unacceptable operand of conditional operator.
+The first operand of conditional operator shall have scalar type. One
+of the following shall hold for the second and third operands:
+both operands have arithmetic type; both operands have compatible
+structure or union types; both operands have void type; both operands
+are pointers to qualified or unqualified versions of compatible types;
+one operand is a pointer and the other is a null pointer constant; or
+one operand is pointer to an object or incomplete type and the other
+is a pointer to a qualified or unqualified version of void.
+3.3.15
+Duplicate label '%s'
+A label name can only occur once in a function.
+3.1.2.1(25)
+Division by zero.
+3.3.5
+Subscripting a non-array.
+3.3.2.1
+Subscripting an array of incomplete type which is not an object type.
+The element of the array shall have an object type.
+3.3.2.1
+Should only subscript an array with an integral expression
+3.3.2.1
+Subscripting an unbounded array
+3.3.2.1
+Array index out of range
+3.3.2.1
+Selector requires struct/union pointer as left hand side
+In K&R mode the expression is implicitly converted to the '.' selector
+for a struct/union left-hand side.
+3.3.2.3
+Selector requires struct/union as left hand side
+In K&R mode the expression is implicitly converted to the '->' selector
+for a struct/union pointer left-hand side.
+3.3.2.3
+member of structure or union required
+3.3.2.3
+types have different qualifier specifications
+For two qualified types to be compatible, both shall have the
+identically qualified version of a compatible type; qualified
+and unqualified versions of a type are distinct types. For two
+types to be compatible their types must be the same.
+3.5.3(26)
+Incompatible array type due to different array size
+For two array types to be compatible, both shall have compatible element
+types; if both size specifiers are present, they shall have the
+same value.
+3.5.4.2(11)
+Incompatible array type due to incompatible element type
+For two array types to be compatible, both shall have compatible element
+types.
+3.5.4.2(11)
+Incompatible pointer type assignment
+The type pointed to by the left-hand side of simple assignment
+statement is incompatible with the type pointed to by the right-hand side.
+3.3.16.1, 3.5.4.1(21)
+Incompatible base type of pointer type
+K&R feature.
+Type %s of %s is incompatible with type %s of %s
+Incompatible types can be resolved by casting or by other means.
+3.3.16.1
+illegal combination of pointer and integer
+Assigning an integral expression to a pointer is a bad practice.
+Type for %s is incompatible with %s
+Incompatible types can be resolved by casting or by other means.
+3.1.2.6
+Bad operand type for += or -=
+3.3.16.2(26)
+A case or default label appears outside a switch statement
+A case or default label shall appear only in a switch statement.
+3.6.1
+The controlling expression of the if statement is not scalar type
+The controlling expression of an if statement shall have scalar type.
+3.6.4.1
+The controlling expression of switch statement is not integral type
+The controlling expression of an switch statement shall have integral type.
+3.6.4.2(20)
+The case label is not an integral constant expression
+The case label shall be an integral constant expression.
+3.6.4.2(22)
+Duplicate case label in the same switch statement
+No two of the case constant expressions in the same switch statement
+shall have the same value after conversion.
+3.6.4.2(22)
+More than one default label in the same switch statement
+There may be at most one default label in a switch statement.
+3.6.4.2(23)
+The controlling expression of the iteration statement is not scalar
+type
+The controlling expression of a iteration statement shall have scalar
+type.
+3.6.5.1
+label '%s' used, but not defined
+The identifier in a goto statement shall name a label located
+somewhere in the enclosing function.
+3.6.6.1
+A continue statement shall appear only in or as a loop body
+3.6.6.2
+A break statement shall appear only in or as a switch body or loop body
+3.6.6.3
+A return statement with an expression should not appear
+in a function '%s', whose return type is void
+3.6.6.4(24)
+A return statement without an expression appears in a
+function '%s', whose return type is not void
+If a return statement without an expression is executed, and the value
+of the function call is used by the caller, the behavior is undefined.
+3.6.6.4(33)
+Internal Error: statement stack underflow
+Long double not supported; double assumed.
+Long float not standard; double assumed.
+Only 'register' allowed in parameter declaration
+The only storage-class specifier that shall occur in a parameter
+declaration is 'register'; illegal storage class ignored.
+3.5.4.3(25)
+Name(s) without types in a function declaration
+An old-style function declaration is not allowed to have names
+in the parameter list; useless names ignored
+3.5.4.3(26)
+Functions cannot return functions
+3.7.1(33), 3.3.2.2
+Functions cannot return a non-object type
+3.3.2.2
+enum declaration must contain enum literals
+Although structs or unions may delay the declaration of their members,
+a similar construction with enum does not exist and is not necessary,
+as there can be no mutual dependencies between the declaration of an
+enumerated type and any other type.
+3.5.2.3(27)
+Register qualification has no effect for this type of object
+Register declarations for array, struct, and function types have
+no effect.
+3.5.1(16), 3.5.1(19)
+Functions cannot be declared 'register'
+The declaration of an identifier for a function that has block
+scope shall have no explicit storage-class specifier other than
+'extern'.
+3.5.1(19)
+'%s' cannot be initialized
+The type of the entity to be initialized shall be an object type
+or an array of unknown size.
+3.5.7(32)
+Cannot initialize 'extern' variable '%s' within a function
+If the declaration of an identifier has block scope, and the
+identifier has 'extern' or 'static' linkage, the declaration
+shall have no initializer for the identifier; initialization
+allowed anyway.
+3.5.7(35)
+initializing an 'extern' is an ANSI C extension
+conflicting declarations for '%s'
+'static' and 'extern' declarations conflict. Which is meant?
+3.1.2.2(15), 3.1.2.2(27)
+Too many initial values for '%s'
+3.5.7(1)
+incompatible types in initialization
+3.3.16(35)
+redefinition of '%s'; previous definition at line %s in file '%s'
+Identifier redeclared in the same scope/block.
+3.1.2.3
+bit-fields as members of a union are an ANSI C invention.
+storage size for '%s' isn't known
+type mismatch in initialization
+Missing braces in a union initialization or illegally formed
+initialization.
+3.5.7(5)
+union '%s' only allowed one initializer for the first member
+3.5.7(5)
+width of '%s' exceeds its type
+the specified bitfield width is too large to be contained within a
+bitfield type.
+structure has no member named '%s'
+This is allowed for compatibility with AT&T pcc-based compilers.
+Reference of an expression of void type or an incomplete type.
+3.2.2.1
+element size of an array shall not be zero
+3.2.2.5(25)
+invalid combination of type specifiers
+Although order is unimportant, not all type specifiers can occur together.
+3.5.2
+declaration must at least declare an identifier, tag, or the member of an enumeration
+3.5(16)
+at most one storage class may be given in the declaration
+Duplicate occurrence ignored.
+3.5.1(10)
+size of function's return type is zero
+The return type of a function must be void or an object type other than array.
+3.7.1(33)
+Expecting an integral return type from the main function
+identifier missing from parameter declaration
+Prototypes for function definitions require identifiers in parameter
+declarations.
+3.7.1(4)
+only 'register' allowed for storage class for parameters
+The declarations in the declaration list shall contain no storage class
+other than 'register', and no initializations.
+3.7.1(10)
+parameters declarations can not have initializations
+3.7.1(10)
+only one instance of 'void' allowed in the parameter list
+'void' must occur by itself (specifying that the function has no parameters).
+3.5.4.3(1)
+%s must have function type
+1) An argument list must be explicitly present in the declarator; it cannot
+ be inherited from a typedef (3.5.4.3).
+2) The declarator is not a function.
+3.7.1(30)
+Illegal hexadecimal constant
+You have no digits after the 0x or 0X. 0x0 assumed.
+3.1.3.2
+value overflows its type in this context. Value is set to be '%s'!
+3.2.1.4
+value is outside range representable for type '%s'
+missing member name
+K&R mode permits a missing member name; otherwise, only bitfields can omit
+the member name.
+3.5.2.1(10)
+useless keyword or type name in declaration
+Type was ignored.
+'%s' declared within and is limited to this function prototype
+Possible program error, since parameter type checking will always fail
+unless the type declaration is visible to the caller.
+3.1.2.1(35)
+Extra spaces within operator, %s assumed
+In ANSI C, the compound assignment operator cannot have embedded
+white space characters.
+3.1.5
+missing size for array '%s'
+Incomplete types permitted for identifiers with internal or
+external linkage, but not automatic linkage.
+3.1.2.5(10)
+can't jump into (from outside of) the body of a 'try' or into either type of handler
+'%s' missing, please #include excpt.h
+excpt.h required to declare exception statements, intrinsics or compiler
+runtime names.
+local function declarations cannot be 'static'
+A function declaration can only contain the storage-class 'static'
+if it is at file scope. Declaration made 'extern'.
+3.5.1(19)
+static function '%s' declared and referenced, but not defined.
+If an identifier declared with internal linkage is used in an
+expression (other than as a part of the operand of a sizeof
+operator), there shall be exactly one external definition for
+the identifier in the translation unit.
+3.7(12)
+pragma argument '%s' must be declared prior to being used in a pragma
+Pragma name ignored.
+Pragma not supported
+'%s' not enabled as intrinsic
+It may have already appeared in a function pragma, or never occurred in
+an intrinsic pragma.
+'%s' is already enabled as an intrinsic
+weak definition for '%s' is later redefined; pragma weak ignored.
+definition of primary name '%s' not found; pragma weak ignored.
+definition of secondary name '%s' not found; pragma weak ignored.
+primary name '%s' is declared as a common or external, and is not defined
+with initial value within this file; pragma weak ignored.
+useless '%s' storage class ignored
+array of functions not allowed
+The element type must be an object type representing a region
+of data storage which can represent values.
+3.1.2.5(23)
+array of voids not allowed
+The element type must be an object type representing a region
+of data storage which can represent values.
+3.1.2.5(23)
+argument for pragma pack must be an integer constant; pragma ignored
+'%s' has wrong tag type.
+Identifier redeclared in the same scope/block.
+3.1.2.3
+missing dimension bound
+For multidimensional arrays, the constant bounds of the array may be
+omitted only for the first member of the sequence.
+3.1.2.5(23)
+Internal error in parameters to function substr; loc: '%s'; len: '%s'.
+Internal error in parameters to function insertstr; indx: '%s'.
+Internal error in function get_tag_name; input is a non-tagged type.
+Internal error in function gen_type_str -- not a type tree '%s'
+Cannot open file '%s'
+Prototype should be moved after tag or a typedef declaration.
+Please look for comments in the extracted header file.
+The extracted header file includes prototypes for static functions,
+which should be removed, if you wish to include the header in a source file
+other than the originator.
+ANSI C requires formal parameter before "..."
+This extension is meant to be used for compatibility with varargs.h
+3.5.4.3(35)
+syntax error: "&..." invalid
+extension used to access "..." formal arguments.
+function '%s' initialized like a variable
+The type of entity to be initialized shall be an object type or an
+array of unknown size.
+3.5.7(31)
+initializer not an array aggregate
+The initializer for an object that has aggregate type shall be a
+brace-enclosed list of initializers for the members of the aggregate,
+written in increasing subscript or member order.
+3.5.7(20)
+'%s' type is incomplete; cannot initialize
+Was the struct ever defined?
+3.5.7.(31)
+'%s' is not standard ANSI.
+This keyword/type is not defined in strict ANSI mode.
+3.1.1
+not a legal asm string
+The first operand of an asm string should be, after argument substitution,
+a legal assembly string.
+The -float option will be ignored in ANSI mode.
+The -float option is ignored, since otherwise program semantics would
+violate the ANSI standard. In particular, fp constants are always
+'double' with ANSI-C, while with -float the type of fp constants will
+depend on the context and may be 'float'.
+ANSI C support unavailable with C compiler bundled with RISC/os
+The C compiler bundled with RISC/os does not support ANSI C. ANSI
+C support requires a separate license.
+Ignored invalid warning number(s) in -woff option, %s%s !
+Warning numbers must be in the range %s to %s.
+The set of warning numbers in cfe is disjoint from the set of warning numbers
+in accom, since accom warnings cannot be mapped one-to-one to cfe warnings.
+'%s' not handled as an intrinsic due to incompatible argument types .
+'__unalign' only qualifies pointers
+'__unalign' indicates the object pointed at by pointer is unaligned (e.g.,
+int * __unalign p). This is an extension to ANSI C and like 'volatile'
+and 'const' can follow the '*' in pointer declarations, but unlike both
+cannot qualify a base type.
+index expression is an anachronism
+ANSI C++ doesn't support array index expressions in delete.
+5.3.4
+member cannot be of function or incomplete type.
+3.5.2.1(12)
+Illegal lint option, '%s', is ignored.
+cannot open header message buffer file
+cannot write header message buffer file
+cannot read header message buffer file
+cannot seek in header message buffer file
+struct/union/enum '%s' is used, but not defined
+static '%s' unused
+nonportable character comparison (chars may be signed or unsigned)
+redundant comparison of unsigned with constant expression
+redundant statement, control flow cannot reach this statement
+'%s' may be used before set
+function parameter '%s' is not used in function '%s'
+'%s' can be const qualified, since it is not set within its lifetime.
+'%s' is not used in function '%s'
+'%s' set but unused in function '%s'
+control may fall through %s statement
+function '%s' has return(e); and return;
+function '%s' may return random value to place of invocation %s
+label without goto: '%s'
+width of %s constant is smaller than size of type (%s)
+explicit conversion from '%s' to '%s' %s
+implicit conversion from '%s' to '%s' %s
+'%s' may be indistinguishable from '%s' due to internal name truncation
+Promoted formal parameter and promoted argument have incompatible types
+No prototype for the definition of '%s' %s
+References to '%s' are substituted by its literal initializer
+ (as included in %s)
+==============
+unsupported language linkage
+string-literal specifies an unsupported linkage
+7.4(1)
+No prototype for the call to %s
+To achieve better type-checking, there should be a full prototype for
+the function being called.
+3.5.4.3
+'inline' only applies to function declarations
+leave statment can occur only within try body
+Microsoft extension
+Use of a Microsoft extension detected without usage of the
+compiler option -msft.
+No parameter mentioned
+A file with no declarations or definitions is accepted as an extension to ANSI C
+The translation unit must contain at least one external definition.
+3.7
+Incompatible signed and unsigned version of a type
+Yacc initialization error
+Internal error: yacc cannot initialize itself.
+The cfe option %s may not be in future releases. We suggest that you not use this option!
+Incompatible char and unsigned char versions of a type
+Lshift with undefined behaviour.
+Lshift with a negative right operand, or a right operand that is greater
+than or equal to the width in bits of the promoted left operand, results
+in undefined behaviour.
+3.3.7(11)
+useless type name in declaration, possibly a semicolon is missing.
+Type was ignored.
+constant initializer expression is invalid (refers to automatic variables).
+All the expressions in an initializer for an object that has static storage
+duration or in the initializer list for an object that has aggregate or
+union type shall be constant expressions. Otherwise, unexpected results
+may occur.
+3.5.7(32) and 3.4
+invalid explicit or implicit conversion of an address constant to an integral value in a constant initializing expression.
+An address constant in a constant initializing expression can neither
+initialize a bit-field nor be directly or indirectly converted to an
+integral type of size different from an address type.
+6.4
diff --git a/tools/ido-recomp/macos/ld b/tools/ido-recomp/macos/ld
new file mode 100644
index 000000000..ee1f7f538
Binary files /dev/null and b/tools/ido-recomp/macos/ld differ
diff --git a/tools/ido-recomp/macos/libc.so b/tools/ido-recomp/macos/libc.so
new file mode 100644
index 000000000..17495ef6c
Binary files /dev/null and b/tools/ido-recomp/macos/libc.so differ
diff --git a/tools/ido-recomp/macos/libc.so.1 b/tools/ido-recomp/macos/libc.so.1
new file mode 100644
index 000000000..17495ef6c
Binary files /dev/null and b/tools/ido-recomp/macos/libc.so.1 differ
diff --git a/tools/ido-recomp/macos/libexc.so b/tools/ido-recomp/macos/libexc.so
new file mode 100644
index 000000000..209c53666
Binary files /dev/null and b/tools/ido-recomp/macos/libexc.so differ
diff --git a/tools/ido-recomp/macos/libgen.so b/tools/ido-recomp/macos/libgen.so
new file mode 100644
index 000000000..7b8ec7fd5
Binary files /dev/null and b/tools/ido-recomp/macos/libgen.so differ
diff --git a/tools/ido-recomp/macos/libm.so b/tools/ido-recomp/macos/libm.so
new file mode 100644
index 000000000..05bf47817
Binary files /dev/null and b/tools/ido-recomp/macos/libm.so differ
diff --git a/tools/ido-recomp/macos/strip b/tools/ido-recomp/macos/strip
new file mode 100644
index 000000000..6559c81c6
Binary files /dev/null and b/tools/ido-recomp/macos/strip differ
diff --git a/tools/ido-recomp/macos/ugen b/tools/ido-recomp/macos/ugen
new file mode 100644
index 000000000..b7c7007d8
Binary files /dev/null and b/tools/ido-recomp/macos/ugen differ
diff --git a/tools/ido-recomp/macos/ujoin b/tools/ido-recomp/macos/ujoin
new file mode 100644
index 000000000..ceb3ba054
Binary files /dev/null and b/tools/ido-recomp/macos/ujoin differ
diff --git a/tools/ido-recomp/macos/uld b/tools/ido-recomp/macos/uld
new file mode 100644
index 000000000..7eb6e9d01
Binary files /dev/null and b/tools/ido-recomp/macos/uld differ
diff --git a/tools/ido-recomp/macos/umerge b/tools/ido-recomp/macos/umerge
new file mode 100644
index 000000000..5dc01c2d9
Binary files /dev/null and b/tools/ido-recomp/macos/umerge differ
diff --git a/tools/ido-recomp/macos/uopt b/tools/ido-recomp/macos/uopt
new file mode 100644
index 000000000..cf9dc173a
Binary files /dev/null and b/tools/ido-recomp/macos/uopt differ
diff --git a/tools/ido-recomp/macos/upas b/tools/ido-recomp/macos/upas
new file mode 100644
index 000000000..f3f0fa386
Binary files /dev/null and b/tools/ido-recomp/macos/upas differ
diff --git a/tools/ido-recomp/macos/usplit b/tools/ido-recomp/macos/usplit
new file mode 100644
index 000000000..0eb529037
Binary files /dev/null and b/tools/ido-recomp/macos/usplit differ
diff --git a/tools/ido-recomp/versions.txt b/tools/ido-recomp/versions.txt
new file mode 100644
index 000000000..634650e09
--- /dev/null
+++ b/tools/ido-recomp/versions.txt
@@ -0,0 +1 @@
+v1.1
\ No newline at end of file
diff --git a/tools/ido-recomp/windows/acpp.exe b/tools/ido-recomp/windows/acpp.exe
new file mode 100644
index 000000000..cc06f31c4
Binary files /dev/null and b/tools/ido-recomp/windows/acpp.exe differ
diff --git a/tools/ido-recomp/windows/as0.exe b/tools/ido-recomp/windows/as0.exe
new file mode 100644
index 000000000..d8fa5aa53
Binary files /dev/null and b/tools/ido-recomp/windows/as0.exe differ
diff --git a/tools/ido-recomp/windows/as1.exe b/tools/ido-recomp/windows/as1.exe
new file mode 100644
index 000000000..253bd704f
Binary files /dev/null and b/tools/ido-recomp/windows/as1.exe differ
diff --git a/tools/ido-recomp/windows/c++filt.exe b/tools/ido-recomp/windows/c++filt.exe
new file mode 100644
index 000000000..bce971a15
Binary files /dev/null and b/tools/ido-recomp/windows/c++filt.exe differ
diff --git a/tools/ido-recomp/windows/cc.exe b/tools/ido-recomp/windows/cc.exe
new file mode 100644
index 000000000..8b2bb4731
Binary files /dev/null and b/tools/ido-recomp/windows/cc.exe differ
diff --git a/tools/ido-recomp/windows/cfe.exe b/tools/ido-recomp/windows/cfe.exe
new file mode 100644
index 000000000..20914bf84
Binary files /dev/null and b/tools/ido-recomp/windows/cfe.exe differ
diff --git a/tools/ido-recomp/windows/copt.exe b/tools/ido-recomp/windows/copt.exe
new file mode 100644
index 000000000..76bddd78b
Binary files /dev/null and b/tools/ido-recomp/windows/copt.exe differ
diff --git a/tools/ido-recomp/windows/crt1.o b/tools/ido-recomp/windows/crt1.o
new file mode 100644
index 000000000..3052ae273
Binary files /dev/null and b/tools/ido-recomp/windows/crt1.o differ
diff --git a/tools/ido-recomp/windows/crtn.o b/tools/ido-recomp/windows/crtn.o
new file mode 100644
index 000000000..4c064d763
Binary files /dev/null and b/tools/ido-recomp/windows/crtn.o differ
diff --git a/tools/ido-recomp/windows/err.english.cc b/tools/ido-recomp/windows/err.english.cc
new file mode 100644
index 000000000..6976e38a9
--- /dev/null
+++ b/tools/ido-recomp/windows/err.english.cc
@@ -0,0 +1,1260 @@
+@
+ 358 358 358
+ 6464 6482 6553
+ 6553 6593 6728
+ 6728 6746 6803
+ 6803 6808 6808
+ 6808 6818 6818
+ 6818 6826 6826
+ 6826 6847 6847
+ 6847 6875 6922
+ 6922 6930 6930
+ 6930 6939 6939
+ 6939 6948 6948
+ 6948 6974 7120
+ 7120 7149 7204
+ 7210 7248 7311
+ 7317 7350 7442
+ 7450 7497 7627
+ 7635 7709 7930
+ 7938 7975 8063
+ 8071 8113 8253
+ 8261 8289 8289
+ 8298 8338 8445
+ 8460 8502 8635
+ 8650 8690 8819
+ 8834 8857 8965
+ 8965 9008 9113
+ 9119 9142 9227
+ 9235 9282 9451
+ 9451 9462 9462
+ 9462 9477 9477
+ 9477 9497 9497
+ 9497 9545 9545
+ 9545 9584 9584
+ 9584 9604 9662
+ 9662 9682 9720
+ 9720 9749 9749
+ 9749 9788 9788
+ 9788 9802 9802
+ 9802 9829 9829
+ 9829 9861 9861
+ 9861 9904 9904
+ 9904 9920 9920
+ 9920 9962 9962
+ 9962 9988 9988
+ 9988 10014 10014
+10014 10035 10035
+10035 10054 10097
+10097 10115 10115
+10115 10147 10147
+10147 10183 10183
+10183 10208 10208
+10208 10236 10236
+10236 10269 10269
+10269 10304 10304
+10304 10328 10328
+10328 10351 10351
+10351 10371 10371
+10371 10402 10402
+10402 10447 10447
+10447 10497 10497
+10497 10533 10533
+10533 10598 10598
+10606 10630 10630
+10640 10671 10671
+10690 10719 10719
+10728 10752 10795
+10795 10837 10837
+10837 10876 10876
+10876 10900 10900
+10900 10948 10948
+10960 11021 11103
+11103 11128 11128
+11128 11153 11153
+11153 11216 11216
+11216 11239 11239
+11239 11303 11303
+11303 11347 11347
+11357 11393 11393
+11393 11432 11432
+11442 11494 11494
+11494 11536 11536
+11536 11595 11595
+11595 11622 11622
+11622 11684 11684
+11684 11726 11726
+11738 11778 11778
+11782 11813 11813
+11813 11850 11850
+11850 11900 12087
+12111 12120 12120
+12120 12129 12129
+12129 12158 12158
+12158 12192 12192
+12192 12237 12237
+12237 12273 12273
+12273 12326 12326
+12330 12366 12366
+12366 12423 12423
+12427 12482 12482
+12486 12560 12560
+12568 12631 12631
+12637 12691 12691
+12691 12743 12743
+12743 12785 12785
+12785 12826 12826
+12826 12865 12865
+12865 12883 12883
+12883 12946 12946
+12956 12995 12995
+13005 13066 13066
+13077 13163 13163
+13163 13211 13211
+13211 13270 13270
+13270 13318 13318
+13318 13350 13350
+13350 13387 13387
+13387 13428 13428
+13428 13464 13533
+13533 13580 13737
+13737 13776 13854
+13854 13913 13913
+13913 13950 13950
+13950 14118 14118
+14118 14150 14150
+14150 14163 14194
+14194 14224 14255
+14255 14275 14319
+14319 14353 14458
+14466 14484 14530
+14534 14567 14567
+14567 14635 14682
+14690 14742 14742
+14742 14789 14789
+14801 14875 14875
+14886 14947 14947
+14947 14992 14992
+14992 15035 15085
+15085 15134 15205
+15214 15267 15448
+15454 15496 16810
+16822 16875 16960
+16972 17053 17179
+17191 17236 17332
+17344 17491 17841
+17853 17939 18304
+18316 18471 18774
+18786 18952 19323
+19335 19364 19496
+19500 19527 19598
+19598 19613 19776
+19797 19808 19837
+19837 19862 19862
+19868 19927 20026
+20034 20075 20179
+20187 20223 20223
+20223 20290 20382
+20392 20441 20589
+20601 20656 20656
+20656 20699 20818
+20826 20860 21038
+21046 21094 21191
+21203 21236 21314
+21326 21395 21457
+21469 21502 21502
+21502 21587 21731
+21756 21789 21864
+21875 21901 21976
+22013 22059 22220
+22257 22397 22561
+22561 22595 22595
+22603 22623 22623
+22631 22667 22828
+22865 22919 22994
+23031 23059 23120
+23132 23201 23201
+23212 23274 23274
+23285 23345 23345
+23356 23393 23393
+23399 23431 23532
+23542 23587 23646
+23656 23697 23745
+23755 23796 23844
+23854 23876 23928
+23942 23971 24153
+24160 24243 24243
+24247 24273 24743
+24755 24784 24984
+24996 25034 25034
+25034 25075 25273
+25281 25332 25410
+25420 25467 25544
+25554 25583 25744
+25754 25783 26061
+26071 26111 26185
+26194 26239 26525
+26535 26568 26914
+26924 26951 26998
+27008 27035 27082
+27093 27120 27167
+27178 27206 27251
+27261 27289 27334
+27345 27391 27931
+27938 27959 28007
+28019 28037 28037
+28043 28069 28069
+28077 28147 28199
+28207 28266 28266
+28274 28306 28306
+28314 28339 28339
+28347 28404 28510
+28518 28567 28682
+28690 28728 28728
+28736 28782 29023
+29033 29085 29234
+29246 29303 29383
+29395 29432 29570
+29592 29631 29644
+29644 29693 29758
+29767 29810 29875
+29875 29911 29976
+29984 30014 30014
+30027 30086 30151
+30157 30223 30293
+30301 30369 30445
+30457 30511 30568
+30580 30630 30743
+30755 30812 30874
+30886 30959 31035
+31043 31076 31175
+31183 31243 31243
+31251 31323 31323
+31331 31433 31433
+31445 31544 31686
+31698 31740 31740
+31740 31783 31783
+31783 31824 31824
+31824 31873 31996
+32008 32056 32164
+32176 32210 32210
+32229 32271 32271
+32279 32323 32569
+32581 32642 32718
+32739 32779 32916
+32926 32953 33047
+33057 33116 33315
+33325 33373 33373
+33373 33407 33469
+33494 33527 33527
+33536 33573 33573
+33584 33650 33697
+33705 33763 33763
+33763 33797 33797
+33797 33829 33906
+33915 33976 33976
+33985 34016 34098
+34098 34133 34198
+34198 34261 34261
+34269 34312 34312
+34324 34363 34438
+34444 34530 34530
+34538 34596 34626
+34636 34675 34754
+34764 34821 34821
+34821 34867 34950
+34959 35016 35135
+35145 35198 35198
+35208 35266 35344
+35355 35382 35537
+35547 35576 35629
+35637 35705 35705
+35713 35764 35764
+35764 35784 35876
+35888 35932 35950
+35950 36013 36138
+36150 36191 36280
+36286 36314 36419
+36431 36516 36516
+36516 36554 36642
+36642 36689 36808
+36818 36881 37105
+37113 37183 37204
+37204 37225 37225
+37225 37255 37348
+37348 37388 37388
+37388 37454 37454
+37454 37518 37518
+37518 37584 37584
+37584 37717 37717
+37717 37752 37752
+37752 37783 37889
+37901 37928 38034
+38046 38115 38115
+38115 38140 38187
+38195 38219 38339
+38351 38422 38422
+38422 38486 38486
+38486 38555 38555
+38555 38619 38619
+38619 38641 38641
+38641 38758 38758
+38758 38929 38929
+38929 38975 39043
+39055 39084 39133
+39133 39175 39265
+39275 39310 39494
+39504 39547 39576
+39587 39614 39668
+39674 39697 39797
+39797 39845 40094
+40094 40158 40264
+40264 40369 40523
+40523 40593 40593
+40593 40629 40876
+40876 40911 40971
+40977 41026 41026
+41038 41077 41077
+41077 41116 41116
+41116 41156 41156
+41156 41195 41195
+41195 41237 41237
+41237 41285 41285
+41285 41304 41304
+41304 41371 41371
+41371 41429 41429
+41429 41491 41491
+41491 41519 41519
+41519 41572 41572
+41572 41642 41642
+41642 41676 41676
+41676 41713 41713
+41713 41751 41751
+41751 41792 41792
+41792 41856 41856
+41856 41881 41881
+41881 41936 41936
+41936 41977 41977
+41977 42018 42018
+42018 42090 42090
+42090 42162 42162
+42162 42205 42205
+42205 42267 42267
+42267 42294 42294
+42294 42309 42309
+42309 42338 42386
+42393 42425 42522
+42530 42577 42577
+42577 42623 42623
+42623 42643 42725
+42725 42748 42748
+42748 42829 42897
+42901 42952 42952
+42952 42978 43025
+43025 43116 43116
+43116 43171 43171
+43171 43204 43376
+43386 43453 43471
+43471 43547 43780
+43798 43921 44116
+44120 44120 44120
+Out of memory: %s
+There is no more memory left in the system for compiling this program.
+Internal Error Unknown Error Message %s
+1) An internal error, while attempting to print an unavailable message
+2) The error message file is inaccessible or has other problems
+Unknown Signal %s
+1) An unknown signal has been caught
+2) 2 Nested signals
+line
+Warning:
+Fatal:
+Source not available
+Too many errors... goodbye.
+There is a limit of 30 errors before aborting.
+Error:
+reserved
+reserved
+Unknown Control Statement
+1) The line begins with a '#' and is not of the form:
+ # ""
+2) Please compile this program with the preprocessor enabled.
+Unknown character %s ignored
+The character is not part of the source character set.
+2.2.1
+Unknown control character \%s ignored
+The control character is not part of the source character set.
+2.2.1
+Illegal character %s in exponent
+1) Digits or sign expected after 'e' or 'E'.
+2) Digits are expected after sign in exponent.
+3.1.3.1
+Constant is out of range and may be truncated.
+The constant is too large to be accurately represented and may be
+truncated. The limits are in the system include file limits.h.
+2.2.4.2
+Constant is out of range for a 32-bit data type, but accepted as written.
+The constant is too large to fit in a 32-bit data type, but will be
+accurately represented in a wider data type. The value may be truncated,
+depending on its context. The limits are in the system include file
+limits.h.
+2.2.4.2
+Character constant size out of range
+1) No characters in a character constant.
+2) More than 4 bytes in a character constant.
+3.1.3.4
+Wide character constant size out of range
+1) No characters in the multibyte sequence (0 assumed).
+2) More than 1 byte in the multi-byte sequence (only the first byte was converted).
+3.1.3.4
+Invalid multibyte character
+4.10.7.2
+Newline in string or character constant
+1) Terminate your string or character constant with closing quotes.
+2) Put a backslash before the newline.
+3.1.3.4, 3.1.4
+Octal character escape too large: %s > %s
+1) Terminate end of octal sequence with a non-octal character.
+2) Select a character value within the limits.
+Value may be truncated
+3.1.3.4, 3.1.4
+Hex character escape too large: %s > %s
+1) Terminate end of hex sequence with a non-hex character.
+2) Select a character value within the limits.
+Value may be truncated
+3.1.3.4, 3.1.4
+Unexpected End-of-file
+1) Unterminated string or character constant
+2) Missing closing comment marker (*/)
+3) File system problems
+Unrecognized escape sequence in string \%s
+Recognized escape sequences are \a, \b, \f, \n, \r, \t, and \v.
+Character will be treated as un-escaped.
+3.9.2
+Illegal octal digit %s
+Octal constants, beginning with 0, must only have digits between 0 and 7,
+inclusive.
+3.1.3.2
+Unable to open temporary file for compiling %s
+1) TMPDIR environment variable is set to a directory that you have no
+ permissions for.
+2) The file system is full.
+3) System errors beyond the scope of the compiler.
+%s: Hangup
+%s: Interrupt
+%s: Quit (ASCII FS)
+%s: Illegal instruction (not reset when caught)
+%s: Trace trap (not reset when caught)
+%s: IOT instruction
+Also SIGABRT, used by abort, replace SIGIOT in the future
+%s: EMT instruction
+Also SIGXCPU, Exceeded CPU time limit
+%s: Floating point exception
+%s: Kill (cannot be caught or ignored)
+%s: Bus error
+%s: Segmentation violation
+%s: Bad argument to system call
+%s: Write on a pipe with no one to read it
+%s: Alarm clock
+%s: Software termination signal from kill
+%s: User defined signal 1
+%s: User defined signal 2
+%s: Death of a child
+Power-fail restart
+%s: Also SIGXFSZ, exceeded file size limit
+%s: Window change
+%s: Handset, line status change
+%s: Sendablestop signalnot from tty
+%s: Stop signal from tty
+%s: Pollable event occurred
+%s: Input/Output possible signal
+%s: Urgent condition on IO channel
+%s: Window size changes
+%s: Virtual time alarm
+%s: Profiling alarm
+%s: Continue a stopped process
+%s: To readers pgrp upon background tty read
+%s: Like TTIN for output if (tp->t_local<OSTOP)
+%s: Resource lost (eg, record-lock)
+'auto' and 'register' are not allowed in an external declaration
+3.7(10)
+must have function type
+3.7.1(30)
+Functions cannot return arrays
+3.7.1(33), 3.3.2.2
+Declaration list not allowed
+3.7.1(5)
+Too many input files %s
+The command line may contain only one file
+cpp internal error: input stack underflow
+cpp internal error: if stack underflow
+Cannot open the file %s
+No new-line character at the end of the file %s
+2.1.1.2(30)
+Fatal: Exceeded the limit of nesting level for #include file
+Fatal: Exceeded the limit of nesting level for #include file. This limit
+is 200.
+Fail to read the file %s
+Cannot write the file %s
+%s: %s: An if directive is not terminated properly in the file
+%s: %s: nested comment
+%s:%s: Illegal macro name %s; macro name shall be an identifier
+%s:%s: Illegal preprocessing token sequence
+3.8.3(35)
+%s:%s: Illegal macro parameter name
+%s:%s: Non-unique macro parameter name
+3.8.3(18)
+%s:%s: Missing ')' in parameter list for #define %s
+%s:%s: Missing ')' in macro instantiation
+%s:%s: Bad punctuator in the parameter list for #define %s
+%s:%s: Macro %s redefined.
+%s:%s: # operator should be followed by a macro argument name
+%s:%s: Badly formed constant expression%s
+3.4(9), 3.8
+%s:%s: Division by zero in #if or #elif
+3.8
+unknown command line option %s
+extraneous input/output file name %s
+%s: %s: Unterminated string or character constant
+A preprocessing string or character constant token was not
+terminated. Note that preprocessing directives are processed
+after the source file has been divided into preprocessing tokens.
+2.1.1.2(30) 3.1(18) 3.8
+%s: %s:
+%s: %s:
+%s: %s: Unterminated comment
+%s: %s: Unknown directive type %s
+%s: %s: #elif or #else after #else directive
+%s: %s: Bad identifier after the %s
+%s: %s: #%s accepts only one identifier as parameter
+3.8
+%s: %s: Bad identifier after the %s
+%s: %s: text following #%s violates the ANSI C standard.
+3.8
+%s: %s: Bad character %s occurs after the # directive.
+3.8
+%s: %s: the ## operator shall not be the %s token in the replacement list
+3.8.3.3
+%s: %s: the defined operator takes identifier as operand only.
+3.8.1
+%s: %s: Not in a conditional directive while using %s
+%s: %s: Illegal filename specification for #include
+%s: %s: Invalid file name %s for #include
+%s: %s: Cannot open file %s for #include
+%s: %s: Bad argument for #line command
+%s: %s: #error %s
+%s: %s: Tried to redefine predefined macro %s, attempt ignored
+3.8.7(22)
+%s: %s: Undefining predefined macro %s
+3.8.7(22)
+%s: %s: Undefined the ANSI standard library defined macro %s
+4.1.2.1(9)
+%s: %s: The number of arguments in the macro invocation does not match the definition
+%s: %s: Illegal character %s in preprocessor if
+%s: %s: Illegal character %s for number in preprocessor if
+%s: %s: No string is allowed in preprocessor if
+%s: %s: Not supported pragma %s
+%s: %s: Not supported #pragma format
+%s: %s: ANSI C does not allow #ident; %s
+%s: %s: Not supported #ident format
+This cpp extension accepts the following format:
+#ident "any string"
+%s: %s: Not supported #assert/#unassert format
+This cpp extension accepts the following format:
+#assert identifier
+#assert identifier ( pp-tokens )
+#unassert identifier
+#unassert identifier ( pp-tokens )
+%s: %s: Bad assertion predicate format
+The correct syntax for this cpp extension is:
+#assert identifier ( pp-token )
+%s: %s: directive is an upward-compatible ANSI C extension
+%s: This option requires an argument
+%s: %s: A macro has expanded recursively more than %s times. Further expansion will be disabled! Use command-line option: -Wp,-max_rec_depth=depth to recurse deeper.
+A status return from cpp to cfe
+Syntax Error
+The token read was unexpected.
+Syntax Error -- cannot backup
+The token read was unexpected.
+Yacc stack overflow
+The expression is too complicated to parse.
+Trailing comma in enumerator list
+The use of a trailing comma in an enumerator list is not standard C. There
+may be portability problems.
+3.5.2.2
+Empty declaration
+Empty declarations are invalid in standard C.
+3.5
+%s declared, but not referenced.
+redeclaration of '%s'; previous declaration at line %s in file '%s'
+Identifier redeclared in the same scope/block.
+3.1.2.3
+'%s' undefined; reoccurrences will not be reported.
+Non-function name referenced in function call.
+3.3.2.2(18)
+The number of arguments doesn't agree with the number in the declaration.
+3.3.2.2(5)
+'%s' section name longer than 8 characters. Name truncated.
+'%s' is already placed by pragma alloc_text.
+Cannot write ucode file while compiling %s
+1) The file system is full
+2) Permissions problem
+Must have corresponding formal argument for '%s'
+Parameter found in the declaration part, but not in the argument list.
+3.7.1(7)
+Non-prototype declaration is an obsolescent feature.
+The use of function definitions with separate parameter identifier
+and declaration lists (not prototype-format parameter type and
+identifier declarators) is an obsolescent feature.
+3.9.5
+Incompatible function declarations for %s
+For two function types to be compatible, both shall specify compatible
+return types. Moreover, the parameter type lists, if both are present,
+shall agree in the number of parameters and in use of the ellipsis
+terminator; corresponding parameters shall have compatible types. If
+one type has a parameter type list and the other type is specified by
+a function declarator that is not part of a function definition and
+contains an empty identifier list, the parameter list shall not have
+an ellipsis terminator and the type of each parameter shall be
+compatible with they type that results from application of the default
+argument promotions. If one type has a parameter type list and the
+other is specified by a function definition that contains a (possibly
+empty) identifier list, both shall agree in the number of parameters,
+and the type of each prototype parameter shall be compatible with the
+type that results from application of the default argument promotions
+to the type of the corresponding identifier. (For each parameter
+declared with function or array type, its type for these comparisons
+is the one that results from conversion to a pointer type. For each
+parameter declared with qualified type, its type for these comparisons
+is the unqualified version of its declared type.) There you have it!
+3.5.4.3(15)
+Incompatible function return type for this function.
+For two function types to be compatible, both shall specify compatible
+return types.
+3.5.4.3(15)
+The number of parameters for function is different from the previous declaration
+The parameter type lists, if both are present, shall agree in the
+number of parameters and in use of the ellipsis terminator.
+3.5.4.3(15)
+Incompatible type for the function parameter
+If both parameter type lists are present, corresponding
+parameters shall have compatible types.
+3.5.4.3(15)
+Function %s is redeclared with an incompatible argument type (after default argument promotion), which could lead to undefined run-time behaviour.
+The redeclaration could cause arguments at a call site to be passed
+inconsistently with what the function implementation expects, and
+parameters would therefore be accessed erroneously when executing the
+function body. Note that a float argument is promoted to a double
+when passed (potentially through fp registers) to an unprototyped
+function.
+3.5.4.3(15)
+prototype and non-prototype declaration found for %s, ellipsis terminator not allowed
+If one type has a parameter type list and the other type is specified
+by a function declarator that is not part of a function definition and
+contains an empty identifier list, the parameter list shall not have
+an ellipsis terminator and the type of each parameter shall be
+compatible with they type that results from application of the default
+argument promotions.
+3.5.4.3(15)
+prototype and non-prototype declaration found for %s, the type of this parameter is not compatible with the type after applying default argument promotion
+If one type has a parameter type list and the other type is specified
+by a function declarator that is not part of a function definition and
+contains an empty identifier list, the type of each parameter shall be
+compatible with the type that results from application of the default
+argument promotions.
+3.5.4.3(15)
+prototype declaration and non-prototype definition found for %s, the type of this parameter is not compatible with the type after applying default argument promotion
+If one type has a parameter type list and the other is specified by a
+function definition that contains a (possibly empty) identifier list,
+both shall agree in the number of parameters, and the type of each
+prototype parameter shall be compatible with the type that results
+from application of the default argument promotions to the type of the
+corresponding identifier.
+3.5.4.3(15)
+Empty declaration specifiers
+Standard C requires at least a storage class specifier, type specifier,
+or a type qualifier in declarations. 'extern int' assumed.
+3.5
+Can't write to the file %s
+1) The output file cannot be opened for writing.
+2) Out of file space.
+Duplicate '%s'
+typedef, extern, static, auto, register, const, volatile may not
+appear more than once in the same specifier list or qualifier list.
+Duplicate occurrence ignored.
+3.5.1(10) , 3.5.3(5)
+Null input
+There is nothing to compile.
+Illegal type combination
+3.5.2
+Missing ';' at end of structure / union member declaration
+In standard C, each member declaration must be terminated by a ';'. A
+terminating ';' is assumed.
+3.5.2.1
+Missing member name in structure / union
+In standard C, each member declaration have a member name. The missing
+member is assumed to not exist.
+3.5.2.1
+This variable is initialized twice.
+Neither 'const' or 'volatile' have any effect on function results.
+Qualifiers only apply to expressions designating an object that
+can be altered or examined.
+3.5.3(10)
+An integer constant expression is required here.
+The expression that defines the value of an enumeration constant
+shall be an integral constant expression that has a value
+representable as an int.
+3.5.2.2(28)
+(previous declaration of '%s' at line %s in file '%s')
+Must be an integer type greater than zero.
+The array size must be either a char, signed or unsigned integer or
+an enumerated type with a value greater than zero.
+3.5.4.2
+Array size cannot be a long long.
+Arrays with more than 2^32 elements are not yet supported.
+The array size must be either a char, signed or unsigned integer or
+an enumerated type with a value greater than zero.
+3.5.4.2
+bit-field '%s' width is not an integer constant
+The expression that specifies the width of a bit-field shall be an
+integral constant expression.
+3.5.2.1(15)
+bit-field '%s' width is negative
+The expression that specifies the width of a bit-field shall be
+non-negative.
+3.5.2.1(15)
+bit-field '%s' type required to be int, unsigned int, or signed int.
+A bit-field shall have type int, unsigned int, or signed int.
+3.5.2.1(30)
+bit-field %s's type not integer.
+Non-scalar type or pointer type to a non-object for increment or decrement operator.
+The operand of the prefix/postfix increment or decrement operator shall have scalar type; if it is of pointer type, it must point to an object.
+3.3.2.4(37), 3.3.3.1(25)
+Assign value to a function type.
+An assignment operator shall have a modifiable lvalue as its left operand.
+3.2.2.1(5)
+Assign value to an array.
+An assignment operator shall have a modifiable lvalue as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+Change value for variable of incomplete type.
+The operand of increment and decrement operator shall be a modifiable
+scalar lvalue. An assignment operator shall have a modifiable lvalue
+as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+The left-hand side of the '.' operator must be an addressable lvalue, when a bit-field is not contained within a unit of 32 bits alignment.
+This is a restriction in our implementation, which can be worked
+around by always accessing long long bit-fields indirectly (i.e.
+by means of the '->' operator).
+This expression is not an lvalue.
+3.2.2.1
+Modified an rvalue.
+3.2.2.1
+Change value for constant variable.
+The operand of increment and decrement operators shall be modifiable
+scalar lvalues. An assignment operator shall have a modifiable lvalue
+as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+Change value for constant field of a struct or union.
+An assignment operator shall have a modifiable lvalue as its left operand.
+3.3.2.4(36), 3.3.3.1(24), 3.2.2.1(5)
+Dereferenced a non-pointer.
+The operand of the unary * operator shall have pointer type.
+3.3.3.2(39)
+The operand of the unary + or - operator shall have arithmetic type.
+3.3.3.3(6)
+The operand of the unary ~ operator shall have integral type.
+3.3.3.3(6)
+The operand of the unary ! operator shall have scalar type.
+3.3.3.3(6)
+Constants must have arithmetic type.
+3.1.3
+Bad type name for cast operator
+The type name for the cast operator should either be void or a
+qualified or unqualified scalar type.
+3.3.4(22)
+Improper cast of non-scalar type expression.
+The operand for the cast operator shall be of scalar type.
+3.3.4(23)
+Cast a pointer into a non-integral type.
+A pointer may be converted to an integral type.
+3.3.4(31)
+Cast a non-integral type into a pointer.
+An integral type may be converted to a pointer.
+3.3.4(31)
+Duplicate member '%s'
+Two members of a struct may not have the same name.
+3.1.2.2(7,25)
+Invalid constant expression.
+Constant expressions shall not contain assignment, increment, decrement,
+function-call, or comma operators, except when they are contained within
+the operand of the sizeof operator.
+3.4(9)
+Constant expressions must be derived from a constant value or a constant
+variable.
+3.4
+Dangerous operand of '&'.
+The operand of the unary & operator shall be either a function
+designator or an lvalue that designates an object that is not a
+bit-field and is not declared with the register storage-class
+specifier. This operand is NOT an lvalue, but we let it pass.
+Note that a segmentation error with possible core dump will result
+when the resulting address does not denote a valid (declared)
+storage location. This feature will be discontinued in future
+releases of the compiler!
+3.3.3.2(36)
+Unacceptable operand of '&'.
+The operand of the unary & operator shall be either a function
+designator or an lvalue that designates an object that is not a
+bit-field and is not declared with the register storage-class
+specifier.
+3.3.3.2(36)
+'&' before array or function; ignored
+Unacceptable operand of sizeof operator.
+The sizeof operator shall not be applied to an expression that has
+function type or an incomplete type, to the parenthesized name of such
+a type, or to an lvalue that designates a bit-field object.
+3.3.3.4
+Unacceptable operand of a multiplicative operator.
+Each of the operands of a multiplicative operator shall have arithmetic type.
+3.3.5(18)
+Unacceptable operand of the remainder operator
+Each of the operands of the remainder (%) operator shall have integral type.
+3.3.5(18)
+Unacceptable operand of '+'.
+For the + operator, either both operands shall have arithmetic type, or
+one operand shall be a pointer to an object type and the other shall
+have integral type.
+3.3.6(39)
+Unacceptable operand of '-'.
+For the subtraction operator, one of the following shall hold: both operands
+have arithmetic type; operands are pointers to qualified or unqualified
+versions of compatible object types; or the left operand is a pointer
+to an object type and the right operand has integral type.
+3.3.6(39)
+Unacceptable operand of shift operator.
+Each of the operands of bitwise shift operators shall have integral type.
+3.3.7(9)
+Unacceptable operand of relational operator.
+For relational operators, one of the following shall hold: both
+operands have arithmetic type; both operands are pointers to qualified
+or unqualified versions of compatible object types; or both operands
+are pointers to qualified or unqualified versions of compatible
+incomplete types.
+3.3.8(32)
+Unacceptable operand of == or !=
+For the == or != operator, one of the following shall hold: both operands
+are pointers to qualified or unqualified versions of compatible types; one
+operand is a pointer to an object or incomplete type and the other is a
+pointer to a qualified or unqualified version of void; or one operand is
+a pointer and the other is a null pointer constant.
+3.3.9(21)
+Unacceptable operand of &.
+Each of the operands shall have integral type.
+3.3.10(7)
+Unacceptable operand of ^.
+Each of the operands shall have integral type.
+3.3.11(18)
+Unacceptable operand of |.
+Each of the operands shall have integral type.
+3.3.12(30)
+Unacceptable operand of &&.
+Each of the operands shall have scalar type.
+3.3.13(7)
+Unacceptable operand of ||.
+Each of the operands shall have scalar type.
+3.3.14(20)
+Unacceptable operand of conditional operator.
+The first operand of conditional operator shall have scalar type. One
+of the following shall hold for the second and third operands:
+both operands have arithmetic type; both operands have compatible
+structure or union types; both operands have void type; both operands
+are pointers to qualified or unqualified versions of compatible types;
+one operand is a pointer and the other is a null pointer constant; or
+one operand is pointer to an object or incomplete type and the other
+is a pointer to a qualified or unqualified version of void.
+3.3.15
+Duplicate label '%s'
+A label name can only occur once in a function.
+3.1.2.1(25)
+Division by zero.
+3.3.5
+Subscripting a non-array.
+3.3.2.1
+Subscripting an array of incomplete type which is not an object type.
+The element of the array shall have an object type.
+3.3.2.1
+Should only subscript an array with an integral expression
+3.3.2.1
+Subscripting an unbounded array
+3.3.2.1
+Array index out of range
+3.3.2.1
+Selector requires struct/union pointer as left hand side
+In K&R mode the expression is implicitly converted to the '.' selector
+for a struct/union left-hand side.
+3.3.2.3
+Selector requires struct/union as left hand side
+In K&R mode the expression is implicitly converted to the '->' selector
+for a struct/union pointer left-hand side.
+3.3.2.3
+member of structure or union required
+3.3.2.3
+types have different qualifier specifications
+For two qualified types to be compatible, both shall have the
+identically qualified version of a compatible type; qualified
+and unqualified versions of a type are distinct types. For two
+types to be compatible their types must be the same.
+3.5.3(26)
+Incompatible array type due to different array size
+For two array types to be compatible, both shall have compatible element
+types; if both size specifiers are present, they shall have the
+same value.
+3.5.4.2(11)
+Incompatible array type due to incompatible element type
+For two array types to be compatible, both shall have compatible element
+types.
+3.5.4.2(11)
+Incompatible pointer type assignment
+The type pointed to by the left-hand side of simple assignment
+statement is incompatible with the type pointed to by the right-hand side.
+3.3.16.1, 3.5.4.1(21)
+Incompatible base type of pointer type
+K&R feature.
+Type %s of %s is incompatible with type %s of %s
+Incompatible types can be resolved by casting or by other means.
+3.3.16.1
+illegal combination of pointer and integer
+Assigning an integral expression to a pointer is a bad practice.
+Type for %s is incompatible with %s
+Incompatible types can be resolved by casting or by other means.
+3.1.2.6
+Bad operand type for += or -=
+3.3.16.2(26)
+A case or default label appears outside a switch statement
+A case or default label shall appear only in a switch statement.
+3.6.1
+The controlling expression of the if statement is not scalar type
+The controlling expression of an if statement shall have scalar type.
+3.6.4.1
+The controlling expression of switch statement is not integral type
+The controlling expression of an switch statement shall have integral type.
+3.6.4.2(20)
+The case label is not an integral constant expression
+The case label shall be an integral constant expression.
+3.6.4.2(22)
+Duplicate case label in the same switch statement
+No two of the case constant expressions in the same switch statement
+shall have the same value after conversion.
+3.6.4.2(22)
+More than one default label in the same switch statement
+There may be at most one default label in a switch statement.
+3.6.4.2(23)
+The controlling expression of the iteration statement is not scalar
+type
+The controlling expression of a iteration statement shall have scalar
+type.
+3.6.5.1
+label '%s' used, but not defined
+The identifier in a goto statement shall name a label located
+somewhere in the enclosing function.
+3.6.6.1
+A continue statement shall appear only in or as a loop body
+3.6.6.2
+A break statement shall appear only in or as a switch body or loop body
+3.6.6.3
+A return statement with an expression should not appear
+in a function '%s', whose return type is void
+3.6.6.4(24)
+A return statement without an expression appears in a
+function '%s', whose return type is not void
+If a return statement without an expression is executed, and the value
+of the function call is used by the caller, the behavior is undefined.
+3.6.6.4(33)
+Internal Error: statement stack underflow
+Long double not supported; double assumed.
+Long float not standard; double assumed.
+Only 'register' allowed in parameter declaration
+The only storage-class specifier that shall occur in a parameter
+declaration is 'register'; illegal storage class ignored.
+3.5.4.3(25)
+Name(s) without types in a function declaration
+An old-style function declaration is not allowed to have names
+in the parameter list; useless names ignored
+3.5.4.3(26)
+Functions cannot return functions
+3.7.1(33), 3.3.2.2
+Functions cannot return a non-object type
+3.3.2.2
+enum declaration must contain enum literals
+Although structs or unions may delay the declaration of their members,
+a similar construction with enum does not exist and is not necessary,
+as there can be no mutual dependencies between the declaration of an
+enumerated type and any other type.
+3.5.2.3(27)
+Register qualification has no effect for this type of object
+Register declarations for array, struct, and function types have
+no effect.
+3.5.1(16), 3.5.1(19)
+Functions cannot be declared 'register'
+The declaration of an identifier for a function that has block
+scope shall have no explicit storage-class specifier other than
+'extern'.
+3.5.1(19)
+'%s' cannot be initialized
+The type of the entity to be initialized shall be an object type
+or an array of unknown size.
+3.5.7(32)
+Cannot initialize 'extern' variable '%s' within a function
+If the declaration of an identifier has block scope, and the
+identifier has 'extern' or 'static' linkage, the declaration
+shall have no initializer for the identifier; initialization
+allowed anyway.
+3.5.7(35)
+initializing an 'extern' is an ANSI C extension
+conflicting declarations for '%s'
+'static' and 'extern' declarations conflict. Which is meant?
+3.1.2.2(15), 3.1.2.2(27)
+Too many initial values for '%s'
+3.5.7(1)
+incompatible types in initialization
+3.3.16(35)
+redefinition of '%s'; previous definition at line %s in file '%s'
+Identifier redeclared in the same scope/block.
+3.1.2.3
+bit-fields as members of a union are an ANSI C invention.
+storage size for '%s' isn't known
+type mismatch in initialization
+Missing braces in a union initialization or illegally formed
+initialization.
+3.5.7(5)
+union '%s' only allowed one initializer for the first member
+3.5.7(5)
+width of '%s' exceeds its type
+the specified bitfield width is too large to be contained within a
+bitfield type.
+structure has no member named '%s'
+This is allowed for compatibility with AT&T pcc-based compilers.
+Reference of an expression of void type or an incomplete type.
+3.2.2.1
+element size of an array shall not be zero
+3.2.2.5(25)
+invalid combination of type specifiers
+Although order is unimportant, not all type specifiers can occur together.
+3.5.2
+declaration must at least declare an identifier, tag, or the member of an enumeration
+3.5(16)
+at most one storage class may be given in the declaration
+Duplicate occurrence ignored.
+3.5.1(10)
+size of function's return type is zero
+The return type of a function must be void or an object type other than array.
+3.7.1(33)
+Expecting an integral return type from the main function
+identifier missing from parameter declaration
+Prototypes for function definitions require identifiers in parameter
+declarations.
+3.7.1(4)
+only 'register' allowed for storage class for parameters
+The declarations in the declaration list shall contain no storage class
+other than 'register', and no initializations.
+3.7.1(10)
+parameters declarations can not have initializations
+3.7.1(10)
+only one instance of 'void' allowed in the parameter list
+'void' must occur by itself (specifying that the function has no parameters).
+3.5.4.3(1)
+%s must have function type
+1) An argument list must be explicitly present in the declarator; it cannot
+ be inherited from a typedef (3.5.4.3).
+2) The declarator is not a function.
+3.7.1(30)
+Illegal hexadecimal constant
+You have no digits after the 0x or 0X. 0x0 assumed.
+3.1.3.2
+value overflows its type in this context. Value is set to be '%s'!
+3.2.1.4
+value is outside range representable for type '%s'
+missing member name
+K&R mode permits a missing member name; otherwise, only bitfields can omit
+the member name.
+3.5.2.1(10)
+useless keyword or type name in declaration
+Type was ignored.
+'%s' declared within and is limited to this function prototype
+Possible program error, since parameter type checking will always fail
+unless the type declaration is visible to the caller.
+3.1.2.1(35)
+Extra spaces within operator, %s assumed
+In ANSI C, the compound assignment operator cannot have embedded
+white space characters.
+3.1.5
+missing size for array '%s'
+Incomplete types permitted for identifiers with internal or
+external linkage, but not automatic linkage.
+3.1.2.5(10)
+can't jump into (from outside of) the body of a 'try' or into either type of handler
+'%s' missing, please #include excpt.h
+excpt.h required to declare exception statements, intrinsics or compiler
+runtime names.
+local function declarations cannot be 'static'
+A function declaration can only contain the storage-class 'static'
+if it is at file scope. Declaration made 'extern'.
+3.5.1(19)
+static function '%s' declared and referenced, but not defined.
+If an identifier declared with internal linkage is used in an
+expression (other than as a part of the operand of a sizeof
+operator), there shall be exactly one external definition for
+the identifier in the translation unit.
+3.7(12)
+pragma argument '%s' must be declared prior to being used in a pragma
+Pragma name ignored.
+Pragma not supported
+'%s' not enabled as intrinsic
+It may have already appeared in a function pragma, or never occurred in
+an intrinsic pragma.
+'%s' is already enabled as an intrinsic
+weak definition for '%s' is later redefined; pragma weak ignored.
+definition of primary name '%s' not found; pragma weak ignored.
+definition of secondary name '%s' not found; pragma weak ignored.
+primary name '%s' is declared as a common or external, and is not defined
+with initial value within this file; pragma weak ignored.
+useless '%s' storage class ignored
+array of functions not allowed
+The element type must be an object type representing a region
+of data storage which can represent values.
+3.1.2.5(23)
+array of voids not allowed
+The element type must be an object type representing a region
+of data storage which can represent values.
+3.1.2.5(23)
+argument for pragma pack must be an integer constant; pragma ignored
+'%s' has wrong tag type.
+Identifier redeclared in the same scope/block.
+3.1.2.3
+missing dimension bound
+For multidimensional arrays, the constant bounds of the array may be
+omitted only for the first member of the sequence.
+3.1.2.5(23)
+Internal error in parameters to function substr; loc: '%s'; len: '%s'.
+Internal error in parameters to function insertstr; indx: '%s'.
+Internal error in function get_tag_name; input is a non-tagged type.
+Internal error in function gen_type_str -- not a type tree '%s'
+Cannot open file '%s'
+Prototype should be moved after tag or a typedef declaration.
+Please look for comments in the extracted header file.
+The extracted header file includes prototypes for static functions,
+which should be removed, if you wish to include the header in a source file
+other than the originator.
+ANSI C requires formal parameter before "..."
+This extension is meant to be used for compatibility with varargs.h
+3.5.4.3(35)
+syntax error: "&..." invalid
+extension used to access "..." formal arguments.
+function '%s' initialized like a variable
+The type of entity to be initialized shall be an object type or an
+array of unknown size.
+3.5.7(31)
+initializer not an array aggregate
+The initializer for an object that has aggregate type shall be a
+brace-enclosed list of initializers for the members of the aggregate,
+written in increasing subscript or member order.
+3.5.7(20)
+'%s' type is incomplete; cannot initialize
+Was the struct ever defined?
+3.5.7.(31)
+'%s' is not standard ANSI.
+This keyword/type is not defined in strict ANSI mode.
+3.1.1
+not a legal asm string
+The first operand of an asm string should be, after argument substitution,
+a legal assembly string.
+The -float option will be ignored in ANSI mode.
+The -float option is ignored, since otherwise program semantics would
+violate the ANSI standard. In particular, fp constants are always
+'double' with ANSI-C, while with -float the type of fp constants will
+depend on the context and may be 'float'.
+ANSI C support unavailable with C compiler bundled with RISC/os
+The C compiler bundled with RISC/os does not support ANSI C. ANSI
+C support requires a separate license.
+Ignored invalid warning number(s) in -woff option, %s%s !
+Warning numbers must be in the range %s to %s.
+The set of warning numbers in cfe is disjoint from the set of warning numbers
+in accom, since accom warnings cannot be mapped one-to-one to cfe warnings.
+'%s' not handled as an intrinsic due to incompatible argument types .
+'__unalign' only qualifies pointers
+'__unalign' indicates the object pointed at by pointer is unaligned (e.g.,
+int * __unalign p). This is an extension to ANSI C and like 'volatile'
+and 'const' can follow the '*' in pointer declarations, but unlike both
+cannot qualify a base type.
+index expression is an anachronism
+ANSI C++ doesn't support array index expressions in delete.
+5.3.4
+member cannot be of function or incomplete type.
+3.5.2.1(12)
+Illegal lint option, '%s', is ignored.
+cannot open header message buffer file
+cannot write header message buffer file
+cannot read header message buffer file
+cannot seek in header message buffer file
+struct/union/enum '%s' is used, but not defined
+static '%s' unused
+nonportable character comparison (chars may be signed or unsigned)
+redundant comparison of unsigned with constant expression
+redundant statement, control flow cannot reach this statement
+'%s' may be used before set
+function parameter '%s' is not used in function '%s'
+'%s' can be const qualified, since it is not set within its lifetime.
+'%s' is not used in function '%s'
+'%s' set but unused in function '%s'
+control may fall through %s statement
+function '%s' has return(e); and return;
+function '%s' may return random value to place of invocation %s
+label without goto: '%s'
+width of %s constant is smaller than size of type (%s)
+explicit conversion from '%s' to '%s' %s
+implicit conversion from '%s' to '%s' %s
+'%s' may be indistinguishable from '%s' due to internal name truncation
+Promoted formal parameter and promoted argument have incompatible types
+No prototype for the definition of '%s' %s
+References to '%s' are substituted by its literal initializer
+ (as included in %s)
+==============
+unsupported language linkage
+string-literal specifies an unsupported linkage
+7.4(1)
+No prototype for the call to %s
+To achieve better type-checking, there should be a full prototype for
+the function being called.
+3.5.4.3
+'inline' only applies to function declarations
+leave statment can occur only within try body
+Microsoft extension
+Use of a Microsoft extension detected without usage of the
+compiler option -msft.
+No parameter mentioned
+A file with no declarations or definitions is accepted as an extension to ANSI C
+The translation unit must contain at least one external definition.
+3.7
+Incompatible signed and unsigned version of a type
+Yacc initialization error
+Internal error: yacc cannot initialize itself.
+The cfe option %s may not be in future releases. We suggest that you not use this option!
+Incompatible char and unsigned char versions of a type
+Lshift with undefined behaviour.
+Lshift with a negative right operand, or a right operand that is greater
+than or equal to the width in bits of the promoted left operand, results
+in undefined behaviour.
+3.3.7(11)
+useless type name in declaration, possibly a semicolon is missing.
+Type was ignored.
+constant initializer expression is invalid (refers to automatic variables).
+All the expressions in an initializer for an object that has static storage
+duration or in the initializer list for an object that has aggregate or
+union type shall be constant expressions. Otherwise, unexpected results
+may occur.
+3.5.7(32) and 3.4
+invalid explicit or implicit conversion of an address constant to an integral value in a constant initializing expression.
+An address constant in a constant initializing expression can neither
+initialize a bit-field nor be directly or indirectly converted to an
+integral type of size different from an address type.
+6.4
diff --git a/tools/ido-recomp/windows/ld.exe b/tools/ido-recomp/windows/ld.exe
new file mode 100644
index 000000000..935091cc9
Binary files /dev/null and b/tools/ido-recomp/windows/ld.exe differ
diff --git a/tools/ido-recomp/windows/libc.so b/tools/ido-recomp/windows/libc.so
new file mode 100644
index 000000000..17495ef6c
Binary files /dev/null and b/tools/ido-recomp/windows/libc.so differ
diff --git a/tools/ido-recomp/windows/libc.so.1 b/tools/ido-recomp/windows/libc.so.1
new file mode 100644
index 000000000..17495ef6c
Binary files /dev/null and b/tools/ido-recomp/windows/libc.so.1 differ
diff --git a/tools/ido-recomp/windows/libexc.so b/tools/ido-recomp/windows/libexc.so
new file mode 100644
index 000000000..209c53666
Binary files /dev/null and b/tools/ido-recomp/windows/libexc.so differ
diff --git a/tools/ido-recomp/windows/libgen.so b/tools/ido-recomp/windows/libgen.so
new file mode 100644
index 000000000..7b8ec7fd5
Binary files /dev/null and b/tools/ido-recomp/windows/libgen.so differ
diff --git a/tools/ido-recomp/windows/libm.so b/tools/ido-recomp/windows/libm.so
new file mode 100644
index 000000000..05bf47817
Binary files /dev/null and b/tools/ido-recomp/windows/libm.so differ
diff --git a/tools/ido-recomp/windows/msys-2.0.dll b/tools/ido-recomp/windows/msys-2.0.dll
new file mode 100644
index 000000000..a986a8d0b
Binary files /dev/null and b/tools/ido-recomp/windows/msys-2.0.dll differ
diff --git a/tools/ido-recomp/windows/strip.exe b/tools/ido-recomp/windows/strip.exe
new file mode 100644
index 000000000..a6974caec
Binary files /dev/null and b/tools/ido-recomp/windows/strip.exe differ
diff --git a/tools/ido-recomp/windows/ugen.exe b/tools/ido-recomp/windows/ugen.exe
new file mode 100644
index 000000000..807f78068
Binary files /dev/null and b/tools/ido-recomp/windows/ugen.exe differ
diff --git a/tools/ido-recomp/windows/ujoin.exe b/tools/ido-recomp/windows/ujoin.exe
new file mode 100644
index 000000000..94d2835c2
Binary files /dev/null and b/tools/ido-recomp/windows/ujoin.exe differ
diff --git a/tools/ido-recomp/windows/uld.exe b/tools/ido-recomp/windows/uld.exe
new file mode 100644
index 000000000..b6db77bc7
Binary files /dev/null and b/tools/ido-recomp/windows/uld.exe differ
diff --git a/tools/ido-recomp/windows/umerge.exe b/tools/ido-recomp/windows/umerge.exe
new file mode 100644
index 000000000..d53f253e7
Binary files /dev/null and b/tools/ido-recomp/windows/umerge.exe differ
diff --git a/tools/ido-recomp/windows/uopt.exe b/tools/ido-recomp/windows/uopt.exe
new file mode 100644
index 000000000..8b787a79d
Binary files /dev/null and b/tools/ido-recomp/windows/uopt.exe differ
diff --git a/tools/ido-recomp/windows/upas.exe b/tools/ido-recomp/windows/upas.exe
new file mode 100644
index 000000000..e43ebdf65
Binary files /dev/null and b/tools/ido-recomp/windows/upas.exe differ
diff --git a/tools/ido-recomp/windows/usplit.exe b/tools/ido-recomp/windows/usplit.exe
new file mode 100644
index 000000000..d55270152
Binary files /dev/null and b/tools/ido-recomp/windows/usplit.exe differ
diff --git a/tools/ido5.3_compiler/LICENSE.md b/tools/ido5.3_compiler/LICENSE.md
deleted file mode 100644
index 015107d41..000000000
--- a/tools/ido5.3_compiler/LICENSE.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Silicon Graphics Freeware Legal Notice
-## Copyright 1995, Silicon Graphics, Inc. -- ALL RIGHTS RESERVED
-
-You may copy, modify, use and distribute this software, (i) provided that you include the entirety of this reservation of rights notice in all such copies, and (ii) you comply with any additional or different obligations and/or use restrictions specified by any third party owner or supplier of the software in other notices that may be included with the software.
-
-**SGI DISCLAIMS ALL WARRANTIES WITH RESPECT TO THIS SOFTWARE, EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. SGI SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST REVENUES, LOST PROFITS, OR LOSS OF PROSPECTIVE ECONOMIC ADVANTAGE, RESULTING FROM THE USE OR MISUSE OF THIS SOFTWARE.**
-
-**U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:**
-
-Use, duplication or disclosure by the Government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement. Unpublished - rights reserved under the Copyright Laws of United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
-
-## Product Support
-
-Freeware products are not supported by Silicon Graphics or any of its support providers. The software contained in this package is made available through the generous efforts of their authors. Although they are interested in your feedback, they are under no obligation to address bugs, enhancements, or answer questions.
-
-----
-
-**NOTE:** This license was copied verbatim from https://web.archive.org/web/19991008090202/http://toolbox.sgi.com/TasteOfDT/public/freeware1.0/legal_notice.html .
diff --git a/tools/ido5.3_compiler/lib/libmalloc.so b/tools/ido5.3_compiler/lib/libmalloc.so
deleted file mode 100644
index 2a59e0a49..000000000
Binary files a/tools/ido5.3_compiler/lib/libmalloc.so and /dev/null differ
diff --git a/tools/ido5.3_compiler/lib/libmalloc_old.so b/tools/ido5.3_compiler/lib/libmalloc_old.so
deleted file mode 100644
index 2a14987d1..000000000
Binary files a/tools/ido5.3_compiler/lib/libmalloc_old.so and /dev/null differ
diff --git a/tools/ido5.3_compiler/lib/rld b/tools/ido5.3_compiler/lib/rld
deleted file mode 100755
index 727b42699..000000000
Binary files a/tools/ido5.3_compiler/lib/rld and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/bin/cc b/tools/ido5.3_compiler/usr/bin/cc
deleted file mode 100755
index 2936fc3fd..000000000
Binary files a/tools/ido5.3_compiler/usr/bin/cc and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/acpp b/tools/ido5.3_compiler/usr/lib/acpp
deleted file mode 100755
index d5392cf67..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/acpp and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/as0 b/tools/ido5.3_compiler/usr/lib/as0
deleted file mode 100755
index badf8c83b..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/as0 and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/as1 b/tools/ido5.3_compiler/usr/lib/as1
deleted file mode 100755
index c246db537..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/as1 and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/cfe b/tools/ido5.3_compiler/usr/lib/cfe
deleted file mode 100755
index 305a50be4..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/cfe and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/copt b/tools/ido5.3_compiler/usr/lib/copt
deleted file mode 100755
index 2e689fdca..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/copt and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/ugen b/tools/ido5.3_compiler/usr/lib/ugen
deleted file mode 100755
index beb81f4bd..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/ugen and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/ujoin b/tools/ido5.3_compiler/usr/lib/ujoin
deleted file mode 100755
index 23a4cbbde..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/ujoin and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/uld b/tools/ido5.3_compiler/usr/lib/uld
deleted file mode 100755
index bd182fdc7..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/uld and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/umerge b/tools/ido5.3_compiler/usr/lib/umerge
deleted file mode 100755
index e8e09e664..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/umerge and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/uopt b/tools/ido5.3_compiler/usr/lib/uopt
deleted file mode 100755
index 5451428ba..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/uopt and /dev/null differ
diff --git a/tools/ido5.3_compiler/usr/lib/usplit b/tools/ido5.3_compiler/usr/lib/usplit
deleted file mode 100755
index 112abfcde..000000000
Binary files a/tools/ido5.3_compiler/usr/lib/usplit and /dev/null differ
diff --git a/tools/ido5.3_recomp/.gitignore b/tools/ido5.3_recomp/.gitignore
deleted file mode 100644
index 6b747abaa..000000000
--- a/tools/ido5.3_recomp/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/recomp
-/recomp-conservative
-
-/cc*
-/cfe*
-/uopt*
-/ugen*
-/as1*
-/acpp*
-/copt*
-/ujoin*
-/uld*
-/umerge*
-/usplit*
-
-/err.english.cc
diff --git a/tools/ido5.3_recomp/Makefile b/tools/ido5.3_recomp/Makefile
deleted file mode 100644
index 750be8805..000000000
--- a/tools/ido5.3_recomp/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-IRIX_ROOT := ../ido5.3_compiler
-
-cc: OPT_CFLAGS := -O2
-cfe: OPT_CFLAGS := -O2
-uopt: OPT_CFLAGS := -O2
-ugen: OPT_CFLAGS := -O2
-as1: OPT_CFLAGS := -O2
-acpp: OPT_CFLAGS := -O2
-
-RECOMP := recomp
-
-# determine host OS for flags
- UNAME_S := $(shell uname -s)
- UNAME_P := $(shell uname -p)
-
-ifeq ($(UNAME_S),Darwin)
- HOST_OS := macOS
-else ifeq ($(UNAME_S),Linux)
- HOST_OS := linux
-else ifeq ($(OS),Windows_NT)
- HOST_OS := cygwin
-else
- $(error Unsupported host OS for Makefile)
-endif
-
-CFLAGS := -fno-strict-aliasing -Wno-tautological-compare
-CLIBS := -lm
-
-ifeq ($(HOST_OS),macOS)
- CFLAGS += -Wno-deprecated-declarations
- ifeq (,$(findstring arm,$(shell uname -p)))
- # only add flags on x86_64 macOS
- CFLAGS += -fno-pie
- endif
-else
- CFLAGS += -no-pie
-endif
-
-ugen_c.c: RECOMP_FLAGS := --conservative
-
-all: cc cfe uopt ugen as1 acpp copt ujoin uld umerge usplit err.english.cc
-
-clean:
- $(RM) cc* cfe* uopt* ugen* as1* acpp* copt* ujoin* uld* umerge* usplit* err.english.cc $(RECOMP) libc_impl.o
-
-$(RECOMP): recomp.cpp
- $(CXX) $^ -o $@ -std=c++11 -O2 -Wno-switch `pkg-config --cflags --libs capstone`
-
-libc_impl.o: libc_impl.c libc_impl.h
- $(CC) $< -c -O2 -DIDO53 $(CFLAGS)
-
-err.english.cc: $(IRIX_ROOT)/usr/lib/err.english.cc
- cp $^ $@
-
-cc_c.c: $(IRIX_ROOT)/usr/bin/cc $(RECOMP)
- ./$(RECOMP) $< > $@
-
-%_c.c: $(IRIX_ROOT)/usr/lib/% $(RECOMP)
- ./$(RECOMP) $(RECOMP_FLAGS) $< > $@
-
-%: %_c.c libc_impl.o
- $(CC) libc_impl.o $< -o $@ $(OPT_CFLAGS) $(CFLAGS) $(CLIBS)
-
-.PHONY: all clean
-.DEFAULT_TARGET := all
diff --git a/tools/ido5.3_recomp/elf.h b/tools/ido5.3_recomp/elf.h
deleted file mode 100755
index 91ba5fe20..000000000
--- a/tools/ido5.3_recomp/elf.h
+++ /dev/null
@@ -1,99 +0,0 @@
-#ifndef ELF_H
-#define ELF_H
-
-#include
-
-#define EI_DATA 5
-#define EI_NIDENT 16
-#define SHT_SYMTAB 2
-#define SHT_DYNAMIC 6
-#define SHT_REL 9
-#define SHT_DYNSYM 11
-#define SHT_MIPS_REGINFO 0x70000006
-#define STN_UNDEF 0
-#define STT_OBJECT 1
-#define STT_FUNC 2
-#define DT_PLTGOT 3
-#define DT_MIPS_LOCAL_GOTNO 0x7000000a
-#define DT_MIPS_SYMTABNO 0x70000011
-#define DT_MIPS_GOTSYM 0x70000013
-
-#define ELF32_R_SYM(info) ((info) >> 8)
-#define ELF32_R_TYPE(info) ((info) & 0xff)
-
-#define ELF32_ST_TYPE(info) ((info) & 0xf)
-
-#define R_MIPS_26 4
-#define R_MIPS_HI16 5
-#define R_MIPS_LO16 6
-
-#define SHN_UNDEF 0
-#define SHN_COMMON 0xfff2
-#define SHN_MIPS_ACOMMON 0xff00
-#define SHN_MIPS_TEXT 0xff01
-#define SHN_MIPS_DATA 0xff02
-
-typedef uint32_t Elf32_Addr;
-typedef uint32_t Elf32_Off;
-
-typedef struct {
- uint8_t e_ident[EI_NIDENT];
- uint16_t e_type;
- uint16_t e_machine;
- uint32_t e_version;
- Elf32_Addr e_entry;
- Elf32_Off e_phoff;
- Elf32_Off e_shoff;
- uint32_t e_flags;
- uint16_t e_ehsize;
- uint16_t e_phentsize;
- uint16_t e_phnum;
- uint16_t e_shentsize;
- uint16_t e_shnum;
- uint16_t e_shstrndx;
-} Elf32_Ehdr;
-
-typedef struct {
- uint32_t sh_name;
- uint32_t sh_type;
- uint32_t sh_flags;
- Elf32_Addr sh_addr;
- Elf32_Off sh_offset;
- uint32_t sh_size;
- uint32_t sh_link;
- uint32_t sh_info;
- uint32_t sh_addralign;
- uint32_t sh_entsize;
-} Elf32_Shdr;
-
-typedef struct {
- uint32_t st_name;
- Elf32_Addr st_value;
- uint32_t st_size;
- uint8_t st_info;
- uint8_t st_other;
- uint16_t st_shndx;
-} Elf32_Sym;
-
-typedef struct {
- Elf32_Addr r_offset;
- uint32_t r_info;
-} Elf32_Rel;
-
-typedef struct
-{
- uint32_t ri_gprmask; /* General registers used. */
- uint32_t ri_cprmask[4]; /* Coprocessor registers used. */
- int32_t ri_gp_value; /* $gp register value. */
-} Elf32_RegInfo;
-
-typedef struct
-{
- int32_t d_tag; /* Dynamic entry type */
- union {
- uint32_t d_val; /* Integer value */
- Elf32_Addr d_ptr; /* Address value */
- } d_un;
-} Elf32_Dyn;
-
-#endif
diff --git a/tools/ido5.3_recomp/header.h b/tools/ido5.3_recomp/header.h
deleted file mode 100644
index b4cd0d316..000000000
--- a/tools/ido5.3_recomp/header.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "libc_impl.h"
-#include "helpers.h"
-
-#define RM_RN 0
-#define RM_RZ 1
-#define RM_RP 2
-#define RM_RM 3
-
-union FloatReg {
- float f[2];
- uint32_t w[2];
- double d;
-};
-
-#define cvt_w_d(f) \
- ((fcsr & RM_RZ) ? ((isnan(f) || f <= -2147483649.0 || f >= 2147483648.0) ? (fcsr |= 0x40, 2147483647) : (int)f) : (assert(0), 0))
-
-#define cvt_w_s(f) cvt_w_d((double)f)
-
-static union FloatReg f0 = {{0, 0}}, f2 = {{0, 0}}, f4 = {{0, 0}}, f6 = {{0, 0}}, f8 = {{0, 0}},
-f10 = {{0, 0}}, f12 = {{0, 0}}, f14 = {{0, 0}}, f16 = {{0, 0}}, f18 = {{0, 0}}, f20 = {{0, 0}},
-f22 = {{0, 0}}, f24 = {{0, 0}}, f26 = {{0, 0}}, f28 = {{0, 0}}, f30 = {{0, 0}};
-static uint32_t fcsr = 1;
diff --git a/tools/ido5.3_recomp/helpers.h b/tools/ido5.3_recomp/helpers.h
deleted file mode 100755
index b2bd23517..000000000
--- a/tools/ido5.3_recomp/helpers.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef HELPERS_H
-#define HELPERS_H
-
-#include
-
-#define MEM_U32(a) (*(uint32_t *)(mem + a))
-#define MEM_S32(a) (*(int32_t *)(mem + a))
-#define MEM_U16(a) (*(uint16_t *)(mem + ((a) ^ 2)))
-#define MEM_S16(a) (*(int16_t *)(mem + ((a) ^ 2)))
-#define MEM_U8(a) (*(uint8_t *)(mem + ((a) ^ 3)))
-#define MEM_S8(a) (*(int8_t *)(mem + ((a) ^ 3)))
-
-#endif
diff --git a/tools/ido5.3_recomp/libc_impl.c b/tools/ido5.3_recomp/libc_impl.c
deleted file mode 100755
index 76eb34fed..000000000
--- a/tools/ido5.3_recomp/libc_impl.c
+++ /dev/null
@@ -1,2629 +0,0 @@
-#define _GNU_SOURCE // for sigset
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifdef __CYGWIN__
-#include
-#endif
-
-#ifdef __APPLE__
-#include
-#include
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "libc_impl.h"
-#include "helpers.h"
-
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
-#define STRING(param) size_t param##_len = wrapper_strlen(mem, param##_addr); \
- char param[param##_len + 1]; \
- for (size_t i = 0; i <= param##_len; i++) { \
- param[i] = MEM_S8(param##_addr + i); \
- }
-
-#if !defined(IDO53) && !defined(IDO71) && !defined(IDO72)
-#define IDO71
-#endif
-
-#define MEM_REGION_START 0xfb00000
-#define MEM_REGION_SIZE (512 * 1024 * 1024)
-
-#ifdef IDO53
-// IDO 5.3
-#define IOB_ADDR 0x0fb528e4
-#define ERRNO_ADDR 0x0fb52720
-#define CTYPE_ADDR 0x0fb504f0
-#define LIBC_ADDR 0x0fb50000
-#define LIBC_SIZE 0x3000
-#endif
-
-#ifdef IDO71
-// IDO 7.1
-#define IOB_ADDR 0x0fb4ee44
-#define ERRNO_ADDR 0x0fb4ec80
-#define CTYPE_ADDR 0x0fb4cba0
-#define LIBC_ADDR 0x0fb4c000
-#define LIBC_SIZE 0x3000
-#endif
-
-#ifdef IDO72
-// IDO 7.2
-#define IOB_ADDR 0x0fb49454
-#define ERRNO_ADDR 0x0fb49290
-#define CTYPE_ADDR 0x0fb46db0
-#define LIBC_ADDR 0x0fb46000
-#define LIBC_SIZE 0x4000
-#endif
-
-#define STDIN_ADDR IOB_ADDR
-#define STDOUT_ADDR (IOB_ADDR + 0x10)
-#define STDERR_ADDR (IOB_ADDR + 0x20)
-#define STDIN ((struct FILE_irix *)&MEM_U32(STDIN_ADDR))
-#define STDOUT ((struct FILE_irix *)&MEM_U32(STDOUT_ADDR))
-#define STDERR ((struct FILE_irix *)&MEM_U32(STDERR_ADDR))
-
-#define MALLOC_BINS_ADDR custom_libc_data_addr
-#define STRTOK_DATA_ADDR (MALLOC_BINS_ADDR + (30 - 3) * 4)
-#define INTBUF_ADDR (STRTOK_DATA_ADDR + 4)
-
-#define SIGNAL_HANDLER_STACK_START LIBC_ADDR
-
-#define NFILE 100
-
-#define IOFBF 0000 /* full buffered */
-#define IOLBF 0100 /* line buffered */
-#define IONBF 0004 /* not buffered */
-#define IOEOF 0020 /* EOF reached on read */
-#define IOERR 0040 /* I/O error from system */
-
-#define IOREAD 0001 /* currently reading */
-#define IOWRT 0002 /* currently writing */
-#define IORW 0200 /* opened for reading and writing */
-#define IOMYBUF 0010 /* stdio malloc()'d buffer */
-
-#define STDIO_BUFSIZE 16384
-
-struct timespec_t_irix {
- int tv_sec;
- int tv_nsec;
-};
-
-struct FILE_irix {
- int _cnt;
- uint32_t _ptr_addr;
- uint32_t _base_addr;
- uint8_t pad[2];
- uint8_t _file;
- uint8_t _flag;
-};
-
-static struct {
- struct {
- uint64_t (*trampoline)(uint8_t *mem, uint32_t sp, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t fp_dest);
- uint8_t *mem;
- uint32_t fp_dest;
- } handlers[65];
- volatile uint32_t recursion_level;
-} signal_context;
-
-static uint32_t cur_sbrk;
-static uint32_t bufendtab[NFILE]; // this version contains the size and not the end ptr
-static uint32_t custom_libc_data_addr;
-
-#define _U 01 /* Upper case */
-#define _L 02 /* Lower case */
-#define _N 04 /* Numeral (digit) */
-#define _S 010 /* Spacing character */
-#define _P 020 /* Punctuation */
-#define _C 040 /* Control character */
-#define _B 0100 /* Blank */
-#define _X 0200 /* heXadecimal digit */
-
-static char ctype[] = { 0,
-
-/* 0 1 2 3 4 5 6 7 */
-
-/* 0*/ _C, _C, _C, _C, _C, _C, _C, _C,
-/* 10*/ _C, _S|_C, _S|_C, _S|_C, _S|_C, _S|_C, _C, _C,
-/* 20*/ _C, _C, _C, _C, _C, _C, _C, _C,
-/* 30*/ _C, _C, _C, _C, _C, _C, _C, _C,
-/* 40*/ _S|_B, _P, _P, _P, _P, _P, _P, _P,
-/* 50*/ _P, _P, _P, _P, _P, _P, _P, _P,
-/* 60*/ _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X,
-/* 70*/ _N|_X, _N|_X, _P, _P, _P, _P, _P, _P,
-/*100*/ _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U,
-/*110*/ _U, _U, _U, _U, _U, _U, _U, _U,
-/*120*/ _U, _U, _U, _U, _U, _U, _U, _U,
-/*130*/ _U, _U, _U, _P, _P, _P, _P, _P,
-/*140*/ _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
-/*150*/ _L, _L, _L, _L, _L, _L, _L, _L,
-/*160*/ _L, _L, _L, _L, _L, _L, _L, _L,
-/*170*/ _L, _L, _L, _P, _P, _P, _P, _C,
-/*200*/ 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-#define REDIRECT_USR_LIB
-
-#ifdef REDIRECT_USR_LIB
-static char bin_dir[PATH_MAX + 1];
-#endif
-static int g_file_max = 3;
-
-
-/* Compilation Target/Emulation Host Page Size Determination */
-#if defined(__CYGWIN__) || (defined(__linux__) && defined(__aarch64__))
-#define RUNTIME_PAGESIZE
-/* ARM64 linux can have page sizes of 4kb, 16kb, or 64kb */
-/* Set in main before running the translated code */
-static size_t g_Pagesize;
-
-#define TRUNC_PAGE(x) ((x) & ~(g_Pagesize - 1))
-#define ROUND_PAGE(x) (TRUNC_PAGE((x) + (g_Pagesize - 1)))
-
-#elif defined(__APPLE__)
-/* https://developer.apple.com/documentation/apple-silicon/addressing-architectural-differences-in-your-macos-code */
-#define TRUNC_PAGE(x) (trunc_page((x)))
-#define ROUND_PAGE(x) (round_page((x)))
-
-#else
-/* A fixed 4KB page size for x64 linux (is there anything else?) */
-#define TRUNC_PAGE(x) ((x) & ~(0x1000 - 1))
-#define ROUND_PAGE(x) (TRUNC_PAGE((x) + (0x1000 - 1)))
-#endif /* PageSize Macros */
-
-static uint8_t *memory_map(size_t length)
-{
-#ifdef __CYGWIN__
- uint8_t *mem = mmap(0, length, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
-#else
- uint8_t *mem = mmap(0, length, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-#endif
-
- assert(TRUNC_PAGE((uintptr_t)mem) == (uintptr_t)mem);
- if (mem == MAP_FAILED) {
- perror("mmap (memory_map)");
- exit(1);
- }
- return mem;
-}
-
-static void memory_allocate(uint8_t *mem, uint32_t start, uint32_t end)
-{
- assert(start >= MEM_REGION_START);
- assert(end <= MEM_REGION_START + MEM_REGION_SIZE);
- // `start` will be passed to mmap,
- // so it has to be host aligned in order to keep the guest's pages valid
- assert(start == TRUNC_PAGE(start));
-#ifdef __CYGWIN__
- uintptr_t _start = TRUNC_PAGE((uintptr_t)mem + start);
- uintptr_t _end = ROUND_PAGE((uintptr_t)mem + end);
-
- if(mprotect((void*)_start, _end - _start, PROT_READ | PROT_WRITE) < 0) {
- perror("mprotect (memory_allocate)");
- exit(1);
- }
-#else
- void *addr = (void *)TRUNC_PAGE((uintptr_t)mem + start);
- size_t len = end - start;
-
- if (mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0) == MAP_FAILED) {
- perror("mmap (memory_allocate)");
- exit(1);
- }
-#endif /* __CYGWIN__ */
-}
-
-static void memory_unmap(uint8_t *mem, size_t length)
-{
- if (munmap(mem, length)) {
- perror("munmap");
- exit(1);
- }
-}
-
-
-static void free_all_file_bufs(uint8_t *mem) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(IOB_ADDR);
- for (int i = 0; i < g_file_max; i++) {
- if (f[i]._flag & IOMYBUF) {
- wrapper_free(mem, f[i]._base_addr);
- }
- }
-}
-
-static void find_bin_dir(void) {
-#ifdef REDIRECT_USR_LIB
- // gets the current executable's path
- char path[PATH_MAX + 1] = {0};
-#ifdef __CYGWIN__
- uint32_t size = GetModuleFileName(NULL, path, PATH_MAX);
- if (size == 0 || size == PATH_MAX) {
- return;
- }
-#elif defined __APPLE__
- uint32_t size = PATH_MAX;
- if (_NSGetExecutablePath(path, &size) < 0) {
- return;
- }
-#else
- ssize_t size = readlink("/proc/self/exe", path, PATH_MAX);
- if (size < 0 || size == PATH_MAX) {
- return;
- }
-#endif
-
- strcpy(bin_dir, dirname(path));
-#endif
-}
-
-int main(int argc, char *argv[]) {
- int ret;
-
- find_bin_dir();
-#ifdef RUNTIME_PAGESIZE
- g_Pagesize = sysconf(_SC_PAGESIZE);
-#endif /* RUNTIME_PAGESIZE */
-
- uint8_t *mem = memory_map(MEM_REGION_SIZE);
- mem -= MEM_REGION_START;
- int run(uint8_t *mem, int argc, char *argv[]);
- ret = run(mem, argc, argv);
- wrapper_fflush(mem, 0);
- free_all_file_bufs(mem);
- mem += MEM_REGION_START;
- memory_unmap(mem, MEM_REGION_SIZE);
- return ret;
-}
-
-void mmap_initial_data_range(uint8_t *mem, uint32_t start, uint32_t end) {
- custom_libc_data_addr = end;
-#ifdef __APPLE__
- end += vm_page_size;
-#else
- end += 4096;
-#endif /* __APPLE__ */
- memory_allocate(mem, start, end);
- cur_sbrk = end;
-}
-
-void setup_libc_data(uint8_t *mem) {
- memory_allocate(mem, LIBC_ADDR, (LIBC_ADDR + LIBC_SIZE));
- for (size_t i = 0; i < sizeof(ctype); i++) {
- MEM_S8(CTYPE_ADDR + i) = ctype[i];
- }
- STDIN->_flag = IOREAD;
- STDIN->_file = 0;
- STDOUT->_flag = IOWRT;
- STDOUT->_file = 1;
- STDERR->_flag = IOWRT | IONBF;
- STDERR->_file = 2;
-}
-
-static uint32_t strcpy1(uint8_t *mem, uint32_t dest_addr, const char *str) {
- for (;;) {
- char c = *str;
- ++str;
- MEM_S8(dest_addr) = c;
- ++dest_addr;
- if (c == '\0') {
- return dest_addr - 1;
- }
- }
-}
-
-static uint32_t strcpy2(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr) {
- for (;;) {
- char c = MEM_S8(src_addr);
- ++src_addr;
- MEM_S8(dest_addr) = c;
- ++dest_addr;
- if (c == '\0') {
- return dest_addr - 1;
- }
- }
-}
-
-uint32_t wrapper_sbrk(uint8_t *mem, int increment) {
- uint32_t old = cur_sbrk;
- size_t alignedInc = ROUND_PAGE(old + increment) - old;
- memory_allocate(mem, old, old + alignedInc);
- cur_sbrk += alignedInc;
- return old;
-}
-
-#if 0
-uint32_t wrapper_malloc(uint8_t *mem, uint32_t size) {
- uint32_t orig_size = size;
- size += 8;
- size = (size + 0xfff) & ~0xfff;
- uint32_t ret = wrapper_sbrk(mem, size);
- MEM_U32(ret) = orig_size;
- return ret + 8;
-}
-
-uint32_t wrapper_calloc(uint8_t *mem, uint32_t num, uint32_t size) {
- uint64_t new_size = (uint64_t)num * size;
- assert(new_size == (uint32_t)new_size);
- uint32_t ret = wrapper_malloc(mem, new_size);
- return wrapper_memset(mem, ret, 0, new_size);
-}
-
-uint32_t wrapper_realloc(uint8_t *mem, uint32_t data_addr, uint32_t size) {
- if (data_addr == 0) {
- return wrapper_malloc(mem, size);
- }
- uint32_t orig_size = MEM_U32(data_addr - 8);
- if (size < orig_size || orig_size < 4088 && size < 4088) {
- MEM_U32(data_addr - 8) = size;
- return data_addr;
- }
- uint32_t new_addr = wrapper_malloc(mem, size);
- return wrapper_memcpy(mem, new_addr, data_addr, MIN(size, orig_size));
-}
-
-void wrapper_free(uint8_t *mem, uint32_t data_addr) {
- // NOP
-}
-#else
-
-/*
-Simple bin-based malloc algorithm
-
-The memory is divided into bins of item sizes 8, 16, 32, 64, 128, ..., 2^30.
-Size requests are divided into these bin sizes and each bin is handled
-completely separate from other bins.
-
-For each bin there is a linked list of free'd items.
-Linked list node:
-struct FreeListNode {
- struct Node *next;
- size_t free_space_after;
- uint8_t data[bin_item_size];
-};
-At most one value of next and space_after is non-zero.
-If a node exists in the linked list, it is the memory node to return.
-struct AllocatedNode {
- int bin;
- uint32_t current_size;
- uint8_t data[bin_item_size];
-};
-The returned address is the data element.
-When the last list node is returned, and free_space_after is big enough
-for a new node, a new node is created having free_space_after set to
-(free_space_after - (8 + bin_item_size)), and is appended to the list.
-
-If the list was empty, a new memory chunk is requested from the system
-of 65536 bytes, or at least (8 + bin_item_size), rounded up to nearest
-page size boundary. It can also be smaller if it leaves holes bigger than
-4096 bytes that can never be used. This chunk is then inserted to the list,
-and the algorithm restarts.
-
-This algorithm, for each bin, never uses more than twice as much as is
-maximally in use (plus 65536 bytes).
-The malloc/free calls run in O(1) and calloc/realloc calls run in O(size).
-*/
-
-size_t mem_used;
-size_t mem_allocated;
-size_t max_mem_used;
-size_t num_sbrks;
-size_t num_allocs;
-uint32_t wrapper_malloc(uint8_t *mem, uint32_t size) {
- int bin = -1;
- for (int i = 3; i < 30; i++) {
- if (size <= (1 << i)) {
- bin = i;
- break;
- }
- }
- if (bin == -1) {
- return 0;
- }
- ++num_allocs;
- mem_used += size;
- max_mem_used = MAX(mem_used, max_mem_used);
- uint32_t item_size = 1 << bin;
- uint32_t list_ptr = MALLOC_BINS_ADDR + (bin - 3) * 4;
- uint32_t node_ptr = MEM_U32(list_ptr);
- if (node_ptr == 0) {
- uint32_t sbrk_request = 0x10000;
- if (8 + item_size > sbrk_request) {
- sbrk_request = 8 + item_size;
- sbrk_request = ROUND_PAGE(sbrk_request);
- }
- uint32_t left_over = sbrk_request % (8 + item_size);
- sbrk_request -= left_over & ~(4096 - 1);
- mem_allocated += sbrk_request;
- ++num_sbrks;
- node_ptr = wrapper_sbrk(mem, sbrk_request);
- MEM_U32(node_ptr + 4) = sbrk_request - (8 + item_size);
- }
- uint32_t next = MEM_U32(node_ptr);
- if (next == 0) {
- uint32_t free_space_after = MEM_U32(node_ptr + 4);
- if (free_space_after >= 8 + item_size) {
- next = node_ptr + 8 + item_size;
- MEM_U32(next + 4) = free_space_after - (8 + item_size);
- }
- } else {
- assert(MEM_U32(node_ptr + 4) == 0);
- }
- MEM_U32(list_ptr) = next;
- MEM_U32(node_ptr) = bin;
- MEM_U32(node_ptr + 4) = size;
- return node_ptr + 8;
-}
-
-uint32_t wrapper_calloc(uint8_t *mem, uint32_t num, uint32_t size) {
- uint64_t new_size = (uint64_t)num * size;
- assert(new_size == (uint32_t)new_size);
- uint32_t ret = wrapper_malloc(mem, new_size);
- return wrapper_memset(mem, ret, 0, new_size);
-}
-
-uint32_t wrapper_realloc(uint8_t *mem, uint32_t data_addr, uint32_t size) {
- if (data_addr == 0) {
- return wrapper_malloc(mem, size);
- } else {
- uint32_t node_ptr = data_addr - 8;
- int bin = MEM_U32(node_ptr);
- uint32_t old_size = MEM_U32(node_ptr + 4);
- uint32_t max_size = 1 << bin;
- assert(bin >= 3 && bin < 30);
- assert(old_size <= max_size);
- if (size <= max_size) {
- mem_used = mem_used - old_size + size;
- MEM_U32(node_ptr + 4) = size;
- return data_addr;
- } else {
- uint32_t new_addr = wrapper_malloc(mem, size);
- wrapper_memcpy(mem, new_addr, data_addr, old_size);
- wrapper_free(mem, data_addr);
- return new_addr;
- }
- }
-}
-
-void wrapper_free(uint8_t *mem, uint32_t data_addr) {
- uint32_t node_ptr = data_addr - 8;
- int bin = MEM_U32(node_ptr);
- uint32_t size = MEM_U32(node_ptr + 4);
- uint32_t list_ptr = MALLOC_BINS_ADDR + (bin - 3) * 4;
- assert(bin >= 3 && bin < 30);
- assert(size <= (1 << bin));
- MEM_U32(node_ptr) = MEM_U32(list_ptr);
- MEM_U32(node_ptr + 4) = 0;
- MEM_U32(list_ptr) = node_ptr;
- mem_used -= size;
-}
-#endif
-
-int wrapper_fscanf(uint8_t *mem, uint32_t fp_addr, uint32_t format_addr, uint32_t sp) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- STRING(format) // for debug
-
- int ret = 0;
- char c;
- int ch;
- sp += 2 * 4;
- for (;;) {
- c = MEM_S8(format_addr);
- ++format_addr;
- if (c == '%') {
- c = MEM_S8(format_addr);
- ++format_addr;
- if (c == '%') {
- goto percent;
- }
- for (;;) {
- ch = wrapper_fgetc(mem, fp_addr);
- if (ch == -1) {
- return ret;
- }
- if (!isspace(ch)) {
- //wrapper_ungetc(mem, ch, fp_addr);
- break;
- }
- }
- bool l = false;
- continue_format:
- switch (c) {
- case 'l':
- assert(!l && "ll not implemented in fscanf");
- l = true;
- c = MEM_S8(format_addr);
- ++format_addr;
- goto continue_format;
- case 'd':
- {
- int64_t num = 0;
- int sign = 1;
- bool found_first = false;
- if (ch == '-') {
- sign = -1;
- ch = wrapper_fgetc(mem, fp_addr);
- if (ch == -1) {
- return ret;
- }
- }
- for (;;) {
- if (isdigit(ch)) {
- num *= 10;
- num += ch - '0';
- found_first = true;
- ch = wrapper_fgetc(mem, fp_addr);
- if (ch == -1) {
- break;
- }
- } else {
- wrapper_ungetc(mem, ch, fp_addr);
- break;
- }
- }
- if (found_first) {
- uint32_t int_addr = MEM_U32(sp);
- sp += 4;
- MEM_S32(int_addr) = (int)(num * sign);
- ++ret;
- } else {
- return ret;
- }
- break;
- }
- default:
- assert(0 && "fscanf format not implemented");
- }
- } else if (c == '\0') {
- break;
- } else {
- percent:
- ch = wrapper_fgetc(mem, fp_addr);
- if (ch == -1) {
- break;
- }
- if ((char)ch != c) {
- break;
- }
- }
- }
-
- return ret;
-}
-
-int wrapper_printf(uint8_t *mem, uint32_t format_addr, uint32_t sp) {
- STRING(format)
- if (!strcmp(format, " child died due to signal %d.\n")) {
- printf(format, MEM_U32(sp + 4));
- return 1;
- }
- assert(0 && "printf not implemented");
- return 0;
-}
-
-int wrapper_sprintf(uint8_t *mem, uint32_t str_addr, uint32_t format_addr, uint32_t sp) {
- STRING(format) // for debug
- char temp[32];
-
- if (!strcmp(format, "%.16e")) {
- union {
- uint32_t w[2];
- double d;
- } d;
- d.w[1] = MEM_U32(sp + 2 * 4);
- d.w[0] = MEM_U32(sp + 3 * 4);
- sprintf(temp, "%.16e", d.d);
- strcpy1(mem, str_addr, temp);
- return 1;
- }
- if (!strcmp(format, "\\%03o")) {
- sprintf(temp, "\\%03o", MEM_U32(sp + 2 * 4));
- strcpy1(mem, str_addr, temp);
- return 1;
- }
- if (!strcmp(format, "%*ld=")) {
- sprintf(temp, "%*d=", MEM_U32(sp + 2 * 4), MEM_U32(sp + 3 * 4));
- strcpy1(mem, str_addr, temp);
- return 1;
- }
-
- uint32_t orig_str_addr = str_addr;
- uint32_t pos = 0;
- int ret = 0;
- char c;
- sp += 2 * 4;
- for (;;) {
- c = MEM_S8(format_addr + pos);
- ++pos;
- if (c == '%') {
- bool l = false;
- c = MEM_S8(format_addr + pos);
- ++pos;
- uint32_t zeros = 0;
- bool zero_prefix = false;
- continue_format:
- switch (c) {
- case '0':
- do {
- c = MEM_S8(format_addr + pos);
- ++pos;
- if (c >= '0' && c <= '9') {
- zeros *= 10;
- zeros += c - '0';
- }
- } while (c >= '0' && c <= '9');
- goto continue_format;
- case '#':
- c = MEM_S8(format_addr + pos);
- ++pos;
- zero_prefix = true;
- goto continue_format;
- break;
- case 'l':
- assert(!l && "ll not implemented in fscanf");
- c = MEM_S8(format_addr + pos);
- ++pos;
- l = true;
- goto continue_format;
- break;
- case 'd':
- if (zeros != 0) {
- char temp1[32];
- sprintf(temp1, "%%0%dd", zeros);
- sprintf(temp, temp1, MEM_S32(sp));
- } else {
- sprintf(temp, "%d", MEM_S32(sp));
- }
- sp += 4;
- str_addr = strcpy1(mem, str_addr, temp);
- ++ret;
- break;
- case 'o':
- if (zero_prefix) {
- sprintf(temp, "%#o", MEM_S32(sp));
- } else {
- sprintf(temp, "%o", MEM_S32(sp));
- }
- sp += 4;
- str_addr = strcpy1(mem, str_addr, temp);
- ++ret;
- break;
- case 'x':
- if (zero_prefix) {
- sprintf(temp, "%#x", MEM_S32(sp));
- } else {
- sprintf(temp, "%x", MEM_S32(sp));
- }
- sp += 4;
- str_addr = strcpy1(mem, str_addr, temp);
- ++ret;
- break;
- case 'u':
- sprintf(temp, "%u", MEM_S32(sp));
- sp += 4;
- str_addr = strcpy1(mem, str_addr, temp);
- ++ret;
- break;
- case 's':
- str_addr = strcpy2(mem, str_addr, MEM_U32(sp));
- sp += 4;
- ++ret;
- break;
- case 'c':
- MEM_S8(str_addr) = (char)MEM_U32(sp);
- ++str_addr;
- sp += 4;
- ++ret;
- break;
- case '%':
- MEM_S8(str_addr) = '%';
- ++str_addr;
- break;
- default:
- fprintf(stderr, "%s\n", format);
- assert(0 && "non-implemented sprintf format");
- }
- } else if (c == '\0') {
- break;
- } else {
- MEM_S8(str_addr) = c;
- ++str_addr;
- }
- }
-
- MEM_S8(str_addr) = '\0';
- STRING(orig_str) // for debug
- //printf("result: '%s' '%s'\n", format, orig_str);
- return ret;
-}
-
-int wrapper_fprintf(uint8_t *mem, uint32_t fp_addr, uint32_t format_addr, uint32_t sp) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- STRING(format)
- sp += 8;
- /*if (!strcmp(format, "%s")) {
- uint32_t s_addr = MEM_U32(sp);
- STRING(s)
- if (fp_addr == STDERR_ADDR) {
- fprintf(stderr, "%s", s);
- fflush(stderr);
- return 1;
- }
- }
- if (!strcmp(format, "%s: %s: ")) {
- uint32_t s1_addr = MEM_U32(sp), s2_addr = MEM_U32(sp + 4);
- STRING(s1)
- STRING(s2)
- if (fp_addr == STDERR_ADDR) {
- fprintf(stderr, "%s: %s: ", s1, s2);
- fflush(stderr);
- return 1;
- }
- }*/
- int ret = 0;
- for (;;) {
- uint32_t pos = format_addr;
- char ch = MEM_S8(pos);
- while (ch != '%' && ch != '\0') {
- ++pos;
- ch = MEM_S8(pos);
- }
- if (format_addr != pos) {
- if (wrapper_fwrite(mem, format_addr, 1, pos - format_addr, fp_addr) != pos - format_addr) {
- break;
- }
- }
- if (ch == '\0') {
- break;
- }
- ++pos;
- ch = MEM_S8(pos);
- switch (ch) {
- case 'd':
- {
- char buf[32];
- sprintf(buf, "%d", MEM_U32(sp));
- strcpy1(mem, INTBUF_ADDR, buf);
- if (wrapper_fputs(mem, INTBUF_ADDR, fp_addr) == -1) {
- return ret;
- }
- sp += 4;
- ++ret;
- break;
- }
- case 's':
- {
- if (wrapper_fputs(mem, MEM_U32(sp), fp_addr) == -1) {
- return ret;
- }
- sp += 4;
- ++ret;
- break;
- }
- case 'c':
- {
- char buf[32];
- sprintf(buf, "%c", MEM_U32(sp));
- strcpy1(mem, INTBUF_ADDR, buf);
- if (wrapper_fputs(mem, INTBUF_ADDR, fp_addr) == -1) {
- return ret;
- }
- sp += 4;
- ++ret;
- break;
- }
- default:
- fprintf(stderr, "missing format: '%s'\n", format);
- assert(0 && "non-implemented fprintf format");
- }
- format_addr = ++pos;
- }
- return ret;
-}
-
-int wrapper__doprnt(uint8_t *mem, uint32_t format_addr, uint32_t params_addr, uint32_t fp_addr) {
- assert(0 && "_doprnt not implemented");
- return 0;
-}
-
-uint32_t wrapper_strlen(uint8_t *mem, uint32_t str_addr) {
- uint32_t len = 0;
- while (MEM_S8(str_addr) != '\0') {
- ++str_addr;
- ++len;
- }
- return len;
-}
-
-int wrapper_open(uint8_t *mem, uint32_t pathname_addr, int flags, int mode) {
- STRING(pathname)
- int f = flags & O_ACCMODE;
- if (flags & 0x100) {
- f |= O_CREAT;
- }
- if (flags & 0x200) {
- f |= O_TRUNC;
- }
- if (flags & 0x400) {
- f |= O_EXCL;
- }
- if (flags & 0x800) {
- f |= O_NOCTTY;
- }
- if (flags & 0x08) {
- f |= O_APPEND;
- }
- int fd = open(pathname, f, mode);
- MEM_U32(ERRNO_ADDR) = errno;
- return fd;
-}
-
-int wrapper_creat(uint8_t *mem, uint32_t pathname_addr, int mode) {
- STRING(pathname)
- int ret = creat(pathname, mode);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_access(uint8_t *mem, uint32_t pathname_addr, int mode) {
- STRING(pathname)
- int ret = access(pathname, mode);
- if (ret != 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_rename(uint8_t *mem, uint32_t oldpath_addr, uint32_t newpath_addr) {
- STRING(oldpath)
- STRING(newpath)
- int ret = rename(oldpath, newpath);
- if (ret != 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_utime(uint8_t *mem, uint32_t filename_addr, uint32_t times_addr) {
- STRING(filename)
- struct utimbuf buf = {0, 0};
- int ret = utime(filename, times_addr == 0 ? NULL : &buf);
- if (ret == 0) {
- if (times_addr != 0) {
- MEM_U32(times_addr + 0) = buf.actime;
- MEM_U32(times_addr + 4) = buf.modtime;
- }
- } else {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_flock(uint8_t *mem, int fd, int operation) {
- int ret = flock(fd, operation);
- if (ret != 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_chmod(uint8_t *mem, uint32_t path_addr, uint32_t mode) {
- STRING(path)
- int ret = chmod(path, mode);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_umask(int mode) {
- return umask(mode);
-}
-
-uint32_t wrapper_ecvt(uint8_t *mem, double number, int ndigits, uint32_t decpt_addr, uint32_t sign_addr) {
- assert(0);
-}
-
-uint32_t wrapper_fcvt(uint8_t *mem, double number, int ndigits, uint32_t decpt_addr, uint32_t sign_addr) {
- assert(0);
-}
-
-double wrapper_sqrt(double v) {
- return sqrt(v);
-}
-
-float wrapper_sqrtf(float v) {
- return sqrtf(v);
-}
-
-int wrapper_atoi(uint8_t *mem, uint32_t nptr_addr) {
- STRING(nptr)
- return atoi(nptr);
-}
-
-int wrapper_atol(uint8_t *mem, uint32_t nptr_addr) {
- return wrapper_atoi(mem, nptr_addr);
-}
-
-double wrapper_atof(uint8_t *mem, uint32_t nptr_addr) {
- STRING(nptr);
- return atof(nptr);
-}
-
-int wrapper_strtol(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base) {
- STRING(nptr)
- char *endptr = NULL;
- int64_t res = strtoll(nptr, endptr_addr != 0 ? &endptr : NULL, base);
- if (res > INT_MAX) {
- MEM_U32(ERRNO_ADDR) = ERANGE;
- res = INT_MAX;
- }
- if (res < INT_MIN) {
- MEM_U32(ERRNO_ADDR) = ERANGE;
- res = INT_MIN;
- }
- if (endptr != NULL) {
- MEM_U32(endptr_addr) = nptr_addr + (uint32_t)(endptr - nptr);
- }
- return res;
-}
-
-uint32_t wrapper_strtoul(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base) {
- STRING(nptr)
- char *endptr = NULL;
- uint64_t res = strtoull(nptr, endptr_addr != 0 ? &endptr : NULL, base);
- if (res > INT_MAX) {
- MEM_U32(ERRNO_ADDR) = ERANGE;
- res = INT_MAX;
- }
- if (endptr != NULL) {
- MEM_U32(endptr_addr) = nptr_addr + (uint32_t)(endptr - nptr);
- }
- return res;
-}
-
-uint64_t wrapper_strtoll(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base) {
- STRING(nptr)
- char *endptr = NULL;
- uint64_t res = strtoll(nptr, endptr_addr != 0 ? &endptr : NULL, base);
-
- if(endptr != NULL) {
- MEM_U32(endptr_addr) = nptr_addr + (uint32_t)(endptr - nptr);
- }
-
- return res;
-}
-
-uint64_t wrapper_strtoull(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base) {
- STRING(nptr)
- char *endptr = NULL;
- uint64_t res = strtoull(nptr, endptr_addr != 0 ? &endptr : NULL, base);
-
- if(endptr != NULL) {
- MEM_U32(endptr_addr) = nptr_addr + (uint32_t)(endptr - nptr);
- }
-
- return res;
-}
-
-double wrapper_strtod(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr) {
- STRING(nptr)
- char *endptr = NULL;
- errno = 0;
- double res = strtod(nptr, endptr_addr != 0 ? &endptr : NULL);
- if (errno != 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- if (endptr != NULL) {
- MEM_U32(endptr_addr) = nptr_addr + (uint32_t)(endptr - nptr);
- }
- return res;
-}
-
-uint32_t wrapper_strchr(uint8_t *mem, uint32_t str_addr, int c) {
- c = c & 0xff;
- for (;;) {
- unsigned char ch = MEM_U8(str_addr);
- if (ch == c) {
- return str_addr;
- }
- if (ch == '\0') {
- return 0;
- }
- ++str_addr;
- }
-}
-
-uint32_t wrapper_strrchr(uint8_t *mem, uint32_t str_addr, int c) {
- c = c & 0xff;
- uint32_t ret = 0;
- for (;;) {
- unsigned char ch = MEM_U8(str_addr);
- if (ch == c) {
- ret = str_addr;
- }
- if (ch == '\0') {
- return ret;
- }
- ++str_addr;
- }
-}
-
-uint32_t wrapper_strcspn(uint8_t *mem, uint32_t str_addr, uint32_t invalid_addr) {
- STRING(invalid)
- uint32_t n = strlen(invalid);
- uint32_t pos = 0;
- char c;
- while ((c = MEM_S8(str_addr)) != 0) {
- for (int i = 0; i < n; i++) {
- if (c == invalid[i]) {
- return pos;
- }
- }
- ++pos;
- ++str_addr;
- }
- return pos;
-}
-
-uint32_t wrapper_strpbrk(uint8_t *mem, uint32_t str_addr, uint32_t accept_addr) {
- STRING(accept)
- uint32_t n = strlen(accept);
- char c;
- while ((c = MEM_S8(str_addr)) != 0) {
- for (int i = 0; i < n; i++) {
- if (c == accept[i]) {
- return str_addr;
- }
- }
- ++str_addr;
- }
- return 0;
-}
-
-static void stat_common(uint8_t *mem, uint32_t buf_addr, struct stat *statbuf) {
- struct irix_stat {
- int st_dev;
- int pad1[3];
- int st_ino;
- int st_mode;
- int st_nlink;
- int st_uid;
- int st_gid;
- int st_rdev;
- int pad2[2];
- int st_size;
- int pad3;
- struct timespec_t_irix st_atim;
- struct timespec_t_irix st_mtim;
- struct timespec_t_irix st_ctim;
- int st_blksize;
- int st_blocks;
- } s;
- s.st_dev = statbuf->st_dev;
- s.st_ino = statbuf->st_ino;
- s.st_mode = statbuf->st_mode;
- s.st_nlink = statbuf->st_nlink;
- s.st_uid = statbuf->st_uid;
- s.st_gid = statbuf->st_gid;
- s.st_rdev = statbuf->st_rdev;
- s.st_size = statbuf->st_size;
-#ifdef __APPLE__
- s.st_atim.tv_sec = statbuf->st_atimespec.tv_sec;
- s.st_atim.tv_nsec = statbuf->st_atimespec.tv_nsec;
- s.st_mtim.tv_sec = statbuf->st_mtimespec.tv_sec;
- s.st_mtim.tv_nsec = statbuf->st_mtimespec.tv_nsec;
- s.st_ctim.tv_sec = statbuf->st_ctimespec.tv_sec;
- s.st_ctim.tv_nsec = statbuf->st_ctimespec.tv_nsec;
-#else
- s.st_atim.tv_sec = statbuf->st_atim.tv_sec;
- s.st_atim.tv_nsec = statbuf->st_atim.tv_nsec;
- s.st_mtim.tv_sec = statbuf->st_mtim.tv_sec;
- s.st_mtim.tv_nsec = statbuf->st_mtim.tv_nsec;
- s.st_ctim.tv_sec = statbuf->st_ctim.tv_sec;
- s.st_ctim.tv_nsec = statbuf->st_ctim.tv_nsec;
-#endif
- memcpy(&MEM_U32(buf_addr), &s, sizeof(s));
-}
-
-int wrapper_fstat(uint8_t *mem, int fildes, uint32_t buf_addr) {
- struct stat statbuf;
- if (fstat(fildes, &statbuf) < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- return -1;
- } else {
- stat_common(mem, buf_addr, &statbuf);
- return 0;
- }
-}
-
-int wrapper_stat(uint8_t *mem, uint32_t pathname_addr, uint32_t buf_addr) {
- STRING(pathname)
- struct stat statbuf;
- if (stat(pathname, &statbuf) < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- return -1;
- } else {
- stat_common(mem, buf_addr, &statbuf);
- return 0;
- }
-}
-
-int wrapper_ftruncate(uint8_t *mem, int fd, int length) {
- int ret = ftruncate(fd, length);
- if (ret != 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-void wrapper_bcopy(uint8_t *mem, uint32_t src_addr, uint32_t dst_addr, uint32_t len) {
- wrapper_memcpy(mem, dst_addr, src_addr, len);
-}
-
-uint32_t wrapper_memcpy(uint8_t *mem, uint32_t dst_addr, uint32_t src_addr, uint32_t len) {
- uint32_t saved = dst_addr;
- if (dst_addr % 4 == 0 && src_addr % 4 == 0 && len % 4 == 0) {
- memcpy(&MEM_U32(dst_addr), &MEM_U32(src_addr), len);
- } else {
- while (len--) {
- MEM_U8(dst_addr) = MEM_U8(src_addr);
- ++dst_addr;
- ++src_addr;
- }
- }
- return saved;
-}
-
-uint32_t wrapper_memccpy(uint8_t *mem, uint32_t dst_addr, uint32_t src_addr, int c, uint32_t len) {
- while (len--) {
- uint8_t ch = MEM_U8(src_addr);
- MEM_U8(dst_addr) = ch;
- ++dst_addr;
- ++src_addr;
- if (ch == c) {
- return dst_addr;
- }
- }
- return 0;
-}
-
-int wrapper_read(uint8_t *mem, int fd, uint32_t buf_addr, uint32_t nbytes) {
- uint8_t *buf = (uint8_t *)malloc(nbytes);
- ssize_t ret = read(fd, buf, nbytes);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- } else {
- for (ssize_t i = 0; i < ret; i++) {
- MEM_U8(buf_addr + i) = buf[i];
- }
- }
- free(buf);
- return (int)ret;
-}
-
-int wrapper_write(uint8_t *mem, int fd, uint32_t buf_addr, uint32_t nbytes) {
- uint8_t *buf = (uint8_t *)malloc(nbytes);
- for (size_t i = 0; i < nbytes; i++) {
- buf[i] = MEM_U8(buf_addr + i);
- }
- ssize_t ret = write(fd, buf, nbytes);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- free(buf);
- return (int)ret;
-}
-
-static uint32_t init_file(uint8_t *mem, int fd, int i, const char *path, const char *mode) {
- int flags = O_RDONLY;
- if (strcmp(mode, "r") == 0 || strcmp(mode, "rb") == 0) {
- flags = O_RDONLY;
- } else if (strcmp(mode, "w") == 0 || strcmp(mode, "wb") == 0) {
- flags = O_WRONLY | O_CREAT | O_TRUNC;
- } else if (strcmp(mode, "a") == 0 || strcmp(mode, "ab") == 0) {
- flags = O_WRONLY | O_CREAT | O_APPEND;
- } else if (strcmp(mode, "r+") == 0 || strcmp(mode, "r+b") == 0) {
- flags = O_RDWR;
- } else if (strcmp(mode, "w+") == 0 || strcmp(mode, "w+b") == 0) {
- flags = O_RDWR | O_CREAT | O_TRUNC;
- } else if (strcmp(mode, "a+") == 0 || strcmp(mode, "a+b") == 0) {
- flags = O_RDWR | O_CREAT | O_APPEND;
- }
- if (fd == -1) {
-
-#ifdef REDIRECT_USR_LIB
- char fixed_path[PATH_MAX + 1];
- if (!strcmp(path, "/usr/lib/err.english.cc") && bin_dir[0] != '\0') {
- int n = snprintf(fixed_path, sizeof(fixed_path), "%s/err.english.cc", bin_dir);
- if (n >= 0 && n < sizeof(fixed_path)) {
- path = fixed_path;
- }
- }
-#endif
- fd = open(path, flags, 0666);
- if (fd < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- return 0;
- }
- }
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(IOB_ADDR);
- uint32_t ret = 0;
- if (i == -1) {
- for (i = 3; i < NFILE; i++) {
- if (f[i]._flag == 0) {
- break;
- }
- }
- }
- assert(i < NFILE);
- g_file_max = i + 1;
- ret = IOB_ADDR + i * sizeof(struct FILE_irix);
- f[i]._cnt = 0;
- f[i]._ptr_addr = 0;
- f[i]._base_addr = 0;
- f[i]._file = fd;
- f[i]._flag = (flags & O_ACCMODE) == O_RDONLY ? IOREAD : 0;
- f[i]._flag |= (flags & O_ACCMODE) == O_WRONLY ? IOWRT : 0;
- f[i]._flag |= (flags & O_ACCMODE) == O_RDWR ? IORW : 0;
- bufendtab[i] = 0;
- return ret;
-}
-
-uint32_t wrapper_fopen(uint8_t *mem, uint32_t path_addr, uint32_t mode_addr) {
- STRING(path)
- STRING(mode)
- return init_file(mem, -1, -1, path, mode);
-}
-
-uint32_t wrapper_freopen(uint8_t *mem, uint32_t path_addr, uint32_t mode_addr, uint32_t fp_addr) {
- STRING(path)
- STRING(mode)
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- wrapper_fclose(mem, fp_addr);
- return init_file(mem, -1, f - (struct FILE_irix *)&MEM_U32(IOB_ADDR), path, mode);
-}
-
-int wrapper_fclose(uint8_t *mem, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- wrapper_fflush(mem, fp_addr);
- if (f->_flag & IOMYBUF) {
- wrapper_free(mem, f->_base_addr);
- }
- f->_flag = 0;
- close(f->_file);
- return 0;
-}
-
-static int flush_all(uint8_t *mem) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(IOB_ADDR);
- int ret = 0;
- for (int i = 0; i < g_file_max; i++) {
- if (f[i]._flag & IOWRT) {
- ret |= wrapper_fflush(mem, IOB_ADDR + i * sizeof(struct FILE_irix));
- }
- }
- return ret;
-}
-
-int wrapper_fflush(uint8_t *mem, uint32_t fp_addr) {
- if (fp_addr == 0) {
- // Flush all
- return flush_all(mem);
- }
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- if (f->_flag & IOWRT) {
- int p = 0;
- int to_flush = f->_ptr_addr - f->_base_addr;
- int c = to_flush;
- while (c > 0) {
- int r = wrapper_write(mem, f->_file, f->_base_addr + p, c);
- if (r < 0) {
- f->_file |= IOERR;
- return -1;
- }
- p += r;
- c -= r;
- }
- f->_ptr_addr = f->_base_addr;
- f->_cnt += to_flush;
- }
- return 0;
-}
-
-int wrapper_ftell(uint8_t *mem, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- int adjust;
- if (f->_cnt < 0) {
- f->_cnt = 0;
- }
- if (f->_flag & IOREAD) {
- adjust = -f->_cnt;
- } else if (f->_flag & (IOWRT | IORW)) {
- adjust = 0;
- if ((f->_flag & IOWRT) && f->_base_addr != 0 && (f->_flag & IONBF) == 0) {
- adjust = f->_ptr_addr - f->_base_addr;
- }
- } else {
- return -1;
- }
- int res = wrapper_lseek(mem, f->_file, 0, 1);
- if (res >= 0) {
- res += adjust;
- }
- return res;
-}
-
-void wrapper_rewind(uint8_t *mem, uint32_t fp_addr) {
- (void)wrapper_fseek(mem, fp_addr, 0, SEEK_SET);
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- f->_flag &= ~IOERR;
-}
-
-int wrapper_fseek(uint8_t *mem, uint32_t fp_addr, int offset, int origin) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- int c, p;
- f->_flag &= ~IOEOF;
- if (f->_flag & IOREAD) {
- if (origin < SEEK_END && f->_base_addr && !(f->_flag & IONBF)) {
- c = f->_cnt;
- p = offset;
- if (origin == SEEK_SET) {
- p += c - lseek(f->_file, 0L, SEEK_CUR);
- } else {
- offset -= c;
- }
- if (!(f->_flag & IORW) && c > 0 && p <= c && p >= f->_base_addr - f->_ptr_addr) {
- f->_ptr_addr += p;
- f->_cnt -= p;
- return 0;
- }
- }
- if (f->_flag & IORW) {
- f->_ptr_addr = f->_base_addr;
- f->_flag &= ~IOREAD;
- }
- p = lseek(f->_file, offset, origin);
- f->_cnt = 0;
- } else if (f->_flag & (IOWRT | IORW)) {
- wrapper_fflush(mem, fp_addr);
- if (f->_flag & IORW) {
- f->_cnt = 0;
- f->_flag &= ~IOWRT;
- f->_ptr_addr = f->_base_addr;
- }
- p = lseek(f->_file, offset, origin);
- }
- if (p < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- return p;
- }
- return 0;
-}
-
-int wrapper_lseek(uint8_t *mem, int fd, int offset, int whence) {
- int ret = (int)lseek(fd, offset, whence);
- if (ret == -1) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_dup(uint8_t *mem, int fd) {
- fd = dup(fd);
- if (fd < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return fd;
-}
-
-int wrapper_dup2(uint8_t *mem, int oldfd, int newfd) {
- int fd = dup2(oldfd, newfd);
- if (fd < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return fd;
-}
-
-int wrapper_pipe(uint8_t *mem, uint32_t pipefd_addr) {
- int pipefd[2];
- int ret = pipe(pipefd);
- if (ret == 0) {
- MEM_U32(pipefd_addr + 0) = pipefd[0];
- MEM_U32(pipefd_addr + 4) = pipefd[1];
- } else {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-void wrapper_perror(uint8_t *mem, uint32_t str_addr) {
- STRING(str)
- perror(str);
-}
-
-int wrapper_fdopen(uint8_t *mem, int fd, uint32_t mode_addr) {
- STRING(mode)
- return init_file(mem, fd, -1, NULL, mode);
-}
-
-uint32_t wrapper_memset(uint8_t *mem, uint32_t dest_addr, int byte, uint32_t n) {
- uint32_t saved = dest_addr;
- if (dest_addr % 4 == 0 && n % 4 == 0) {
- memset(&MEM_U32(dest_addr), byte, n);
- } else {
- while (n--) {
- MEM_U8(dest_addr) = (uint8_t)byte;
- ++dest_addr;
- }
- }
- return saved;
-}
-
-int wrapper_bcmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr, uint32_t n) {
- while (n--) {
- if (MEM_U8(s1_addr) != MEM_U8(s2_addr)) {
- return 1;
- }
- ++s1_addr;
- ++s2_addr;
- }
- return 0;
-}
-
-int wrapper_memcmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr, uint32_t n) {
- while (n--) {
- unsigned char c1 = MEM_U8(s1_addr);
- unsigned char c2 = MEM_U8(s2_addr);
- if (c1 < c2) {
- return -1;
- }
- if (c1 > c2) {
- return 1;
- }
- ++s1_addr;
- ++s2_addr;
- }
- return 0;
-}
-
-int wrapper_getpid(void) {
- return getpid();
-}
-
-int wrapper_getpgrp(uint8_t *mem) {
- int ret = getpgrp();
- if (ret == -1) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_remove(uint8_t *mem, uint32_t path_addr) {
- STRING(path)
- int ret = remove(path);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_unlink(uint8_t *mem, uint32_t path_addr) {
- if (path_addr == 0) {
- fprintf(stderr, "Warning: unlink with NULL as arguement\n");
- MEM_U32(ERRNO_ADDR) = EFAULT;
- return -1;
- }
- STRING(path)
- int ret = unlink(path);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_close(uint8_t *mem, int fd) {
- int ret = close(fd);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_strcmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr) {
- for (;;) {
- char c1 = MEM_S8(s1_addr);
- char c2 = MEM_S8(s2_addr);
- if (c1 != c2) {
- return c1 < c2 ? -1 : 1;
- }
- if (c1 == '\0') {
- return 0;
- }
- ++s1_addr;
- ++s2_addr;
- }
-}
-
-int wrapper_strncmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr, uint32_t n) {
- if (n == 0) {
- return 0;
- }
- for (;;) {
- char c1 = MEM_S8(s1_addr);
- char c2 = MEM_S8(s2_addr);
- if (c1 != c2) {
- return c1 < c2 ? -1 : 1;
- }
- if (--n == 0 || c1 == '\0') {
- return 0;
- }
- ++s1_addr;
- ++s2_addr;
- }
-}
-
-uint32_t wrapper_strcpy(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr) {
- uint32_t saved = dest_addr;
- for (;;) {
- char c = MEM_S8(src_addr);
- ++src_addr;
- MEM_S8(dest_addr) = c;
- ++dest_addr;
- if (c == '\0') {
- return saved;
- }
- }
-}
-
-uint32_t wrapper_strncpy(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr, uint32_t n) {
- uint32_t i;
- for (i = 0; i < n && MEM_S8(src_addr) != '\0'; i++) {
- MEM_S8(dest_addr + i) = MEM_S8(src_addr + i);
- }
- for (; i < n; i++) {
- MEM_S8(dest_addr + i) = '\0';
- }
- return dest_addr;
-}
-
-uint32_t wrapper_strcat(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr) {
- uint32_t saved = dest_addr;
- while (MEM_S8(dest_addr) != '\0') {
- ++dest_addr;
- }
- while (MEM_S8(src_addr) != '\0') {
- MEM_S8(dest_addr) = MEM_S8(src_addr);
- ++src_addr;
- ++dest_addr;
- }
- MEM_S8(dest_addr) = '\0';
- return saved;
-}
-
-uint32_t wrapper_strncat(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr, uint32_t n) {
- uint32_t saved = dest_addr;
- while (MEM_S8(dest_addr) != '\0') {
- ++dest_addr;
- }
- while (n-- && MEM_S8(src_addr) != '\0') {
- MEM_S8(dest_addr) = MEM_S8(src_addr);
- ++src_addr;
- ++dest_addr;
- }
- MEM_S8(dest_addr) = '\0';
- return saved;
-}
-
-uint32_t wrapper_strtok(uint8_t *mem, uint32_t str_addr, uint32_t delimiters_addr) {
- if (str_addr == 0) {
- str_addr = MEM_U32(STRTOK_DATA_ADDR);
- }
- if (str_addr == 0) {
- // nothing remaining
- return 0;
- }
- uint32_t p;
- for (p = str_addr; MEM_S8(p) != '\0'; p++) {
- uint32_t q;
- for (q = delimiters_addr; MEM_S8(q) != '\0' && MEM_S8(q) != MEM_S8(p); q++) {
- }
- if (MEM_S8(q) == '\0') {
- break;
- }
- }
- if (MEM_S8(p) == '\0') {
- return 0;
- }
- uint32_t ret = p;
- for (;;) {
- uint32_t q;
- for (q = delimiters_addr; MEM_S8(q) != '\0' && MEM_S8(q) != MEM_S8(p); q++) {
- }
- if (MEM_S8(q) != '\0') {
- MEM_S8(p) = '\0';
- MEM_U32(STRTOK_DATA_ADDR) = ++p;
- return ret;
- }
- char next = MEM_S8(p);
- ++p;
- if (next == '\0') {
- MEM_U32(STRTOK_DATA_ADDR) = 0;
- return ret;
- }
- }
-}
-
-uint32_t wrapper_strstr(uint8_t *mem, uint32_t str1_addr, uint32_t str2_addr) {
- for (;;) {
- if (MEM_S8(str1_addr) == '\0') {
- return 0;
- }
- uint32_t s1 = str1_addr;
- uint32_t s2 = str2_addr;
- for (;;) {
- char c2 = MEM_S8(s2);
- if (c2 == '\0') {
- return str1_addr;
- }
- if (MEM_S8(s1) == c2) {
- ++s1;
- ++s2;
- } else {
- break;
- }
- }
- ++str1_addr;
- }
-}
-
-uint32_t wrapper_strdup(uint8_t *mem, uint32_t str_addr) {
- uint32_t len = wrapper_strlen(mem, str_addr) + 1;
- uint32_t ret = wrapper_malloc(mem, len);
- if (ret == 0) {
- MEM_U32(ERRNO_ADDR) = ENOMEM;
- return 0;
- }
- return wrapper_memcpy(mem, ret, str_addr, len);
-}
-
-int wrapper_toupper(int c) {
- return toupper(c);
-}
-
-int wrapper_tolower(int c) {
- return tolower(c);
-}
-
-int wrapper_gethostname(uint8_t *mem, uint32_t name_addr, uint32_t len) {
- char buf[256] = {0};
- if (len > 256) {
- len = 256;
- }
- int ret = gethostname(buf, len);
- if (ret < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- } else {
- for (uint32_t i = 0; i < len; i++) {
- MEM_S8(name_addr + i) = buf[i];
- }
- }
- return ret;
-}
-
-int wrapper_isatty(uint8_t *mem, int fd) {
- int ret = isatty(fd);
- if (ret == 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-uint32_t wrapper_strftime(uint8_t *mem, uint32_t ptr_addr, uint32_t maxsize, uint32_t format_addr, uint32_t timeptr_addr) {
- //assert(0 && "strftime not implemented");
- MEM_S8(ptr_addr) = 0;
- return 0;
-}
-
-int wrapper_times(uint8_t *mem, uint32_t buffer_addr) {
- struct tms_irix {
- int tms_utime;
- int tms_stime;
- int tms_cutime;
- int tms_cstime;
- } r;
- struct tms t;
- clock_t ret = times(&t);
- if (ret == (clock_t)-1) {
- MEM_U32(ERRNO_ADDR) = errno;
- } else {
- r.tms_utime = t.tms_utime;
- r.tms_stime = t.tms_stime;
- r.tms_cutime = t.tms_cutime;
- r.tms_cstime = t.tms_cstime;
- }
- return (int)ret;
-}
-
-int wrapper_clock(void) {
- return (int)clock();
-}
-
-uint32_t wrapper_ctime(uint8_t *mem, uint32_t timep_addr) {
- time_t t = MEM_S32(timep_addr);
- char *res = ctime(&t);
- size_t len = strlen(res) + 1;
- uint32_t ret_addr = wrapper_malloc(mem, len);
- uint32_t pos = ret_addr;
- while (len--) {
- MEM_S8(pos) = *res;
- ++pos;
- ++res;
- }
- return ret_addr;
- //assert(0 && "ctime not implemented");
- //return 0;
-}
-
-uint32_t wrapper_localtime(uint8_t *mem, uint32_t timep_addr) {
- time_t t = MEM_S32(timep_addr);
- struct irix_tm {
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- };
- uint32_t ret = wrapper_malloc(mem, sizeof(struct irix_tm));
- struct irix_tm *r = (struct irix_tm *)&MEM_U32(ret);
- struct tm *l = localtime(&t);
- r->tm_sec = l->tm_sec;
- r->tm_min = l->tm_min;
- r->tm_hour = l->tm_hour;
- r->tm_mday = l->tm_mday;
- r->tm_mon = l->tm_mon;
- r->tm_year = l->tm_year;
- r->tm_wday = l->tm_wday;
- r->tm_yday = l->tm_yday;
- r->tm_isdst = l->tm_isdst;
- return ret;
-}
-
-int wrapper_setvbuf(uint8_t *mem, uint32_t fp_addr, uint32_t buf_addr, int mode, uint32_t size) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- wrapper_fflush(mem, fp_addr);
- if ((f->_flag & IOMYBUF) && f->_base_addr != 0) {
- wrapper_free(mem, f->_base_addr);
- }
- size &= ~0xf;
- f->_flag &= ~IOMYBUF;
- f->_base_addr = buf_addr;
- f->_ptr_addr = buf_addr;
- f->_cnt = 0;
- bufendtab[(fp_addr - IOB_ADDR) / sizeof(struct FILE_irix)] = size;
- return 0;
-}
-
-int wrapper___semgetc(uint8_t *mem, uint32_t fp_addr) {
- assert(0);
-}
-
-int wrapper___semputc(uint8_t *mem, int c, uint32_t fp_addr) {
- assert(0);
-}
-
-int wrapper_fgetc(uint8_t *mem, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- if (--f->_cnt < 0) {
- return wrapper___filbuf(mem, fp_addr);
- } else {
- int ret = MEM_U8(f->_ptr_addr);
- ++f->_ptr_addr;
- return ret;
- }
-}
-
-int wrapper_fgets(uint8_t *mem, uint32_t str_addr, int count, uint32_t fp_addr) {
- bool modified = false;
- uint32_t saved = str_addr;
- for (count--; count > 0; count--) {
- int ch = wrapper_fgetc(mem, fp_addr);
- if (ch == -1) {
- MEM_S8(str_addr) = '\0';
- return modified ? saved : 0;
- }
- modified = true;
- MEM_S8(str_addr) = (char)ch;
- ++str_addr;
- if (ch == '\n') {
- break;
- }
- }
- MEM_S8(str_addr) = '\0';
- return saved;
-}
-
-static void file_assign_buffer(uint8_t *mem, struct FILE_irix *f) {
- f->_base_addr = wrapper_malloc(mem, STDIO_BUFSIZE);
- f->_ptr_addr = f->_base_addr;
- f->_flag |= IOMYBUF;
- f->_cnt = 0;
- bufendtab[f - (struct FILE_irix *)&MEM_U32(IOB_ADDR)] = STDIO_BUFSIZE;
-}
-
-int wrapper___filbuf(uint8_t *mem, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- if (!(f->_flag & IOREAD)) {
- if (f->_flag & IORW) {
- f->_flag |= IOREAD;
- } else {
- MEM_U32(ERRNO_ADDR) = 9; // EBADF
- return -1;
- }
- }
- if (f->_base_addr == 0) {
- file_assign_buffer(mem, f);
- }
- uint32_t size = bufendtab[(fp_addr - IOB_ADDR) / sizeof(struct FILE_irix)];
- int nread = wrapper_read(mem, f->_file, f->_base_addr, size);
- int ret = -1;
- if (nread > 0) {
- f->_ptr_addr = f->_base_addr;
- f->_cnt = nread;
- ret = MEM_U8(f->_ptr_addr);
- ++f->_ptr_addr;
- --f->_cnt;
- } else if (nread == 0) {
- f->_flag |= IOEOF;
- } else {
- f->_flag |= IOERR;
- }
- return ret;
-}
-
-int wrapper___flsbuf(uint8_t *mem, int ch, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- if (wrapper_fflush(mem, fp_addr) != 0) {
- return -1;
- }
- if (f->_base_addr == 0) {
- file_assign_buffer(mem, f);
- f->_cnt = bufendtab[f - (struct FILE_irix *)&MEM_U32(IOB_ADDR)];
- }
- MEM_U8(f->_ptr_addr) = ch;
- ++f->_ptr_addr;
- --f->_cnt;
- if (f->_flag & IONBF) {
- if (wrapper_fflush(mem, fp_addr) != 0) {
- return -1;
- }
- f->_cnt = 0;
- }
- return ch;
-}
-
-int wrapper_ungetc(uint8_t *mem, int ch, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- if (ch == -1 || f->_ptr_addr == f->_base_addr) {
- return -1;
- }
- --f->_ptr_addr;
- MEM_U8(f->_ptr_addr) = (uint8_t)ch;
- ++f->_cnt;
- f->_flag &= ~IOEOF;
- return ch;
-}
-
-uint32_t wrapper_gets(uint8_t *mem, uint32_t str_addr) {
- uint32_t p, str0 = str_addr;
- int n;
-
- for (;;) {
- if (STDIN->_cnt <= 0) {
- if (wrapper___filbuf(mem, STDIN_ADDR) == -1) {
- if (str0 == str_addr) {
- return 0;
- }
- break;
- }
- --STDIN->_ptr_addr;
- ++STDIN->_cnt;
- }
- n = STDIN->_cnt;
- if ((p = wrapper_memccpy(mem, str_addr, STDIN->_ptr_addr, '\n', n)) != 0) {
- n = p - str_addr;
- }
- str_addr += n;
- STDIN->_cnt -= n;
- STDIN->_ptr_addr += n;
- // bufsync
- if (p != 0) {
- // found '\n' in buffer
- --str_addr;
- break;
- }
- }
- MEM_S8(str_addr) = '\0';
- return str0;
-}
-
-uint32_t wrapper_fread(uint8_t *mem, uint32_t data_addr, uint32_t size, uint32_t count, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- int nleft = count * size;
- int n;
- for (;;) {
- if (f->_cnt <= 0) {
- if (wrapper___filbuf(mem, fp_addr) == -1) {
- return count - (nleft + size - 1) / size;
- }
- --f->_ptr_addr;
- ++f->_cnt;
- }
- n = MIN(nleft, f->_cnt);
- data_addr = wrapper_memcpy(mem, data_addr, f->_ptr_addr, n) + n;
- f->_cnt -= n;
- f->_ptr_addr += n;
- if ((nleft -= n) <= 0) {
- return count;
- }
- }
-}
-
-uint32_t wrapper_fwrite(uint8_t *mem, uint32_t data_addr, uint32_t size, uint32_t count, uint32_t fp_addr) {
- struct FILE_irix *f = (struct FILE_irix *)&MEM_U32(fp_addr);
- if (size > 0 && count > 0 && f->_base_addr == 0) {
- file_assign_buffer(mem, f);
- f->_cnt = bufendtab[f - (struct FILE_irix *)&MEM_U32(IOB_ADDR)];
- f->_flag |= IOWRT;
- }
- uint32_t num_written = 0;
- while (count--) {
- uint32_t s = size;
- while (s > 0) {
- uint32_t to_write = f->_cnt;
- if (s < to_write) {
- to_write = s;
- }
- if (f->_cnt == 0) {
- if (wrapper_fflush(mem, fp_addr) != 0) {
- return num_written;
- }
- }
- wrapper_memcpy(mem, f->_ptr_addr, data_addr, to_write);
- data_addr += to_write;
- f->_ptr_addr += to_write;
- f->_cnt -= to_write;
- s -= to_write;
- }
- num_written++;
- }
- if (f->_flag & IONBF) {
- wrapper_fflush(mem, fp_addr); // TODO check error return value
- }
- return num_written;
-}
-
-int wrapper_fputs(uint8_t *mem, uint32_t str_addr, uint32_t fp_addr) {
- uint32_t len = wrapper_strlen(mem, str_addr);
- uint32_t ret = wrapper_fwrite(mem, str_addr, 1, len, fp_addr);
- return ret == 0 && len != 0 ? -1 : 0;
-}
-
-int wrapper_puts(uint8_t *mem, uint32_t str_addr) {
- int ret = wrapper_fputs(mem, str_addr, STDOUT_ADDR);
- if (ret != 0) {
- return ret;
- }
- struct FILE_irix *f = STDOUT;
- if (--f->_cnt < 0) {
- if (wrapper___flsbuf(mem, '\n', STDOUT_ADDR) != '\n') {
- return -1;
- }
- } else {
- MEM_S8(f->_ptr_addr) = '\n';
- ++f->_ptr_addr;
- }
- return 0;
-}
-
-uint32_t wrapper_getcwd(uint8_t *mem, uint32_t buf_addr, uint32_t size) {
- char buf[size];
- if (getcwd(buf, size) == NULL) {
- MEM_U32(ERRNO_ADDR) = errno;
- return 0;
- } else {
- if (buf_addr == 0) {
- buf_addr = wrapper_malloc(mem, size);
- }
- strcpy1(mem, buf_addr, buf);
- return buf_addr;
- }
-}
-
-int wrapper_time(uint8_t *mem, uint32_t tloc_addr) {
- time_t ret = time(NULL);
- if (ret == (time_t)-1) {
- MEM_U32(ERRNO_ADDR) = errno;
- } else if (tloc_addr != 0) {
- MEM_S32(tloc_addr) = ret;
- }
- return ret;
-}
-
-void wrapper_bzero(uint8_t *mem, uint32_t str_addr, uint32_t n) {
- while (n--) {
- MEM_U8(str_addr) = 0;
- ++str_addr;
- }
-}
-
-int wrapper_fp_class_d(double d) {
- union {
- uint32_t w[2];
- double d;
- } bits;
- bits.d = d;
- uint32_t a2 = bits.w[1];
- uint32_t a1 = a2 >> 20;
- uint32_t a0 = a1;
- a2 &= 0xfffff;
- uint32_t a3 = bits.w[0];
- a1 &= 0x7ff;
- a0 &= 0x800;
- if (a1 == 0x7ff) {
- if (a2 == 0 && a3 == 0) {
- return a0 == 0 ? 2 : 3;
- }
- a0 = a2 & 0x80000;
- return a0 == 0 ? 1 : 0;
- }
- if (a1 == 0) {
- if (a2 == 0 && a3 == 0) {
- return a0 == 0 ? 8 : 9;
- }
- return a0 == 0 ? 6 : 7;
- }
- return a0 == 0 ? 4 : 5;
-}
-
-double wrapper_ldexp(double d, int i) {
- return ldexp(d, i);
-}
-
-int64_t wrapper___ll_mul(int64_t a0, int64_t a1) {
- return a0 * a1;
-}
-
-int64_t wrapper___ll_div(int64_t a0, int64_t a1) {
- return a0 / a1;
-}
-
-int64_t wrapper___ll_rem(uint64_t a0, int64_t a1) {
- return a0 % a1;
-}
-
-int64_t wrapper___ll_lshift(int64_t a0, uint64_t shift) {
- return a0 << (shift & 0x3f);
-}
-
-int64_t wrapper___ll_rshift(int64_t a0, uint64_t shift) {
- return a0 >> (shift & 0x3f);
-}
-
-uint64_t wrapper___ull_div(uint64_t a0, uint64_t a1) {
- return a0 / a1;
-}
-
-uint64_t wrapper___ull_rem(uint64_t a0, uint64_t a1) {
- return a0 % a1;
-}
-
-uint64_t wrapper___ull_rshift(uint64_t a0, uint64_t shift) {
- return a0 >> (shift & 0x3f);
-}
-
-uint64_t wrapper___d_to_ull(double d) {
- return d;
-}
-
-int64_t wrapper___d_to_ll(double d) {
- return d;
-}
-
-uint64_t wrapper___f_to_ull(float f) {
- return f;
-}
-
-int64_t wrapper___f_to_ll(float f) {
- return f;
-}
-
-float wrapper___ull_to_f(uint64_t v) {
- return v;
-}
-
-float wrapper___ll_to_f(int64_t v) {
- return v;
-}
-
-double wrapper___ull_to_d(uint64_t v) {
- return v;
-}
-
-double wrapper___ll_to_d(int64_t v) {
- return v;
-}
-
-void wrapper_abort(uint8_t *mem) {
- abort();
-}
-
-void wrapper_exit(uint8_t *mem, int status) {
- exit(status);
-}
-
-void wrapper__exit(uint8_t *mem, int status) {
- assert(0 && "_exit not implemented"); // exit() is already overridden
-}
-
-void wrapper__cleanup(uint8_t *mem) {
-}
-
-uint32_t wrapper__rld_new_interface(uint8_t *mem, uint32_t operation, uint32_t sp) {
- assert(0 && "_rld_new_interface not implemented");
- return 0;
-}
-
-void wrapper__exithandle(uint8_t *mem) {
- assert(0 && "_exithandle not implemented");
-}
-
-int wrapper__prctl(uint8_t *mem, int operation, uint32_t sp) {
- assert(0 && "_prctl not implemented");
- return 0;
-}
-
-double wrapper__atod(uint8_t *mem, uint32_t buffer_addr, int ndigits, int dexp) {
- // ftp://atoum.hst.nerim.net/irix/src/irix-6.5.5-src/6.5.5/m/irix/lib/libc/src/math/atod.c
- assert(0 && "_atod not implemented");
- return 0.0;
-}
-
-int wrapper_pathconf(uint8_t *mem, uint32_t path_addr, int name) {
- STRING(path)
- if (name == 5) {
- errno = 0;
- int ret = pathconf(path, _PC_PATH_MAX);
- if (errno != 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
- }
- assert(0 && "pathconf not implemented for the specific 'name'");
- return 0;
-}
-
-uint32_t wrapper_getenv(uint8_t *mem, uint32_t name_addr) {
- STRING(name);
- const char *value = getenv(name);
- if (value == NULL) {
- return 0;
- }
- size_t value_size = strlen(value) + 1;
- uint32_t buf_addr = wrapper_malloc(mem, value_size);
- strcpy1(mem, buf_addr, value);
- return buf_addr;
-}
-
-uint32_t wrapper_gettxt(uint8_t *mem, uint32_t msgid_addr, uint32_t default_str_addr) {
- // Return default for now
- return default_str_addr;
-}
-
-uint32_t wrapper_setlocale(uint8_t *mem, int category, uint32_t locale_addr) {
- assert(locale_addr != 0);
- STRING(locale)
- assert(category == 6); // LC_ALL
- char *ret = setlocale(LC_ALL, locale);
- // Let's hope the caller doesn't use the return value
- return 0;
-}
-
-uint32_t wrapper_mmap(uint8_t *mem, uint32_t addr, uint32_t length, int prot, int flags, int fd, int offset) {
- assert(0 && "mmap not implemented");
- return 0;
-}
-
-int wrapper_munmap(uint8_t *mem, uint32_t addr, uint32_t length) {
- assert(0 && "munmap not implemented");
- return 0;
-}
-
-int wrapper_mprotect(uint8_t *mem, uint32_t addr, uint32_t length, int prot) {
- assert(0 && "mprotect not implemented");
- return 0;
-}
-
-int wrapper_sysconf(uint8_t *mem, int name) {
- assert(0 && "sysconf not implemented");
- return 0;
-}
-
-int wrapper_getpagesize(uint8_t *mem) {
- return 4096;
-}
-
-int wrapper_strerror(uint8_t *mem, int errnum) {
- errno = errnum;
- perror("strerror");
- assert(0 && "strerror not implemented");
- return 0;
-}
-
-int wrapper_ioctl(uint8_t *mem, int fd, uint32_t request, uint32_t sp) {
- assert(0 && "ioctl not implemented");
- return 0;
-}
-
-int wrapper_fcntl(uint8_t *mem, int fd, int cmd, uint32_t sp) {
- assert(0 && "fcntl not implemented");
- return 0;
-}
-
-static void signal_handler(int signum) {
- uint32_t level = signal_context.recursion_level++;
- uint8_t *mem = signal_context.handlers[signum].mem;
- uint32_t fp_dest = signal_context.handlers[signum].fp_dest;
- uint32_t sp = SIGNAL_HANDLER_STACK_START - 16 - level * 0x1000;
- signal_context.handlers[signum].trampoline(mem, sp, signum, 0, 0, 0, fp_dest);
- signal_context.recursion_level--;
-}
-
-uint32_t wrapper_signal(uint8_t *mem, int signum, uint64_t (*trampoline)(uint8_t *mem, uint32_t sp, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t fp_dest), uint32_t handler_addr, uint32_t sp) {
- //assert(0 && "signal not implemented");
- return 0;
-}
-
-uint32_t wrapper_sigset(uint8_t *mem, int signum, uint64_t (*trampoline)(uint8_t *mem, uint32_t sp, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t fp_dest), uint32_t disp_addr, uint32_t sp) {
- void (*handler)(int) = signal_handler;
-
- if ((int)disp_addr >= -1 && (int)disp_addr <= 1) {
- // SIG_DFL etc.
- handler = (void (*)(int))(intptr_t)(int)disp_addr;
- }
-
- switch (signum) {
- case 2:
- signum = SIGINT;
- break;
- case 13:
- signum = SIGPIPE;
- break;
- case 15:
- signum = SIGTERM;
- break;
- default:
- assert(0 && "sigset with this signum not implemented");
- break;
- }
-
- signal_context.handlers[signum].trampoline = trampoline;
- signal_context.handlers[signum].mem = mem;
- signal_context.handlers[signum].fp_dest = disp_addr;
-
- return (uint32_t)(uintptr_t)sigset(signum, handler); // for now only support SIG_DFL etc. as return value
-}
-
-int wrapper_get_fpc_csr(uint8_t *mem) {
- //assert(0 && "get_fpc_csr not implemented");
- return 0;
-}
-
-int wrapper_set_fpc_csr(uint8_t *mem, int csr) {
- //assert(0 && "set_fpc_csr not implemented");
- return 0;
-}
-
-int wrapper_setjmp(uint8_t *mem, uint32_t addr) {
- return 0;
-}
-
-void wrapper_longjmp(uint8_t *mem, uint32_t addr, int status) {
- assert(0 && "longjmp not implemented");
-}
-
-uint32_t wrapper_tempnam(uint8_t *mem, uint32_t dir_addr, uint32_t pfx_addr) {
- STRING(dir)
- STRING(pfx)
- char *ret = tempnam(dir, pfx);
- char *ret_saved = ret;
- if (ret == NULL) {
- MEM_U32(ERRNO_ADDR) = errno;
- return 0;
- }
- size_t len = strlen(ret) + 1;
- uint32_t ret_addr = wrapper_malloc(mem, len);
- uint32_t pos = ret_addr;
- while (len--) {
- MEM_S8(pos) = *ret;
- ++pos;
- ++ret;
- }
- free(ret_saved);
- return ret_addr;
-}
-
-uint32_t wrapper_tmpnam(uint8_t *mem, uint32_t str_addr) {
- char buf[1024];
- assert(str_addr != 0 && "s NULL not implemented for tmpnam");
- char *ret = tmpnam(buf);
- if (ret == NULL) {
- return 0;
- } else {
- strcpy1(mem, str_addr, ret);
- return str_addr;
- }
-}
-
-uint32_t wrapper_mktemp(uint8_t *mem, uint32_t template_addr) {
- STRING(template)
- mktemp(template);
- strcpy1(mem, template_addr, template);
- return template_addr;
-}
-
-int wrapper_mkstemp(uint8_t *mem, uint32_t name_addr) {
- STRING(name)
- int fd = mkstemp(name);
- if (fd < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- } else {
- strcpy1(mem, name_addr, name);
- }
- return fd;
-}
-
-uint32_t wrapper_tmpfile(uint8_t *mem) {
- // create and fopen a temporary file that is removed when the program exits
- const char *tmpdir = getenv("TMPDIR");
- if (tmpdir == NULL) {
- tmpdir = "/tmp";
- }
-
- char name[PATH_MAX + 1] = {0};
- int n = snprintf(name, sizeof(name), "%s/copt_temp_XXXXXX", tmpdir);
- if (n < 0 || n >= sizeof(name)) {
- // This isn't the best errno code, but it is one that can be returned by tmpfile
- MEM_U32(ERRNO_ADDR) = EACCES;
- return 0;
- }
-
- int fd = mkstemp(name);
- if (fd < 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- return 0;
- }
-
- // the file will be removed from disk when it's closed later
- unlink(name);
-
- // fdopen:
- uint32_t ret = init_file(mem, fd, -1, NULL, "w+");
- if (ret == 0) {
- close(fd);
- }
- return ret;
-}
-
-int wrapper_wait(uint8_t *mem, uint32_t wstatus_addr) {
- int wstatus;
- pid_t ret = wait(&wstatus);
- MEM_S32(wstatus_addr) = wstatus;
- return ret;
-}
-
-int wrapper_kill(uint8_t *mem, int pid, int sig) {
- int ret = kill(pid, sig);
- if (ret != 0) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_execlp(uint8_t *mem, uint32_t file_addr, uint32_t sp) {
- uint32_t argv_addr = sp + 4;
- return wrapper_execvp(mem, file_addr, argv_addr);
-}
-
-int wrapper_execv(uint8_t *mem, uint32_t pathname_addr, uint32_t argv_addr) {
- STRING(pathname)
- uint32_t argc = 0;
- while (MEM_U32(argv_addr + argc * 4) != 0) {
- ++argc;
- }
- char *argv[argc + 1];
- for (uint32_t i = 0; i < argc; i++) {
- uint32_t str_addr = MEM_U32(argv_addr + i * 4);
- uint32_t len = wrapper_strlen(mem, str_addr) + 1;
- argv[i] = (char *)malloc(len);
- char *pos = argv[i];
- while (len--) {
- *pos++ = MEM_S8(str_addr);
- ++str_addr;
- }
- }
- argv[argc] = NULL;
- execv(pathname, argv);
- MEM_U32(ERRNO_ADDR) = errno;
- for (uint32_t i = 0; i < argc; i++) {
- free(argv[i]);
- }
- return -1;
-}
-
-int wrapper_execvp(uint8_t *mem, uint32_t file_addr, uint32_t argv_addr) {
- STRING(file)
- uint32_t argc = 0;
- while (MEM_U32(argv_addr + argc * 4) != 0) {
- ++argc;
- }
- char *argv[argc + 1];
- for (uint32_t i = 0; i < argc; i++) {
- uint32_t str_addr = MEM_U32(argv_addr + i * 4);
- uint32_t len = wrapper_strlen(mem, str_addr) + 1;
- argv[i] = (char *)malloc(len);
- char *pos = argv[i];
- while (len--) {
- *pos++ = MEM_S8(str_addr);
- ++str_addr;
- }
- }
- argv[argc] = NULL;
-
-#ifdef REDIRECT_USR_LIB
- if (!strncmp(file, "/usr/lib/", 9) && bin_dir[0] != '\0') {
- char fixed_path[PATH_MAX + 1];
-#ifdef __CYGWIN__
- int n = snprintf(fixed_path, sizeof(fixed_path), "%s/%s.exe", bin_dir, file + 9);
-#else
- int n = snprintf(fixed_path, sizeof(fixed_path), "%s/%s", bin_dir, file + 9);
-#endif
- if (n > 0 && n < sizeof(fixed_path)) {
- execvp(fixed_path, argv);
- } else {
- execvp(file, argv);
- }
- } else {
- execvp(file, argv);
- }
-#else
- execvp(file, argv);
-#endif
-
- MEM_U32(ERRNO_ADDR) = errno;
- for (uint32_t i = 0; i < argc; i++) {
- free(argv[i]);
- }
- return -1;
-}
-
-int wrapper_fork(uint8_t *mem) {
- int ret = fork();
- if (ret == -1) {
- MEM_U32(ERRNO_ADDR) = errno;
- }
- return ret;
-}
-
-int wrapper_system(uint8_t *mem, uint32_t command_addr) {
- STRING(command)
- return system(command); // no errno
-}
-
-static int name_compare(uint8_t *mem, uint32_t a_addr, uint32_t b_addr) {
- //printf("pc=0x00438180\n");
- return wrapper_strcmp(mem, MEM_U32(a_addr), MEM_U32(b_addr));
-}
-
-static uint32_t tsearch_tfind(uint8_t *mem, uint32_t key_addr, uint32_t rootp_addr, uint32_t compar_addr, bool insert) {
- //assert(compar_addr == 0x438180); // name_compare in as1
-
- if (rootp_addr == 0) {
- return 0;
- }
- while (MEM_U32(rootp_addr) != 0) {
- uint32_t node_addr = MEM_U32(rootp_addr);
- int r = name_compare(mem, key_addr, MEM_U32(node_addr));
- if (r == 0) {
- return node_addr;
- }
- rootp_addr = r < 0 ? node_addr + 4 : node_addr + 8;
- }
- if (insert) {
- uint32_t node_addr = wrapper_malloc(mem, 12);
- if (node_addr != 0) {
- MEM_U32(rootp_addr) = node_addr;
- MEM_U32(node_addr) = key_addr;
- MEM_U32(node_addr + 4) = 0;
- MEM_U32(node_addr + 8) = 0;
- return node_addr;
- }
- }
- return 0;
-}
-
-uint32_t wrapper_tsearch(uint8_t *mem, uint32_t key_addr, uint32_t rootp_addr, uint32_t compar_addr) {
- return tsearch_tfind(mem, key_addr, rootp_addr, compar_addr, true);
-}
-
-uint32_t wrapper_tfind(uint8_t *mem, uint32_t key_addr, uint32_t rootp_addr, uint32_t compar_addr) {
- return tsearch_tfind(mem, key_addr, rootp_addr, compar_addr, false);
-}
-
-uint32_t wrapper_qsort(uint8_t *mem, uint32_t base_addr, uint32_t num, uint32_t size, uint64_t (*trampoline)(uint8_t *mem, uint32_t sp, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t fp_dest), uint32_t compare_addr, uint32_t sp) {
- assert(0 && "qsort not implemented");
- return 0;
-}
-
-uint32_t wrapper_regcmp(uint8_t *mem, uint32_t string1_addr, uint32_t sp) {
- STRING(string1);
- fprintf(stderr, "regex string: %s\n", string1);
- assert(0 && "regcmp not implemented");
- return 0;
-}
-
-uint32_t wrapper_regex(uint8_t *mem, uint32_t re_addr, uint32_t subject_addr, uint32_t sp) {
- STRING(subject);
- assert(0 && "regex not implemented");
- return 0;
-}
-
-void wrapper___assert(uint8_t *mem, uint32_t assertion_addr, uint32_t file_addr, int line) {
- STRING(assertion)
- STRING(file)
- __assert(assertion, file, line);
-}
diff --git a/tools/ido5.3_recomp/libc_impl.h b/tools/ido5.3_recomp/libc_impl.h
deleted file mode 100755
index 4dd53935a..000000000
--- a/tools/ido5.3_recomp/libc_impl.h
+++ /dev/null
@@ -1,165 +0,0 @@
-#include
-
-void mmap_initial_data_range(uint8_t *mem, uint32_t start, uint32_t end);
-void setup_libc_data(uint8_t *mem);
-
-uint32_t wrapper_sbrk(uint8_t *mem, int increment);
-uint32_t wrapper_malloc(uint8_t *mem, uint32_t size);
-uint32_t wrapper_calloc(uint8_t *mem, uint32_t num, uint32_t size);
-uint32_t wrapper_realloc(uint8_t *mem, uint32_t data_addr, uint32_t size);
-int wrapper_fscanf(uint8_t *mem, uint32_t fp_addr, uint32_t format_addr, uint32_t sp);
-int wrapper_printf(uint8_t *mem, uint32_t format_addr, uint32_t sp);
-int wrapper_sprintf(uint8_t *mem, uint32_t str_addr, uint32_t format_addr, uint32_t sp);
-int wrapper_fprintf(uint8_t *mem, uint32_t fp_addr, uint32_t format_addr, uint32_t sp);
-int wrapper__doprnt(uint8_t *mem, uint32_t format_addr, uint32_t params_addr, uint32_t fp_addr);
-void wrapper_free(uint8_t *mem, uint32_t data_addr);
-uint32_t wrapper_strlen(uint8_t *mem, uint32_t str_addr);
-int wrapper_open(uint8_t *mem, uint32_t pathname_addr, int flags, int mode);
-int wrapper_creat(uint8_t *mem, uint32_t pathname_addr, int mode);
-int wrapper_access(uint8_t *mem, uint32_t pathname_addr, int mode);
-int wrapper_rename(uint8_t *mem, uint32_t oldpath_addr, uint32_t newpath_addr);
-int wrapper_utime(uint8_t *mem, uint32_t filename_addr, uint32_t times_addr);
-int wrapper_flock(uint8_t *mem, int fd, int operation);
-int wrapper_chmod(uint8_t *mem, uint32_t path_addr, uint32_t mode);
-int wrapper_umask(int mode);
-uint32_t wrapper_ecvt(uint8_t *mem, double number, int ndigits, uint32_t decpt_addr, uint32_t sign_addr);
-uint32_t wrapper_fcvt(uint8_t *mem, double number, int ndigits, uint32_t decpt_addr, uint32_t sign_addr);
-double wrapper_sqrt(double v);
-float wrapper_sqrtf(float v);
-int wrapper_atoi(uint8_t *mem, uint32_t nptr_addr);
-int wrapper_atol(uint8_t *mem, uint32_t nptr_addr);
-double wrapper_atof(uint8_t *mem, uint32_t nptr_addr);
-int wrapper_strtol(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base);
-uint32_t wrapper_strtoul(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base);
-uint64_t wrapper_strtoll(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base);
-uint64_t wrapper_strtoull(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr, int base);
-double wrapper_strtod(uint8_t *mem, uint32_t nptr_addr, uint32_t endptr_addr);
-uint32_t wrapper_strchr(uint8_t *mem, uint32_t str_addr, int c);
-uint32_t wrapper_strrchr(uint8_t *mem, uint32_t str_addr, int c);
-uint32_t wrapper_strcspn(uint8_t *mem, uint32_t str_addr, uint32_t invalid_addr);
-uint32_t wrapper_strpbrk(uint8_t *mem, uint32_t str_addr, uint32_t accept_addr);
-int wrapper_fstat(uint8_t *mem, int fildes, uint32_t buf_addr);
-int wrapper_stat(uint8_t *mem, uint32_t pathname_addr, uint32_t buf_addr);
-int wrapper_ftruncate(uint8_t *mem, int fd, int length);
-void wrapper_bcopy(uint8_t *mem, uint32_t src_addr, uint32_t dst_addr, uint32_t len);
-uint32_t wrapper_memcpy(uint8_t *mem, uint32_t dst_addr, uint32_t src_addr, uint32_t len);
-uint32_t wrapper_memccpy(uint8_t *mem, uint32_t dst_addr, uint32_t src_addr, int c, uint32_t len);
-int wrapper_read(uint8_t *mem, int fd, uint32_t buf_addr, uint32_t nbytes);
-int wrapper_write(uint8_t *mem, int fd, uint32_t buf_addr, uint32_t nbytes);
-uint32_t wrapper_fopen(uint8_t *mem, uint32_t path_addr, uint32_t mode_addr);
-uint32_t wrapper_freopen(uint8_t *mem, uint32_t path_addr, uint32_t mode_addr, uint32_t fp_addr);
-int wrapper_fclose(uint8_t *mem, uint32_t fp_addr);
-int wrapper_fflush(uint8_t *mem, uint32_t fp_addr);
-int wrapper_ftell(uint8_t *mem, uint32_t fp_addr);
-void wrapper_rewind(uint8_t *mem, uint32_t fp_addr);
-int wrapper_fseek(uint8_t *mem, uint32_t fp_addr, int offset, int origin);
-int wrapper_lseek(uint8_t *mem, int fd, int offset, int whence);
-int wrapper_dup(uint8_t *mem, int fd);
-int wrapper_dup2(uint8_t *mem, int oldfd, int newfd);
-int wrapper_pipe(uint8_t *mem, uint32_t pipefd_addr);
-void wrapper_perror(uint8_t *mem, uint32_t str_addr);
-int wrapper_fdopen(uint8_t *mem, int fd, uint32_t mode_addr);
-uint32_t wrapper_memset(uint8_t *mem, uint32_t dest_addr, int byte, uint32_t n);
-int wrapper_bcmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr, uint32_t n);
-int wrapper_memcmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr, uint32_t n);
-int wrapper_getpid(void);
-int wrapper_getpgrp(uint8_t *mem);
-int wrapper_remove(uint8_t *mem, uint32_t path_addr);
-int wrapper_unlink(uint8_t *mem, uint32_t path_addr);
-int wrapper_close(uint8_t *mem, int fd);
-int wrapper_strcmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr);
-int wrapper_strncmp(uint8_t *mem, uint32_t s1_addr, uint32_t s2_addr, uint32_t n);
-uint32_t wrapper_strcpy(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr);
-uint32_t wrapper_strncpy(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr, uint32_t n);
-uint32_t wrapper_strcat(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr);
-uint32_t wrapper_strncat(uint8_t *mem, uint32_t dest_addr, uint32_t src_addr, uint32_t n);
-uint32_t wrapper_strtok(uint8_t *mem, uint32_t str_addr, uint32_t delimiters_addr);
-uint32_t wrapper_strstr(uint8_t *mem, uint32_t str1_addr, uint32_t str2_addr);
-uint32_t wrapper_strdup(uint8_t *mem, uint32_t str_addr);
-int wrapper_toupper(int c);
-int wrapper_tolower(int c);
-int wrapper_gethostname(uint8_t *mem, uint32_t name_addr, uint32_t len);
-int wrapper_isatty(uint8_t *mem, int fd);
-int wrapper_times(uint8_t *mem, uint32_t buffer_addr);
-uint32_t wrapper_strftime(uint8_t *mem, uint32_t ptr_addr, uint32_t maxsize, uint32_t format_addr, uint32_t timeptr_addr);
-int wrapper_clock(void);
-uint32_t wrapper_ctime(uint8_t *mem, uint32_t timep_addr);
-uint32_t wrapper_localtime(uint8_t *mem, uint32_t timep_addr);
-int wrapper_setvbuf(uint8_t *mem, uint32_t fp_addr, uint32_t buf_addr, int mode, uint32_t size);
-int wrapper___semgetc(uint8_t *mem, uint32_t fp_addr);
-int wrapper___semputc(uint8_t *mem, int c, uint32_t fp_addr);
-int wrapper_fgetc(uint8_t *mem, uint32_t fp_addr);
-int wrapper_fgets(uint8_t *mem, uint32_t str_addr, int count, uint32_t fp_addr);
-int wrapper___filbuf(uint8_t *mem, uint32_t fp_addr);
-int wrapper___flsbuf(uint8_t *mem, int ch, uint32_t fp_addr);
-int wrapper_ungetc(uint8_t *mem, int ch, uint32_t fp_addr);
-uint32_t wrapper_gets(uint8_t *mem, uint32_t str_addr);
-uint32_t wrapper_fread(uint8_t *mem, uint32_t data_addr, uint32_t size, uint32_t count, uint32_t fp_addr);
-uint32_t wrapper_fwrite(uint8_t *mem, uint32_t data_addr, uint32_t size, uint32_t count, uint32_t fp_addr);
-int wrapper_fputs(uint8_t *mem, uint32_t str_addr, uint32_t fp_addr);
-int wrapper_puts(uint8_t *mem, uint32_t str_addr);
-uint32_t wrapper_getcwd(uint8_t *mem, uint32_t buf_addr, uint32_t size);
-int wrapper_time(uint8_t *mem, uint32_t tloc_addr);
-void wrapper_bzero(uint8_t *mem, uint32_t str_addr, uint32_t n);
-int wrapper_fp_class_d(double d);
-double wrapper_ldexp(double d, int i);
-int64_t wrapper___ll_mul(int64_t a0, int64_t a1);
-int64_t wrapper___ll_div(int64_t a0, int64_t a1);
-int64_t wrapper___ll_rem(uint64_t a0, int64_t a1);
-int64_t wrapper___ll_lshift(int64_t a0, uint64_t shift);
-int64_t wrapper___ll_rshift(int64_t a0, uint64_t shift);
-uint64_t wrapper___ull_div(uint64_t a0, uint64_t a1);
-uint64_t wrapper___ull_rem(uint64_t a0, uint64_t a1);
-uint64_t wrapper___ull_rshift(uint64_t a0, uint64_t shift);
-uint64_t wrapper___d_to_ull(double d);
-int64_t wrapper___d_to_ll(double d);
-uint64_t wrapper___f_to_ull(float f);
-int64_t wrapper___f_to_ll(float f);
-float wrapper___ull_to_f(uint64_t v);
-float wrapper___ll_to_f(int64_t v);
-double wrapper___ull_to_d(uint64_t v);
-double wrapper___ll_to_d(int64_t v);
-void wrapper_abort(uint8_t *mem);
-void wrapper_exit(uint8_t *mem, int status);
-void wrapper__exit(uint8_t *mem, int status);
-void wrapper__cleanup(uint8_t *mem);
-uint32_t wrapper__rld_new_interface(uint8_t *mem, uint32_t operation, uint32_t sp);
-void wrapper__exithandle(uint8_t *mem);
-int wrapper__prctl(uint8_t *mem, int operation, uint32_t sp);
-double wrapper__atod(uint8_t *mem, uint32_t buffer_addr, int ndigits, int dexp);
-int wrapper_pathconf(uint8_t *mem, uint32_t path_addr, int name);
-uint32_t wrapper_getenv(uint8_t *mem, uint32_t name_addr);
-uint32_t wrapper_gettxt(uint8_t *mem, uint32_t msgid_addr, uint32_t default_str_addr);
-uint32_t wrapper_setlocale(uint8_t *mem, int category, uint32_t locale_addr);
-uint32_t wrapper_mmap(uint8_t *mem, uint32_t addr, uint32_t length, int prot, int flags, int fd, int offset);
-int wrapper_munmap(uint8_t *mem, uint32_t addr, uint32_t length);
-int wrapper_mprotect(uint8_t *mem, uint32_t addr, uint32_t length, int prot);
-int wrapper_sysconf(uint8_t *mem, int name);
-int wrapper_getpagesize(uint8_t *mem);
-int wrapper_strerror(uint8_t *mem, int errnum);
-int wrapper_ioctl(uint8_t *mem, int fd, uint32_t request, uint32_t sp);
-int wrapper_fcntl(uint8_t *mem, int fd, int cmd, uint32_t sp);
-uint32_t wrapper_signal(uint8_t *mem, int signum, uint64_t (*trampoline)(uint8_t *mem, uint32_t sp, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t fp_dest), uint32_t handler_addr, uint32_t sp);
-uint32_t wrapper_sigset(uint8_t *mem, int signum, uint64_t (*trampoline)(uint8_t *mem, uint32_t sp, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t fp_dest), uint32_t disp_addr, uint32_t sp);
-int wrapper_get_fpc_csr(uint8_t *mem);
-int wrapper_set_fpc_csr(uint8_t *mem, int csr);
-int wrapper_setjmp(uint8_t *mem, uint32_t addr);
-void wrapper_longjmp(uint8_t *mem, uint32_t addr, int status);
-uint32_t wrapper_tempnam(uint8_t *mem, uint32_t dir_addr, uint32_t pfx_addr);
-uint32_t wrapper_tmpnam(uint8_t *mem, uint32_t str_addr);
-uint32_t wrapper_mktemp(uint8_t *mem, uint32_t template_addr);
-int wrapper_mkstemp(uint8_t *mem, uint32_t name_addr);
-uint32_t wrapper_tmpfile(uint8_t *mem);
-int wrapper_wait(uint8_t *mem, uint32_t wstatus_addr);
-int wrapper_kill(uint8_t *mem, int pid, int sig);
-int wrapper_execlp(uint8_t *mem, uint32_t file_addr, uint32_t sp);
-int wrapper_execv(uint8_t *mem, uint32_t pathname_addr, uint32_t argv_addr);
-int wrapper_execvp(uint8_t *mem, uint32_t file_addr, uint32_t argv_addr);
-int wrapper_fork(uint8_t *mem);
-int wrapper_system(uint8_t *mem, uint32_t command_addr);
-uint32_t wrapper_tsearch(uint8_t *mem, uint32_t key_addr, uint32_t rootp_addr, uint32_t compar_addr);
-uint32_t wrapper_tfind(uint8_t *mem, uint32_t key_addr, uint32_t rootp_addr, uint32_t compar_addr);
-uint32_t wrapper_qsort(uint8_t *mem, uint32_t base_addr, uint32_t num, uint32_t size, uint64_t (*trampoline)(uint8_t *mem, uint32_t sp, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3, uint32_t fp_dest), uint32_t compare_addr, uint32_t sp);
-uint32_t wrapper_regcmp(uint8_t *mem, uint32_t string1_addr, uint32_t sp);
-uint32_t wrapper_regex(uint8_t *mem, uint32_t re_addr, uint32_t subject_addr, uint32_t sp);
-void wrapper___assert(uint8_t *mem, uint32_t assertion_addr, uint32_t file_addr, int line);
diff --git a/tools/ido5.3_recomp/recomp.cpp b/tools/ido5.3_recomp/recomp.cpp
deleted file mode 100755
index dc991bda3..000000000
--- a/tools/ido5.3_recomp/recomp.cpp
+++ /dev/null
@@ -1,2959 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include