21class SID final :
public SubComponent,
public Inspectable<SIDInfo>
23 friend class SIDBridge;
24 friend class AudioPort;
26 Descriptions descriptions = {
29 .description =
"Primary Sound Interface Device"
33 .description =
"First Auxiliary SID"
37 .description =
"Second Auxiliary SID"
41 .description =
"Third Auxiliary SID"
45 ConfigOptions options = {
57 SIDConfig config = { };
71 ReSID resid = ReSID(c64, objid);
80 SID(C64 &ref, isize
id);
82 SID& operator= (
const SID& other) {
99 void serialize(T& worker)
107 if (isResetter(worker))
return;
118 void operator << (SerResetter &worker)
override { serialize(worker); }
119 void operator << (SerChecker &worker)
override { serialize(worker); }
120 void operator << (SerCounter &worker)
override { serialize(worker); }
121 void operator << (SerReader &worker)
override;
122 void operator << (SerWriter &worker)
override { serialize(worker); }
131 const Descriptions &getDescriptions()
const override {
return descriptions; }
135 void _dump(Category category, std::ostream& os)
const override;
144 void cacheInfo(SIDInfo &result)
const override;
153 const SIDConfig &getConfig()
const {
return config; }
154 const ConfigOptions &getOptions()
const override {
return options; }
155 i64 getFallback(Option opt)
const override;
156 i64 getOption(Option opt)
const override;
157 void checkOption(Option opt, i64 value)
override;
158 void setOption(Option opt, i64 value)
override;
168 bool isEnabled()
const {
return config.enabled; }
171 u8 spypeek(u16 addr)
const;
177 void poke(u16 addr, u8 value);
187 void executeUntil(Cycle targetCycle);
190 bool powerSave()
const;
199 u32 getClockFrequency()
const;
200 void setClockFrequency(u32 frequency);
202 SIDRevision getRevision()
const;
203 void setRevision(SIDRevision revision);
205 double getSampleRate()
const;
206 void setSampleRate(
double rate);
208 bool getAudioFilter()
const;
209 void setAudioFilter(
bool enable);
211 SamplingMethod getSamplingMethod()
const;
212 void setSamplingMethod(SamplingMethod method);
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
@ OPT_SID_SAMPLING
Audio sampling mode.
Definition OptionTypes.h:113
@ OPT_SID_ENGINE
SID backend (e.g., reSID)
Definition OptionTypes.h:112
@ OPT_SID_FILTER
Enable or disables the audio filter.
Definition OptionTypes.h:111
@ OPT_SID_ADDRESS
Mapping address in memory.
Definition OptionTypes.h:109
@ OPT_SID_ENABLE
Enable or disable SID.
Definition OptionTypes.h:108
@ OPT_SID_REVISION
Chip revision.
Definition OptionTypes.h:110
@ OPT_SID_POWER_SAVE
Enable fast-paths.
Definition OptionTypes.h:114