Adding documentation and implementations for Ram, VRam, SRam

This commit is contained in:
AnonymusRaccoon
2020-01-28 14:04:53 +01:00
parent 8698642636
commit 87ecd6c23d
7 changed files with 111 additions and 4 deletions

View File

@@ -10,10 +10,13 @@ namespace ComSquare
{
std::shared_ptr<IMemory> MemoryBus::getAccessor(uint24_t addr)
{
return *std::find_if(this->_memoryAccessors.begin(), this->_memoryAccessors.end(), [addr](std::shared_ptr<IMemory> &accessor)
auto it = std::find_if(this->_memoryAccessors.begin(), this->_memoryAccessors.end(), [addr](std::shared_ptr<IMemory> &accessor)
{
return accessor->hasMemoryAt(addr);
});
if (it == this->_memoryAccessors.end())
return nullptr;
return *it;
}
uint8_t MemoryBus::read(uint24_t addr)