libsidplayfp  2.0.2
sidmemory.h
1 /*
2  * This file is part of libsidplayfp, a SID player engine.
3  *
4  * Copyright 2012-2013 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 SIDMEMORY_H
22 #define SIDMEMORY_H
23 
24 #include <stdint.h>
25 
26 namespace libsidplayfp
27 {
28 
33 class sidmemory
34 {
35 public:
41  virtual uint8_t readMemByte(uint_least16_t addr) =0;
42 
48  virtual uint_least16_t readMemWord(uint_least16_t addr) =0;
49 
56  virtual void writeMemByte(uint_least16_t addr, uint8_t value) =0;
57 
64  virtual void writeMemWord(uint_least16_t addr, uint_least16_t value) =0;
65 
73  virtual void fillRam(uint_least16_t start, uint8_t value, unsigned int size) =0;
74 
82  virtual void fillRam(uint_least16_t start, const uint8_t* source, unsigned int size) =0;
83 
89  virtual void installResetHook(uint_least16_t addr) =0;
90 
96  virtual void installBasicTrap(uint_least16_t addr) =0;
97 
103  virtual void setBasicSubtune(uint8_t tune) =0;
104 
105 protected:
106  ~sidmemory() {}
107 };
108 
109 }
110 
111 #endif
libsidplayfp::sidmemory::fillRam
virtual void fillRam(uint_least16_t start, const uint8_t *source, unsigned int size)=0
libsidplayfp::sidmemory::setBasicSubtune
virtual void setBasicSubtune(uint8_t tune)=0
libsidplayfp::sidmemory
Definition: sidmemory.h:34
libsidplayfp::sidmemory::writeMemByte
virtual void writeMemByte(uint_least16_t addr, uint8_t value)=0
libsidplayfp::sidmemory::installResetHook
virtual void installResetHook(uint_least16_t addr)=0
libsidplayfp::sidmemory::fillRam
virtual void fillRam(uint_least16_t start, uint8_t value, unsigned int size)=0
libsidplayfp::sidmemory::writeMemWord
virtual void writeMemWord(uint_least16_t addr, uint_least16_t value)=0
libsidplayfp::sidmemory::readMemByte
virtual uint8_t readMemByte(uint_least16_t addr)=0
libsidplayfp::sidmemory::readMemWord
virtual uint_least16_t readMemWord(uint_least16_t addr)=0
libsidplayfp::sidmemory::installBasicTrap
virtual void installBasicTrap(uint_least16_t addr)=0