From 21e32b1fd6afa9c20ad33d317a81776026536311 Mon Sep 17 00:00:00 2001 From: SlyCooperReloadCoded Date: Sat, 30 Nov 2024 21:07:09 -0500 Subject: [PATCH 1/2] Fixed build.sh --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 6ae7a7f6..13c13537 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,5 +13,5 @@ if [ ! -f disc/SCUS_971.98 ]; then fi # Configure and build -python configure.py --clean +python3 configure.py --clean ninja From e950baf0ea007b7cb859a48bdfe7d7218bac9e27 Mon Sep 17 00:00:00 2001 From: Zac Date: Sun, 1 Dec 2024 02:13:28 +0000 Subject: [PATCH 2/2] Change references to python to python3 --- README.md | 18 +++++++++++------- config/readme.md | 2 +- docs/CONTRIBUTING.md | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e0cfc13f..2b16695a 100644 --- a/README.md +++ b/README.md @@ -88,15 +88,19 @@ To build the project, you will need to extract the original ELF file from your o ### Install python packages -You will need Python 3.8 or higher. +If you don't have Python 3.8 or higher, install it: ```bash -pip install -U -r requirements.txt +sudo apt-get install python3 python3-pip ``` -### Setup build environment +Then install the required Python packages: - +```bash +pip3 install -U -r requirements.txt +``` + +### Setup build environment 1. Setup wine: ```bash @@ -136,20 +140,20 @@ choco install 7zip The project builds the executable `SCUS_971.98`. ```bash -python configure.py +python3 configure.py ninja ``` If you update any config files or add any source files, you will need run a clean reconfigure: ```bash -python configure.py --clean +python3 configure.py --clean ``` To only clean without reconfiguring (i.e. delete build files) use: ```bash -python configure.py --only-clean +python3 configure.py --only-clean ``` ## Running diff --git a/config/readme.md b/config/readme.md index b3c94cb9..0dbbda7c 100644 --- a/config/readme.md +++ b/config/readme.md @@ -3,7 +3,7 @@ This directory contains config files for splat, the tool we use to split and disassemble the game binary. The config files are used to tell splat how to split the binary and what to name the output files. ## Files in this directory -- `sly1.yaml` - Main config file for splat. Contains the offsets of each file split in the game binary. Creating new `.c` files involves modifying this file to create a `c` split and then running `python configure.py` to generate the new files. +- `sly1.yaml` - Main config file for splat. Contains the offsets of each file split in the game binary. Creating new `.c` files involves modifying this file to create a `c` split and then running `python3 configure.py` to generate the new files. - `symbol_addrs.txt` - Contains the addresses of symbols in the game binary. Used by splat to properly reference functions and variables in the game code when splitting the binary. - `checksum.sha1` - SHA1 checksum of the original game binary. Used to verify the integrity of the binary after compilation. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index e72d9daf..21423c20 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -61,7 +61,7 @@ Then start writing your code under the "Source code" tab. It will tell you what Once the function matches 100%, follow these steps to integrate it into the project: 1. Replace the `INCLUDE_ASM` macro in the `.c` file with the matched function. - * If the function is in a new file, **do not create a new file**. Creating new `.c` files is done by editing the `config/sly1.yaml` file to change the file split from `asm` to `c`, then running `python configure.py` to generate the new file. If you don't know how to do this, feel free to ask for help in the Discord server. + * If the function is in a new file, **do not create a new file**. Creating new `.c` files is done by editing the `config/sly1.yaml` file to change the file split from `asm` to `c`, then running `python3 configure.py` to generate the new file. If you don't know how to do this, feel free to ask for help in the Discord server. 2. Check `config/symbol_addrs.txt` to see if the mangled name of the function is present. * If it is not, add the **mangled name** of the function with it's address. The mangled name of the function can be found in the debug symbols for the May 2002 prototype. If you don't know how to find it, ask for help in the Discord server; someone will be able to find it for you easily. * The symbol_addrs.txt file is grouped alphabetically by filename, then sorted by address within the file.