libsidplayfp  1.8.7
psiddrv.h
1 /*
2  * This file is part of libsidplayfp, a SID player engine.
3  *
4  * Copyright 2012-2014 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 
26 class SidTuneInfo;
27 class sidmemory;
28 
29 class psiddrv
30 {
31 private:
32  const SidTuneInfo *m_tuneInfo;
33  const char *m_errorString;
34 
35  uint8_t *reloc_driver;
36  int reloc_size;
37 
38  uint_least16_t m_driverAddr;
39  uint_least16_t m_driverLength;
40  uint_least16_t m_powerOnDelay;
41 
42 private:
49  uint8_t iomap(uint_least16_t addr) const;
50 
51 public:
52  psiddrv(const SidTuneInfo *tuneInfo) :
53  m_tuneInfo(tuneInfo),
54  m_powerOnDelay(0) {}
55 
61  void powerOnDelay(uint_least16_t delay) { m_powerOnDelay = delay; }
62 
68  bool drvReloc();
69 
77  void install(sidmemory *mem, uint8_t video) const;
78 
84  const char* errorString() const { return m_errorString; }
85 
86  uint_least16_t driverAddr() const { return m_driverAddr; }
87  uint_least16_t driverLength() const { return m_driverLength; }
88 };
89 
90 #endif
bool drvReloc()
Definition: psiddrv.cpp:135
Definition: SidTuneInfo.h:38
void install(sidmemory *mem, uint8_t video) const
Definition: psiddrv.cpp:209
void powerOnDelay(uint_least16_t delay)
Definition: psiddrv.h:61
Definition: psiddrv.h:29
const char * errorString() const
Definition: psiddrv.h:84
Definition: sidmemory.h:30