Skip to content

Commit

Permalink
Update dtk_tag and minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Sep 5, 2024
1 parent 66867d0 commit 796b91a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 43 deletions.
8 changes: 4 additions & 4 deletions config/G2ME01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15780,8 +15780,8 @@ __CARDAllocBlock = .text:0x80359CF4; // type:function size:0x118
__CARDFreeBlock = .text:0x80359E0C; // type:function size:0x9C align:4
__CARDUpdateFatBlock = .text:0x80359EA8; // type:function size:0xAC
__CARDGetDirBlock = .text:0x80359F54; // type:function size:0x8
WriteCallback = .text:0x80359F5C; // type:function size:0xD0 align:4
EraseCallback = .text:0x8035A02C; // type:function size:0xC8 align:4
WriteCallback = .text:0x80359F5C; // type:function size:0xD0 scope:local align:4
EraseCallback = .text:0x8035A02C; // type:function size:0xC8 scope:local align:4
__CARDUpdateDir = .text:0x8035A0F4; // type:function size:0xC4
__CARDCheckSum = .text:0x8035A1B8; // type:function size:0x1B0
VerifyID = .text:0x8035A368; // type:function size:0x284 align:4
Expand Down Expand Up @@ -17789,7 +17789,7 @@ lbl_803AFC48 = .rodata:0x803AFC48; // type:object size:0x30
lbl_803AFC78 = .rodata:0x803AFC78; // type:object size:0x100
lbl_803AFD78 = .rodata:0x803AFD78; // type:object size:0x10
lbl_803AFD88 = .rodata:0x803AFD88; // type:object size:0x8
@stringBase0 = .rodata:0x803AFD90; // type:object size:0x8 data:string
@stringBase0 = .rodata:0x803AFD90; // type:object size:0x7 data:string
lbl_803AFD98 = .rodata:0x803AFD98; // type:object size:0x10
lbl_803AFDA8 = .rodata:0x803AFDA8; // type:object size:0xB0
lbl_803AFE58 = .rodata:0x803AFE58; // type:object size:0x8
Expand Down Expand Up @@ -18683,7 +18683,7 @@ jumptable_803BCAC4 = .data:0x803BCAC4; // type:object size:0x7C scope:local
@3 = .data:0x803BCCB8; // type:object size:0x44 scope:local data:string
@3 = .data:0x803BCD00; // type:object size:0x45 scope:local data:string
...data.0 = .data:0x803BCD48; // type:label scope:local
@3 = .data:0x803BCD48; // type:object size:0x48 scope:local data:string
@3 = .data:0x803BCD48; // type:object size:0x46 scope:local data:string
ResetFunctionInfo = .data:0x803BCD90; // type:object size:0x10 scope:local
CardData = .data:0x803BCDA0; // type:object size:0x160
SectorSizeTable = .data:0x803BCF00; // type:object size:0x20 scope:local
Expand Down
47 changes: 9 additions & 38 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
# Tool versions
config.binutils_tag = "2.42-1"
config.compilers_tag = "20240706"
config.dtk_tag = "v0.9.4"
config.dtk_tag = "v0.9.5"
config.objdiff_tag = "v2.0.0-beta.5"
config.sjiswrap_tag = "v1.1.1"
config.wibo_tag = "0.6.11"
Expand All @@ -153,7 +153,6 @@
config.ldflags = [
"-fp hardware",
"-nodefaults",
# "-warn off",
"-listclosure",
]
# Use for any additional files that should cause a re-configure when modified
Expand All @@ -178,36 +177,17 @@
"-RTTI off",
"-fp_contract on",
"-str reuse",
"-multibyte", # For Wii compilers, replace with `-enc SJIS`
"-i include",
"-i libc",
f"-i build/{config.version}/include",
f"-DVERSION={version_num}",
]

cflags_base_dbg = [
"-nodefaults",
"-proc gekko",
"-align powerpc",
"-enum int",
"-fp hardware",
"-Cpp_exceptions off",
# "-W all",
#"-O4,p",
"-g",
#"-inline auto",
'-pragma "cats off"',
'-pragma "warn_notinlined off"',
"-maxerrors 1",
"-nosyspath",
"-RTTI off",
"-fp_contract on",
"-str reuse",
"-i include",
"-i libc",
f"-DVERSION={version_num}",
"-D_DEBUG=1",
]
# GC 3.0 and above require -enc SJIS instead of -multibyte
if version_num >= 3:
cflags_base.append("-enc SJIS")
else:
cflags_base.append("-multibyte")

# Debug flags
if config.debug:
Expand Down Expand Up @@ -253,13 +233,13 @@
# RELs not yet set up for non-USA versions
config.build_rels = False


# Helper function for Dolphin libraries
def DolphinLib(lib_name: str, objects: List[Object], debug=False) -> Dict[str, Any]:
def DolphinLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
return {
"lib": lib_name,
"mw_version": "GC/1.2.5n",
"cflags": cflags_base,
"progress_category": "sdk",
"host": False,
"objects": objects,
}
Expand All @@ -271,7 +251,6 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
"lib": lib_name,
"mw_version": "GC/1.3.2",
"cflags": cflags_rel,
"progress_category": "game",
"host": True,
"objects": objects,
}
Expand All @@ -288,7 +267,6 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
"lib": "MetroidPrime",
"cflags": cflags_retro,
"mw_version": "GC/2.7",
"progress_category": "game",
"host": True,
"objects": [
Object(NonMatching, "MetroidPrime/main.cpp"),
Expand All @@ -312,7 +290,6 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
"lib": "Kyoto_CW",
"mw_version": "GC/2.7",
"cflags": cflags_retro,
"progress_category": "game",
"host": True,
"objects": [
Object(Matching, "Kyoto/Basics/CStopwatch.cpp"),
Expand All @@ -333,7 +310,6 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
"lib": "Runtime.PPCEABI.H",
"mw_version": config.linker_version,
"cflags": cflags_runtime,
"progress_category": "sdk", # str | List[str]
"host": False,
"objects": [
Object(Matching, "Runtime/global_destructor_chain.c"),
Expand Down Expand Up @@ -373,7 +349,6 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
Object(Matching, "Dolphin/card/CARDErase.c"),
Object(Matching, "Dolphin/card/CARDProgram.c"),
],
debug=False,
),
DolphinLib(
"base",
Expand Down Expand Up @@ -420,11 +395,7 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
]

# Optional extra categories for progress tracking
# Adjust as desired for your project
config.progress_categories = [
ProgressCategory("game", "Game Code"),
ProgressCategory("sdk", "SDK Code"),
]
config.progress_categories = []
config.progress_each_module = args.verbose

if args.mode == "configure":
Expand Down
2 changes: 1 addition & 1 deletion tools/decompctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
src_dir = os.path.join(root_dir, "src")
include_dirs = [
os.path.join(root_dir, "include"),
# Add additional include directories here
os.path.join(root_dir, "libc"),
]

include_pattern = re.compile(r'^#\s*include\s*[<"](.+?)[>"]$')
Expand Down

0 comments on commit 796b91a

Please sign in to comment.