mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-20 06:05:11 +00:00
Adding documentation and implementations for Ram, VRam, SRam
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user