If you want to mod a game to change the actual behaviour (executable code) then this is the where you start, there are also multiple ways to apply an ExeFS mod which will be covered in another section. There are a few files contains in the executable filesystem that we will cover in this section. It is a file system that contains Nintendo Switch executables known as NSO’s 2.
#SZS MODIFIER MINIMAPS ARCHIVE#
There are multiple types of NCA file depending on what they contain:ĮxeFS stands for Executable filesystem and is part of the largest Nintendo Content Archive (NCA) file for a game. NCA files are compressed archives (think zip) that contain game data, normally multiple NCA files can be extracted from a single XCI or NSP file. These files store part of the game and are normally included inside other file formats. CTools and SZS Modifier can only handle U8 files.The recommended way of creating NSP files is to use the NX Dump Tool available on GitHubĮven although NSP is the format for Eshop games the application NX Dump Tool allows you to dump cartridges as NSP files. Wexos's Toolbox and Wiimms SZS Tools can (de)compress any kind of Yaz0-compressed files.
#SZS MODIFIER MINIMAPS CODE#
This code example is taken from Wiimms SZS Tools: SVN repository lib-szs.c line 162 Tools some assertions to find errors in debugging mode they don't work with self referencing chunks. don't use memcpy() or memmove() here because N = *src++ + 0x12 // N=0 -> read third byteĪSSERT( n >= 3 & n data || dest + n > dest_end ) *** bit in group header byte is not set -> run length encodingĬonst u8 * copy_src = dest - (( b1 & 0x0f ) > 4 U8 * dest_end = // pointer to end of destination (last byte +1) U8 * dest = // pointer to start of destination For example if RRR=1 (go back 1+1=2) and SIZE=10 the previous 2 bytes are copied 10/2=5 times.ĭecoding data groups and chunks is done until the end of the destination data is reached.Ĭonst u8 * src = // pointer to start of sourceĬonst u8 * src_end = // pointer to end of source (last byte +1)
The complete compressed data is organized in data groups.
Always 0 in Mario Kart Wii.īe32_t uncompressed_size // total size of uncompressed dataīe32_t reserved // two unsigned integers reserved for special use All numeric values are stored as big endian. The header of a Yaz0 file is always 16 bytes long.