libsidplayfp 2.9.0
exsid-emu.h
1/***************************************************************************
2 exsid-emu.h - exSID support interface.
3 -------------------
4 Based on hardsid-emu.h (C) 2000-2002 Simon White, (C) 2001-2002 Jarno Paananen
5
6 copyright : (C) 2015 Thibaut VARENE
7 ***************************************************************************/
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License version 2 as *
12 * published by the Free Software Foundation. *
13 * *
14 ***************************************************************************/
15
16#ifndef EXSID_EMU_H
17#define EXSID_EMU_H
18
19#include "sidemu.h"
20#include "Event.h"
21#include "EventScheduler.h"
22#include "sidplayfp/siddefs.h"
23
24#include "sidcxx11.h"
25
26#ifdef HAVE_CONFIG_H
27# include "config.h"
28#endif
29
30namespace libsidplayfp
31{
32
33/***************************************************************************
34 * exSID SID Specialisation
35 ***************************************************************************/
36class exSID final : public sidemu
37{
38private:
39 //friend class HardSIDBuilder;
40
41 // exSID specific data
42 static unsigned int sid;
43 void * exsid;
44
45 bool m_status;
46
47 bool readflag;
48
49 uint8_t busValue;
50
51 bool muted[3];
52
54
55private:
56 unsigned int delay();
57
58public:
59 static const char* getCredits();
60
61public:
62 exSID(sidbuilder *builder);
63 ~exSID() override;
64
65 bool getStatus() const { return m_status; }
66
67 uint8_t read(uint_least8_t addr) override;
68 void write(uint_least8_t addr, uint8_t data) override;
69
70 // c64sid functions
71 void reset(uint8_t volume) override;
72
73 // Standard SID functions
74 void clock() override;
75
76 void model(SidConfig::sid_model_t model, bool digiboost) override;
77
78 void voice(unsigned int num, bool mute) override;
79
80 void filter(bool) {}
81
82 void sampling(float systemclock, float freq,
83 SidConfig::sampling_method_t method, bool) override;
84
85 // exSID specific
86 void flush();
87
88 // Must lock the SID before using the standard functions.
89 bool lock(EventScheduler *env) override;
90 void unlock() override;
91};
92
93}
94
95#endif // EXSID_EMU_H
sid_model_t
SID chip model.
Definition SidConfig.h:51
sampling_method_t
Sampling method.
Definition SidConfig.h:84
Definition EventScheduler.h:62
Definition exsid-emu.h:37
void clock() override
Definition exsid-emu.cpp:99
bool lock(EventScheduler *env) override
Definition exsid-emu.cpp:164
void model(SidConfig::sid_model_t model, bool digiboost) override
Definition exsid-emu.cpp:153
void unlock() override
Definition exsid-emu.cpp:169
void voice(unsigned int num, bool mute) override
Definition exsid-emu.cpp:148
Definition sidemu.h:47
Definition sidbuilder.h:41