17 lines
280 B
C++
17 lines
280 B
C++
#pragma once
|
|
|
|
#include <memory/device.h>
|
|
|
|
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);
|
|
};
|