YM2610 registers

= SSG part =

If 'Mode' = 1, the EG is used instead of the 4bit volume value. f = 8M / (Coarse*256 + Fine) ?

= Timers =


 * TA = Timer A, TB = Timer B
 * Timers will tick until they have reached zero, at which point an IRQ will be generated if enabled. Reading port $04 will show which timer caused it.
 * The actual timer counter registers are not directly accessable. They can be reset to zero or initialised from load registers $24-$26
 * Writing 0 to the load bits in register $27 will reset the timer counter registers to zero
 * Writing 1 to the load bits will copy the respective timer load register to the timer counter. This only works when the timer is at zero.
 * When a timer expires, it is automatically reloaded from the load registers and continues.
 * Timer flag reset refers to the same flags that are read from port $04
 * CSM mode is for automatic key on for operators on the second FM channel when timer A expires?

= FM part =

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

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

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

Overall Channel Registers
The first value listed in the Address column is for channels 1/3; the second is for channels 2/4.

= ADPCM-A part =

'Dump' in register $00 is the key on/off bit. Write 0 to start playing specified channels and write 1 to stop playing.

= ADPCM-B part =


 * Datasheet states playback formula as F=[Delta-N / 256] x 55.5KHz (correct?)
 * Write to flag control to reset/mask channel end flags
 * Write 1 to reset and/or mask selected flag
 * Write 0 to unmask selected flag
 * Masking a flag will prevent it from being raised when a channel sample reach its end, this means you have to write 1, then 0 to clear a flag and keep it active.
 * Flags must be manually cleared, playing a new sample on the channel won't clear it.

= Reading =

The only writable registers that can also be read are from the SSG. All other ports and addresses return different data.