libsidplayfp 1.8.8
resid-emu.h
1/*
2 * This file is part of libsidplayfp, a SID player engine.
3 *
4 * Copyright 2011-2014 Leandro Nini <drfiemost@users.sourceforge.net>
5 * Copyright 2007-2010 Antti Lankila
6 * Copyright 2001 Simon White
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 RESID_EMU_H
24#define RESID_EMU_H
25
26#include <stdint.h>
27
28#include "sidplayfp/SidConfig.h"
29#include "sidemu.h"
30#include "sidplayfp/event.h"
31#include "resid/sid.h"
32
33#ifdef HAVE_CONFIG_H
34# include "config.h"
35#endif
36
37//FIXME
38#define RESID_NAMESPACE reSID
39
40#ifdef RESID_NAMESPACE
41# define RESID_NS ::RESID_NAMESPACE
42#else
43# define RESID_NS
44#endif
45
46class ReSID: public sidemu
47{
48private:
49 RESID_NS::SID &m_sid;
50 uint8_t m_voiceMask;
51
52public:
53 static const char* getCredits();
54
55public:
56 ReSID(sidbuilder *builder);
57 ~ReSID();
58
59 // Standard component functions
60 void reset() { sidemu::reset (); }
61 void reset(uint8_t volume);
62
63 uint8_t read(uint_least8_t addr);
64 void write(uint_least8_t addr, uint8_t data);
65
66 // Standard SID functions
67 void clock();
68 void filter(bool enable);
69 void voice(unsigned int num, bool mute);
70
71 bool getStatus() const { return m_status; }
72
73 // Specific to resid
74 void sampling(float systemclock, float freq,
75 SidConfig::sampling_method_t method, bool fast);
76
77 void bias(double dac_bias);
78 void model(SidConfig::sid_model_t model);
79};
80
81#endif // RESID_EMU_H
Definition: resid-emu.h:47
void clock()
Definition: resid-emu.cpp:89
void voice(unsigned int num, bool mute)
Definition: resid-emu.cpp:129
void model(SidConfig::sid_model_t model)
Definition: resid-emu.cpp:140
Definition: sidbuilder.h:38
Definition: sidemu.h:40