Ym2413+instrumentsbin May 2026

(starting with version 0.231) to accurately simulate the internal Instruments ROM of the Yamaha YM2413 (OPLL) sound chip. Key Functions of the YM2413 Instruments File

The ym2413_instruments.bin file contains the hard-coded register data for the chip's built-in sound presets. Its primary features include:

Preset Storage: It holds the parameters for the 15 built-in melody tones (such as piano, violin, and guitar) and 5 percussion sounds (bass drum, snare, tom-tom, top cymbal, and hi-hat).

Simplified Sound Generation: By having these tones pre-defined in a ROM (replicated by the .bin file in emulators), the processor only needs to send a single instrument selection command instead of complex register settings for every sound change.

Emulation Accuracy: Modern emulators use this file to ensure that "into the screen" games like Super Pang or titles for the Sega Master System and MSX2 sound exactly as they did on original hardware. Technical Specifications ym2413_instruments.bin (ym2413) - Not Found - Noobs

This article provides a comprehensive overview of the YM2413 sound chip, specifically focusing on the instruments.bin file format used to define its FM instrument sounds.

Understanding YM2413 instruments.bin: Unlocking OPLL Sound Synthesis

The Yamaha YM2413, often referred to as the OPLL (FM Operator Type-LL), is a legendary sound chip that defined the audio landscape of 8-bit and early 16-bit computing, most notably in the Sega Master System, MSX computers, and various arcade machines.

While the chip provides 9 channels of FM synthesis or 6 FM channels plus 5 percussion instruments, its true power lies in its capability for instrument customization. The data defining these sounds—patches, operator settings, and envelope behaviors—is often stored in a binary format known as instruments.bin.

This article explores what instruments.bin is, its structure, and how it is used to customize the sound of the YM2413. What is the YM2413 (OPLL)?

Before diving into the data structure, it is essential to understand what the chip does. The YM2413 is a 2-operator FM synthesis chip. Unlike later, more complex chips (like the YM2612), the YM2413 is designed to be inexpensive and easy to implement. ym2413+instrumentsbin

9 channels: Can be used as 9 melodic channels or 6 melodic + 5 rhythm. 2 Operators per channel: One carrier and one modulator.

Internal ROM/RAM: It has 15 pre-set instrument sounds in its ROM, but it allows for one user-defined instrument (user patch) to be loaded into RAM to replace one of the fixed sounds [1]. The instruments.bin Format

The instruments.bin file is a direct, byte-for-byte representation of the registry data required to program the YM2413's user instrument slot. Typically, this file is small, representing 8 bytes of data per patch, as defined by the OPLL's internal registers (often addresses Structure of a YM2413 Instrument

An instrument on the YM2413 is defined by 8 bytes, which control the two operators: Operator 1 (Modulator): Controls character/timber. Operator 2 (Carrier): Controls volume and envelope. The 8 bytes define:

Amplitude Modulation (AM) / Vibrato (VIB) / Sustaining (SUS) / Key Scaling (KSR) / Frequency Multiplier (MULT): These set the basic envelope behavior and harmonics.

Key Scale Level (KSL) / Total Level (TL): Controls volume and how it changes across the keyboard.

Attack Rate (AR) / Decay Rate (DR): Sets how quickly the sound starts and fades.

Sustain Level (SL) / Release Rate (RR): Sets how long the sound lingers.

Feedback (FB) / Algorithm: Determines how the modulator affects the carrier. Anatomy of instruments.bin

When dealing with a instruments.bin file, it usually contains a specific number of patches arranged sequentially. A single instrument entry might look like this in raw hex: 00 00 00 00 00 00 00 00 (A default, silent patch) (starting with version 0

A user-defined brass sound might look like:41 61 74 18 83 82 51 01

Bytes 0-1: Frequency Multiplier and Envelope settings for Operator 1.

Bytes 2-3: Key Scale Level and Total Level (Volume) for Operator 1. Bytes 4-5: Attack/Decay Rate for Operator 1/2. Bytes 6-7: Sustain/Release Rate for Operator 1/2. Working with instruments.bin

Several tools exist to create or edit instruments.bin files, allowing developers and musicians to create custom sounds for game development or emulation.

OPLLEdit: Often used in emulator development to modify the instruments.bin file [1].

VGM Tools: Files can be embedded into VGM (Video Game Music) logs for playback on original hardware. Loading and Emulation

When running in an emulator (like MESS or Fusion), the emulator looks for a file named ym2413.bin or instruments.bin to initialize the user patch slot, replacing the default instrument ( ) with the custom sound defined in the file. Why Customize instruments.bin?

Sound Variety: The built-in 15 sounds are iconic but limited. Custom instruments can create complex pads, percussive sounds, or sharper basslines.

Music Composition: Using tracker software, composers can create unique soundbanks to make their music stand out from standard YM2413 compositions. Conclusion

The instruments.bin file is the gateway to unlocking custom audio on the Yamaha YM2413. By understanding how the 8 bytes of register data control the 2-operator FM synthesis, users can significantly expand the sonic capabilities of the OPLL, pushing the boundaries of 8-bit sound design. To better assist you, are you: The Future: ym2413_instruments

Developing for an emulator and need help locating where to place the file?

Creating music for a tracker (like DefleMask) and looking for pre-made patch sets? Trying to write software to generate this binary data?


The Future: ym2413_instruments.bin in FPGA

With the rise of MiSTer and Analogue Pocket, the ym2413_instruments.bin has seen a renaissance. FPGA cores like JT51 (Jose Tejada's FM core) require the binary to be loaded into the hardware's Block RAM. Unlike software emulation, an FPGA runs the logic gates of the original chip, so the instrument bank must be fed as a serialized bitstream.

If you are building your own OPLL core in Verilog/VHDL, you will likely have a line like: $readmemh("ym2413_instruments.hex", opll_rom);

The Software: What is instruments.bin?

If you have ever downloaded an MSX music player, a VGM (Video Game Music) pack, or a tracker like Arkos Tracker for OPLL use, you have likely encountered a file named instruments.bin.

Why instruments.bin Matters

For the modern retro-computing scene, instruments.bin represents the bridge between hardware limitations and creative freedom.

1. What is the YM2413?

The YM2413 (also known as the OPLL) is a sound chip developed by Yamaha. It’s a 4-operator FM synthesis chip with 15 preset instruments and 1 user-programmable instrument slot. It was used in:

  • MSX computers (MSX-Music standard)
  • Sega Master System (Japanese version, with FM sound unit)
  • Sega Mega Drive / Genesis (as a second FM chip in some games)
  • Arcade boards (e.g., early 80s Namco, Irem, Konami games)
  • Various home computers and sound cards (e.g., FM-7, PC-8801, Sound Blaster Pro’s OPL3 compatibility mode includes OPLL)

Type A: The MSX BIOS Instrument Bank

The most historically significant version comes from the MSX computer standard. Later MSX models (MSX2+) included the YM2413 as a standard feature. Microsoft and ASCII created a standard INSTRUMENTS.BIN file located in the system BIOS or on disk. This file contained 16 custom patches that were designed to be loaded into the chip's user slot in real-time.

If you download a random ym2413_instruments.bin from a retro archive, you are likely getting the MSX standard bank. These patches include:

  • Steel Drum
  • Echoing Piano
  • Aggressive Synth Brass
  • Slap Bass