libsidplayfp  1.5.3
residfp-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 RESIDFP_EMU_H
24 #define RESIDFP_EMU_H
25 
26 #include <stdint.h>
27 
28 #include "residfp/SID.h"
29 #include "sidplayfp/SidConfig.h"
30 #include "sidplayfp/sidemu.h"
31 #include "sidplayfp/event.h"
32 
33 class sidbuilder;
34 
35 #define RESID_NAMESPACE reSIDfp
36 
37 class ReSIDfp: public sidemu
38 {
39 private:
40  RESID_NAMESPACE::SID &m_sid;
41 
42 public:
43  static const char* getCredits();
44 
45 public:
46  ReSIDfp(sidbuilder *builder);
47  ~ReSIDfp();
48 
49  // Standard component functions
50  const char *credits() const { return getCredits(); }
51 
52  void reset() { sidemu::reset (); }
53  void reset(uint8_t volume);
54 
55  uint8_t read(uint_least8_t addr);
56  void write(uint_least8_t addr, uint8_t data);
57 
58  // Standard SID functions
59  void clock();
60  void filter(bool enable);
61  void voice(unsigned int num, bool mute) { m_sid.mute(num, mute); }
62 
63  bool getStatus() const { return m_status; }
64 
65  // Specific to resid
66  void sampling(float systemclock, float freq,
67  SidConfig::sampling_method_t method, bool fast);
68 
69  void filter6581Curve(double filterCurve);
70  void filter8580Curve(double filterCurve);
71  void model(SidConfig::sid_model_t model);
72 };
73 
74 #endif // RESIDFP_EMU_H
Definition: sidemu.h:48
Definition: residfp-emu.h:37
Definition: sidbuilder.h:37