Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

XC 2 > Audio Files

This page describes the .nop (Nintendo OPus) file format, which is based on the opus format but with a custom header.

The audio stream uses VBR (Variable Bit Rate) encoding.

A frame is the work unit of this file format. Each frame is 20 ms long and contains 960 samples.

To play these files, you can use Foobar2000 with the VGMstream plugin or the VGMstream website directly.

OffsetSizeDescription
0x00x60File Header
0x600x20Padding
0x80?Index Table
?0x28Opus Header
??Opus Stream

File Header

OffsetSizeDescription
0x04Always "sadf"
0x44File size
0x84Always "opus"
0xC4Always 1
0x104Always "head"
0x144Index table offset (0x80)
0x184Channel count (1 or 2)
0x1C4Opus stream offset
0x204Opus stream length (excluding padding)
0x244Sample rate (48,000 Hz)
0x284Number of samples (960)
0x2C4Unknown (always 0?)
0x304Number of samples (bis)
0x344Opus stream length (excluding padding, bis)
0x384Unknown (always 0?)
0x3C4Unknown (always 0?)
0x404Unknown (64,000 or 96,000)
0x444Unknown (20,000)
0x484Unknown (always 0?)
0x4C4Number of frames
0x504Number of frames (bis)
0x544Index table offset (bis, 0x80)
0x584Total length of the index table
0x5C4Unknown (always 0?)
0x6032Padding

Index Table

The size of a frame can be determined by calculating the difference between two consecutive offsets.

OffsetSizeDescription
0x80428 00 00 00 Start of the index table / Opus header length
0x??4The last 4 bytes give the opus length, excluding opus padding
0x??4 / 8 / 12Padding (E8 E8 E8 E8 …)

The index table is padded with 0xE8 until its size is a multiple of 16 bytes

Opus Header

The offsets below are relative to the start of the Opus header for simplicity.

OffsetSizeDescription
0x0401 00 00 80 Unknown
0x4418 00 00 00 Unknown
0x81Unknown
0x911 = Mono, 2 = Stereo
0xA2Unknown
0xC4Sample rate (48,000 Hz)
0x10420 00 00 00 Unknown
0x14400 00 00 00 0
0x18400 00 00 00 0
0x1C478 00 00 00 Unknown
0x20404 00 00 80 Unknown
0x244Length of the file’s rest (excluding padding)

The index table is padded with 0xE8 until its size is a multiple of 16 bytes

Opus Stream

This is the structure of a single frame.

OffsetSizeDescription
0x04Frame data size
0x44Frame checksum
0x81Frame data

Frame data starts with the byte FC.

00 00 00 03 01 00 00 00 FC FF FE = 1 frame of silence, may vary slightly.

To find a frame, locate the end of the index table and skip the opus header. Take note of the four following bytes, then skip the frame checksum. Read the subsequent bytes until the number of bytes matches the recorded frame length.

All .nop files are padded with null bytes (0x00) until its size is a multiple of 16 bytes (This padding is included in the .nop file size but is not part of the Opus stream).