/*1* Gearcoleco - ColecoVision Emulator2* Copyright (C) 2021 Ignacio Sanchez34* This program is free software: you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation, either version 3 of the License, or7* any later version.89* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.1314* You should have received a copy of the GNU General Public License15* along with this program. If not, see http://www.gnu.org/licenses/16*17*/1819#ifndef MAPPER_H20#define MAPPER_H2122#include "definitions.h"23#include <iostream>2425class Cartridge;2627class Mapper28{29public:30Mapper(Cartridge* pCartridge) : m_pCartridge(pCartridge) { }31virtual ~Mapper() { }3233virtual void Reset() = 0;34virtual u8 Read(u16 address) = 0;35virtual void Write(u16 address, u8 value) = 0;36virtual void SaveState(std::ostream& stream) = 0;37virtual void LoadState(std::istream& stream) = 0;38virtual u8 GetRomBank() { return 0; }39virtual u32 GetRomBankAddress() { return 0; }40virtual u8 GetBankReg(int) { return 0; }4142protected:43Cartridge* m_pCartridge;44};4546#endif /* MAPPER_H */474849