libsidplayfp  1.8.7
c64cpu.h
1 /*
2  * This file is part of libsidplayfp, a SID player engine.
3  *
4  * Copyright (C) 2012 Leandro Nini
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 C64CPU_H
22 #define C64CPU_H
23 
24 #include "c64/c64env.h"
25 #include "CPU/mos6510.h"
26 
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30 
31 class c64cpu: public MOS6510
32 {
33 private:
34  c64env &m_env;
35 
36 public:
37  c64cpu (c64env *env) :
38  MOS6510(&(env->context ())),
39  m_env(*env) {}
40 
41  uint8_t cpuRead(uint_least16_t addr) { return m_env.cpuRead (addr); }
42  void cpuWrite(uint_least16_t addr, uint8_t data) { m_env.cpuWrite (addr, data); }
43 
44 #ifdef PC64_TESTSUITE
45  void loadFile(const char *file) { m_env.loadFile (file); }
46 #endif
47 };
48 
49 #endif // C64CPU_H
50 
MOS6510(EventContext *context)
Definition: mos6510.cpp:1475
Definition: c64env.h:37
void cpuWrite(uint_least16_t addr, uint8_t data)
Definition: c64cpu.h:42
Definition: mos6510.h:47
uint8_t cpuRead(uint_least16_t addr)
Definition: c64cpu.h:41
Definition: c64cpu.h:31