From 1a4f5a62d12a57dbafbde2529014127777342717 Mon Sep 17 00:00:00 2001 From: Aetias Date: Thu, 6 Feb 2025 17:52:30 +0100 Subject: [PATCH 1/5] Fix ActorSpawner double mangled symbol names --- include/Actor/ActorSpawner.hpp | 4 ++-- src/00_Core/Actor/ActorSpawner.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/Actor/ActorSpawner.hpp b/include/Actor/ActorSpawner.hpp index e417ddcc..94047e10 100644 --- a/include/Actor/ActorSpawner.hpp +++ b/include/Actor/ActorSpawner.hpp @@ -16,8 +16,8 @@ public: static void Destroy(); ActorSpawner(); ~ActorSpawner(); - void _ZN12ActorSpawner19func_ov000_020c4014Ev(); - void _ZN12ActorSpawner19func_ov000_020c4018Ev(); + void func_ov000_020c4014(); + void func_ov000_020c4018(); Actor *CreateActor(ActorTypeId type); s32 Spawn(ActorTypeId type, Vec3p *pos, void *param3, ActorRef *ref); }; diff --git a/src/00_Core/Actor/ActorSpawner.cpp b/src/00_Core/Actor/ActorSpawner.cpp index 514156ac..76b4ae74 100644 --- a/src/00_Core/Actor/ActorSpawner.cpp +++ b/src/00_Core/Actor/ActorSpawner.cpp @@ -4,7 +4,7 @@ ActorSpawner *ActorSpawner::Create() {} void ActorSpawner::Destroy() {} ActorSpawner::ActorSpawner() {} ActorSpawner::~ActorSpawner() {} -void ActorSpawner::_ZN12ActorSpawner19func_ov000_020c4014Ev() {} -void ActorSpawner::_ZN12ActorSpawner19func_ov000_020c4018Ev() {} +void ActorSpawner::func_ov000_020c4014() {} +void ActorSpawner::func_ov000_020c4018() {} Actor *ActorSpawner::CreateActor(ActorTypeId type) {} s32 ActorSpawner::Spawn(ActorTypeId type, Vec3p *pos, void *param3, ActorRef *ref) {} From de6431687dcf257063cc91745e189f93997f8d01 Mon Sep 17 00:00:00 2001 From: Aetias Date: Thu, 6 Feb 2025 18:07:21 +0100 Subject: [PATCH 2/5] `chmod +x` on dsd --- tools/setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/setup.py b/tools/setup.py index bc322e1d..1af78e32 100644 --- a/tools/setup.py +++ b/tools/setup.py @@ -3,6 +3,7 @@ import zipfile import io from pathlib import Path import platform +import stat DSD_VERSION = 'v0.4.0' @@ -30,8 +31,10 @@ match platform.machine().lower(): print('\nInstalling dsd...') response = requests.get(f'https://github.com/AetiasHax/ds-decomp/releases/download/{DSD_VERSION}/dsd-{system}-{machine}{EXE}') -with open(root_path / f'dsd{EXE}', 'wb') as f: +dsd_path = root_path / f'dsd{EXE}' +with open(dsd_path, 'wb') as f: f.write(response.content) +dsd_path.chmod(dsd_path.stat().st_mode | stat.S_IEXEC) print('\nInstalling toolchain...') From 326c2a51c6bb6d05026ac04cf764b38a3e028359 Mon Sep 17 00:00:00 2001 From: Aetias Date: Thu, 6 Feb 2025 18:15:25 +0100 Subject: [PATCH 3/5] Auto-install wibo --- .gitignore | 1 + INSTALL.md | 3 +-- tools/configure.py | 2 +- tools/setup.py | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 14723773..b510ca5d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ objdiff.json build.ninja .ninja_log* .ninja_lock +/wibo diff --git a/INSTALL.md b/INSTALL.md index 6d4acc03..5f694513 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -16,7 +16,6 @@ Contents: - Python 3.11+ and pip - GCC 9+ - Ninja - - **On Linux**: Wine/Wibo 3. Install the Python dependencies: ```shell python -m pip install -r tools/requirements.txt @@ -38,7 +37,7 @@ python tools/configure.py > Rerun `configure.py` often to ensure that all C/C++ code gets compiled. > [!NOTE] -> For Linux users: If you plan to use Wibo instead of Wine, run `configure.py` with `-w `. +> For Linux users: Wibo is used by default. If you want to use Wine instead, run `configure.py` with `-w `. 7. Put one or more base ROMs in the [`/extract/`](/extract/README.md) directory of this repository. Now you can run `ninja` to build a ROM for the chosen version. diff --git a/tools/configure.py b/tools/configure.py index 7f2c5b26..5ab6329d 100644 --- a/tools/configure.py +++ b/tools/configure.py @@ -10,7 +10,7 @@ import ninja_syntax parser = argparse.ArgumentParser(description="Generates build.ninja") -parser.add_argument('-w', type=str, default="wine", dest="wine", required=False, help="Path to Wine (linux only)") +parser.add_argument('-w', type=str, default="wibo", dest="wine", required=False, help="Path to Wine (linux only)") parser.add_argument('version', help='Game version') args = parser.parse_args() diff --git a/tools/setup.py b/tools/setup.py index 1af78e32..f81ca25d 100644 --- a/tools/setup.py +++ b/tools/setup.py @@ -6,6 +6,7 @@ import platform import stat DSD_VERSION = 'v0.4.0' +WIBO_VERSION = '0.6.16' tools_path = Path(__file__).parent @@ -42,3 +43,12 @@ response = requests.get('http://decomp.aetias.com/files/mwccarm.zip') zip_file = zipfile.ZipFile(io.BytesIO(response.content)) zip_file.extractall(tools_path) + +if system == "linux": + print('\nInstalling wibo...') + response = requests.get(f'https://github.com/decompals/wibo/releases/download/{WIBO_VERSION}/wibo') + wibo_path = root_path / 'wibo' + with open(wibo_path, 'wb') as f: + f.write(response.content) + wibo_path.chmod(wibo_path.stat().st_mode | stat.S_IEXEC) + From 92fbf89ae21e0ec03546c7aeeda866c19988d81e Mon Sep 17 00:00:00 2001 From: Aetias Date: Thu, 6 Feb 2025 19:36:26 +0100 Subject: [PATCH 4/5] Add SHA1 checksum for another valid BIOS dump --- INSTALL.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 5f694513..91c4a96c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -47,10 +47,11 @@ Now you can run `ninja` to build a ROM for the chosen version. **This is optional!** You only need to follow these steps if you want a matching ROM. First, [extract the ARM7 BIOS from your DS device](https://wiki.ds-homebrew.com/ds-index/ds-bios-firmware-dump). Put the -ARM7 BIOS in the root directory of this repository, and verify that your dumped BIOS matches the one below: +ARM7 BIOS in the root directory of this repository, and verify that your dumped BIOS matches one of the following: | File name | SHA1 | | --------------- | ------------------------------------------ | | `arm7_bios.bin` | `6ee830c7f552c5bf194c20a2c13d5bb44bdb5c03` | +| `arm7_bios.bin` | `24f67bdea115a2c847c8813a262502ee1607b7df` | Now, rerun `configure.py` so it can update `build.ninja` to build a matching ROM. From 0c775b9a8d2100c9c6da02022594d44cf33dc67e Mon Sep 17 00:00:00 2001 From: Aetias Date: Sat, 8 Feb 2025 12:19:48 +0100 Subject: [PATCH 5/5] Fix wibo default path --- tools/configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure.py b/tools/configure.py index 5ab6329d..f3c34311 100644 --- a/tools/configure.py +++ b/tools/configure.py @@ -10,7 +10,7 @@ import ninja_syntax parser = argparse.ArgumentParser(description="Generates build.ninja") -parser.add_argument('-w', type=str, default="wibo", dest="wine", required=False, help="Path to Wine (linux only)") +parser.add_argument('-w', type=str, default="./wibo", dest="wine", required=False, help="Path to Wine/Wibo (linux only)") parser.add_argument('version', help='Game version') args = parser.parse_args()