Merge pull request #8 from NovaSquirrel/master

EPSG update
This commit is contained in:
mkwong98 2021-04-08 11:15:34 +08:00 committed by GitHub
commit 0f35fdc97c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View file

@ -11,6 +11,7 @@
#include "BatteryManager.h"
#include "MessageManager.h"
#include "EmulationSettings.h"
#include "CPU.h"
void BaseMapper::WriteRegister(uint16_t addr, uint8_t value) { }
void BaseMapper::WriteEPSG(uint16_t addr, uint8_t value) { _epsgaudio->WriteRegister(addr, value); }
@ -781,7 +782,7 @@ uint8_t BaseMapper::DebugReadRAM(uint16_t addr)
void BaseMapper::WriteRAM(uint16_t addr, uint8_t value)
{
if(addr == 0x4016){ WriteEPSG(addr, value); }
if((addr == 0x4016) & (_console->GetCpu()->GetCycleCount() % 2 == 1)){ WriteEPSG(addr, value); }
if(_isWriteRegisterAddr[addr]) {
if(_hasBusConflicts) {
uint8_t prgValue = _prgPages[addr >> 8][(uint8_t)addr];

View file

@ -123,7 +123,7 @@ protected:
for (uint8_t x = 0; x < 2; x++)
{
_currentOutputs[x] /= 12;
_currentOutputs[x] /= 5;
}
UpdateOutputLevel();

View file

@ -275,8 +275,8 @@ int16_t SoundMixer::GetOutputVolume(bool forRightChannel)
#else
GetChannelOutput(AudioChannel::VRC7, forRightChannel) +
#endif
GetChannelOutput(AudioChannel::EPSG_L, forRightChannel) * 15 +
GetChannelOutput(AudioChannel::EPSG_R, forRightChannel) * 15
GetChannelOutput(AudioChannel::EPSG_L, forRightChannel) * 4 +
GetChannelOutput(AudioChannel::EPSG_R, forRightChannel) * 4
);
}

View file

@ -123,6 +123,8 @@ namespace Mesen.GUI.Config
InteropEmu.SetChannelVolume(AudioChannel.Sunsoft5B, ConvertVolume(audioInfo.Sunsoft5bVolume));
InteropEmu.SetChannelVolume(AudioChannel.EPSG_L, ConvertVolume(audioInfo.EPSGVolume_L));
InteropEmu.SetChannelVolume(AudioChannel.EPSG_R, ConvertVolume(audioInfo.EPSGVolume_R));
InteropEmu.SetChannelVolume(AudioChannel.EPSG_L, audioInfo.EnableEPSG ? AudioInfo.ConvertVolume(audioInfo.EPSGVolume_L) : 0);
InteropEmu.SetChannelVolume(AudioChannel.EPSG_R, audioInfo.EnableEPSG ? AudioInfo.ConvertVolume(audioInfo.EPSGVolume_R) : 0);
InteropEmu.SetChannelPanning(AudioChannel.Square1, ConvertPanning(audioInfo.Square1Panning));
InteropEmu.SetChannelPanning(AudioChannel.Square2, ConvertPanning(audioInfo.Square2Panning));