Sega Master System / Mark III / Game Gear
Systems with FM hardware include:
|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 is always enabled.
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.
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