From fe825e4f52ca154e87cc09861da3c32a3ae36dae Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Wed, 30 Aug 2023 00:08:05 +0200 Subject: [PATCH] memory - Fix bootrom_overlay --- Makeconf | 1 + memory/bootrom_overlay.cpp | 3 ++- memory/bootrom_overlay.h | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makeconf b/Makeconf index 08a2572..96de62c 100644 --- a/Makeconf +++ b/Makeconf @@ -1,6 +1,7 @@ modules := memory/mem_device \ memory/bus \ memory/ram \ + memory/bootrom_overlay \ cpu/cpu \ cpu/decoder diff --git a/memory/bootrom_overlay.cpp b/memory/bootrom_overlay.cpp index bbcfdb1..4cf74e9 100644 --- a/memory/bootrom_overlay.cpp +++ b/memory/bootrom_overlay.cpp @@ -1,7 +1,8 @@ #include "memory/bootrom_overlay.h" BootRom::BootRom(Mem_device* lowmem, Mem_device* highmem, Mem_device* backend) - : lowmem(lowmem), highmem(highmem), backend(backend), enabled(true) + : lowmem(lowmem), highmem(highmem), backend(backend), enabled(true), + lowrange(0x0000, 0x00FF), highrange(0x0200, 0x08FF) {} void BootRom::enable() diff --git a/memory/bootrom_overlay.h b/memory/bootrom_overlay.h index c5439dd..f1e5460 100644 --- a/memory/bootrom_overlay.h +++ b/memory/bootrom_overlay.h @@ -1,7 +1,7 @@ #pragma once #include -class BootRom : Mem_device +class BootRom : public Mem_device { private: Mem_device* lowmem; @@ -9,8 +9,8 @@ private: Mem_device* backend; - const Range lowrange(0x0000, 0x00FF); - const Range highrange(0x0200, 0x08FF); + Range lowrange; + Range highrange; bool enabled; public: @@ -25,4 +25,4 @@ public: virtual void write16(u16 addr, u16 data); virtual u16 read16(u16 addr); -} +};