From be738f965261dbb5f526a974f8903c416cfccfe8 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Sun, 20 Mar 2022 22:51:45 +0100 Subject: [PATCH] cleanup --- bus.cpp | 2 +- bus.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bus.cpp b/bus.cpp index 448bc51..2fec7b4 100644 --- a/bus.cpp +++ b/bus.cpp @@ -18,7 +18,7 @@ constexpr int n_pages = 12; constexpr int n_pages = 16; #endif -bus::bus() : c(nullptr), tm11(nullptr), rk05_(nullptr), rx02_(nullptr), tty_(nullptr) +bus::bus() { m = new memory(n_pages * 8192); diff --git a/bus.h b/bus.h index 4051e78..0c7c25c 100644 --- a/bus.h +++ b/bus.h @@ -21,15 +21,15 @@ typedef struct class bus { private: - cpu *c { nullptr }; - tm_11 *tm11 { nullptr }; - rk05 *rk05_ { nullptr }; - rx02 *rx02_ { nullptr }; - tty *tty_ { nullptr }; + cpu *c { nullptr }; + tm_11 *tm11 { nullptr }; + rk05 *rk05_ { nullptr }; + rx02 *rx02_ { nullptr }; + tty *tty_ { nullptr }; - memory *m { nullptr }; + memory *m { nullptr }; - page_t pages[16]; + page_t pages[16] { 0 }; uint16_t MMR2 { 0 }, MMR3 { 0 }, CPUERR { 0 }, PIR { 0 }, CSR { 0 };