vgbc/memory/bank.h

24 lines
370 B
C
Raw Normal View History

2023-08-31 00:28:40 +02:00
#pragma once
#include <memory/device.h>
#include <map>
class Bank : public Mem_device {
private:
Mem_device* current_bank;
std::map<u8, Mem_device*> banks;
public:
Bank();
void addBank(u8 idx, Mem_device* dev);
void setBank(u8 bank);
void write8(u16 addr, u8 data);
u8 read8(u16 addr);
void write16(u16 addr, u16 data);
u16 read16(u16 addr);
};