vgbc/memory/bootrom_overlay.h

28 lines
521 B
C++

#pragma once
#include <memory/mem_device.h>
class BootRom : Mem_device
{
private:
Mem_device* lowmem;
Mem_device* highmem;
Mem_device* backend;
const Range lowrange(0x0000, 0x00FF);
const Range highrange(0x0200, 0x08FF);
bool enabled;
public:
BootRom(Mem_device* lowmem, Mem_device* highmem, Mem_device* backend);
void enable();
void disable();
virtual void write8(u16 addr, u8 data);
virtual u8 read8(u16 addr);
virtual void write16(u16 addr, u16 data);
virtual u16 read16(u16 addr);
}