libsidplayfp 2.3.1
psiddrv.h
1/*
2 * This file is part of libsidplayfp, a SID player engine.
3 *
4 * Copyright 2012-2015 Leandro Nini <drfiemost@users.sourceforge.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef PSIDDRV_H
22#define PSIDDRV_H
23
24#include <stdint.h>
25
26class SidTuneInfo;
27
28namespace libsidplayfp
29{
30
31class sidmemory;
32
34{
35private:
36 const SidTuneInfo *m_tuneInfo;
37 const char *m_errorString;
38
39 uint8_t *reloc_driver;
40 int reloc_size;
41
42 uint_least16_t m_driverAddr;
43 uint_least16_t m_driverLength;
44
45 uint_least16_t m_powerOnDelay;
46
47private:
54 uint8_t iomap(uint_least16_t addr) const;
55
56public:
57 psiddrv(const SidTuneInfo *tuneInfo) :
58 m_tuneInfo(tuneInfo),
59 m_powerOnDelay(0) {}
60
66 void powerOnDelay(uint_least16_t delay) { m_powerOnDelay = delay; }
67
73 bool drvReloc();
74
82 void install(sidmemory& mem, uint8_t video) const;
83
89 const char* errorString() const { return m_errorString; }
90
91 uint_least16_t driverAddr() const { return m_driverAddr; }
92 uint_least16_t driverLength() const { return m_driverLength; }
93};
94
95}
96
97#endif
Definition: SidTuneInfo.h:39
Definition: psiddrv.h:34
void powerOnDelay(uint_least16_t delay)
Definition: psiddrv.h:66
void install(sidmemory &mem, uint8_t video) const
Definition: psiddrv.cpp:210
bool drvReloc()
Definition: psiddrv.cpp:138
const char * errorString() const
Definition: psiddrv.h:89
Definition: sidmemory.h:34