mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Ensures a consistent initial state.
This commit is contained in:
parent
d5f209366a
commit
d35def4bbc
@ -27,6 +27,11 @@ namespace {
|
|||||||
_ram.resize((128 + 8 * 1024) * 1024);
|
_ram.resize((128 + 8 * 1024) * 1024);
|
||||||
_rom.resize(256 * 1024);
|
_rom.resize(256 * 1024);
|
||||||
_memoryMap.set_storage(_ram, _rom);
|
_memoryMap.set_storage(_ram, _rom);
|
||||||
|
|
||||||
|
// If this isn't the first test run, RAM and ROM may have old values.
|
||||||
|
// Initialise to a known state.
|
||||||
|
memset(_ram.data(), 0, _ram.size());
|
||||||
|
memset(_rom.data(), 0, _rom.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)write:(uint8_t)value address:(uint32_t)address {
|
- (void)write:(uint8_t)value address:(uint32_t)address {
|
||||||
|
Loading…
Reference in New Issue
Block a user