Emu?
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
553 B

/* PlipMemoryRom.cpp
*
* A read-only memory implementation.
*/
#include <cstring>
#include "PlipMemoryRom.h"
namespace Plip {
PlipMemoryRom::PlipMemoryRom(void *data, uint32_t length) {
m_length = length;
m_data = new uint8_t[m_length];
std::memcpy(m_data, data, m_length);
}
PlipMemoryRom::~PlipMemoryRom() {
delete m_data;
}
uint8_t PlipMemoryRom::GetByte(uint32_t address) {
return m_data[address];
}
uint32_t PlipMemoryRom::GetLength() {
return m_length;
}
}