Skip to content

Commit

Permalink
Update dtk stuff (build fails for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialAmber committed Oct 1, 2024
1 parent f793d53 commit cd16b4f
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 167 deletions.
25 changes: 8 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
__pycache__
.vscode/c_cpp_properties.json

# game files
orig/*/*
!orig/SOUE01/README.md
!orig/*/.gitkeep

# ninja stuff
.idea
.vscode
.ninja_*
.mypy_cache
*.exe
build
build.ninja
.ninja_deps
.ninja_log

# tools
tools/dtk
tools/mwcc_compiler/*
!tools/mwcc_compiler/.gitkeep
/tools/objdiff.exe

objdiff.json
orig/*/*
!orig/*/.gitkeep
/*.txt
ctx.c
.DS_Store
6 changes: 3 additions & 3 deletions config/jp/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38273,9 +38273,9 @@ reslist_CArcItem_typestr = .rodata:0x80527F98; // type:object size:0x14 scope:gl
_reslist_base_CArcItem_typestr = .rodata:0x80527FAC; // type:object size:0x1C scope:global align:4 data:string
reslist_CPackItem_typestr = .rodata:0x80527FC8; // type:object size:0x18 scope:global align:4 data:string
_reslist_base_CPackItem_typestr = .rodata:0x80527FE0; // type:object size:0x1C scope:global align:8 data:string
CPackItem_typestr = .rodata:0x80527FFC; // type:object size:0xC scope:global align:4 data:string
CArcItem_typestr = .rodata:0x80528008; // type:object size:0xC scope:global align:4 data:string
lbl_80528014 = .rodata:0x80528014; // type:object size:0x14 scope:global align:4 data:string_table
CPackItem_typestr = .rodata:0x80527FFC; // type:object size:0xA scope:global align:4 data:string
CArcItem_typestr = .rodata:0x80528008; // type:object size:0x9 scope:global align:4 data:string
lbl_80528014 = .rodata:0x80528014; // type:object size:0x14 scope:global align:8 data:string_table
CSchedule_typestr = .rodata:0x80528028; // type:object size:0x10 scope:global align:8 data:string
ScheduleList_typestr = .rodata:0x80528038; // type:object size:0x10 scope:global align:8 data:string
reslist_CSchedule_typestr = .rodata:0x80528048; // type:object size:0x18 scope:global align:8 data:string
Expand Down
25 changes: 20 additions & 5 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
import sys
from pathlib import Path
from typing import Any, Dict, List
from tools.project import *

from tools.project import (
Object,
ProgressCategory,
ProjectConfig,
calculate_progress,
generate_build,
is_windows,
)

# Game versions
DEFAULT_VERSION = 0
Expand Down Expand Up @@ -107,6 +115,12 @@
action="store_true",
help="builds equivalent (but non-matching) or modded objects",
)
parser.add_argument(
"--no-progress",
dest="progress",
action="store_false",
help="disable progress calculation",
)
args = parser.parse_args()

config = ProjectConfig()
Expand All @@ -122,6 +136,7 @@
config.generate_map = args.map
config.non_matching = args.non_matching
config.sjiswrap_path = args.sjiswrap
config.progress = args.progress
if not is_windows():
config.wrapper = args.wrapper
# Don't build asm unless we're --non-matching
Expand All @@ -131,8 +146,8 @@
# Tool versions
config.binutils_tag = "2.42-1"
config.compilers_tag = "20240706"
config.dtk_tag = "v0.9.5"
config.objdiff_tag = "v2.0.0-beta.5"
config.dtk_tag = "v1.0.0"
config.objdiff_tag = "v2.2.1"
config.sjiswrap_tag = "v1.1.1"
config.wibo_tag = "0.6.11"

Expand All @@ -147,7 +162,7 @@
f"--defsym version={version_num}",
]
config.ldflags = [
"-fp fmadd",
"-fp hardware",
"-nodefaults",
]
if args.debug:
Expand Down Expand Up @@ -190,7 +205,7 @@
"-proc gekko",
"-align powerpc",
"-enum int",
"-fp hard",
"-fp hardware",
"-Cpp_exceptions off",
# "-W all",
"-O4,p",
Expand Down
6 changes: 3 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ float sqrtf(float);

The extra directives are to ensure the file isn't included multiple times (header guard, or the ifndef and define), and to have the function declarations still work when the file is included in a C++ file (#ifdef __cplusplus).

The final step is to change the path of the file in the corresponding library's Makefile, in this case PowerPC_EABI_Support. The Makefiles are located in each library/module's src folder. (for example, the one we need to modify is at src/PowerPC_EABI_Support/MSL_C/Makefile):
The final step is to change the matching status value of the file in the "configure.py" file. The entries for each file are located in the large table at the bottom. For example, for this file you can find the entry by just searching for `ansi_files`:

Before:

``$(BUILD_DIR)/asm/PowerPC_EABI_Support/MSL_C/MSL_Common/ansi_files.o\``
``Object(NonMatching, "MSL_C/MSL_Common/ansi_files.c")``

After:

``$(BUILD_DIR)/src/PowerPC_EABI_Support/MSL_C/MSL_Common/ansi_files.o\``
``Object(Matching, "MSL_C/MSL_Common/ansi_files.c"),``

Now, you can try building the repository to make sure your new file matches. For a file this simple, as long as you formatted everything correctly, it should easily work. If not, find out what was wrong and keep trying to fix it.

Expand Down
Loading

0 comments on commit cd16b4f

Please sign in to comment.