libresidfp 1.3.0
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
27#include "residfp/sidversion.h"
28
35namespace reSIDfp
36{
37
38class SID;
39
43class RESIDFP_EXTERN residfp
44{
45private:
46 SID &sid;
47
48public:
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
245 RESIDFP_DEPRECATED void enableOld6581caps(bool enable);
246
252 void setPaddle(unsigned char x, unsigned char y);
253
261 int stateSize() const;
262
274 int saveState(char* buffer, int size) const;
275
284 void restoreState(char* buffer, int size);
285
294 void setDacLeakage(double level);
295
304 void setOffset6581(double offset);
305
314 void setDCBRes(double res);
315
328 void set6581caps(CapsType type);
329
340 void enableStrongPS(bool enable);
341
350 void noiseLevel(int level);
351};
352
353}
354
355#endif
Definition SID.h:67
Definition residfp.h:44
SamplingMethod
Definition residfp_defs.h:78
CombinedWaveforms
Definition residfp_defs.h:73
ChipModel
Definition residfp_defs.h:65
CapsType
Definition residfp_defs.h:87