mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-26 07:33:08 +00:00
Correct the hex loader, using the new mapping mechanism.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
fe3794e011
commit
2d93087e5f
@ -31,10 +31,9 @@ void EightBit::Bus::loadHexFile(const std::string path) {
|
||||
for (const auto& chunk : chunks) {
|
||||
const auto address = chunk.first;
|
||||
const auto content = chunk.second;
|
||||
for (size_t i = 0; i != content.size(); ++i)
|
||||
write((uint16_t)(address + i), content[i]);
|
||||
const auto mapped = mapping(address);
|
||||
mapped.memory.load(content, address - mapped.begin);
|
||||
const uint16_t offset = address - mapped.begin;
|
||||
mapped.memory.load(content, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user