Merge pull request #42 from Gumball2415/feature-add-2a03-interference
Add /A13 and /OE1 audio interference
This commit is contained in:
commit
f1696a90be
19 changed files with 520 additions and 256 deletions
|
@ -511,8 +511,10 @@ void BaseMapper::StreamState(bool saving)
|
||||||
ArrayInfo<MemoryAccessType> prgMemoryAccess = { _prgMemoryAccess, 0x100 };
|
ArrayInfo<MemoryAccessType> prgMemoryAccess = { _prgMemoryAccess, 0x100 };
|
||||||
ArrayInfo<MemoryAccessType> chrMemoryAccess = { _chrMemoryAccess, 0x40 };
|
ArrayInfo<MemoryAccessType> chrMemoryAccess = { _chrMemoryAccess, 0x40 };
|
||||||
SnapshotInfo epsmaudio{ _epsmaudio.get() };
|
SnapshotInfo epsmaudio{ _epsmaudio.get() };
|
||||||
|
SnapshotInfo invA13Audio{ _invA13Audio.get() };
|
||||||
|
SnapshotInfo invOE1Audio{ _invOE1Audio.get() };
|
||||||
|
|
||||||
Stream(_mirroringType, chrRam, workRam, saveRam, nametableRam, prgMemoryOffset, chrMemoryOffset, prgMemoryType, chrMemoryType, prgMemoryAccess, chrMemoryAccess, epsmaudio);
|
Stream(_mirroringType, chrRam, workRam, saveRam, nametableRam, prgMemoryOffset, chrMemoryOffset, prgMemoryType, chrMemoryType, prgMemoryAccess, chrMemoryAccess, epsmaudio, invA13Audio, invOE1Audio);
|
||||||
|
|
||||||
if(!saving) {
|
if(!saving) {
|
||||||
RestorePrgChrState();
|
RestorePrgChrState();
|
||||||
|
@ -640,6 +642,8 @@ void BaseMapper::Initialize(RomData &romData)
|
||||||
InitMapper();
|
InitMapper();
|
||||||
InitMapper(romData);
|
InitMapper(romData);
|
||||||
_epsmaudio.reset(new EPSMAudio(_console));
|
_epsmaudio.reset(new EPSMAudio(_console));
|
||||||
|
_invA13Audio.reset(new InvA13Audio(_console));
|
||||||
|
_invOE1Audio.reset(new InvOE1Audio(_console));
|
||||||
|
|
||||||
//Load battery data if present
|
//Load battery data if present
|
||||||
LoadBattery();
|
LoadBattery();
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include "Console.h"
|
#include "Console.h"
|
||||||
#include "CPU.h"
|
#include "CPU.h"
|
||||||
#include "EPSMAudio.h"
|
#include "EPSMAudio.h"
|
||||||
|
#include "InvA13Audio.h"
|
||||||
|
#include "InvOE1Audio.h"
|
||||||
|
|
||||||
class BaseControlDevice;
|
class BaseControlDevice;
|
||||||
|
|
||||||
|
@ -159,6 +161,8 @@ public:
|
||||||
static constexpr uint32_t NametableCount = 0x10;
|
static constexpr uint32_t NametableCount = 0x10;
|
||||||
static constexpr uint32_t NametableSize = 0x400;
|
static constexpr uint32_t NametableSize = 0x400;
|
||||||
unique_ptr<EPSMAudio> _epsmaudio;
|
unique_ptr<EPSMAudio> _epsmaudio;
|
||||||
|
unique_ptr<InvA13Audio> _invA13Audio;
|
||||||
|
unique_ptr<InvOE1Audio> _invOE1Audio;
|
||||||
void Initialize(RomData &romData);
|
void Initialize(RomData &romData);
|
||||||
|
|
||||||
virtual ~BaseMapper();
|
virtual ~BaseMapper();
|
||||||
|
@ -168,7 +172,13 @@ public:
|
||||||
|
|
||||||
virtual void SetNesModel(NesModel model) { }
|
virtual void SetNesModel(NesModel model) { }
|
||||||
virtual void ProcessCpuClock() { }
|
virtual void ProcessCpuClock() { }
|
||||||
virtual void ProcessEPSMClock() { _epsmaudio->Clock(); }
|
void ProcessMiscClock()
|
||||||
|
{
|
||||||
|
_epsmaudio->Clock();
|
||||||
|
_invA13Audio->Clock();
|
||||||
|
_invOE1Audio->Clock();
|
||||||
|
}
|
||||||
|
|
||||||
virtual void NotifyVRAMAddressChange(uint16_t addr);
|
virtual void NotifyVRAMAddressChange(uint16_t addr);
|
||||||
virtual void GetMemoryRanges(MemoryRanges &ranges) override;
|
virtual void GetMemoryRanges(MemoryRanges &ranges) override;
|
||||||
|
|
||||||
|
|
|
@ -465,11 +465,23 @@ bool Console::Initialize(VirtualFile &romFile, VirtualFile &patchFile, bool forP
|
||||||
|
|
||||||
void Console::ProcessCpuClock()
|
void Console::ProcessCpuClock()
|
||||||
{
|
{
|
||||||
_mapper->ProcessEPSMClock();
|
ProcessInterferenceAudio();
|
||||||
_mapper->ProcessCpuClock();
|
_mapper->ProcessCpuClock();
|
||||||
|
_mapper->ProcessMiscClock();
|
||||||
_apu->ProcessCpuClock();
|
_apu->ProcessCpuClock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Console::ProcessInterferenceAudio()
|
||||||
|
{
|
||||||
|
_InvA13 = _ppu->_A13pinLow;
|
||||||
|
|
||||||
|
_controlManager->GetInvOE1(_controlManager->_address);
|
||||||
|
_InvOE1 = _controlManager->_OE1pinLow;
|
||||||
|
|
||||||
|
if (_controlManager->_strobed == true)
|
||||||
|
_controlManager->_strobed = false;
|
||||||
|
}
|
||||||
|
|
||||||
CPU* Console::GetCpu()
|
CPU* Console::GetCpu()
|
||||||
{
|
{
|
||||||
return _cpu.get();
|
return _cpu.get();
|
||||||
|
|
|
@ -117,6 +117,9 @@ public:
|
||||||
void Init();
|
void Init();
|
||||||
void Release(bool forShutdown);
|
void Release(bool forShutdown);
|
||||||
|
|
||||||
|
uint8_t _InvA13;
|
||||||
|
uint8_t _InvOE1;
|
||||||
|
|
||||||
shared_ptr<BatteryManager> GetBatteryManager();
|
shared_ptr<BatteryManager> GetBatteryManager();
|
||||||
shared_ptr<SaveStateManager> GetSaveStateManager();
|
shared_ptr<SaveStateManager> GetSaveStateManager();
|
||||||
shared_ptr<VideoDecoder> GetVideoDecoder();
|
shared_ptr<VideoDecoder> GetVideoDecoder();
|
||||||
|
@ -131,6 +134,7 @@ public:
|
||||||
bool IsMaster();
|
bool IsMaster();
|
||||||
|
|
||||||
void ProcessCpuClock();
|
void ProcessCpuClock();
|
||||||
|
void ProcessInterferenceAudio();
|
||||||
CPU* GetCpu();
|
CPU* GetCpu();
|
||||||
PPU* GetPpu();
|
PPU* GetPpu();
|
||||||
APU* GetApu();
|
APU* GetApu();
|
||||||
|
|
|
@ -333,10 +333,12 @@ uint8_t ControlManager::ReadRAM(uint16_t addr)
|
||||||
{
|
{
|
||||||
//Used for lag counter - any frame where the input is read does not count as lag
|
//Used for lag counter - any frame where the input is read does not count as lag
|
||||||
_isLagging = false;
|
_isLagging = false;
|
||||||
|
_address = addr;
|
||||||
|
|
||||||
uint8_t value = _console->GetMemoryManager()->GetOpenBus(GetOpenBusMask(addr - 0x4016));
|
uint8_t value = _console->GetMemoryManager()->GetOpenBus(GetOpenBusMask(addr - 0x4016));
|
||||||
for(shared_ptr<BaseControlDevice> &device : _controlDevices) {
|
for(shared_ptr<BaseControlDevice> &device : _controlDevices) {
|
||||||
value |= device->ReadRAM(addr);
|
value |= device->ReadRAM(addr);
|
||||||
|
_strobed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
@ -349,6 +351,13 @@ void ControlManager::WriteRAM(uint16_t addr, uint8_t value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ControlManager::GetInvOE1(uint16_t addr)
|
||||||
|
{
|
||||||
|
// pull low for only one clock
|
||||||
|
if (addr == 0x4016)
|
||||||
|
_OE1pinLow = (_strobed) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
void ControlManager::Reset(bool softReset)
|
void ControlManager::Reset(bool softReset)
|
||||||
{
|
{
|
||||||
ResetLagCounter();
|
ResetLagCounter();
|
||||||
|
|
|
@ -43,6 +43,10 @@ protected:
|
||||||
virtual uint8_t GetOpenBusMask(uint8_t port);
|
virtual uint8_t GetOpenBusMask(uint8_t port);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
uint8_t _OE1pinLow;
|
||||||
|
uint16_t _address;
|
||||||
|
bool _strobed;
|
||||||
|
|
||||||
ControlManager(shared_ptr<Console> console, shared_ptr<BaseControlDevice> systemActionManager, shared_ptr<BaseControlDevice> mapperControlDevice);
|
ControlManager(shared_ptr<Console> console, shared_ptr<BaseControlDevice> systemActionManager, shared_ptr<BaseControlDevice> mapperControlDevice);
|
||||||
virtual ~ControlManager();
|
virtual ~ControlManager();
|
||||||
|
|
||||||
|
@ -80,4 +84,6 @@ public:
|
||||||
|
|
||||||
virtual uint8_t ReadRAM(uint16_t addr) override;
|
virtual uint8_t ReadRAM(uint16_t addr) override;
|
||||||
virtual void WriteRAM(uint16_t addr, uint8_t value) override;
|
virtual void WriteRAM(uint16_t addr, uint8_t value) override;
|
||||||
|
|
||||||
|
void GetInvOE1(uint16_t addr);
|
||||||
};
|
};
|
||||||
|
|
|
@ -574,6 +574,8 @@
|
||||||
<ClInclude Include="IInputProvider.h" />
|
<ClInclude Include="IInputProvider.h" />
|
||||||
<ClInclude Include="IInputRecorder.h" />
|
<ClInclude Include="IInputRecorder.h" />
|
||||||
<ClInclude Include="InternalRamHandler.h" />
|
<ClInclude Include="InternalRamHandler.h" />
|
||||||
|
<ClInclude Include="InvA13Audio.h" />
|
||||||
|
<ClInclude Include="InvOE1Audio.h" />
|
||||||
<ClInclude Include="Kaiser7017.h" />
|
<ClInclude Include="Kaiser7017.h" />
|
||||||
<ClInclude Include="Kaiser7031.h" />
|
<ClInclude Include="Kaiser7031.h" />
|
||||||
<ClInclude Include="KeyManager.h" />
|
<ClInclude Include="KeyManager.h" />
|
||||||
|
|
|
@ -1523,6 +1523,8 @@
|
||||||
<ClInclude Include="fmopn_2608rom.h">
|
<ClInclude Include="fmopn_2608rom.h">
|
||||||
<Filter>Nes\Mappers\EPSG</Filter>
|
<Filter>Nes\Mappers\EPSG</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="InvA13Audio.h" />
|
||||||
|
<ClInclude Include="InvOE1Audio.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
|
|
@ -119,6 +119,9 @@ enum class AudioChannel
|
||||||
Sunsoft5B = 10,
|
Sunsoft5B = 10,
|
||||||
EPSM_L = 11,
|
EPSM_L = 11,
|
||||||
EPSM_R = 12,
|
EPSM_R = 12,
|
||||||
|
InvA13 = 13,
|
||||||
|
InvOE1 = 14,
|
||||||
|
MaxChannelCount
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class EqualizerFilterType
|
enum class EqualizerFilterType
|
||||||
|
@ -660,8 +663,40 @@ private:
|
||||||
bool _audioSettingsChanged = false;
|
bool _audioSettingsChanged = false;
|
||||||
uint32_t _audioLatency = 50;
|
uint32_t _audioLatency = 50;
|
||||||
uint32_t _EPSMClockFrequency = 3579545;
|
uint32_t _EPSMClockFrequency = 3579545;
|
||||||
double _channelVolume[13] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
|
double _channelVolume[15] = {
|
||||||
double _channelPanning[13] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 2.0 };
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0
|
||||||
|
};
|
||||||
|
double _channelPanning[15] = {
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
1.0,
|
||||||
|
1.0
|
||||||
|
};
|
||||||
EqualizerFilterType _equalizerFilterType = EqualizerFilterType::None;
|
EqualizerFilterType _equalizerFilterType = EqualizerFilterType::None;
|
||||||
vector<double> _bandGains = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
|
vector<double> _bandGains = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
|
||||||
vector<double> _bands = { { 40,56,80,113,160,225,320,450,600,750,1000,2000,3000,4000,5000,6000,7000,10000,12500,15000 } };
|
vector<double> _bands = { { 40,56,80,113,160,225,320,450,600,750,1000,2000,3000,4000,5000,6000,7000,10000,12500,15000 } };
|
||||||
|
|
41
Core/InvA13Audio.h
Normal file
41
Core/InvA13Audio.h
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#pragma once
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "Snapshotable.h"
|
||||||
|
#include "APU.h"
|
||||||
|
#include "BaseExpansionAudio.h"
|
||||||
|
#include "Console.h"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
class InvA13Audio : public BaseExpansionAudio
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
int8_t _currentOutput;
|
||||||
|
int8_t _lastOutput;
|
||||||
|
|
||||||
|
void UpdateOutputLevel()
|
||||||
|
{
|
||||||
|
if (_currentOutput != _lastOutput) {
|
||||||
|
_console->GetApu()->AddExpansionAudioDelta(AudioChannel::InvA13, _currentOutput - _lastOutput);
|
||||||
|
_lastOutput = _currentOutput;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void StreamState(bool saving) override
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClockAudio() override
|
||||||
|
{
|
||||||
|
_currentOutput = _console->_InvA13;
|
||||||
|
UpdateOutputLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
InvA13Audio(shared_ptr<Console> console) : BaseExpansionAudio(console)
|
||||||
|
{
|
||||||
|
_lastOutput = 0;
|
||||||
|
_currentOutput = 0;
|
||||||
|
}
|
||||||
|
};
|
41
Core/InvOE1Audio.h
Normal file
41
Core/InvOE1Audio.h
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#pragma once
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "Snapshotable.h"
|
||||||
|
#include "APU.h"
|
||||||
|
#include "BaseExpansionAudio.h"
|
||||||
|
#include "Console.h"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
class InvOE1Audio : public BaseExpansionAudio
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
int8_t _currentOutput;
|
||||||
|
int8_t _lastOutput;
|
||||||
|
|
||||||
|
void UpdateOutputLevel()
|
||||||
|
{
|
||||||
|
if (_currentOutput != _lastOutput) {
|
||||||
|
_console->GetApu()->AddExpansionAudioDelta(AudioChannel::InvOE1, _currentOutput - _lastOutput);
|
||||||
|
_lastOutput = _currentOutput;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void StreamState(bool saving) override
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClockAudio() override
|
||||||
|
{
|
||||||
|
_currentOutput = _console->_InvOE1;
|
||||||
|
UpdateOutputLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
InvOE1Audio(shared_ptr<Console> console) : BaseExpansionAudio(console)
|
||||||
|
{
|
||||||
|
_lastOutput = 0;
|
||||||
|
_currentOutput = 0;
|
||||||
|
}
|
||||||
|
};
|
|
@ -463,6 +463,12 @@ void PPU::WriteRAM(uint16_t addr, uint8_t value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PPU::GetInvA13()
|
||||||
|
{
|
||||||
|
// pull level high when PPU/VRAM addr bit 13 is low
|
||||||
|
_A13pinLow = (_ppuBusAddress & 0x2000) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t PPU::ReadPaletteRAM(uint16_t addr)
|
uint8_t PPU::ReadPaletteRAM(uint16_t addr)
|
||||||
{
|
{
|
||||||
addr &= 0x1F;
|
addr &= 0x1F;
|
||||||
|
@ -1345,6 +1351,7 @@ void PPU::Exec()
|
||||||
if(_needStateUpdate) {
|
if(_needStateUpdate) {
|
||||||
UpdateState();
|
UpdateState();
|
||||||
}
|
}
|
||||||
|
GetInvA13();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPU::UpdateState()
|
void PPU::UpdateState()
|
||||||
|
|
|
@ -179,6 +179,8 @@ class PPU : public IMemoryHandler, public Snapshotable
|
||||||
static constexpr int32_t PixelCount = 256*240;
|
static constexpr int32_t PixelCount = 256*240;
|
||||||
static constexpr int32_t OutputBufferSize = 256*240*2;
|
static constexpr int32_t OutputBufferSize = 256*240*2;
|
||||||
static constexpr int32_t OamDecayCycleCount = 3000;
|
static constexpr int32_t OamDecayCycleCount = 3000;
|
||||||
|
|
||||||
|
uint8_t _A13pinLow;
|
||||||
|
|
||||||
PPU(shared_ptr<Console> console);
|
PPU(shared_ptr<Console> console);
|
||||||
virtual ~PPU();
|
virtual ~PPU();
|
||||||
|
@ -212,6 +214,8 @@ class PPU : public IMemoryHandler, public Snapshotable
|
||||||
void Exec();
|
void Exec();
|
||||||
__forceinline void Run(uint64_t runTo);
|
__forceinline void Run(uint64_t runTo);
|
||||||
|
|
||||||
|
void GetInvA13();
|
||||||
|
|
||||||
uint32_t GetFrameCount()
|
uint32_t GetFrameCount()
|
||||||
{
|
{
|
||||||
return _frameCount;
|
return _frameCount;
|
||||||
|
|
|
@ -276,7 +276,9 @@ int16_t SoundMixer::GetOutputVolume(bool forRightChannel)
|
||||||
GetChannelOutput(AudioChannel::VRC7, forRightChannel) +
|
GetChannelOutput(AudioChannel::VRC7, forRightChannel) +
|
||||||
#endif
|
#endif
|
||||||
GetChannelOutput(AudioChannel::EPSM_L, forRightChannel) * 4 +
|
GetChannelOutput(AudioChannel::EPSM_L, forRightChannel) * 4 +
|
||||||
GetChannelOutput(AudioChannel::EPSM_R, forRightChannel) * 4
|
GetChannelOutput(AudioChannel::EPSM_R, forRightChannel) * 4 +
|
||||||
|
GetChannelOutput(AudioChannel::InvA13, forRightChannel) * 500 +
|
||||||
|
GetChannelOutput(AudioChannel::InvOE1, forRightChannel) * 500
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
private:
|
private:
|
||||||
static constexpr uint32_t MaxSampleRate = 96000;
|
static constexpr uint32_t MaxSampleRate = 96000;
|
||||||
static constexpr uint32_t MaxSamplesPerFrame = MaxSampleRate / 60 * 4 * 2; //x4 to allow CPU overclocking up to 10x, x2 for panning stereo
|
static constexpr uint32_t MaxSamplesPerFrame = MaxSampleRate / 60 * 4 * 2; //x4 to allow CPU overclocking up to 10x, x2 for panning stereo
|
||||||
static constexpr uint32_t MaxChannelCount = 13;
|
static constexpr uint32_t MaxChannelCount = (uint32_t)AudioChannel::MaxChannelCount;
|
||||||
|
|
||||||
IAudioDevice* _audioDevice;
|
IAudioDevice* _audioDevice;
|
||||||
EmulationSettings* _settings;
|
EmulationSettings* _settings;
|
||||||
|
|
|
@ -26,6 +26,8 @@ namespace Mesen.GUI.Config
|
||||||
[MinMax(0, 100)] public UInt32 Sunsoft5bVolume = 100;
|
[MinMax(0, 100)] public UInt32 Sunsoft5bVolume = 100;
|
||||||
[MinMax(0, 100)] public UInt32 EPSMVolume_L = 50;
|
[MinMax(0, 100)] public UInt32 EPSMVolume_L = 50;
|
||||||
[MinMax(0, 100)] public UInt32 EPSMVolume_R = 50;
|
[MinMax(0, 100)] public UInt32 EPSMVolume_R = 50;
|
||||||
|
[MinMax(0, 100)] public UInt32 InvA13Volume = 0;
|
||||||
|
[MinMax(0, 100)] public UInt32 InvOE1Volume = 0;
|
||||||
|
|
||||||
[MinMax(10000, 32000000)] public UInt32 EPSMClockFrequency = 3579545;
|
[MinMax(10000, 32000000)] public UInt32 EPSMClockFrequency = 3579545;
|
||||||
|
|
||||||
|
@ -42,6 +44,8 @@ namespace Mesen.GUI.Config
|
||||||
[MinMax(-100, 100)] public Int32 Sunsoft5bPanning = 0;
|
[MinMax(-100, 100)] public Int32 Sunsoft5bPanning = 0;
|
||||||
[MinMax(-100, 100)] public Int32 EPSMPanning_L = -100;
|
[MinMax(-100, 100)] public Int32 EPSMPanning_L = -100;
|
||||||
[MinMax(-100, 100)] public Int32 EPSMPanning_R = 100;
|
[MinMax(-100, 100)] public Int32 EPSMPanning_R = 100;
|
||||||
|
[MinMax(-100, 100)] public Int32 InvA13Panning = 0;
|
||||||
|
[MinMax(-100, 100)] public Int32 InvOE1Panning = 0;
|
||||||
|
|
||||||
[ValidValues(11025, 22050, 44100, 48000, 96000)] public UInt32 SampleRate = 48000;
|
[ValidValues(11025, 22050, 44100, 48000, 96000)] public UInt32 SampleRate = 48000;
|
||||||
public bool ReduceSoundInBackground = true;
|
public bool ReduceSoundInBackground = true;
|
||||||
|
@ -125,6 +129,8 @@ namespace Mesen.GUI.Config
|
||||||
InteropEmu.SetChannelVolume(AudioChannel.EPSM_R, ConvertVolume(audioInfo.EPSMVolume_R));
|
InteropEmu.SetChannelVolume(AudioChannel.EPSM_R, ConvertVolume(audioInfo.EPSMVolume_R));
|
||||||
InteropEmu.SetChannelVolume(AudioChannel.EPSM_L, audioInfo.EnableEPSM ? AudioInfo.ConvertVolume(audioInfo.EPSMVolume_L) : 0);
|
InteropEmu.SetChannelVolume(AudioChannel.EPSM_L, audioInfo.EnableEPSM ? AudioInfo.ConvertVolume(audioInfo.EPSMVolume_L) : 0);
|
||||||
InteropEmu.SetChannelVolume(AudioChannel.EPSM_R, audioInfo.EnableEPSM ? AudioInfo.ConvertVolume(audioInfo.EPSMVolume_R) : 0);
|
InteropEmu.SetChannelVolume(AudioChannel.EPSM_R, audioInfo.EnableEPSM ? AudioInfo.ConvertVolume(audioInfo.EPSMVolume_R) : 0);
|
||||||
|
InteropEmu.SetChannelVolume(AudioChannel.InvA13, ConvertVolume(audioInfo.InvA13Volume));
|
||||||
|
InteropEmu.SetChannelVolume(AudioChannel.InvOE1, ConvertVolume(audioInfo.InvOE1Volume));
|
||||||
|
|
||||||
InteropEmu.SetChannelPanning(AudioChannel.Square1, ConvertPanning(audioInfo.Square1Panning));
|
InteropEmu.SetChannelPanning(AudioChannel.Square1, ConvertPanning(audioInfo.Square1Panning));
|
||||||
InteropEmu.SetChannelPanning(AudioChannel.Square2, ConvertPanning(audioInfo.Square2Panning));
|
InteropEmu.SetChannelPanning(AudioChannel.Square2, ConvertPanning(audioInfo.Square2Panning));
|
||||||
|
@ -139,6 +145,8 @@ namespace Mesen.GUI.Config
|
||||||
InteropEmu.SetChannelPanning(AudioChannel.Sunsoft5B, ConvertPanning(audioInfo.Sunsoft5bPanning));
|
InteropEmu.SetChannelPanning(AudioChannel.Sunsoft5B, ConvertPanning(audioInfo.Sunsoft5bPanning));
|
||||||
InteropEmu.SetChannelPanning(AudioChannel.EPSM_L, ConvertPanning(audioInfo.EPSMPanning_L));
|
InteropEmu.SetChannelPanning(AudioChannel.EPSM_L, ConvertPanning(audioInfo.EPSMPanning_L));
|
||||||
InteropEmu.SetChannelPanning(AudioChannel.EPSM_R, ConvertPanning(audioInfo.EPSMPanning_R));
|
InteropEmu.SetChannelPanning(AudioChannel.EPSM_R, ConvertPanning(audioInfo.EPSMPanning_R));
|
||||||
|
InteropEmu.SetChannelPanning(AudioChannel.InvA13, ConvertPanning(audioInfo.InvA13Panning));
|
||||||
|
InteropEmu.SetChannelPanning(AudioChannel.InvOE1, ConvertPanning(audioInfo.InvOE1Panning));
|
||||||
|
|
||||||
InteropEmu.SetEPSMClockFrequency(audioInfo.EPSMClockFrequency);
|
InteropEmu.SetEPSMClockFrequency(audioInfo.EPSMClockFrequency);
|
||||||
|
|
||||||
|
|
559
GUI.NET/Forms/Config/frmAudioConfig.Designer.cs
generated
559
GUI.NET/Forms/Config/frmAudioConfig.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -46,6 +46,8 @@ namespace Mesen.GUI.Forms.Config
|
||||||
AddBinding("Sunsoft5bVolume", trkSunsoft5b);
|
AddBinding("Sunsoft5bVolume", trkSunsoft5b);
|
||||||
AddBinding("EPSMVolume_L", trkEPSMVol_L);
|
AddBinding("EPSMVolume_L", trkEPSMVol_L);
|
||||||
AddBinding("EPSMVolume_R", trkEPSMVol_R);
|
AddBinding("EPSMVolume_R", trkEPSMVol_R);
|
||||||
|
AddBinding("InvA13Volume", trkInvA13Vol);
|
||||||
|
AddBinding("InvOE1Volume", trkInvOE1Vol);
|
||||||
|
|
||||||
AddBinding("Square1Panning", trkSquare1Pan);
|
AddBinding("Square1Panning", trkSquare1Pan);
|
||||||
AddBinding("Square2Panning", trkSquare2Pan);
|
AddBinding("Square2Panning", trkSquare2Pan);
|
||||||
|
@ -60,6 +62,8 @@ namespace Mesen.GUI.Forms.Config
|
||||||
AddBinding("Sunsoft5bPanning", trkSunsoftPan);
|
AddBinding("Sunsoft5bPanning", trkSunsoftPan);
|
||||||
AddBinding("EPSMPanning_L", trkEPSMPan_L);
|
AddBinding("EPSMPanning_L", trkEPSMPan_L);
|
||||||
AddBinding("EPSMPanning_R", trkEPSMPan_R);
|
AddBinding("EPSMPanning_R", trkEPSMPan_R);
|
||||||
|
AddBinding("InvA13Panning", trkInvA13Pan);
|
||||||
|
AddBinding("InvOE1Panning", trkInvOE1Pan);
|
||||||
|
|
||||||
AddBinding("EPSMClockFrequency", nudEPSMClockFrequency);
|
AddBinding("EPSMClockFrequency", nudEPSMClockFrequency);
|
||||||
|
|
||||||
|
|
|
@ -2301,8 +2301,10 @@ namespace Mesen.GUI
|
||||||
Namco163 = 9,
|
Namco163 = 9,
|
||||||
Sunsoft5B = 10,
|
Sunsoft5B = 10,
|
||||||
EPSM_L = 11,
|
EPSM_L = 11,
|
||||||
EPSM_R= 12
|
EPSM_R = 12,
|
||||||
}
|
InvA13 = 13,
|
||||||
|
InvOE1 = 14
|
||||||
|
}
|
||||||
|
|
||||||
public enum EqualizerFilterType
|
public enum EqualizerFilterType
|
||||||
{
|
{
|
||||||
|
@ -2559,10 +2561,10 @@ namespace Mesen.GUI
|
||||||
SortByUsageFrequency = 2,
|
SortByUsageFrequency = 2,
|
||||||
GroupBlankTiles = 4,
|
GroupBlankTiles = 4,
|
||||||
IgnoreOverscan = 8,
|
IgnoreOverscan = 8,
|
||||||
SaveFrame = 16,
|
SaveFrame = 16,
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public class AddressTypeInfo
|
public class AddressTypeInfo
|
||||||
{
|
{
|
||||||
public Int32 Address;
|
public Int32 Address;
|
||||||
|
|
Loading…
Add table
Reference in a new issue