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
587 B

/* PlipMemoryRam.cpp
*
* A random access memory implementation.
*/
#include "PlipMemoryRam.h"
namespace Plip {
PlipMemoryRam::PlipMemoryRam(uint32_t amount) {
m_data = new uint8_t[amount] {};
m_length = amount;
}
PlipMemoryRam::~PlipMemoryRam() {
delete m_data;
}
uint8_t PlipMemoryRam::GetByte(uint32_t address) {
return m_data[address];
}
uint32_t PlipMemoryRam::GetLength() {
return m_length;
}
void PlipMemoryRam::SetByte(uint32_t address, uint8_t value) {
m_data[address] = value;
}
}