1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-12-20 06:16:41 +00:00

Return whatever was written last if read.

This commit is contained in:
Thomas Harte
2025-11-11 09:19:01 -05:00
parent 29235f1276
commit b9f5802c89
2 changed files with 5 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ using namespace MOS::SID;
SID::SID(Concurrency::AsyncTaskQueue<false> &audio_queue) : audio_queue_(audio_queue) {}
void SID::write(const Numeric::SizedInt<5> address, const uint8_t value) {
last_write_ = value;
audio_queue_.enqueue([=, this] {
const auto voice = [&]() -> Voice & {
return voices_[address.get() / 7];
@@ -57,7 +58,7 @@ void SID::write(const Numeric::SizedInt<5> address, const uint8_t value) {
uint8_t SID::read(const Numeric::SizedInt<5> address) {
(void)address;
return 0xff;
return last_write_;
}
void SID::set_sample_volume_range(const std::int16_t range) {
@@ -97,7 +98,6 @@ void SID::apply_samples(const std::size_t number_of_samples, Outputs::Speaker::M
)
);
}
(void)target;
}
template void SID::apply_samples<Outputs::Speaker::Action::Mix>(