SMDH

SMDH

This page describes the format of the icon stored at CXI ExeFS:/icon and CIA icons. The size of icons are 0x36c0 bytes. The CXI icon is displayed by Home Menu and System Settings(3DS Software Management), while CIA icons are dummies and not yet utilised by Dev 3DS’ (as of rev 47586).

Format #

OFFSETSIZEDESCRIPTION
0x000x04Magic ‘SMDH’
0x040x02Version
0x060x02Reserved
0x80x200016 application titles structs, each 0x200 bytes
0x20080x30Application Settings
0x20380x8Reserved
0x20400x1680Icon graphics

Application Titles #

STARTSIZEDESCRIPTION
0x000x80Short Description
0x800x100Long Description
0x1800x80Publisher

All encoded in UTF-16. There are 16 app title structs (currently only 12 are used), each one for separate languages.

The languages by order of appearance:

  • 1st: Japanese title name
  • 2nd: English title name
  • 3rd: French title name
  • 4th: German title name
  • 5th: Italian title name
  • 6th: Spanish title name
  • 7th: Simplified Chinese title name
  • 8th: Korean title name
  • 9th: Dutch title name
  • 10th: Portuguese title name
  • 11th: Russian title name
  • 12th: Traditional Chinese title name

Application Settings #

Most of these flags are only used by the Home Menu. All of these are represented in SMDH files in little endian. But when documented below, the tables represent values in big endian.

STARTSIZEDESCRIPTION
0x20080x10Region Specific Game Ratings (For use with Parental Controls)
0x20180x4Region Lockout
0x201C0xCMatch Maker IDs (Online Play)
0x20280x4Flags
0x202C0x2EULA Version
0x202E0x2Reserved
0x20300x4‘Optimal Animation Default Frame’ (for BNR)
0x20340x4CEC (StreetPass) ID (So the Home Menu knows which application icon to show the ‘Green’ CEC notification for)

Region Specific Game Age Ratings #

These flags tell the 3DS the ‘Age Rating’ of the software for the below regions:

STARTSIZEDESCRIPTION
0x20080x1CERO (Japan)
0x20090x1ESRB (USA)
0x200A0x1Reserved
0x200B0x1USK (German)
0x200C0x1PEGI GEN (Europe)
0x200D0x1Reserved
0x200E0x1PEGI PRT (Portugal)
0x200F0x1PEGI BBFC (England)
0x20100x1COB (Australia)
0x20110x1GRB (South Korea)
0x20120x1CGSRR (Taiwan)
0x20130x1Reserved
0x20140x1Reserved
0x20150x1Reserved
0x20160x1Reserved
0x20170x1Reserved

Active ratings have a bitmask of 0x80, and inactive ratings have no bitmask at all. Ratings without the 0x80 bitmask are ignored. 0x40 bitmask indicates Rating Pending. 0x20 bitmask indicates No Age Restriction. Age limits are set by adding the minimal age to 0x80 (for example, limiting to 12 years and up would give a bitmask of 0x8C)

Region Lockout #

This u32 flag is what the Home Menu uses to determine the Region Lockout of a title.

REGIONBITMASK
Japan0x01
North America0x02
Europe0x04
Australia0x08
China0x10
Korea0x20
Taiwan0x40

Regions are ‘included’ in region lock by setting their bitmask value. Nintendo defines region free as 0x7fffffff. Early in the 3DS’ development, Nintendo grouped the Australian and Europe markets together. Nintendo defines market Europe as having the combined bitmasks of Europe and Australia. No 3DS’ which check the Australia bitmask have been seen (Australia uses the European 3DS model).

Match Maker IDs #

These IDs are an application’s online gaming IDs.

STARTSIZEDESCRIPTION
0x201C0x4Match Maker ID
0x20200x8Match Maker BIT ID

Flags #

The u32 is used for storing flags as bit-masks.

FLAGBITMASK VALUE
Visibility Flag (Required for visibility on the Home Menu)0x0001
Auto-boot this gamecard title0x0002
Allow use of 3D? (For use with parental Controls. An application can use the 3D affect, even when this flag isn’t set)0x0004
Require accepting CTR EULA before being launched by Home (see below)0x0008
Autosave on exit? (see below)0x0010
Uses an Extended Banner?0x0020
Region game rating required0x0040
Uses save data? (see below)0x0080
Application usage is to be recorded. If this is not set, it causes the application’s usage to be omitted from the Home Menu’s icon cache, as well as in other places.0x0100
Disables SD Savedata Backups for this title. This is in addition to the blacklist.0x0400
New 3DS exclusive title. Shows an error if used on Old 3DS.0x1000

Effect of SaveData and AutoSave #

These options have no effect on the performance of the application itself: they’re used to select an appropriate warning when closing an application from Home.

  • Both off: “Closing software” (no warning if quitting directly with X)
  • SaveData: “Do you want to close […]? (Unsaved data will be lost.)”
  • AutoSave: ?
  • Both on: “Saving data and closing software…” (no warning if quitting directly with X)

EULA Version #

This is the EULA version which is checked when the Accept EULA flag is set, the version is compared to one stored in the 3DS. If the SMDH version is greater, then the user will be prompted to accept the EULA.

STARTSIZEDESCRIPTION
0x202C0x01EULA Version Minor
0x202D0x01EULA Version Major

‘Optimal Animation Default Frame’ (for BNR) #

This is a float, indicating the preferred (or ‘most representative’) frame for the banner animation.

CEC (StreetPass) ID #

This u32 represents the application CEC ID. This is likely loaded by applications for use with the CEC services as well.

Icon graphics #

At offset 0x2040, there are two icons:

STARTSIZEDESCRIPTION
0x20400x480Small - 24x24 (shown on top screen when pausing the app)
0x24C00x1200Large - 48x48 icon (the general icon)

Both of the icons are encoded in RGB565 meaning 16bpp. Although both icons are known to be RGB565, developers have the option of encoding icons (and banners) with the following encodings :

  • RGBA8
  • RGB8
  • RGBA5551
  • RGB565
  • RGBA4
  • LA8
  • HILO8
  • L8
  • A8
  • LA4
  • L4
  • ETC1
  • ETC1A4

This does not necessarily mean the other encodings will be used, it is just that those are the options when compiling. Like we’ve seen with Super Mario 3D Land Nintendo has changed save file encryption, and likewise they can encode icons and banners differently should they choose to. Currently we’ve seen just RGB565 so don’t be fooled if an icon doesn’t show up right! It is probably one of these formats above. Although we will probably not see other formats used for a while it’s nice to know they have an opportunity to change. Also note that it seems Nintendo stores each pixel in 🔗 word-order, so the actual order of order of each color channel in memory will depend on the endianness.

The data is encoded in tiles (starting from size 8x8, continuing recursively).

If the buffer is like this:

012345678910111213141516

Then the image would look like this:

x=0x=1x=2x=3x=4
014516
2367
891213
10111415

Tools #

CiTRUS - (GUI)(Windows Only) Generating ICN files

3DSExplorer - (GUI)(Windows Only) Parsing ICN files