mirror of
https://github.com/TheOnlyZac/sly1.git
synced 2024-11-26 23:20:43 +00:00
Splat configuration & necessary includes
This commit is contained in:
parent
2fdb99d07e
commit
443cb2930b
3
.gitignore
vendored
3
.gitignore
vendored
@ -47,6 +47,9 @@ assets/
|
||||
*.app
|
||||
*.elf
|
||||
|
||||
# Linker scripts
|
||||
*.ld
|
||||
|
||||
# Miscellaneous
|
||||
.vscode
|
||||
temp/
|
||||
|
13
README.md
13
README.md
@ -37,6 +37,17 @@ Documentation of the code can be found at [theonlyzac.github.io/sly1](https://th
|
||||
|
||||
New contributors are welcome and encouraged to make a pull request! If you would like to help but aren't sure where to start, check out [CONTRIBUTING.md](/docs/CONTRIBUTING.md) and feel free to [join our Discord server][discord-url] for guidance.
|
||||
|
||||
## Setup
|
||||
|
||||
First you need to clone the repository. After cloning, install the required python packages with pip.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/TheOnlyZac/sly1
|
||||
cd sly1
|
||||
pip install -U -r requirements.txt
|
||||
```
|
||||
|
||||
After setting up the repository and installing the required packages, you will need to extract the ELF file from a legally obtained copy of the game. With the disc mounted, copy the `SCUS_971.98` file from the root directory of the disc to the `disc` directory of the project.
|
||||
|
||||
## Building
|
||||
|
||||
@ -49,7 +60,6 @@ The `scripts` directory contains scripts for setting up the build environment on
|
||||
**Prerequisites**: `git`, `make`, `wine-stable`, `p7zip-full`
|
||||
|
||||
```bash
|
||||
git clone https://github.com/TheOnlyZac/sly1
|
||||
cd sly1/scripts
|
||||
./setup-progd-linux.sh
|
||||
cd ..
|
||||
@ -61,7 +71,6 @@ make
|
||||
**Prerequisites**: `git`, `make`, `7zip`
|
||||
|
||||
```powershell
|
||||
git clone https://github.com/TheOnlyZac/sly1
|
||||
cd sly1\scripts
|
||||
.\setup-progd-windows.bat
|
||||
cd ..
|
||||
|
57
config/sly1.yaml
Normal file
57
config/sly1.yaml
Normal file
@ -0,0 +1,57 @@
|
||||
name: Sly Cooper and the Thievius Raccoonus (USA)
|
||||
sha1: 57dc305db57932ad3f1122966cdb695d2e62a47a
|
||||
|
||||
options:
|
||||
basename: sly1
|
||||
target_path: disc/SCUS_971.98
|
||||
elf_path: SCUS_971.98
|
||||
base_path: ../
|
||||
platform: ps2
|
||||
compiler: GCC
|
||||
|
||||
asm_path: asm
|
||||
src_path: src
|
||||
build_path: build
|
||||
|
||||
find_file_boundaries: False
|
||||
disasm_unknown: True
|
||||
named_regs_for_c_funcs: False
|
||||
|
||||
create_undefined_funcs_auto: True
|
||||
undefined_funcs_auto_path: config/undefined_funcs_auto.txt
|
||||
|
||||
create_undefined_syms_auto: True
|
||||
undefined_syms_auto_path: config/undefined_syms_auto.txt
|
||||
|
||||
symbol_addrs_path: config/symbol_addrs.txt
|
||||
|
||||
extensions_path: tools/splat_ext
|
||||
|
||||
section_order: [".text", ".rodata", ".data", ".bss"]
|
||||
|
||||
auto_all_sections: [".rodata", ".data", ".bss"]
|
||||
|
||||
subalign: 0x4
|
||||
|
||||
segments:
|
||||
- [0, databin, elf_header]
|
||||
|
||||
- name: main
|
||||
type: code
|
||||
start: 0x001000
|
||||
vram: 0x100000
|
||||
bss_size: 0x3B1304
|
||||
subsegments:
|
||||
- [0x001000, asm, sce/crt0] # starts with 2 nops
|
||||
- [0x001178, asm]
|
||||
- [0x0491A0, c, P2/coin]
|
||||
- [0x049400, asm]
|
||||
|
||||
- [0x112E10, bin, vutext]
|
||||
|
||||
- [0x118380, rodata]
|
||||
|
||||
- [0x151580, data]
|
||||
|
||||
- [0x17C200, databin]
|
||||
- [0x1A20D0]
|
2
config/symbol_addrs.txt
Normal file
2
config/symbol_addrs.txt
Normal file
@ -0,0 +1,2 @@
|
||||
OnCoinSmack = 0x001481A0; // type:func
|
||||
SetCoinDprizes = 0x00148298; // type:func
|
0
disc/.gitkeep
Normal file
0
disc/.gitkeep
Normal file
6
include/common.h
Normal file
6
include/common.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
#include "include_asm.h"
|
||||
|
||||
#endif /* COMMON_H */
|
23
include/include_asm.h
Normal file
23
include/include_asm.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef INCLUDE_ASM_H
|
||||
#define INCLUDE_ASM_H
|
||||
|
||||
#if !defined(SPLAT) && !defined(__CTX__) && !defined(PERMUTER)
|
||||
#ifndef INCLUDE_ASM
|
||||
#define INCLUDE_ASM_INTERNAL(TYPE, BASE_FOLDER, FOLDER, NAME, ARGS...) \
|
||||
__asm__( \
|
||||
".section .text\n" \
|
||||
"\t.align\t3\n" \
|
||||
"\t.globl\t" #NAME "\n" \
|
||||
"\t.ent\t" #NAME "\n" #NAME ":\n" \
|
||||
"\t.include \"asm/" BASE_FOLDER "/" FOLDER "/" #NAME ".s\"\n" \
|
||||
"\t.set reorder\n" \
|
||||
"\t.set at\n" \
|
||||
"\t.end\t" #NAME);
|
||||
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) INCLUDE_ASM_INTERNAL(TYPE, "nonmatchings", FOLDER, NAME, ARGS)
|
||||
#endif
|
||||
__asm__(".include \"include/macro.inc\"\n");
|
||||
#else
|
||||
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...)
|
||||
#endif
|
||||
|
||||
#endif /* INCLUDE_ASM_H */
|
10
include/macro.inc
Normal file
10
include/macro.inc
Normal file
@ -0,0 +1,10 @@
|
||||
.macro glabel label
|
||||
.global \label
|
||||
.type \label, @function
|
||||
\label:
|
||||
.endm
|
||||
|
||||
.macro dlabel label
|
||||
.global \label
|
||||
\label:
|
||||
.endm
|
69
splat.yml
69
splat.yml
@ -1,69 +0,0 @@
|
||||
name: Sly Cooper and the Thievius Raccoonus (USA)
|
||||
sha1: 57dc305db57932ad3f1122966cdb695d2e62a47a
|
||||
|
||||
options:
|
||||
basename: sly1
|
||||
target_path: SCUS_971.98
|
||||
elf_path: SCUS_971.98
|
||||
base_path: .
|
||||
platform: ps2
|
||||
compiler: GCC
|
||||
|
||||
asm_path: asm
|
||||
src_path: src
|
||||
build_path: build
|
||||
|
||||
find_file_boundaries: False
|
||||
disasm_unknown: True
|
||||
named_regs_for_c_funcs: False
|
||||
|
||||
create_undefined_funcs_auto: True
|
||||
undefined_funcs_auto_path: undefined_funcs_auto.txt
|
||||
|
||||
create_undefined_syms_auto: True
|
||||
undefined_syms_auto_path: undefined_syms_auto.txt
|
||||
|
||||
symbol_addrs_path: symbol_addrs.txt
|
||||
|
||||
extensions_path: tools/splat_ext
|
||||
|
||||
section_order:
|
||||
- .text
|
||||
- .vutext
|
||||
- .rodata
|
||||
#- .vudata
|
||||
#- .reginfo
|
||||
- .data
|
||||
- .gcc_except_table
|
||||
- .sbss
|
||||
- .bss
|
||||
#- .vubss
|
||||
#- .stack
|
||||
#- .shstrtab
|
||||
|
||||
auto_all_sections:
|
||||
- .data
|
||||
- .rodata
|
||||
- .bss
|
||||
|
||||
subalign: 0x4
|
||||
|
||||
|
||||
segments:
|
||||
- [0, databin, elf_header]
|
||||
|
||||
- name: .text
|
||||
type: code
|
||||
start: 0x001000
|
||||
vram: 0x100000
|
||||
bss_size: 0x3b1304
|
||||
subsegments:
|
||||
- [0x001000, asm, sce/crt0] # starts with 2 nops
|
||||
- [0x001178, asm, xunk1]
|
||||
- [0x0863f0, asm, P2/lookat]
|
||||
- [0x086758, asm, P2/main]
|
||||
|
||||
- { name: .vutext, type: data, start: 0x112e10, vram: 0x112e10 }
|
||||
|
||||
#- [0x211e0b]
|
||||
i
|
@ -1 +0,0 @@
|
||||
Subproject commit 46729c53201730a7c3fd93fdaabb11e26db88995
|
Loading…
Reference in New Issue
Block a user