libsidplayfp  2.0.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 
40 namespace libsidplayfp
41 {
42 
43 class ReSID final : public sidemu
44 {
45 private:
46  reSID::SID &m_sid;
47  uint8_t m_voiceMask;
48 
49 public:
50  static const char* getCredits();
51 
52 public:
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
libsidplayfp::ReSID::voice
void voice(unsigned int num, bool mute) override
Definition: resid-emu.cpp:134
libsidplayfp::sidemu
Definition: sidemu.h:47
reSID::SID
Definition: sid.h:39
SidConfig::sampling_method_t
sampling_method_t
Sampling method.
Definition: SidConfig.h:75
libsidplayfp::ReSID
Definition: resid-emu.h:44
sidbuilder
Definition: sidbuilder.h:41
sid.h
libsidplayfp::ReSID::clock
void clock() override
Definition: resid-emu.cpp:94
libsidplayfp::ReSID::model
void model(SidConfig::sid_model_t model, bool digiboost) override
Definition: resid-emu.cpp:145
SidConfig::sid_model_t
sid_model_t
SID chip model.
Definition: SidConfig.h:51