mirror of
https://github.com/TomHarte/CLK.git
synced 2025-12-20 06:16:41 +00:00
Allow potentometer inputs to be set; disable SID by default.
This commit is contained in:
@@ -44,7 +44,7 @@ struct BBCMicroTarget: public ::Analyser::Static::Target, public Reflection::Str
|
||||
bool has_1770dfs = false;
|
||||
bool has_adfs = false;
|
||||
bool has_sideways_ram = true;
|
||||
bool has_beebsid = true; // TODO: false is a much better default.
|
||||
bool has_beebsid = false;
|
||||
|
||||
ReflectableEnum(TubeProcessor, None, WDC65C02, Z80);
|
||||
TubeProcessor tube_processor = TubeProcessor::None;
|
||||
|
||||
@@ -88,6 +88,10 @@ void SID::write(const Numeric::SizedInt<5> address, const uint8_t value) {
|
||||
});
|
||||
}
|
||||
|
||||
void SID::set_potentometer_input(const int index, const uint8_t value) {
|
||||
potentometers_[index] = value;
|
||||
}
|
||||
|
||||
void SID::update_filter() {
|
||||
using Type = SignalProcessing::BiquadFilter::Type;
|
||||
Type type = Type::AllPass;
|
||||
@@ -136,8 +140,8 @@ uint8_t SID::read(const Numeric::SizedInt<5> address) {
|
||||
switch(address.get()) {
|
||||
default: return last_write_;
|
||||
|
||||
case 0x19: return 0x00; // TODO: potentometer x.
|
||||
case 0x1a: return 0x00; // TODO: potentometer y.
|
||||
case 0x19: return potentometers_[0];
|
||||
case 0x1a: return potentometers_[1];
|
||||
|
||||
case 0x1b:
|
||||
case 0x1c:
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
|
||||
void write(Numeric::SizedInt<5> address, uint8_t value);
|
||||
uint8_t read(Numeric::SizedInt<5> address);
|
||||
void set_potentometer_input(int index, uint8_t value);
|
||||
|
||||
// Outputs::Speaker::BufferSource.
|
||||
template <Outputs::Speaker::Action action>
|
||||
@@ -120,6 +121,8 @@ private:
|
||||
void update_filter();
|
||||
|
||||
SignalProcessing::BiquadFilter output_filter_;
|
||||
|
||||
uint8_t potentometers_[2]{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user