libresidfp  1.2.3
residfp.h
Go to the documentation of this file.
1 /*
2  * This file is part of residfp, a SID player engine.
3  *
4  * Copyright 2011-2026 Leandro Nini <drfiemost@users.sourceforge.net>
5  * Copyright 2007-2010 Antti Lankila
6  * Copyright 2004 Dag Lem <resid@nimrod.no>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef RESIDFP_H
24 #define RESIDFP_H
25 
26 #include "residfp/residfp_defs.h"
27 #include "residfp/sidversion.h"
28 
35 namespace reSIDfp
36 {
37 
38 class SID;
39 
43 class RESIDFP_EXTERN residfp
44 {
45 private:
46  SID &sid;
47 
48 public:
49  residfp();
50  ~residfp();
51 
58  bool setChipModel(ChipModel model);
59 
63  ChipModel getChipModel() const;
64 
71  bool setCombinedWaveforms(CombinedWaveforms cws);
72 
76  void reset();
77 
85  void input(int value);
86 
95  unsigned char peek(int offset) const;
96 
118  unsigned char read(int offset);
119 
126  void write(int offset, unsigned char value);
127 
152  bool setSamplingParameters(
153  double clockFrequency,
154  SamplingMethod method,
155  double samplingFrequency
156  );
157 
173  int clock(unsigned int cycles, short* buf);
174 
183  int clock(short* buf, int bufSize);
184 
194  void clockDigital(unsigned int cycles);
195 
206  void clockSilent(unsigned int cycles);
207 
213  void setFilter6581Curve(double filterCurve);
214 
220  void setFilter6581Range(double adjustment);
221 
227  void setFilter8580Curve(double filterCurve);
228 
234  void enableFilter(bool enable);
235 
243  void enableOld6581caps(bool enable);
244 
250  void setPaddle(unsigned char x, unsigned char y);
251 
259  int stateSize() const;
260 
272  int saveState(char* buffer, int size) const;
273 
282  void restoreState(char* buffer, int size);
283 
292  void setDacLeakage(double level);
293 
302  void setOffset6581(double offset);
303 
312  void setDCBRes(double res);
313 };
314 
315 }
316 
317 #endif
Definition: SID.h:63
Definition: Dac.cpp:27
Definition: residfp.h:43