2023-08-28 21:55:46 +02:00
|
|
|
#pragma once
|
2023-08-30 22:34:45 +02:00
|
|
|
#include <memory/device.h>
|
2023-08-28 21:55:46 +02:00
|
|
|
|
2023-08-30 00:08:05 +02:00
|
|
|
class BootRom : public Mem_device
|
2023-08-28 21:55:46 +02:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
Mem_device* lowmem;
|
|
|
|
Mem_device* highmem;
|
|
|
|
|
|
|
|
Mem_device* backend;
|
|
|
|
|
2023-08-30 00:08:05 +02:00
|
|
|
Range lowrange;
|
|
|
|
Range highrange;
|
2023-08-28 21:55:46 +02:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2023-08-30 00:08:05 +02:00
|
|
|
};
|