From 531a3bb7e6889bdfe41bfc773be172c8a50da80c Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 31 Oct 2020 20:03:23 -0400 Subject: [PATCH] Ensures RAM is zero-initialised, for now, to aid in repeatable bug finding. --- Machines/Apple/AppleIIgs/AppleIIgs.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index d883c225a..b30ba02f5 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -18,6 +18,8 @@ #include "../../../Components/AppleClock/AppleClock.hpp" #include "../../../Components/DiskII/IWM.hpp" +#include "../../Utility/MemoryFuzzer.hpp" + #include #include @@ -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 ram_; + std::vector ram_{}; std::vector rom_; // MARK: - Other components.