From 7e84f4787a5fccfc828a0a118f2451c71cf93373 Mon Sep 17 00:00:00 2001 From: Zac Date: Sun, 20 Oct 2024 21:03:43 +0000 Subject: [PATCH 1/3] Update setup instructions --- README.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 513b359a..37baac37 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,10 @@ New contributors are welcome and encouraged to make a pull request! If you would ## Quickstart +**1. Setup build environment.** + +Copy and paste this into your terminal: + ```bash git clone https://github.com/theonlyzac/sly1 && \ cd sly1 && \ @@ -46,9 +50,15 @@ pip install -U -r requirements.txt && \ sudo ./scripts/setup_build_environment.sh ``` -Copy the `SCUS_971.98` file from your game disc to the `disc` directory of the project. Then build with: +**2. Extract your original ELF file.** -``` +Copy the file `SCUS_971.98` from your Sly 1 game disc to the `disc` directory of the project. + +**3. Build the project.** + +Run the build script with this command: + +```bash ./scripts/build.sh ``` @@ -62,17 +72,21 @@ If you have any issues, or you prefer to set up the project manually, follow the ## Manual Setup -The project can be built on Linux, or Windows using WSL. Follow the instructions below to set up the build environment. +The project can be built on Linux (or Windows using WSL). Follow the instructions below to set up the build environment. -### Clone the repo +### Clone the repository -Clone the repository to your local machine: +Clone the repo to your local machine: ```bash git clone https://github.com/TheOnlyZac/sly1 cd sly1 ``` +### Extract your original ELF file + +To build the project, you will need to extract the original ELF file from your own legally obtained copy of the game. Mount the disc on your PC and copy the file `SCUS_971.98` from your disc to the `disc` directory of this project. + ### Install python packages You will need Python 3.8 or higher. @@ -117,10 +131,6 @@ choco install 7zip .\scripts\setup-progd-windows.bat ```--> -### Setup binary splitting - -To build the project you will need to extract the original ELF file from your own legally obtained copy of the game. Mount the disc on your PC and copy the file `SCUS_971.98` from your disc to the `disc` directory of this project. - ### Build the project @@ -131,7 +141,7 @@ python configure.py ninja ``` -If you update the config files, you will need run a clean reconfigure: +If you update any config files or add any source files, you will need run a clean reconfigure: ```bash python configure.py --clean @@ -158,10 +168,10 @@ The `run.sh` script in the `scripts` dir will automatically rebuild the executab To boot the elf in PCSX2 from the command line, use the following command: ```bash -pcsx2-1.7.exe -elf ".../sly1/bin/debug/SCUS_971.98" "/path/to/game/backup.iso" +pcsx2.exe -elf ".../sly1/bin/debug/SCUS_971.98" "/path/to/game/backup.iso" ``` -Replace `pcsx2-1.7.exe` with the path to your PCSX2 v1.7 executable (for Linux it will be an **.appimage** file). +Replace `pcsx2.exe` with the path to your PCSX2 v2.0 executable (for Linux it will be an **.appimage** file). - The `-elf` parameter specifies the path to the SCUS_971.98 you built from this project. Replace `...` with the path to this repository. The emulator will use this ELF to boot the game. - The last argument is the path to your game ISO. Replace `/path/to/game/backup.iso` with the path to a backup of your own game disc. This is where the game will load the assets from. From c522181b72900c0e05f18ef513630d1f2fd84ebc Mon Sep 17 00:00:00 2001 From: Zac Date: Sun, 20 Oct 2024 21:06:59 +0000 Subject: [PATCH 2/3] Update splat to use named regs --- config/sly1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/sly1.yaml b/config/sly1.yaml index 7dec8f23..6490b79a 100644 --- a/config/sly1.yaml +++ b/config/sly1.yaml @@ -19,7 +19,7 @@ options: find_file_boundaries: False disasm_unknown: True - named_regs_for_c_funcs: False + named_regs_for_c_funcs: True # Auto-generate undefined functions and symbols create_undefined_funcs_auto: True From f3e19f91e7a1243d52b84721d7af534452ff15f7 Mon Sep 17 00:00:00 2001 From: Zac Date: Mon, 21 Oct 2024 16:47:10 +0000 Subject: [PATCH 3/3] Turn off named regs --- config/sly1.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sly1.yaml b/config/sly1.yaml index 6490b79a..b91d33d2 100644 --- a/config/sly1.yaml +++ b/config/sly1.yaml @@ -19,7 +19,7 @@ options: find_file_boundaries: False disasm_unknown: True - named_regs_for_c_funcs: True + named_regs_for_c_funcs: False # Auto-generate undefined functions and symbols create_undefined_funcs_auto: True @@ -168,7 +168,7 @@ segments: - [0x6f0b8, c, P2/joy] - [0x70608, c, P2/jt1] - - [0x74888, asm, P2/jt_UpdateJtActive] + - [0x74888, asm, P2/jt_UpdateJtActive] # should be in P2/jt but doesn't match when split - [0x75808, c, P2/jt2] - [0x79008, asm, P2/jp]