yabgbe/include/rom.hpp
2021-07-12 05:26:38 +02:00

27 lines
317 B
C++

#pragma once
#include <vector>
#include <memory>
#include "util.hpp"
#include "mbcs/Imbc.hpp"
class Bus;
// Cartridge
class ROM
{
public:
ROM(FILE* f);
BYTE Read(WORD addr);
void Write(WORD addr, BYTE val);
friend class Bus;
private:
Bus* bus;
std::unique_ptr<IMBC> mbc;
std::vector<BYTE> data, ram;
};