/* `Deep Thought', a softcore CPU implemented on a FPGA Copyright (C) 2010 Markus Hofstaetter Copyright (C) 2010 Martin Perner Copyright (C) 2010 Stefan Rebernig Copyright (C) 2010 Manfred Schwarz Copyright (C) 2010 Bernhard Urban This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "../iext.hpp" class Cprog : public Iext { public: Cprog() : m_writeAddress(0) {}; void applyTick() {}; void loadData(const int address, CDat value); CDat readData(const int) { return 0; } void parseInput(const vector&) {}; private: int m_writeAddress; }; void Cprog::loadData(const int address, CDat value) { if(address == 0x2034) { m_writeAddress = (value*4); //adress pointer } else if(address == 0x2038) { this->m_cpu->setProg(m_writeAddress, m_disasm->decodeNum(value)); m_writeAddress += 4; //data pointer } }