libsidplayfp  1.8.7
c64sid.h
1 /*
2  * This file is part of libsidplayfp, a SID player engine.
3  *
4  * Copyright 2013-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 C64SID_H
22 #define C64SID_H
23 
24 #include "component.h"
25 #include "Banks/Bank.h"
26 
27 #include <stdint.h>
28 
32 class c64sid : public Bank, public component
33 {
34 protected:
35  virtual ~c64sid() {}
36 
37 public:
38  virtual void reset(uint8_t volume) = 0;
39 
40  void reset() { reset(0); }
41 
42  // Bank functions
43  void poke(uint_least16_t address, uint8_t value) { write(address & 0x1f, value); }
44  uint8_t peek(uint_least16_t address) { return read(address & 0x1f); }
45 };
46 
47 #endif // C64SID_H
uint8_t peek(uint_least16_t address)
Definition: c64sid.h:44
Definition: c64sid.h:32
Definition: component.h:28
void poke(uint_least16_t address, uint8_t value)
Definition: c64sid.h:43
Definition: Bank.h:32