mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-28 19:25:27 +00:00
Rename and move handwritten asm files (#1254)
* Rename handwritten asm files and move them to src * Fix progress.py * Remove handling for asm dir from Makefile
This commit is contained in:
parent
e989cb7ace
commit
4775fd4a7e
39 changed files with 47 additions and 59 deletions
13
Makefile
13
Makefile
|
@ -158,7 +158,6 @@ else
|
|||
SRC_DIRS := $(shell find src -type d)
|
||||
endif
|
||||
|
||||
ASM_DIRS := $(shell find asm -type d -not -path "asm/non_matchings*") $(shell find data -type d)
|
||||
ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/text")
|
||||
ASSET_FILES_XML := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.xml))
|
||||
ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin))
|
||||
|
@ -166,9 +165,11 @@ ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_XML:.xml=.c),$f) \
|
|||
$(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),build/$f) \
|
||||
$(foreach f,$(wildcard assets/text/*.c),build/$(f:.c=.o))
|
||||
|
||||
UNDECOMPILED_DATA_DIRS := $(shell find data -type d)
|
||||
|
||||
# source files
|
||||
C_FILES := $(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS),$(wildcard $(dir)/*.c))
|
||||
S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s))
|
||||
S_FILES := $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS),$(wildcard $(dir)/*.s))
|
||||
O_FILES := $(foreach f,$(S_FILES:.s=.o),build/$f) \
|
||||
$(foreach f,$(C_FILES:.c=.o),build/$f) \
|
||||
$(foreach f,$(wildcard baserom/*),build/$f.o)
|
||||
|
@ -186,7 +187,7 @@ TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \
|
|||
$(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \
|
||||
|
||||
# create build directories
|
||||
$(shell mkdir -p build/baserom build/assets/text $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(ASSET_BIN_DIRS),build/$(dir)))
|
||||
$(shell mkdir -p build/baserom build/assets/text $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS) $(ASSET_BIN_DIRS),build/$(dir)))
|
||||
|
||||
ifeq ($(COMPILER),ido)
|
||||
build/src/code/fault.o: CFLAGS += -trapuv
|
||||
|
@ -297,9 +298,6 @@ build/undefined_syms.txt: undefined_syms.txt
|
|||
build/baserom/%.o: baserom/%
|
||||
$(OBJCOPY) -I binary -O elf32-big $< $@
|
||||
|
||||
build/asm/%.o: asm/%.s
|
||||
$(CPP) $(CPPFLAGS) -Iinclude $< | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
build/data/%.o: data/%.s
|
||||
$(AS) $(ASFLAGS) $< -o $@
|
||||
|
||||
|
@ -315,6 +313,9 @@ build/assets/%.o: assets/%.c
|
|||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
$(OBJCOPY) -O binary $@ $@.bin
|
||||
|
||||
build/src/%.o: src/%.s
|
||||
$(CPP) $(CPPFLAGS) -Iinclude $< | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
build/dmadata_table_spec.h: build/$(SPEC)
|
||||
$(MKDMADATA) $< $@
|
||||
|
||||
|
|
|
@ -58,6 +58,9 @@ def GetNonMatchingSize(path):
|
|||
|
||||
return size
|
||||
|
||||
def IsCFile(objfile):
|
||||
srcfile = objfile.strip().replace("build/", "").replace(".o", ".c")
|
||||
return os.path.isfile(srcfile)
|
||||
|
||||
mapFile = ReadAllLines("build/z64.map")
|
||||
curSegment = None
|
||||
|
@ -82,7 +85,7 @@ for line in mapFile:
|
|||
size = int(lineSplit[2], 16)
|
||||
objFile = lineSplit[3]
|
||||
|
||||
if (section == ".text"):
|
||||
if (section == ".text" and IsCFile(objFile)):
|
||||
if (objFile.startswith("build/src")):
|
||||
src += size
|
||||
|
||||
|
|
72
spec
72
spec
|
@ -4,9 +4,9 @@
|
|||
|
||||
beginseg
|
||||
name "makerom"
|
||||
include "build/asm/rom_header.o"
|
||||
include "build/asm/ipl3.o"
|
||||
include "build/asm/entry.o"
|
||||
include "build/src/makerom/rom_header.o"
|
||||
include "build/src/makerom/ipl3.o"
|
||||
include "build/src/makerom/entry.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -23,7 +23,7 @@ beginseg
|
|||
include "build/src/boot/assert.o"
|
||||
include "build/src/boot/is_debug.o"
|
||||
include "build/src/libultra/io/driverominit.o"
|
||||
include "build/asm/mio0.o"
|
||||
include "build/src/boot/mio0.o"
|
||||
include "build/src/boot/stackcheck.o"
|
||||
include "build/src/boot/logutils.o"
|
||||
include "build/src/libultra/rmon/sprintf.o"
|
||||
|
@ -35,15 +35,15 @@ beginseg
|
|||
include "build/src/libultra/os/recvmesg.o"
|
||||
include "build/src/libultra/os/initialize.o"
|
||||
include "build/src/libultra/libc/ll.o"
|
||||
include "build/asm/exceptasm.o"
|
||||
include "build/src/libultra/os/exceptasm.o"
|
||||
include "build/src/libultra/os/dequeuethread.o"
|
||||
include "build/src/libultra/os/destroythread.o"
|
||||
include "build/asm/bzero.o"
|
||||
include "build/asm/parameters.o"
|
||||
include "build/src/libultra/libc//bzero.o"
|
||||
include "build/src/libultra/os/parameters.o"
|
||||
include "build/src/libultra/os/createthread.o"
|
||||
include "build/asm/__osSetSR.o"
|
||||
include "build/asm/__osGetSR.o"
|
||||
include "build/asm/osWritebackDCache.o"
|
||||
include "build/src/libultra/os/setsr.o"
|
||||
include "build/src/libultra/os/getsr.o"
|
||||
include "build/src/libultra/os/writebackdcache.o"
|
||||
include "build/src/libultra/io/vigetnextframebuf.o"
|
||||
include "build/src/libultra/io/pimgr.o"
|
||||
include "build/src/libultra/io/devmgr.o"
|
||||
|
@ -52,18 +52,18 @@ beginseg
|
|||
include "build/src/libultra/io/viblack.o"
|
||||
include "build/src/libultra/io/sirawread.o"
|
||||
include "build/src/libultra/os/getthreadid.o"
|
||||
include "build/asm/osSetIntMask.o"
|
||||
include "build/src/libultra/os/setintmask.o"
|
||||
include "build/src/libultra/io/visetmode.o"
|
||||
include "build/asm/__osProbeTLB.o"
|
||||
include "build/src/libultra/os/probetlb.o"
|
||||
include "build/src/libultra/os/getmemsize.o"
|
||||
include "build/src/libultra/os/seteventmesg.o"
|
||||
include "build/src/libultra/rmon/xprintf.o"
|
||||
include "build/asm/osUnmapTLBAll.o"
|
||||
include "build/src/libultra/os/unmaptlball.o"
|
||||
include "build/src/libultra/io/epidma.o"
|
||||
include "build/src/libultra/libc/string.o"
|
||||
include "build/asm/osInvalICache.o"
|
||||
include "build/src/libultra/os/invalicache.o"
|
||||
include "build/src/libultra/os/createmesgqueue.o"
|
||||
include "build/asm/osInvalDCache.o"
|
||||
include "build/src/libultra/os/invaldcache.o"
|
||||
include "build/src/libultra/io/si.o"
|
||||
include "build/src/libultra/os/jammesg.o"
|
||||
include "build/src/libultra/os/setthreadpri.o"
|
||||
|
@ -71,15 +71,15 @@ beginseg
|
|||
include "build/src/libultra/io/epirawread.o"
|
||||
include "build/src/libultra/io/viswapbuf.o"
|
||||
include "build/src/libultra/io/epirawdma.o"
|
||||
include "build/asm/bcmp.o"
|
||||
include "build/src/libultra/libc/bcmp.o"
|
||||
include "build/src/libultra/os/gettime.o"
|
||||
include "build/src/libultra/os/timerintr.o"
|
||||
include "build/asm/osGetCount.o"
|
||||
include "build/src/libultra/os/getcount.o"
|
||||
include "build/src/libultra/os/setglobalintmask.o"
|
||||
include "build/asm/__osSetCompare.o"
|
||||
include "build/asm/bcopy.o"
|
||||
include "build/src/libultra/os/setcompare.o"
|
||||
include "build/src/libultra/libc/bcopy.o"
|
||||
include "build/src/libultra/os/resetglobalintmask.o"
|
||||
include "build/asm/interrupt.o"
|
||||
include "build/src/libultra/os/interrupt.o"
|
||||
include "build/src/libultra/io/vimodentsclan1.o"
|
||||
include "build/src/libultra/io/vimodempallan1.o"
|
||||
include "build/src/libultra/io/vi.o"
|
||||
|
@ -89,12 +89,12 @@ beginseg
|
|||
include "build/src/libultra/io/visetspecial.o"
|
||||
include "build/src/libultra/io/cartrominit.o"
|
||||
include "build/src/libultra/io/vimodefpallan1.o"
|
||||
include "build/asm/__osSetFpcCsr.o"
|
||||
include "build/asm/__osGetFpcCsr.o"
|
||||
include "build/src/libultra/os/setfpccsr.o"
|
||||
include "build/src/libultra/os/getfpccsr.o"
|
||||
include "build/src/libultra/io/epiwrite.o"
|
||||
include "build/asm/osMapTLBRdb.o"
|
||||
include "build/src/libultra/os/maptlbrdb.o"
|
||||
include "build/src/libultra/os/yieldthread.o"
|
||||
include "build/asm/__osGetCause.o"
|
||||
include "build/src/libultra/os/getcause.o"
|
||||
include "build/src/libultra/io/epirawwrite.o"
|
||||
include "build/src/libultra/rmon/xlitob.o"
|
||||
include "build/src/libultra/libc/ldiv.o"
|
||||
|
@ -108,7 +108,7 @@ beginseg
|
|||
include "build/src/libultra/io/visetxscale.o"
|
||||
include "build/src/libultra/os/sethwintrroutine.o"
|
||||
include "build/src/libultra/os/gethwintrroutine.o"
|
||||
include "build/asm/__osSetWatchLo.o"
|
||||
include "build/src/libultra/os/setwatchlo.o"
|
||||
include "build/data/rsp_boot.text.o"
|
||||
#ifdef COMPILER_GCC
|
||||
include "build/src/gcc_fix/missing_gcc_functions.o"
|
||||
|
@ -409,7 +409,7 @@ beginseg
|
|||
include "build/src/code/fault.o"
|
||||
include "build/data/fault.bss.o"
|
||||
include "build/src/code/fault_drawer.o"
|
||||
include "build/asm/kanread.o"
|
||||
include "build/src/code/kanread.o"
|
||||
include "build/src/code/ucode_disas.o"
|
||||
pad_text // audio library aligned to 32 bytes?
|
||||
include "build/src/code/audio_data.o"
|
||||
|
@ -438,7 +438,7 @@ beginseg
|
|||
include "build/src/code/padutils.o"
|
||||
include "build/src/code/padsetup.o"
|
||||
include "build/src/code/code_800FCE80.o"
|
||||
include "build/asm/fp.o"
|
||||
include "build/src/code/fp.o"
|
||||
include "build/src/code/system_malloc.o"
|
||||
include "build/src/code/code_800FD970.o"
|
||||
include "build/src/code/__osMalloc.o"
|
||||
|
@ -447,7 +447,7 @@ beginseg
|
|||
include "build/src/code/jpegutils.o"
|
||||
include "build/src/code/jpegdecoder.o"
|
||||
include "build/src/libultra/io/pfsfreeblocks.o"
|
||||
include "build/asm/guScale.o"
|
||||
include "build/src/libultra/mgu/scale.o"
|
||||
include "build/src/libultra/gu/sinf.o"
|
||||
include "build/src/libultra/gu/sins.o"
|
||||
include "build/src/libultra/io/sptask.o"
|
||||
|
@ -461,31 +461,31 @@ beginseg
|
|||
include "build/src/libultra/io/sptaskyield.o"
|
||||
include "build/src/libultra/io/pfsreadwritefile.o"
|
||||
include "build/src/libultra/io/pfsgetstatus.o"
|
||||
include "build/asm/guMtxIdentF.o"
|
||||
include "build/src/libultra/mgu/mtxidentf.o"
|
||||
include "build/src/libultra/gu/lookat.o"
|
||||
include "build/src/libultra/io/pfsallocatefile.o"
|
||||
include "build/src/libultra/os/stoptimer.o"
|
||||
include "build/src/libultra/io/contpfs.o"
|
||||
include "build/asm/guMtxL2F.o"
|
||||
include "build/src/libultra/mgu/mtxl2f.o"
|
||||
include "build/src/libultra/io/pfsfindfile.o"
|
||||
include "build/src/libultra/gu/sqrtf.o"
|
||||
include "build/src/libultra/os/afterprenmi.o"
|
||||
include "build/src/libultra/io/contquery.o"
|
||||
include "build/src/libultra/gu/lookathil.o"
|
||||
include "build/src/libultra/io/sp.o"
|
||||
include "build/asm/guMtxIdent.o"
|
||||
include "build/src/libultra/mgu/mtxident.o"
|
||||
include "build/src/libultra/gu/position.o"
|
||||
include "build/src/libultra/io/sptaskyielded.o"
|
||||
include "build/src/libultra/gu/rotate.o"
|
||||
include "build/src/libultra/io/aisetfreq.o"
|
||||
include "build/src/libultra/os/getactivequeue.o"
|
||||
include "build/asm/guNormalize.o"
|
||||
include "build/src/libultra/mgu/normalize.o"
|
||||
include "build/src/libultra/io/dpgetstat.o"
|
||||
include "build/src/libultra/io/dpsetstat.o"
|
||||
include "build/src/libultra/io/pfsdeletefile.o"
|
||||
include "build/src/libultra/gu/ortho.o"
|
||||
include "build/src/libultra/gu/cosf.o"
|
||||
include "build/asm/libm_vals.o"
|
||||
include "build/src/libultra/gu/libm_vals.o"
|
||||
include "build/src/libultra/gu/coss.o"
|
||||
include "build/src/libultra/io/visetevent.o"
|
||||
include "build/src/libultra/io/pfsisplug.o"
|
||||
|
@ -496,16 +496,16 @@ beginseg
|
|||
include "build/src/libultra/io/pfsinitpak.o"
|
||||
include "build/src/libultra/io/pfschecker.o"
|
||||
include "build/src/libultra/io/aigetlen.o"
|
||||
include "build/asm/guTranslate.o"
|
||||
include "build/src/libultra/mgu/translate.o"
|
||||
include "build/src/libultra/io/contramwrite.o"
|
||||
include "build/src/libultra/io/contramread.o"
|
||||
include "build/src/libultra/io/crc.o"
|
||||
include "build/src/libultra/os/settimer.o"
|
||||
include "build/src/libultra/io/spgetstat.o"
|
||||
include "build/src/libultra/io/spsetstat.o"
|
||||
include "build/asm/osWritebackDCacheAll.o"
|
||||
include "build/src/libultra/os/writebackdcacheall.o"
|
||||
include "build/src/libultra/os/getcurrfaultedthread.o"
|
||||
include "build/asm/guMtxF2L.o"
|
||||
include "build/src/libultra/mgu/mtxf2l.o"
|
||||
include "build/src/libultra/libc/llcvt.o"
|
||||
include "build/src/libultra/io/vigetcurrframebuf.o"
|
||||
include "build/src/libultra/io/spsetpc.o"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,6 +1,5 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
// assembler directives
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,6 +1,5 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,6 +1,5 @@
|
|||
#include "ultra64/asm.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -2,7 +2,6 @@
|
|||
#include "ultra64/r4300.h"
|
||||
#include "ultra64/rdb.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "ultra64/r4300.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
|
@ -1,7 +1,6 @@
|
|||
#include "ultra64/asm.h"
|
||||
#include "boot.h"
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.section .text
|
Loading…
Reference in a new issue