3DSX Format

3DSX Format

The 3DSX format is an executable file-format designed for homebrew applications on the 3DS.

The file is structured like this:

  • Header
  • Extended Header, if the header size field is greater than 32.
  • Code relocation table header
  • Rodata relocation table header
  • Data relocation table header
  • Code segment
  • Rodata segment
  • Data segment
  • Code relocation table
  • Rodata relocation table
  • Data relocation table
  • SMDH data, if there is an extended header.
  • RomFS data, if there is an extended header.
OffsetSizeDescription
0x04Magic (3DSX)
0x42Header size
0x62Relocation Header size
0x84Format version
0xC4Flags
0x104Code segment size
0x144Rodata segment size
0x184Data segment size (including bss)
0x1C4Bss segment size

Extended Header #

OffsetSizeDescription
0x04SMDH offset
0x44SMDH size
0x84RomFS offset

Relocation Header #

OffsetSizeDescription
0x04Number of absolute relocations
0x44Number of relative relocations

Relocation #

OffsetSizeDescription
0x02Number of words to skip
0x22Number of words to patch