(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
Here’s a helpful guide to understanding YM2413 and the instruments.bin file often associated with it. ym2413+instrumentsbin
The YM2413, also known as the OPL3-L or simply OPL, is an audio chip developed by Yamaha Corporation. It was widely used in the 1980s and 1990s for generating music and sound effects in various devices, most notably in computers, video game consoles, and arcade machines. The chip was capable of producing high-quality audio for its time, using a form of audio synthesis called FM synthesis (Frequency Modulation synthesis). This technology allowed for the creation of complex sounds and textures using a limited number of audio channels.
The YM2413 was particularly famous for its use in the original IBM PC, the Sega Master System, and numerous arcade machines. It became iconic in the world of video game soundtracks, contributing to the chiptune music genre, which still has a dedicated following today.
Modern trackers often use an instruments.bin as a container for all patches—including the 15 ROM presets plus the user slot. These files are used to calibrate emulation accuracy. For example, the MAME (Multiple Arcade Machine Emulator) team distributed a specific ym2413_instruments.bin to ensure that game rips sounded identical to the arcade hardware.
instruments.bin filesinsdata.bin, voice.bin.GitHub search for instruments.bin often yields MSX, SMS, or PC-Engine (YM2413) projects.
instruments.binHere's a C code to write a custom YM2413 instrument into an 8‑byte binary file: (starting with version 0
#include <stdio.h>typedef struct unsigned char op1_AM_VIB_EGT_KSR_MULT; // $30 unsigned char op1_KSL_TL; // $31 unsigned char op1_AR_DR; // $32 unsigned char op1_SL_RR; // $33 unsigned char op2_AM_VIB_EGT_KSR_MULT; // $34 unsigned char op2_KSL_TL; // $35 unsigned char op2_AR_DR; // $36 unsigned char op2_SL_RR; // $37 OpllVoice;
int main() // Example: a "bright piano" patch (just as demo) OpllVoice voice = 0x01, // op1: MULT=1, no AM/VIB, EGT=0, KSR=0 0x22, // KSL=2, TL=34 (decimal) → 0x22 0x9C, // AR=15, DR=12 → 0x9C 0x17, // SL=2, RR=7 0x01, // op2 same MULT 0x00, // op2 KSL=0, TL=0 0xFC, // AR=15, DR=12 0x37 // SL=3, RR=7 ;
FILE *f = fopen("instruments.bin", "wb"); fwrite(&voice, 1, sizeof(voice), f); fclose(f); return 0;
Compile, run → get an 8‑byte instruments.bin. YM2413 The YM2413, also known as the OPL3-L
But many tools expect 48‑byte (e.g., MSX PLAYER), so you can repeat or combine patches.
The YM2413 (OPLL) is a 4-operator FM synthesis chip by Yamaha.
Key features:
The famous instruments.bin is a small binary file (often 48 bytes) that writes custom FM parameters into the user instrument slot (channel 8 or channel 0 depending on implementation).
instruments.binHex dump (8 bytes): 0x42 0x6F 0x32 0x83 0x7F 0x22 0x35 0x27
Decoded:
This demonstrates the dense packing of parameters.
instruments.bin in emulators / playersym2413_instruments.bin → place in same dir as VGM