Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05849 Sound Minor Always Feb 16, 2015, 17:58 Jan 26, 2023, 05:46
Tester enik View Status Public Platform MESS (Official Binary)
Assigned To Resolution Open OS Windows XP
Status [?] Acknowledged Driver
Version 0.158 Fixed in Version Build I686
Fixed in Git Commit Github Pull Request #
Summary MESS-specific 05849: sg1000m3, smsj, sms1krfm: FM sound volume much lower than PSG's
Description The volume of the FM sound, generated by the YM2413 chip, is much lower than volume of the PSG sound, generated by the SN76489 PSG chip. On real hardware, FM volume seems to be a bit lower than PSG's, IMO. Official games in general support only one chip even when the two chips are available, so the user may adjust the volume at OS/hardware level as a workaround, but a correct sound balance becomes important for homebrew hacks like the one produced by ValleyBell, that changed the Sonic 1 ROM to add FM music and use PSG for sound effects.
Steps To Reproduce Play a game that supports FM sound (when available) on a driver that only supports PSG sound (like sms1) and play again the same game on a driver that also supports FM sound (like smsj).

Compare the volume of both emulated sound chips with the following video, that is a comparison of the PSG sound and FM sound of a modded Brazilian sms1 console with the FM sound of a Japanese sms console:
Additional Information These are the relevant lines that set the sound balance in the current src/mess/drivers/sms.c file:

static MACHINE_CONFIG_START( sms_ntsc_base, sms_state )
(...)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

MCFG_SOUND_ADD("segapsg", SEGAPSG, XTAL_53_693175MHz/15)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
(...)
MACHINE_CONFIG_END

static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
(...)
MACHINE_CONFIG_END

static MACHINE_CONFIG_DERIVED( sms1_kr, sms1_ntsc )
(...)
MACHINE_CONFIG_END

static MACHINE_CONFIG_DERIVED( sms1_krfm, sms1_kr )
MCFG_SOUND_ADD("ym2413", YM2413, XTAL_53_693175MHz/15)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END


For comparison, these are the lines that set the sound balance for Sega Mega Drive, that has the same PSG chip, but with another Yamaha chip variant:

File src/mame/machine/megadriv.c:

MACHINE_CONFIG_FRAGMENT( md_ntsc )
(...)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")

MCFG_SOUND_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7) /* 7.67 MHz */
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)

/* sound hardware */
MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) /* 3.58 MHz */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25) /* 3.58 MHz */
MACHINE_CONFIG_END
Github Commit
Flags
Regression Version
Affected Sets / Systems sg1000m3, smsj, sms1krfm
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
3
User avatar
No.11469
enik
Tester
Feb 19, 2015, 20:41
The Sega System E is a more direct derivative of the Master System, and the newly added code to support FM sound on MAME's fantzn2 driver sets the sound balance as:

MCFG_SPEAKER_STANDARD_MONO("mono")

MCFG_SOUND_ADD("sn1", SEGAPSG, XTAL_10_738635MHz/3)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)

MCFG_SOUND_ADD("sn2", SEGAPSG, XTAL_10_738635MHz/3)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)

MCFG_SOUND_ADD("ym2", YM2413, XTAL_10_738635MHz/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.00)
User avatar
No.11678
enik
Tester
May 25, 2015, 02:33
The patch to add FM support for the Sega System E driver was invalidated because the hardware doesn't have that support.

As stated before, most ROMs with code for the FM chip just play FM sound when the hardware has support, else just play PSG sound. Most of them don't make use of both sound chips. For the record, these are the exceptions:

- instructional screen of the Japanese SMS BIOS;
- games with FM sound that plays sampled audio, because it requires the PSG (After Burner, Alex Kidd: The Lost Stars, Alien Syndrome, Altered Beast, California Games, Captain Silver, Space Harrier 3-D, some sports games, etc);
- the Sonic 1 ROM hacked by ValleyBell to include FM together with PSG effects;
- maybe future homebrew projects.

I tried to fix the sound balance of the SMS drivers using videos found on the web as reference, but didn't come to a conclusion because haven't found a reliable source. I was looking for good quality videos recorded directly from original/official hardware and have PSG and FM sound played in separated moments, but with same capture settings, as input volume, without any sound effect applied. Videos of any game with FM sound that also plays sampled audio are good examples, as FM and PSG aren't played at same time. The preferred hardware is the Japanese SMS, because it has the FM chip built in, what avoid loss of gain due to additional connection of the FM unit.

By using the comparisons I performed, with the FM volume kept to 1.00 on MESS, the PSG volume seems to be more faithful when set to 0.25 or 0.30, sometimes even 0.35, depending of the video sample. What also affect the comparisons are differences in the sound output that seems to be caused by inaccuracies of the YM2413 chip emulation.
User avatar
No.21044
newiln2
Tester
Jan 26, 2023, 05:46
The sound balance is reasonably close in 0.251 when the PSG volume is set to 0.35 as enik suggested, but the Japanese BIOS' rendition of the Space Harrier theme still sounds slightly off, almost as if certain channels were cutting out.

This is the recording I've been using as reference: