GGFM - Yamaha YM2413

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

FM sound is an add-on sound module for the Sega MasterSystem. The FM sound on the Sega Master System allowed for more complex and richer audio compared to the console's standard PSG sound. It offered a wider range of tones, including various instruments and musical effects, which enhanced the overall audio experience of games that utilized FM sound.

Since the Sega GameGear is also capable of running in Mastersystem games, it is also possible to retrofit the add-ons from the Mastersystem to the GameGear. For the past months I have been working on a FM sound add-on module that fits on top of the GameGear mainboard.
There are about 60 Mastersystem games that support this module, if you enjoy playing them on your GameGear - this module is a must!

The add-on board has been made based on the SMSFM module from Tim Worthington, a big thanks to him! Without his support this module wouldn't available.

Installation

High level steps for installation.
  1. In case of an original SEGA mainboard, verify if the solder on the cartridge slot is still flowing. Else reflow it with fresh solder and/or flux
  2. Place the adhesive tape on the GGFM board and stick it to the front / LCD side of mainboard. the pads should match with the cartridge slot.
  3. Reflow the cardridge pads; only the golden pads of the GGFM board are needed
  4. Follow the instructions for PSG mixing below
  5. Ensure all 3 DIP switches are in ON position

Enjoy FM sound!

DIP Switches

The GGFM board I have developed features three DIP switches that provide various options and functionalities:

  1. FM_EN - This switch allows you to enable / disable the FM sound chip
  2. FM_M - This switch allows you to turn off the auto-muting feature of the FM chip. The FM chip is quite noisy and therefor I have implemented a feature to mute it while it is not used.
  3. PSG_M - This switch allows you to turn off the auto-muting feature of the PSG chip. This is specifically needed for the game Outrun. In case you have not wired the PSG mixing feature, I recommend you to turn this switch off.

Volume adjustment

There is a little potentiometer which can be used to adjust the volume of the FM sound. You can adjust it while the GameGear is powered on and playing FM sound. A good game to test this is "Alex Kidd: The Lost Stars", it uses both FM and PSG sound effects. Please listen carefully, since increasing the volume too much will cause distortion.

Please take care not to exceed the limits of the potentiometer, you can easily break it!

PSG Mixing

I do not recommend to follow this step for a dual-ASIC VA0 GameGear. The dual-ASIC model gives some graphical glitches with Mastersystem games, specially with Outrun.

For the game Outrun it is needed to mix the PSG sound together with the FM sound. To make this possible I have added 3 pads on the GGFM board and included a small wire to connect to the PSG outputs.

The GGFM sound will work fine without this wiring, only the game Outrun will have additional noise from the PSG chip. If you decide not to use this, you bridge the 2 pads marked with "DISABLE PSG MIXING" and switch off DIP switch #3.

SEGA / SYF Dual-ASIC VA0 mainboard:

  • Remove R20 and R23
  • Locate IC6 marked with 358
  • Solder red wire to PSG right channel on IC6 pin 1-2 (they are bridged)
  • Solder white wire to PSG left channel on IC6 pin 6-7 (they are bridged)
  • Solder the shield to ground - IC6 pin 4

SEGA Single-ASIC VA1 mainboard:

  • Remove R52 and R54
  • Locate IC4 marked with 358
  • Solder red wire to PSG right channel on IC4 pin 1-2 (they are bridged)
  • Solder white wire to PSG left channel on IC4 pin 6-7 (they are bridged)
  • Solder the shield to ground - IC4 pin 4

SYF 315-5535 Single-ASIC mainboard (v1.5 and later):

  • Remove R52 and R54
  • Locate IC4 marked with 358
  • Solder red wire to PSG right channel on IC4 pin 6-7 (they are bridged)
  • Solder white wire to PSG left channel on IC4 pin 1-2 (they are bridged)
  • Solder the shield to ground - IC4 pin 4

Gerber and CPLD code

In case you like to make your own board, you can download the gerber, BOM and PNP files here. Keep in mind the project has a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.

The CPLD binary (GGFM.pof) is added in the above ZIP file, you can program it using a Altera USB-Blaster and the Quartus Programmer (QuartusProgrammerSetup-13.0.1.232.exe).

The programmer software can be downloaded here - you need to navigate to "Additional software".

A clone USB-Blaster can be found here

A programmer converter cable (2.54mm to 1.27mm) can be found here

Since there are no designators on the board, you can use the following diagram for part placement.

CPLD source

% 
  GGFM v1.0 logic (AHDL)
  Based on SMSFM v2.2 by Tim Worthington 2015
  GameGear conversion by Mathijs Nilwik 2023
%

SUBDESIGN ggfm
(
 d0			: BIDIR;
 d1			: BIDIR;
 d2			: OUTPUT;
 a0			: INPUT;
 a1			: INPUT;
 a2			: INPUT;
 a6			: INPUT;
 a7			: INPUT;
 /rd			: INPUT;
 /wr			: INPUT;
 /reset			: INPUT;
 /ym_reset		: OUTPUT;
 /ym_cs			: OUTPUT;
 /iorq			: INPUT;
 /kbsel			: INPUT;
 /fm_enable	        : INPUT;
 /fm_mute_disable	: INPUT;
 /psg_mute_disable      : INPUT;
 /fm_mute		: OUTPUT; 
 /psg_mute		: OUTPUT;
)

VARIABLE
reg[1..0]		: DFF;
fm_addr			: NODE;
d_tri[2..0]		: TRI;
kbsel_int		: NODE;
fmsel_int		: NODE;

BEGIN
--FM
fmsel_int = !/fm_enable; -- input pin to enable or disable FM sound chip
kbsel_int = !/iorq and a6 and a7;
fm_addr = !a2 and kbsel_int and fmsel_int;

d0 = d_tri[0].out;
d1 = d_tri[1].out;
d2 = d_tri[2].out;

d_tri[0].in = reg[0].q;
d_tri[2..1].in = gnd;
d_tri[2..0].oe = !/rd and fm_addr;

-- the value of reg[] is set to default to 0 in the assignment editor
--reg[].clrn = /reset;

reg[].clk = a1 and !/wr and /rd and fm_addr;    
reg[0].d = d0;
reg[1].d = d1;

/ym_reset = /reset;
!/ym_cs = !a1 and !/wr and /rd and fm_addr;

-- Muting audio outputs
-- mute PSG chip when not used, audio output connected via 74HC4066
!/psg_mute = !reg[1].q and reg[0].q and !/psg_mute_disable; 
-- mute FM chip when not used, audio output connect via 74HC4066. 
/fm_mute = reg[0].q or /fm_mute_disable;

END;

BOM

Designator Value Footprint LCSC Part
C1 100nF 0603 C14663
C2 100nF 0603 C14663
C3 8.2nF 0603

C113812

C162249 (recommended)

C4 22pF 0603 C105620
C5 22pF 0603 C105620
C6 100nF 0603 C14663
C7 10uF 0603 C326057
C8 10uF 0603 C326057
C9 1uF 0603 C1952840
C10 1uF 0603 C1952840
C11 680uF CASE_D  C79115
C12 100nF 0603 C14663
C13 1uF 0603 C106248
C14 100nF 0603 C14663
C15 1uF 0603 C1952840
C16 1uF 0603 C1952840
C17 1uF 0603 C1952840
C18 1uF 0603 C1952840
CN1 PZ127VS-12-10-H10-A38 SMD C2935458
IC1 EPM3032ATC44 TQFP-44 C500865
IC2 YM2413 SOP24
IC3  TL072 SOIC-8 C67473
IC4 TLV74333 SOT-23-5 C408972
IC5 74HC4066P TSSOP14 C5650
R1 10K 0603

C98220

C469659 (recommeded)

R2 10K 0603

C98220

C469659 (recommeded)

R3 10K 0603

C98220

C469659 (recommeded)

R4 47K 0603 C105579
R5 3.3K 0603

C108078

C863782

(recommended)

R6 4.7K 0603

C99782

C700513 (recommended)

R7 4.7K 0603

C99782

C700513 (recommended)

R8 3.3K 0603

C108078

C863782

(recommended)

R9 10K 0603

C98220

C469659 (recommeded)

R10 10K 0603

C98220

C469659 (recommeded)

R11 10K 0603

C98220

C469659 (recommeded)

R12 1K 0603

C22548

C375503 (recommeded)

R13 1K 0603

C22548

C375503 (recommeded)

R14 1K 0603

C22548

C375503 (recommeded)

R15 1K 0603

C22548

C375503 (recommeded)

SW1 DSHP03TS-S SMD C319051
VR1 200K SMD C128551
X1 3.579545MHz HC-49S-SMD C240967
* the BOM is based on thick film resistors - thin film resistors are recommended for audio purpose. However, these have poor availability.