2023-08-26 19:04:02 +02:00
|
|
|
#pragma once
|
|
|
|
|
2023-08-30 22:34:45 +02:00
|
|
|
#include <memory/device.h>
|
2023-08-26 19:04:02 +02:00
|
|
|
|
|
|
|
class RAM : public Mem_device {
|
|
|
|
private:
|
|
|
|
u8* memory;
|
|
|
|
u16 size;
|
|
|
|
bool readonly;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RAM(u16 size);
|
|
|
|
RAM(u8* memory, u16 size, bool readonly = false);
|
|
|
|
|
|
|
|
virtual void write8(u16 addr, u8 data);
|
|
|
|
virtual u8 read8(u16 addr);
|
|
|
|
};
|