libsidplayfp 2.15.0
SidTuneInfo.h
1/*
2 * This file is part of libsidplayfp, a SID player engine.
3 *
4 * Copyright 2011-2017 Leandro Nini
5 * Copyright 2007-2010 Antti Lankila
6 * Copyright 2000 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 SIDTUNEINFO_H
24#define SIDTUNEINFO_H
25
26#include <stdint.h>
27
28#include "sidplayfp/siddefs.h"
29
38class SID_EXTERN SidTuneInfo
39{
40public:
41 typedef enum {
42 CLOCK_UNKNOWN,
43 CLOCK_PAL,
44 CLOCK_NTSC,
45 CLOCK_ANY
46 } clock_t;
47
48 typedef enum {
49 SIDMODEL_UNKNOWN,
50 SIDMODEL_6581,
51 SIDMODEL_8580,
52 SIDMODEL_ANY
53 } model_t;
54
55 typedef enum {
59 COMPATIBILITY_BASIC
60 } compatibility_t;
61
62public:
64 static const int SPEED_VBI = 0;
65
67 static const int SPEED_CIA_1A = 60;
68
69public:
73 uint_least16_t loadAddr() const;
74
78 uint_least16_t initAddr() const;
79
83 uint_least16_t playAddr() const;
84
88 unsigned int songs() const;
89
93 unsigned int startSong() const;
94
98 unsigned int currentSong() const;
99
106 uint_least16_t sidChipBase(unsigned int i) const;
107
111 int sidChips() const;
112
116 int songSpeed() const;
117
121 uint_least8_t relocStartPage() const;
122
126 uint_least8_t relocPages() const;
127
132 model_t sidModel(unsigned int i) const;
133
137 compatibility_t compatibility() const;
138
147 unsigned int numberOfInfoStrings() const;
148 const char* infoString(unsigned int i) const;
150
156 unsigned int numberOfCommentStrings() const;
157 const char* commentString(unsigned int i) const;
159
163 uint_least32_t dataFileLen() const;
164
168 uint_least32_t c64dataLen() const;
169
173 clock_t clockSpeed() const;
174
178 const char* formatString() const;
179
183 bool fixLoad() const;
184
188 const char* path() const;
189
193 const char* dataFileName() const;
194
199 const char* infoFileName() const;
200
201private:
202 virtual uint_least16_t getLoadAddr() const =0;
203
204 virtual uint_least16_t getInitAddr() const =0;
205
206 virtual uint_least16_t getPlayAddr() const =0;
207
208 virtual unsigned int getSongs() const =0;
209
210 virtual unsigned int getStartSong() const =0;
211
212 virtual unsigned int getCurrentSong() const =0;
213
214 virtual uint_least16_t getSidChipBase(unsigned int i) const =0;
215
216 virtual int getSidChips() const =0;
217
218 virtual int getSongSpeed() const =0;
219
220 virtual uint_least8_t getRelocStartPage() const =0;
221
222 virtual uint_least8_t getRelocPages() const =0;
223
224 virtual model_t getSidModel(unsigned int i) const =0;
225
226 virtual compatibility_t getCompatibility() const =0;
227
228 virtual unsigned int getNumberOfInfoStrings() const =0;
229 virtual const char* getInfoString(unsigned int i) const =0;
230
231 virtual unsigned int getNumberOfCommentStrings() const =0;
232 virtual const char* getCommentString(unsigned int i) const =0;
233
234 virtual uint_least32_t getDataFileLen() const =0;
235
236 virtual uint_least32_t getC64dataLen() const =0;
237
238 virtual clock_t getClockSpeed() const =0;
239
240 virtual const char* getFormatString() const =0;
241
242 virtual bool getFixLoad() const =0;
243
244 virtual const char* getPath() const =0;
245
246 virtual const char* getDataFileName() const =0;
247
248 virtual const char* getInfoFileName() const =0;
249
250protected:
252};
253
254#endif /* SIDTUNEINFO_H */
Definition SidTuneInfo.h:39
~SidTuneInfo()
Number of comments.
Definition SidTuneInfo.h:251
compatibility_t
Definition SidTuneInfo.h:55
@ COMPATIBILITY_C64
File is C64 compatible.
Definition SidTuneInfo.h:56
@ COMPATIBILITY_R64
File is Real C64 only.
Definition SidTuneInfo.h:58
@ COMPATIBILITY_PSID
File is PSID specific.
Definition SidTuneInfo.h:57