libresidfp 1.1.1
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
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};
284
285}
286
287#endif
Definition SID.h:64
Definition residfp.h:44
SamplingMethod
Definition residfp_defs.h:67
CombinedWaveforms
Definition residfp_defs.h:62
ChipModel
Definition residfp_defs.h:54