libsidplayfp 1.0.3
c64cpu.h
00001 /*
00002  * This file is part of libsidplayfp, a SID player engine.
00003  *
00004  *  Copyright (C) 2012 Leandro Nini
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 #ifndef C64CPU_H
00022 #define C64CPU_H
00023 
00024 #include "sidplayfp/c64/c64env.h"
00025 #include "CPU/mos6510.h"
00026 
00027 #ifdef HAVE_CONFIG_H
00028 #  include "config.h"
00029 #endif
00030 
00031 class c64cpu: public MOS6510
00032 {
00033 private:
00034     c64env &m_env;
00035 
00036 public:
00037     c64cpu (c64env *env) :
00038         MOS6510(&(env->context ())),
00039         m_env(*env) {}
00040 
00041     uint8_t cpuRead(uint_least16_t addr) { return m_env.cpuRead (addr); }
00042     void cpuWrite(uint_least16_t addr, uint8_t data) { m_env.cpuWrite (addr, data); }
00043 
00044 #ifdef PC64_TESTSUITE
00045     void loadFile(const char *file) { m_env.loadFile (file); }
00046 #endif
00047 };
00048 
00049 #endif // C64CPU_H
00050