Switch from 'iconv' to sjiswrap, remove reference to yaz0 tool

This commit is contained in:
Cuyler36
2024-07-10 19:08:49 -04:00
parent 422368d282
commit 22d4bbfd62
5 changed files with 14 additions and 29 deletions
+1
View File
@@ -14,6 +14,7 @@ dump/*
*.ctx
ctx.*
!tools/orthrus.exe
!tools/sjiswrap.exe
build.ninja
ac-decomp.code-workspace
assets/
+2 -5
View File
@@ -215,11 +215,10 @@ CC = os.path.join(CODEWARRIOR, "mwcceppc.exe")
CC_R = os.path.join(CODEWARRIOR_RODATA_POOL_FIX, "mwcceppc.exe")
OCC = os.path.join(SDK_CW, "mwcceppc.exe")
LD = os.path.join(CODEWARRIOR, "mwldeppc.exe")
SJISWRAP = f"{TOOLS}/sjiswrap.exe"
if platform != "win32":
CC = f"wibo {CC}"
CC_R = f"wibo {CC_R}"
OCC = f"wibo {OCC}"
LD = f"wibo {LD}"
SJISWRAP = f"wibo {SJISWRAP}"
else:
ORTHRUS = os.path.join(TOOLS, "orthrus.exe")
@@ -236,8 +235,6 @@ PAL16DIS = f"{PYTHON} {TOOLS}/converters/pal16dis.py"
# JSystem JKernel archive tool
ARC_TOOL = f"{PYTHON} {TOOLS}/arc_tool.py"
ICONV = f"{PYTHON} tools/sjis.py" # TODO: get actual iconv working(?)
# N64 SDK path for GBI
N64SDK = os.environ.get("N64_SDK")
assert N64SDK != None, "N64_SDK is not defined as a system environment variable"
+11 -18
View File
@@ -97,11 +97,11 @@ n.variable("ld", c.LD)
n.variable("devkitppc", c.DEVKITPPC)
n.variable("as", c.AS)
n.variable("cpp", c.CPP)
n.variable("iconv", c.ICONV)
n.variable("forcefilesgen", c.FORCEFILESGEN)
n.variable("vtxdis", c.VTXDIS)
n.variable("pal16dis", c.PAL16DIS)
n.variable("arctool", c.ARC_TOOL)
n.variable("sjiswrap", c.SJISWRAP)
n.newline()
##############
@@ -121,7 +121,7 @@ n.newline()
# Windows can't use && without this statement
ALLOW_CHAIN = "cmd /c " if os.name == "nt" else ""
mwcc_cmd = ALLOW_CHAIN + f"$cpp -M $in -MF $out.d $cppflags && $cc $cflags -c $in -o $out"
mwcc_cmd = ALLOW_CHAIN + f"$cpp -M $in -MF $out.d $cppflags && $sjiswrap $cc $cflags -c $in -o $out"
n.rule(
"relextern",
@@ -225,7 +225,7 @@ n.rule(
n.rule(
"ccs",
command = ALLOW_CHAIN + f"$cpp -M $in -MF $out.d $cppflags && $cc $cflags -S $in -o $out",
command = ALLOW_CHAIN + f"$cpp -M $in -MF $out.d $cppflags && $sjiswrap $cc $cflags -S $in -o $out",
description = "CC -S $in",
deps = "gcc",
depfile = "$out.d"
@@ -237,12 +237,6 @@ n.rule(
description = "LD $out",
)
n.rule(
"iconv",
command = "$iconv $in $out",
description = "iconv $in",
)
n.rule(
"forcefiles",
command = "$forcefilesgen $in $out $forcefiles",
@@ -267,6 +261,12 @@ n.rule(
description = "$arctool -v $in $out"
)
n.rule(
"sjiswrap",
command = "$sjiswrap $in",
description = "sjiswrap $in",
)
##########
# Assets #
##########
@@ -676,7 +676,6 @@ class CSource(Source):
else:
self.cflags = ctx.cflags
self.cc = c.CC_R
self.iconv_path = f"$builddir/iconv/{path}"
# Find generated includes
with open(path, encoding="utf-8") as f:
@@ -686,16 +685,10 @@ class CSource(Source):
super().__init__(True, path, f"$builddir/{os.path.splitext(path)[0]}.o", gen_includes)
def build(self):
n.build(
self.iconv_path,
rule="iconv",
inputs=self.src_path
)
n.build(
self.o_path,
rule = "cc",
inputs = self.iconv_path,
inputs = self.src_path,
implicit = [inc.path for inc in self.gen_includes],
variables = {
"cc" : self.cc,
@@ -707,7 +700,7 @@ class CSource(Source):
n.build(
self.s_path,
rule = "ccs",
inputs = self.iconv_path,
inputs = self.src_path,
implicit = [inc.path for inc in self.gen_includes],
variables = {
"cflags" : self.cflags
-6
View File
@@ -40,12 +40,6 @@ Once files have been extracted you will need to copy the following files into th
Make sure to rename `main.dol` to `static.dol`.
You will also need to decompress `foresta.rel.szs` using `yaz0` found in `tools/` using the following command:
~~~~console
yaz0 -d foresta.rel.szs foresta.rel
~~~~
It is recommended that you also copy the following symbol maps for reference:
- `foresta.map`
- `static.map`
Binary file not shown.