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 \
memory/bus \
memory/ram \
memory/bootrom_overlay \
cpu/cpu \
cpu/decoder

View file

@ -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()

View file

@ -1,7 +1,7 @@
#pragma once
#include <memory/mem_device.h>
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);
}
};