libsidplayfp 2.15.0
sidmemory.h
1/*
2 * This file is part of libsidplayfp, a SID player engine.
3 *
4 * Copyright 2012-2021 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
26namespace libsidplayfp
27{
28
34{
35public:
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
111 virtual void setKernal(const uint8_t* rom) =0;
112 virtual void setBasic(const uint8_t* rom) =0;
113 virtual void setChargen(const uint8_t* rom) =0;
115
116protected:
117 ~sidmemory() = default;
118};
119
120}
121
122#endif
Definition sidmemory.h:34
virtual void installResetHook(uint_least16_t addr)=0
virtual void fillRam(uint_least16_t start, uint8_t value, unsigned int size)=0
virtual void setBasicSubtune(uint8_t tune)=0
virtual void fillRam(uint_least16_t start, const uint8_t *source, unsigned int size)=0
virtual void setKernal(const uint8_t *rom)=0
virtual uint_least16_t readMemWord(uint_least16_t addr)=0
virtual uint8_t readMemByte(uint_least16_t addr)=0
virtual void writeMemWord(uint_least16_t addr, uint_least16_t value)=0
virtual void writeMemByte(uint_least16_t addr, uint8_t value)=0
virtual void installBasicTrap(uint_least16_t addr)=0