-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab0df3c
commit 7ac7395
Showing
13 changed files
with
96 additions
and
88 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Splat Config Files | ||
|
||
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. | ||
- `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. | ||
|
||
## Adding new splits | ||
To add a new source code file to the project, you must add the split to `sly1.yaml`. Here is an example of some file splits: | ||
```yaml | ||
- [0x1f560, c, P2/brx] | ||
- [0x1fe70, asm, P2/ac] | ||
#- [0x, asm, P2/act] | ||
``` | ||
- The first line tells splat to split the binary at offset `0x1f560` and create a new file `P2/brx.c`. It will contain the data from the translation unit starting at `0x1f560` and ending at the next split offset. The `c` tells splat to create a `.c` file in `src/P2/`. | ||
- The second line tells splat to split that the functions starting from offset `0x1fe70` are in the translation unit `P2/ac`, but not to create a new `.c` file. | ||
- The third line is commented out and does nothing, because we know the next translation unit is `P2/act`, but we don't yet know the offset of the first function in that TU. | ||
|
||
When splat is run, it will create `.s` assembly files for each non-matching functions in each split in the `asm/nonmatchings/` directory. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Disc Files | ||
|
||
This directory is intentionally left empty. It is where you should place files you extract from your own copy of the game. The files you will need are: | ||
- `SCUS_971.98` - The original executable of the game. This file is required to build the project. | ||
|
||
Extract your original ELF file and place it in this directory before building the project. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Scripts | ||
|
||
This directory contains the following scripts used to setup and build the project. | ||
- `build.sh` | ||
- `check_progress.sh` | ||
- `quickstart.sh` | ||
- `setup_progd_linux.sh` | ||
|
||
There are a few others, but they are not used in the normal contributing workflow. | ||
|
||
## build.sh | ||
|
||
Runs a clean reconfigure (deletes build files and splits the binary), then builds the project. Will warn you if `disc/SCUS_971.98` is not present. | ||
|
||
## check_progress.sh | ||
|
||
Checks the progress of the project by comparing the number of bytes in the original game binary to the number of bytes that have been matched. The output will be in this format: | ||
|
||
``` | ||
Category : DecompedSize / Total OfFolder% ( OfTotal%) | ||
all : 10516 / 1143680 0.9195% ( 0.9195% / 100.0000%) | ||
sce : 0 / 116164 0.0000% ( 0.0000% / 10.1570%) | ||
P2 : 10516 / 1005644 1.0457% ( 0.9195% / 87.9305%) | ||
data : 0 / 21872 0.0000% ( 0.0000% / 1.9124%) | ||
``` | ||
|
||
The value that we consider the progress of the project is row "`P2`", column "`OfFolder%`". This is the percentage of the game engine code that has been matched. | ||
|
||
## quickstart.sh | ||
|
||
Installs the necessary dependencies using pip/apt and sets up the build environment. You only need to run this script once. | ||
|
||
## setup_progd_linux.sh | ||
|
||
Installs the compiler needed to build the project on Linux. `quickstart.h` will run this script for you, so you don't need to run both. | ||
|
||
There is a similar script for Windows, but the compiler |