Skip to content

Instantly share code, notes, and snippets.

@ChainSwordCS
Created May 29, 2026 02:34
Show Gist options
  • Select an option

  • Save ChainSwordCS/0ce1eccdfeb513b90288f19d5c64caab to your computer and use it in GitHub Desktop.

Select an option

Save ChainSwordCS/0ce1eccdfeb513b90288f19d5c64caab to your computer and use it in GitHub Desktop.
incomplete/partial parser for control.nacp (Nintendo Switch), for use with ImHex
/** (incomplete) parser for control.nacp [Nintendo Switch]
see also:
https://switchbrew.org/wiki/NACP
*/
#pragma endian little
import std.core;
import std.io;
import std.mem;
import std.string;
struct NacpLanguageEntry {
char name[];
u32 offs = 0x200 - std::string::length(name);
padding[offs];
char author[];
offs = 0x100 - std::string::length(author);
padding[offs];
};
NacpLanguageEntry lang[16] @ 0x00;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment