[Core/Sound] disable PSG output on Mark III hardware when FM output is enabled (fixes issue #474)

This commit is contained in:
ekeeke 2022-12-18 14:49:34 +01:00
parent 46652c7fd7
commit 350be7731c
6 changed files with 13 additions and 5 deletions

View File

@ -168,6 +168,7 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
* fixed YM2612 potential issue with SSG-EG inverted attenuation level on Key OFF
* fixed YM2413 carrier/modulator phase reset after channel Key ON (fixes Japanese Master System BIOS music)
* fixed YM2413 intruments ROM (verified on YM2413B die)
* disabled PSG output on Mark III hardware when FM output is enabled (verified with real FM sound unit hardware)
[Gamecube/Wii]
---------------

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 4.0 MiB

View File

@ -5,7 +5,7 @@
* Support for SG-1000, Mark-III, Master System, Game Gear & Mega Drive ports access
*
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2020 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2022 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -639,10 +639,17 @@ void z80_m3_port_w(unsigned int port, unsigned char data)
default:
{
/* write FM chip if enabled */
/* write to FM sound unit (FM-70) if enabled */
if (!(port & 4) && (config.ym2413 & 1))
{
fm_write(Z80.cycles, port, data);
/* FM output control "register" */
if (port & 2)
{
/* PSG output is automatically disabled (resp. enabled) by FM sound unit hardware if FM output is enabled (resp. disabled) */
psg_config(Z80.cycles, config.psg_preamp, (data & 0x01) ? 0x00 : 0xff);
}
return;
}
@ -684,10 +691,10 @@ unsigned char z80_m3_port_r(unsigned int port)
default:
{
/* read FM chip if enabled */
/* read FM sound unit (FM-70) if enabled */
if (!(port & 4) && (config.ym2413 & 1))
{
/* I/O ports are automatically disabled by hardware */
/* I/O ports are automatically disabled by FM sound unit hardware */
return fm_read(Z80.cycles, port);
}

View File

@ -5,7 +5,7 @@
* Support for SG-1000, Mark-III, Master System, Game Gear & Mega Drive ports access
*
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2020 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2022 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: