memory settings fixes (16b versus 8b)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Some checks are pending
CodeQL / Analyze (push) Waiting to run
This commit is contained in:
parent
323008a1b0
commit
1bd06643b5
1 changed files with 4 additions and 3 deletions
7
main.cpp
7
main.cpp
|
@ -65,8 +65,9 @@ std::vector<std::pair<uint32_t, uint8_t> > get_memory_settings(const JsonArrayCo
|
||||||
for(const auto & kv: kv_dict.as<JsonObjectConst>()) {
|
for(const auto & kv: kv_dict.as<JsonObjectConst>()) {
|
||||||
uint32_t a = std::stoi(kv.key().c_str(), nullptr, 8);
|
uint32_t a = std::stoi(kv.key().c_str(), nullptr, 8);
|
||||||
uint16_t v = kv.value().as<int>();
|
uint16_t v = kv.value().as<int>();
|
||||||
out.push_back({ a, v & 255 });
|
out.push_back({ a, v });
|
||||||
out.push_back({ a + 1, v >> 8 });
|
if (a == 0 && v == 0)
|
||||||
|
printf("Suspect\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
|
@ -140,7 +141,7 @@ int run_cpu_validation(console *const cnsl, const std::string & filename)
|
||||||
auto memory_before = before["memory"];
|
auto memory_before = before["memory"];
|
||||||
auto memory_before_settings = get_memory_settings(memory_before);
|
auto memory_before_settings = get_memory_settings(memory_before);
|
||||||
for(auto & element: memory_before_settings)
|
for(auto & element: memory_before_settings)
|
||||||
b->write_physical(element.first, element.second);
|
b->write_unibus_byte(element.first, element.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cur_n_errors = 0;
|
int cur_n_errors = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue