1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-29 00:29:34 +00:00
CLK/Components/KonamiSCC/KonamiSCC.cpp
Thomas Harte 655b971976 Establishes that there is such as a thing as a Konami SCC.
Creates one, ensures it appears in memory when intended to, lets it handle reads and writes. It currently does nothing.
2018-01-06 20:15:55 -05:00

39 lines
684 B
C++

//
// KonamiSCC.cpp
// Clock Signal
//
// Created by Thomas Harte on 06/01/2018.
// Copyright © 2018 Thomas Harte. All rights reserved.
//
#include "KonamiSCC.hpp"
#include <cstring>
using namespace Konami;
SCC::SCC(Concurrency::DeferringAsyncTaskQueue &task_queue) :
task_queue_(task_queue) {}
bool SCC::is_silent() {
return !(channel_enable_ & 0x1f);
}
void SCC::get_samples(std::size_t number_of_samples, std::int16_t *target) {
if(is_silent()) {
std::memset(target, 0, sizeof(std::int16_t) * number_of_samples);
return;
}
// TODO
}
void SCC::write(uint16_t address, uint8_t value) {
// TODO
}
uint8_t SCC::read(uint16_t address) {
// TODO
return 0xff;
}