BNVIB

From Nintendo Switch Brew
Revision as of 16:26, 16 December 2017 by Sebastiaan (talk | contribs) (Info about the BNVIB file format)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BNVIB is the vibration file for the HD Rumble in the Joy-Con or Pro Controller.

Offset Size Description
0x00 0x01 Vibration Type (see Vibration Types)
0x04 0x01 Magic number (0x03)
0x06 ? Vibration Data

The size of a sample is 4 bytes. The sample rate is in milliseconds.

Vibration Types

Value Description
0x04 Normal vibration (Vibrate 1 time) (see Normal Vibration)
0x0C Loop vibration (see Loop Vibration)
0x10 Loop and wait vibration (see Loop and Wait Vibration)

Normal Vibration

Offset Size Description
0x00 0x02 Sample rate (LE)
0x02 0x04 Vibration size (vibsize) (LE)
0x06 vibsize Samples

Loop Vibration

Offset Size Description
0x00 0x02 Sample rate (LE)
0x02 0x04 Loop start (LE)
0x06 0x04 Loop end (LE)
0x0A 0x04 Vibration size (vibsize) (LE)
0x0E vibsize Samples

Loop and Wait Vibration

Offset Size Description
0x00 0x02 Sample rate (LE)
0x02 0x04 Loop start (LE)
0x06 0x04 Loop end (LE)
0x0A 0x04 Loop wait (LE)
0x0E 0x04 Vibration size (vibsize) (LE)
0x13 vibsize Samples