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
34
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
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
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
int saveState(char *buffer, int size) const
Definition residfp.cpp:168
void setFilter6581Range(double adjustment)
Definition residfp.cpp:138
void enableOld6581caps(bool enable)
Definition residfp.cpp:153
void input(int value)
Definition residfp.cpp:76
void setPaddle(unsigned char x, unsigned char y)
Definition residfp.cpp:158
void enableFilter(bool enable)
Definition residfp.cpp:148
bool setCombinedWaveforms(CombinedWaveforms cws)
Definition residfp.cpp:58
void restoreState(char *buffer, int size)
Definition residfp.cpp:173
bool setSamplingParameters(double clockFrequency, SamplingMethod method, double samplingFrequency)
Definition residfp.cpp:96
void reset()
Definition residfp.cpp:71
ChipModel getChipModel() const
Definition residfp.cpp:53
void setFilter6581Curve(double filterCurve)
Definition residfp.cpp:133
unsigned char read(int offset)
Definition residfp.cpp:86
void clockSilent(unsigned int cycles)
Definition residfp.cpp:128
void write(int offset, unsigned char value)
Definition residfp.cpp:91
bool setChipModel(ChipModel model)
Definition residfp.cpp:40
unsigned char peek(int offset) const
Definition residfp.cpp:81
void clockDigital(unsigned int cycles)
Definition residfp.cpp:123
int stateSize() const
Definition residfp.cpp:163
void setFilter8580Curve(double filterCurve)
Definition residfp.cpp:143
int clock(unsigned int cycles, short *buf)
Definition residfp.cpp:113
SamplingMethod
Definition residfp_defs.h:67
CombinedWaveforms
Definition residfp_defs.h:62
ChipModel
Definition residfp_defs.h:54