libsidplayfp 2.4.2
resid-emu.h
1/*
2 * This file is part of libsidplayfp, a SID player engine.
3 *
4 * Copyright 2011-2019 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 "Event.h"
31#include "resid/sid.h"
32
33#include "sidcxx11.h"
34
35#ifdef HAVE_CONFIG_H
36# include "config.h"
37#endif
38
39
40namespace libsidplayfp
41{
42
43class ReSID final : public sidemu
44{
45private:
46 reSID::SID &m_sid;
47 uint8_t m_voiceMask;
48
49public:
50 static const char* getCredits();
51
52public:
53 ReSID(sidbuilder *builder);
54 ~ReSID();
55
56 bool getStatus() const { return m_status; }
57
58 uint8_t read(uint_least8_t addr) override;
59 void write(uint_least8_t addr, uint8_t data) override;
60
61 // c64sid functions
62 void reset(uint8_t volume) override;
63
64 // Standard SID emu functions
65 void clock() override;
66
67 void sampling(float systemclock, float freq,
68 SidConfig::sampling_method_t method, bool fast) override;
69
70 void voice(unsigned int num, bool mute) override;
71
72 void model(SidConfig::sid_model_t model, bool digiboost) override;
73
74 // Specific to resid
75 void bias(double dac_bias);
76 void filter(bool enable);
77};
78
79}
80
81#endif // RESID_EMU_H
sid_model_t
SID chip model.
Definition: SidConfig.h:51
sampling_method_t
Sampling method.
Definition: SidConfig.h:76
Definition: resid-emu.h:44
void voice(unsigned int num, bool mute) override
Definition: resid-emu.cpp:134
void clock() override
Definition: resid-emu.cpp:94
void model(SidConfig::sid_model_t model, bool digiboost) override
Definition: resid-emu.cpp:145
Definition: sidemu.h:47
Definition: sid.h:39
Definition: sidbuilder.h:41