FM

The FM (Frequency Modulation) is part of the sound chip. It provides 4 channels, each having their own set of 4 operators, panning and amplitude values. It's the most used way of producing music in games.

=Common registers=

LFO frequency values are as follows:
 * 0 – 3.98Hz
 * 1 – 5.56Hz
 * 2 – 6.02Hz
 * 3 – 6.37Hz
 * 4 – 6.88Hz
 * 5 – 9.63Hz
 * 6 – 48.1Hz
 * 7 – 72.2Hz

Channel numbering: This strange numbering seems to be due to the fact YM2610 is a YM2610B with 2 removed FM channels (000 and 100).

=Channel registers=

Depending on which channel you want to write to, the ports used are different:
 * Channels 1 & 2: Ports 4/5
 * Channels 3 & 4: Ports 6/7

2CH mode additional operator frequencies:
 * OP1 frequency is stored in the usual CH2 frequency registers ($A2/$A6)
 * write to Z80 ports 4/5

=Operator registers= The ranges given for the address represent all of the parameter values. Each channel's operators are laid out as follows: