一键导入
match-data-file
Match data file describes how to add dat asegments to a C file. Use the match data file skill when you need to match a data file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Match data file describes how to add dat asegments to a C file. Use the match data file skill when you need to match a data file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | match-data-file |
| description | Match data file describes how to add dat asegments to a C file. Use the match data file skill when you need to match a data file. |
Code, data, rodata and bss are all defined as separate segments in snowboardkids2.yaml. The first step of matching a new data segment is to update the appropriate data segment entry to mark is as defined in the existing C file (code segment).
For example if you are asked to match the data segment for code segment 0x8A40:
- [0x88D30, data, 8A40]
Should be changed to:
- [0x88D30, .data, 8A40]
Rebuild the project by running:
./tools/build-and-verify.sh
The build will now fail because we have not yet added the expected data. But these error messages can be instructive for telling us what data is needed, etc.
Examine the assembly code for the data segment, this is located in asm/data/. So our above example would be located in asm/data/8A40.data.s. Remember that the N64 rom is big endian.
Take the labeled data from the data file and add the appropriate variable definitions to the C file (`src/8A40.c in our example).
Note that the C file will have missing data definitions already but they will be externs. You should add the variable definitions in the order in which they appear in the data file (do not follow the ordering of the externs).
Rebuild the project by running:
./tools/build-and-verify.sh
You will likely encounter build errors or checksum failures. Work through the errors and resolve any checksum mismatches.
Match a segments bss data by replacing extern declarations with the appropriate definitions. Use when asked to match, add, split, or fix a .bss segment, especially after checksum failures from bss symbol layout, shifted VRAM labels, queue/stack buffers, or unresolved bss externs.
Convert arrays with hardcoded pointer addresses to use ROM_START/ROM_END symbols. This automates the process of adding USE_ASSET declarations, updating array initialization, and configuring YAML segments.
Use this skill if you need to decompile a function using F3Dex2 or S2Dex. The presence of the Gfx type or gRegionAllocPtr are strongly indicative of an F3Dex2 or S2Dex microcode function.
Adding a new asset to snowboardkids2.yaml requires following specific steps to ensure assets are in the correct order and properly declared. Use this skill when you need to add a new binary asset.
Renaming a C file or associated header (.h) file requires additional steps in decompilation projects or the build will fail. Use this skill when you want to rename a C file and/or a header file.
Renaming a global variable or function requires additional steps in decompilation projects or the build will fail. Use this skill when you want to rename a global variable or function.