On systems with FM hardware, port $f2 allows detection, and enabling, of the YM2413 FM chip. On some systems, it also allows disabling the SN76489 PSG chip.
Systems with FM hardware include:
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
Read or write when FM hardware not present | Undefined | |||||||
Read | Counter (see below) | Always 0 | Last value written, 0 by default | |||||
Write | No effect | SN76489 mute control | YM2413 mute control |
The SN76489 control only works on a Japanese Master System. On the Mark III with FM unit, it has no effect: it seems that the FM unit disables PSG output when FM is enabled (but more experimentation is needed).
The ability to read back the values written allows detection of the FM chip: see FM Chip Detection for example code.
Homebrew YM2413 add-ons for original hardware may not support the SN76489 enable bit.
In this forum post, Charles MacDonald said:
Bits 7-5 of port $F2 return the high bits of a counter that is clocked by the C-Sync input into the 315-5297. The counter is 12 bits wide and counts up on each C-Sync pulse. The bits return are as follows:
D7 : Counter bit 11 D6 : Counter bit 7 D5 : Counter bit 3