-
Notifications
You must be signed in to change notification settings - Fork 42
Configuration
Splat has various options for configuration, all of which are listed under the options
section of the yaml file.
Path that all other configured paths are relative to.
base_path: path/to/base/folder
.
(Current directory)
Path to target binary.
target_path: path/to/target/binary
Path to the final elf target
Path to the binary that was used as the input to python3 -m splat create_config
The target platform for the binary. Options are:
-
n64
(Nintendo 64) -
psx
(PlayStation 1) -
ps2
(PlayStation 2) -
gc
(GameCube)
platform: psx
Compiler used to build the binary.
splat recognizes the following compilers, and it will adapt it behavior accordingly for them, but unknown compilers can be passed as well:
- GCC
- SN64
- IDO
compiler: IDO
ido
Determines the endianness of the target binary. If not set, the endiannesss will be guessed from the selected platform.
Valid values:
- big
- little
Determines the default section order of the target binary. This can be overridden per-segment.
Expects a list of strings.
String that is placed before the contents of newly-generated .c
files.
generated_c_preamble: #include "header.h"
#include "common.h"
String that is placed before the contents of newly-generated assembly (.s
) files.
generated_s_preamble: .set fp=64
Determines whether to replace the suffix of the file to .o
or to append .o
to the suffix of the file.
The value of the $gp
register to correctly calculate offset to %gp_rel
relocs.
By default splat will check and error if there are any non consecutive segment types. This option disables said feature.
# Disable checking for non-consecutive segments
check_consecutive_segment_types: False
Path to output split asset files.
asset_path: path/to/assets/folder
assets
Determines the path to the symbol addresses file(s). A symbol_addrs
file is to be updated/curated manually and contains addresses of symbols as well as optional metadata such as rom address, type, and more
It's possible to use more than one file by supplying a list instead of a string
symbol_addrs_path: path/to/symbol_addrs
symbol_addrs.txt
Path that built files will be found. Used for generation of the linker script.
build_path: path/to/build/folder
build
Path to split .c
files.
src_path: path/to/src/folder
src
Path to output split assembly files.
asm_path: path/to/asm/folder
asm
Determines the path to the asm data directory
Determines the path to the asm nonmatchings directory
Path to splat cache
cache_path: path/to/splat/cache
.splat_cache
Tells splat to consider hasm
files to be relative to src_path
instead of asm_path
.
hasm_in_src_path: True
False
If True
, splat will generate an undefined_funcs_auto.txt
file.
create_undefined_funcs_auto: False
True
Path to file containing automatically defined functions.
undefined_funcs_auto_path: path/to/undefined_funcs_auto.txt
undefined_funcs_auto.txt
If True
, splat will generate an undefined_syms_auto.txt
file.
create_undefined_syms_auto: False
True
Path to file containing automatically defined symbols.
undefined_syms_auto_path: path/to/undefined_syms_auto.txt
undefined_syms_auto.txt
If you are using splat extension(s), this is the path they will be loaded from.
extensions_path: path/to/extensions/folder
tools/splat_ext
Determines the path to library files that are to be linked into the target binary
Path to file containing elf section list.
elf_section_list_path: path/to/elf_sections
elf_sections.txt
Sub-alignment (in bytes) of sections.
subalign: 4
16
TODO
Path to output ld script.
ld_script_path: path/to/ld/script.ld
{basename}.ld
Path to output a header containing linker symbols.
ld_symbol_header_path: path/to/linker_symbol_header
Determines whether to add a discard section to the linker script
Determines the list of section labels that are to be added to the linker script
Determines whether to add wildcards for section linking in the linker script (.rodata* for example)
Determines whether to use follows_vram
(segment option) and vram_symbol
/ follows_classes
(vram_class options) to calculate vram addresses in the linker script.
Enabled by default. If disabled, this uses the plain integer values for vram addresses defined in the yaml.
Change linker script generation to allow partially linking segments. Requires both ld_partial_scripts_path
and ld_partial_build_segments_path
to be set.
Folder were each intermediary linker script will be written to.
Folder where the built partially linked segments will be placed by the build system.
Generate a dependency file for every linker script generated. Dependency files will have the same path and name as the corresponding linker script, but changing the extension to .d
. Requires elf_path
to be set.
Legacy linker script generation does not impose the section_order specified in the yaml options or per-segment options.
If enabled, the end symbol for each segment will be placed before the alignment directive for the segment
Controls the style of the auto-generated segment symbols in the linker script.
Possible values:
- splat
- makerom
Specifies the starting offset for rom address symbols in the linker script.
Allows to specify the value of the FILL
statement generated on every segment of the linker script.
It must be either an integer, which will be used as the parameter for the FILL
statement, or null
, which tells splat to not emit FILL
statements.
This behavior can be customized per segment too. See ld_fill_value on the Segments section.
Defaults to 0.
Allows to control if bss
sections (and derivatived sections) will be put on a NOLOAD
segment on the generated linker script or not.
Applies to all bss
(sbss
, common
, scommon
, etc) sections.
Defaults to True
, meaning bss
sections will be put on NOLOAD
segments.
Allows to toggle aligning the *_VRAM_END
linker symbol of each segment.
Setting this to True
will make the *_VRAM_END
to be aligned to the configured alignment of the segment.
Defaults to True
.
Allows to toggle aligning the *_VRAM_END
linker symbol of each section for every segment.
Setting this to True
will make the *_END
linker symbol of every section to be aligned to the configured alignment of the segment.
Defaults to True
.
If enabled, the generated linker script will have a linker symbol for each data file.
Defaults to True
.
Determines whether to create new c files if they don't exist
Determines whether to "auto-decompile" empty functions
Determines whether to detect matched/unmatched functions in existing c files so we can avoid creating .s
files for already-decompiled functions.
Determines the newline char(s) to be used in c files
Determine the format that symbols should be named by default
Same as symbol_name_format
but for symbols with no rom address
Determines whether to detect and hint to the user about likely file splits when disassembling.
This setting can also be set on a per segment basis, if you'd like to enable or disable detection for specific segments. This could be useful when you are confident you identified all subsegments in a segment, yet splat
still hints that subsegments could be split.
Determines whether to detect and hint to the user about possible rodata sections corresponding to a text section
Determines whether to attempt to automatically migrate rodata into functions
Determines the header to be used in every asm file that's included from c files
Determines the macro used to declare functions in asm files
Determines the macro used to declare symbols in the middle of functions in asm files (which may be alternative entries)
Determines the macro used to declare jumptable labels in asm files
Determines the macro used to declare data symbols in asm files
Determines the macro used at the end of a function, such as endlabel or .end
Toggles the .size directive emitted by the disassembler
Determines including the macro.inc file on non-migrated rodata variables
Determines the number of characters to left align before the instruction
Determines whether to pad the rom address
Determines which ABI names to use for general purpose registers
Determines which ABI names to use for floating point registers.
Valid values:
- numeric
- o32
- n32
- n64
`o32`` is highly recommended, as it provides logically named registers for floating point instructions. For more info, see https://gist.github.com/EllipticEllipsis/27eef11205c7a59d8ea85632bc49224d
Determines whether functions inside c files should have named registers
Determines whether to add ".set gp=64" to asm/hasm files
Generate .asmproc.d
dependency files for each C file which still reference functions in assembly files
Global option for rodata string encoding. This can be overriden per segment
Global option for data string encoding. This can be overriden per segment
Global option for the rodata string guesser. 0 disables the guesser completely.
Global option for the data string guesser. 0 disables the guesser completely.
Global option for allowing data symbols using addends on symbol references. It can be overriden per symbol
Tells the disassembler to try disassembling functions with unknown instructions instead of falling back to disassembling as raw data
Tries to detect redundant and unreferenced functions ends and merge them together. This option is ignored if the compiler is not set to IDO.
Don't skip disassembling already matched functions and migrated sections
Used to specify what encoding should be used used when parsing the N64 ROM header.
ASCII
Determines the type gfx ucode (used by gfx segments)
Valid options are:
- f3d
- f3db
- f3dex
- f3dexb
- f3dex2
Use named libultra symbols by default. Those will need to be added to a linker script manually by the user
Use named libultra symbols by default. Those will need to be added to a linker script manually by the user
Use named hardware register symbols by default. Those will need to be added to a linker script manually by the user
Path where the iso's filesystem will be extracted to
If True
, generate c files using the longer INCLUDE_ASM
macro. This is defaulted to True
to by-default support projects using the longer macro.
use_legacy_include_asm: False
True