Split a file based on a YAML description file. Inspired by splat.
Split a .xex file based on a yaml definition. If no .xex file give, uses default.xex.
$ split360 split <file>.yaml [<file>.xex]
Generates <file>.xex based on a yaml definition. Takes all .bin files (raw in bin/ or compiled in build/) and concatenate them.
$ split360 merge <file>.yaml <file>.xex
Compares the checksum of <file>.xex with the one inside <file>.yaml.
$ split360 checksum <file>.yaml <file>.xex
The start of the segment in the .xex file.
The size of the segment.
The filename (without extension) of the file containing the data (e.g. <name>.c or <name>.bin).
bin: extract the segment as-is inbin/<name>.bin.asm: extract the segment as-is inasm/<name>.binand disassemble it inbin/<name>.s.c: do nothing on extraction ifsegmentis set otherwise disassemble it in thematching/directory.
- missing: This segment is the
.textsegment and is defined in a.cfile inside thesrcdirectory. data: This is the.datasegment extracted from the compiledsrc/<name>.cfile.rdata: This is the.rdatasegment extracted from the compiledsrc/<name>.cfile.
name: Banjo Kazooie # mandatory but not used
sha1: 24f81f8058d1be416d95ccfcb5ebd2503eb4fd47 # sha1 of "default.xex"
segments:
- start: 0x00
size: 0x100
name: header
path: assets # only for "bin" format, if not set, defaults to "bin"
format: bin # dumped "as-is" in `<path>/<name>.bin`
- start: 0xc7a70
size: 0x40
name: func_820c5a70
format: asm # will be decompiled to PPC assembly
- start: 0x5AF456
size: 0x12
name: vec3 # filename "vec3.c"
format: c # will be skipped, .c file already exist
# missing "segment" means a disassembly will be generated in matching/
- start: 0x645cc6
size: 0x42
name: vec3 # same as above
format: c # same as above
segment: rdata # must be omitted for .text, but mandatory for ".data" or ".rdata"The bytes that are not covered in the file are dumped in the bin/ directory. In this example, it will contains the following files:
bin_100.bin: 0x100 to 0xc7a6fbin_c7ab0.bin: 0xc7ab0 to 0x5af455bin_5af468.bin: 0x5af468 to 0x645cc5bin_645d07.bin: 0x645d07 to the end of the file.