From 189e139354e313f02a688513bc2705a5c89c9773 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 18 Jul 2023 16:10:36 -0400 Subject: c64_nl10: Identify and add CPU --- src/devices/bus/cbmiec/c64_nl10.cpp | 26 ++++++++++++++++++++++++++ src/devices/bus/cbmiec/c64_nl10.h | 8 +++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/devices/bus/cbmiec/c64_nl10.cpp b/src/devices/bus/cbmiec/c64_nl10.cpp index d4ed3467016..774dce1a18b 100644 --- a/src/devices/bus/cbmiec/c64_nl10.cpp +++ b/src/devices/bus/cbmiec/c64_nl10.cpp @@ -9,6 +9,8 @@ #include "emu.h" #include "c64_nl10.h" +#include "cpu/m6800/m6801.h" + //************************************************************************** @@ -54,6 +56,30 @@ c64_nl10_interface_device::c64_nl10_interface_device(const machine_config &mconf } +//------------------------------------------------- +// mem_map - CPU memory map +//------------------------------------------------- + +void c64_nl10_interface_device::mem_map(address_map &map) +{ + map(0x0000, 0x0027).m("bufcpu", FUNC(hd6303y_cpu_device::hd6301y_io)); // TODO: internalize this + map(0x0040, 0x013f).ram(); // TODO: internalize this + map(0x6000, 0x7fff).ram(); + map(0x8000, 0xffff).rom().region("rom", 0); +} + + +//------------------------------------------------- +// device_add_mconfig - machine configuration +//------------------------------------------------- + +void c64_nl10_interface_device::device_add_mconfig(machine_config &config) +{ + hd6303y_cpu_device &bufcpu(HD6303Y(config, "bufcpu", 8'000'000)); + bufcpu.set_addrmap(AS_PROGRAM, &c64_nl10_interface_device::mem_map); +} + + //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- diff --git a/src/devices/bus/cbmiec/c64_nl10.h b/src/devices/bus/cbmiec/c64_nl10.h index 68f9f135c91..a45322e3f53 100644 --- a/src/devices/bus/cbmiec/c64_nl10.h +++ b/src/devices/bus/cbmiec/c64_nl10.h @@ -27,11 +27,10 @@ public: // construction/destruction c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; - protected: // device-level overrides + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; virtual void device_reset() override; @@ -39,6 +38,9 @@ protected: void cbm_iec_atn(int state) override; void cbm_iec_data(int state) override; void cbm_iec_reset(int state) override; + +private: + void mem_map(address_map &map); }; -- cgit v1.2.3