1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-18 04:28:57 +00:00

Ensured the AY is pumped linearly, not exponentially.

This commit is contained in:
Thomas Harte 2016-10-18 22:21:06 -04:00
parent bd6e6674a0
commit ca28e3c64e

View File

@ -145,12 +145,13 @@ class Machine:
std::shared_ptr<Storage::Tape::BinaryTapePlayer> tape;
std::shared_ptr<Keyboard> keyboard;
inline void synchronise() { ay8910->run_for_cycles(_half_cycles_since_ay_update >> 1); }
inline void synchronise() { ay8910->run_for_cycles(_half_cycles_since_ay_update >> 1); _half_cycles_since_ay_update = 0; }
private:
void update_ay()
{
ay8910->run_for_cycles(_half_cycles_since_ay_update >> 1);
_half_cycles_since_ay_update = 0;
ay8910->set_control_lines( (GI::AY38910::ControlLines)((_ay_bdir ? GI::AY38910::BCDIR : 0) | (_ay_bc1 ? GI::AY38910::BC1 : 0) | GI::AY38910::BC2));
}
bool _ay_bdir, _ay_bc1;