Revert "Merge pull request #44 from Gumball2415/feature-add-2a03-interference"
This reverts commitc5ac9ecb74
, reversing changes made todf1e9c9c27
.
This commit is contained in:
parent
6bf04088ef
commit
bb9d052955
6 changed files with 11 additions and 12 deletions
|
@ -473,10 +473,10 @@ void Console::ProcessCpuClock()
|
||||||
|
|
||||||
void Console::ProcessInterferenceAudio()
|
void Console::ProcessInterferenceAudio()
|
||||||
{
|
{
|
||||||
_InvA13 = _ppu->_A13pinLowSum;
|
_InvA13 = (_ppu->_A13pinLow == 1) ? 0 : 1; // invert relative to 2A03
|
||||||
_ppu->_A13pinLowSum = 0;
|
|
||||||
|
|
||||||
_InvOE1 = !_controlManager->GetInvOE1(_controlManager->_address); // invert relative to 2A03
|
_controlManager->GetInvOE1(_controlManager->_address);
|
||||||
|
_InvOE1 = (_controlManager->_OE1pinLow == 1) ? 0 : 1; // invert relative to 2A03
|
||||||
|
|
||||||
if (_controlManager->_strobed == true)
|
if (_controlManager->_strobed == true)
|
||||||
_controlManager->_strobed = false;
|
_controlManager->_strobed = false;
|
||||||
|
|
|
@ -351,12 +351,11 @@ void ControlManager::WriteRAM(uint16_t addr, uint8_t value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ControlManager::GetInvOE1(uint16_t addr)
|
void ControlManager::GetInvOE1(uint16_t addr)
|
||||||
{
|
{
|
||||||
// pull low for only one clock
|
// pull low for only one clock
|
||||||
if (addr == 0x4016)
|
if (addr == 0x4016)
|
||||||
_OE1pinLow = !_strobed;
|
_OE1pinLow = (_strobed) ? 0 : 1;
|
||||||
return _OE1pinLow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlManager::Reset(bool softReset)
|
void ControlManager::Reset(bool softReset)
|
||||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
||||||
virtual uint8_t GetOpenBusMask(uint8_t port);
|
virtual uint8_t GetOpenBusMask(uint8_t port);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool _OE1pinLow;
|
uint8_t _OE1pinLow;
|
||||||
uint16_t _address;
|
uint16_t _address;
|
||||||
bool _strobed;
|
bool _strobed;
|
||||||
|
|
||||||
|
@ -85,5 +85,5 @@ 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;
|
||||||
|
|
||||||
bool GetInvOE1(uint16_t addr);
|
void GetInvOE1(uint16_t addr);
|
||||||
};
|
};
|
||||||
|
|
|
@ -466,7 +466,7 @@ void PPU::WriteRAM(uint16_t addr, uint8_t value)
|
||||||
void PPU::GetInvA13()
|
void PPU::GetInvA13()
|
||||||
{
|
{
|
||||||
// pull level high when PPU/VRAM addr bit 13 is low
|
// pull level high when PPU/VRAM addr bit 13 is low
|
||||||
_A13pinLowSum += (bool)(_ppuBusAddress & 0x2000); // invert relative to 2A03
|
_A13pinLow = (_ppuBusAddress & 0x2000) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t PPU::ReadPaletteRAM(uint16_t addr)
|
uint8_t PPU::ReadPaletteRAM(uint16_t addr)
|
||||||
|
|
|
@ -180,7 +180,7 @@ class PPU : public IMemoryHandler, public Snapshotable
|
||||||
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 _A13pinLowSum;
|
uint8_t _A13pinLow;
|
||||||
|
|
||||||
PPU(shared_ptr<Console> console);
|
PPU(shared_ptr<Console> console);
|
||||||
virtual ~PPU();
|
virtual ~PPU();
|
||||||
|
|
|
@ -277,8 +277,8 @@ int16_t SoundMixer::GetOutputVolume(bool 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) * 20) / 3.0 + // 3 PPU samples per CPU clock
|
GetChannelOutput(AudioChannel::InvA13, forRightChannel) * 20 +
|
||||||
GetChannelOutput(AudioChannel::InvOE1, forRightChannel) * 100
|
GetChannelOutput(AudioChannel::InvOE1, forRightChannel) * 1000
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue