1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 02:55:07 +00:00

Ensures RAM is zero-initialised, for now, to aid in repeatable bug finding.

This commit is contained in:
Thomas Harte 2020-10-31 20:03:23 -04:00
parent 1b28d929e4
commit 531a3bb7e6

View File

@ -18,6 +18,8 @@
#include "../../../Components/AppleClock/AppleClock.hpp"
#include "../../../Components/DiskII/IWM.hpp"
#include "../../Utility/MemoryFuzzer.hpp"
#include <cassert>
#include <array>
@ -74,6 +76,9 @@ class ConcreteMachine:
memory_.set_storage(ram_, rom_);
// TODO: enable once machine is otherwise sane.
// Memory::Fuzz(ram_);
// Sync up initial values.
memory_.set_speed_register(speed_register_);
}
@ -104,7 +109,7 @@ class ConcreteMachine:
// New video register.
case 0xc029:
if(is_read) {
*value = 0;
*value = 0x01;
} else {
printf("New video: %02x\n", *value);
// TODO: this bit should affect memory bank selection, somehow?
@ -238,7 +243,6 @@ class ConcreteMachine:
);
} else printf("\n");
Cycles duration = Cycles(5);
// TODO: determine the cost of this access.
@ -266,7 +270,7 @@ class ConcreteMachine:
// MARK: - Memory storage.
std::vector<uint8_t> ram_;
std::vector<uint8_t> ram_{};
std::vector<uint8_t> rom_;
// MARK: - Other components.