memory - Fix bootrom_overlay

This commit is contained in:
madmaurice 2023-08-30 00:08:05 +02:00
parent 45015b68fe
commit fe825e4f52
3 changed files with 7 additions and 5 deletions

View file

@ -1,6 +1,7 @@
modules := memory/mem_device \ modules := memory/mem_device \
memory/bus \ memory/bus \
memory/ram \ memory/ram \
memory/bootrom_overlay \
cpu/cpu \ cpu/cpu \
cpu/decoder cpu/decoder

View file

@ -1,7 +1,8 @@
#include "memory/bootrom_overlay.h" #include "memory/bootrom_overlay.h"
BootRom::BootRom(Mem_device* lowmem, Mem_device* highmem, Mem_device* backend) 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() void BootRom::enable()

View file

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <memory/mem_device.h> #include <memory/mem_device.h>
class BootRom : Mem_device class BootRom : public Mem_device
{ {
private: private:
Mem_device* lowmem; Mem_device* lowmem;
@ -9,8 +9,8 @@ private:
Mem_device* backend; Mem_device* backend;
const Range lowrange(0x0000, 0x00FF); Range lowrange;
const Range highrange(0x0200, 0x08FF); Range highrange;
bool enabled; bool enabled;
public: public:
@ -25,4 +25,4 @@ public:
virtual void write16(u16 addr, u16 data); virtual void write16(u16 addr, u16 data);
virtual u16 read16(u16 addr); virtual u16 read16(u16 addr);
} };