diff options
author | 2019-03-23 11:55:09 +0000 | |
---|---|---|
committer | 2019-03-23 11:55:09 +0000 | |
commit | 9e122168ef4fdbb9158bc8a4fd0e5e86900496f0 (patch) | |
tree | d3ba3c8087a701574e0bacb8ae9c24fd0d084069 /src/devices/bus/bbc | |
parent | b445d101357be7d62f3dee88d29e66bfc59a5bc3 (diff) |
ns32000: Skeleton CPU device with disassembler for NS32000 family.
bbc: Added preliminary Acorn 32016 2nd Processor, incomplete CPU emulation.
Diffstat (limited to 'src/devices/bus/bbc')
-rw-r--r-- | src/devices/bus/bbc/tube/tube.cpp | 12 | ||||
-rw-r--r-- | src/devices/bus/bbc/tube/tube_32016.cpp | 210 | ||||
-rw-r--r-- | src/devices/bus/bbc/tube/tube_32016.h | 71 |
3 files changed, 288 insertions, 5 deletions
diff --git a/src/devices/bus/bbc/tube/tube.cpp b/src/devices/bus/bbc/tube/tube.cpp index c0ff49915a6..602ea3c845a 100644 --- a/src/devices/bus/bbc/tube/tube.cpp +++ b/src/devices/bus/bbc/tube/tube.cpp @@ -112,6 +112,7 @@ void bbc_tube_slot_device::host_w(offs_t offset, uint8_t data) // slot devices +#include "tube_32016.h" #include "tube_6502.h" #include "tube_80186.h" #include "tube_80286.h" @@ -133,7 +134,7 @@ void bbc_tube_devices(device_slot_interface &device) { device.option_add("6502", BBC_TUBE_6502); /* Acorn ANC01 6502 2nd processor */ device.option_add("z80", BBC_TUBE_Z80); /* Acorn ANC04 Z80 2nd processor */ - //device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */ + device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */ device.option_add("arm", BBC_TUBE_ARM); /* Acorn ANC13 ARM Evaluation System */ device.option_add("80286", BBC_TUBE_80286); /* Acorn 80286 2nd Processor */ //device.option_add("a500", BBC_TUBE_A500); /* Acorn A500 2nd Processor */ @@ -142,8 +143,8 @@ void bbc_tube_devices(device_slot_interface &device) //device.option_add("hdp68k", BBC_TUBE_HDP68K); /* Torch Unicorn (HDP68K) */ //device.option_add("x25", BBC_TUBE_X25); /* Econet X25 Gateway */ device.option_add("zep100", BBC_TUBE_ZEP100); /* Torch Z80 Communicator (ZEP100) (Torch) */ - //device.option_add("zep100l", BBC_TUBE_ZEP100L); /* Torch Z80 Communicator (ZEP100) (Acorn 8271) */ - //device.option_add("zep100w", BBC_TUBE_ZEP100W); /* Torch Z80 Communicator (ZEP100) (Acorn 1770) */ + //device.option_add("zep100l", BBC_TUBE_ZEP100L); /* Torch Z80 Communicator (ZEP100) (Model B) */ + //device.option_add("zep100w", BBC_TUBE_ZEP100W); /* Torch Z80 Communicator (ZEP100) (Model B+) */ /* Acorn ANC21 Universal 2nd Processor Unit */ device.option_add("65c102", BBC_TUBE_65C102); /* Acorn ADC06 65C102 co-processor */ device.option_add("80186", BBC_TUBE_80186); /* Acorn ADC08 80186 co-processor */ @@ -160,11 +161,12 @@ void bbc_extube_devices(device_slot_interface &device) { device.option_add("6502", BBC_TUBE_6502); /* Acorn ANC01 6502 2nd processor */ device.option_add("z80", BBC_TUBE_Z80); /* Acorn ANC04 Z80 2nd processor */ - //device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */ + device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */ device.option_add("arm", BBC_TUBE_ARM); /* Acorn ANC13 ARM Evaluation System */ device.option_add("80286", BBC_TUBE_80286); /* Acorn 80286 2nd Processor */ //device.option_add("a500", BBC_TUBE_A500); /* Acorn A500 2nd Processor */ //device.option_add("pmsb2p", BBC_TUBE_PMSB2P); /* PMS B2P-6502 */ + //device.option_add("zep100m", BBC_TUBE_ZEP100M); /* Torch Z80 Communicator (ZEP100) (Master) */ /* Acorn ANC21 Universal 2nd Processor Unit */ device.option_add("65c102", BBC_TUBE_65C102); /* Acorn ADC06 65C102 co-processor */ device.option_add("80186", BBC_TUBE_80186); /* Acorn ADC08 80186 co-processor */ @@ -181,7 +183,6 @@ void bbc_intube_devices(device_slot_interface &device) { device.option_add("65c102", BBC_TUBE_65C102); /* Acorn ADC06 65C102 co-processor */ device.option_add("80186", BBC_TUBE_80186); /* Acorn ADC08 80186 co-processor */ - //device.option_add("zep100m", BBC_TUBE_ZEP100M); /* Torch Z80 Communicator (ZEP100) (Master) */ //device.option_add("arm7", BBC_TUBE_ARM7); /* Sprow ARM7 co-processor */ device.option_add("rc6502", BBC_TUBE_RC6502); /* ReCo6502 (6502) */ device.option_add("rc65816", BBC_TUBE_RC65816); /* ReCo6502 (65816) */ @@ -196,6 +197,7 @@ void electron_tube_devices(device_slot_interface &device) { device.option_add("6502", BBC_TUBE_6502); /* Acorn ANC01 6502 2nd processor */ device.option_add("z80", BBC_TUBE_Z80); /* Acorn ANC04 Z80 2nd processor */ + device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */ device.option_add("arm", BBC_TUBE_ARM); /* Acorn ANC13 ARM Evaluation System */ device.option_add("65c102", BBC_TUBE_65C102); /* Acorn ADC06 65C102 co-processor */ device.option_add("80186", BBC_TUBE_80186); /* Acorn ADC08 80186 co-processor */ diff --git a/src/devices/bus/bbc/tube/tube_32016.cpp b/src/devices/bus/bbc/tube/tube_32016.cpp new file mode 100644 index 00000000000..7b6ac355e42 --- /dev/null +++ b/src/devices/bus/bbc/tube/tube_32016.cpp @@ -0,0 +1,210 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn ANC05 32016 2nd processor + + http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Acorn_ANC05_320162ndproc.html + + Acorn ANC06 Cambridge Co-Processor + + http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Acorn_ANC06_CamCoPro.html + + IC1 (ULA) TUBE + IC2 (MMU) NS32082 Not fitted + IC3 (CPU) NS32016 + IC4 (TCU) NS32201 + IC20 (FPU) NS32081 + +**********************************************************************/ + + +#include "emu.h" +#include "tube_32016.h" +#include "softlist_dev.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE(BBC_TUBE_32016, bbc_tube_32016_device, "bbc_tube_32016", "Acorn 32016 2nd processor") + + +//------------------------------------------------- +// ADDRESS_MAP( tube_32016_mem ) +//------------------------------------------------- + +void bbc_tube_32016_device::tube_32016_mem(address_map &map) +{ + map(0x000000, 0xffffff).rw(FUNC(bbc_tube_32016_device::read), FUNC(bbc_tube_32016_device::write)); + map(0xf90000, 0xf90001).portr("CONFIG"); + map(0xfffff0, 0xffffff).rw("ula", FUNC(tube_device::parasite_r), FUNC(tube_device::parasite_w)).umask32(0x00ff); +} + +//------------------------------------------------- +// ROM( tube_32016 ) +//------------------------------------------------- + +ROM_START(tube_32016) + ROM_REGION(0x8000, "rom", 0) + ROM_DEFAULT_BIOS("200") + ROM_SYSTEM_BIOS(0, "200", "Pandora v2.00") + ROMX_LOAD("pan200lo.rom", 0x0000, 0x4000, CRC(b1980fd0) SHA1(8084f8896cd22953abefbd43c51e1a422b30e28d), ROM_SKIP(1) | ROM_BIOS(0)) // 0201-764-02 Pandora Lo + ROMX_LOAD("pan200hi.rom", 0x0001, 0x4000, CRC(cab98d6b) SHA1(dfad1f4180c50757a74fcfe3a0ee7d7b48eb1bee), ROM_SKIP(1) | ROM_BIOS(0)) // 0201-763-02 Pandora Hi + ROM_SYSTEM_BIOS(1, "100", "Pandora v1.00") + ROMX_LOAD("pan100.rom", 0x0000, 0x8000, BAD_DUMP CRC(75333006) SHA1(996cd120103039390c9b979b16c327bb95da72e4), ROM_BIOS(1)) // 0201-763-01, 0201-764-01 Pandora + ROM_SYSTEM_BIOS(2, "061", "Pandora v0.61") + ROMX_LOAD("pan061lo.rom", 0x0000, 0x4000, CRC(6f801b35) SHA1(ce31f7c10603f3d15a06a8e32bde40df0639e446), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD("pan061hi.rom", 0x0001, 0x4000, CRC(c00b1ab0) SHA1(e6a705232278c518340ddc69ea51af91965fa332), ROM_SKIP(1) | ROM_BIOS(2)) +ROM_END + +//------------------------------------------------- +// INPUT_PORTS( tube_32016 ) +//------------------------------------------------- + +static INPUT_PORTS_START(tube_32016) + PORT_START("CONFIG") + PORT_DIPNAME(0x80, 0x80, "H") PORT_DIPLOCATION("LKS:1") + PORT_DIPSETTING(0x80, "FPU") + PORT_DIPSETTING(0x00, "No FPU") + + PORT_DIPNAME(0x40, 0x00, "G") PORT_DIPLOCATION("LKS:2") + PORT_DIPSETTING(0x40, "MMU") + PORT_DIPSETTING(0x00, "No MMU") + + PORT_DIPNAME(0x20, 0x00, "F") PORT_DIPLOCATION("LKS:3") + PORT_DIPSETTING(0x20, "Reserved") + PORT_DIPSETTING(0x00, "Reserved") + + PORT_DIPNAME(0x10, 0x00, "E") PORT_DIPLOCATION("LKS:4") + PORT_DIPSETTING(0x10, "Reserved") + PORT_DIPSETTING(0x00, "Reserved") + + PORT_DIPNAME(0x08, 0x00, "D") PORT_DIPLOCATION("LKS:5") + PORT_DIPSETTING(0x08, "Reserved") + PORT_DIPSETTING(0x00, "Reserved") + + PORT_DIPNAME(0x04, 0x00, "C") PORT_DIPLOCATION("LKS:6") + PORT_DIPSETTING(0x04, "Reserved") + PORT_DIPSETTING(0x00, "Reserved") + + PORT_DIPNAME(0x02, 0x00, "B") PORT_DIPLOCATION("LKS:7") + PORT_DIPSETTING(0x02, "Reserved") + PORT_DIPSETTING(0x00, "Reserved") + + PORT_DIPNAME(0x01, 0x00, "A") PORT_DIPLOCATION("LKS:8") + PORT_DIPSETTING(0x01, "Reserved") + PORT_DIPSETTING(0x00, "Reserved") +INPUT_PORTS_END + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void bbc_tube_32016_device::device_add_mconfig(machine_config &config) +{ + NS32016(config, m_maincpu, 12_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &bbc_tube_32016_device::tube_32016_mem); + + TUBE(config, m_ula); + m_ula->pnmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); + m_ula->pirq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + + /* internal ram */ + RAM(config, m_ram).set_default_size("1M").set_default_value(0); + + /* software lists */ + SOFTWARE_LIST(config, "flop_ls_32016").set_original("bbc_flop_32016"); +} + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const tiny_rom_entry *bbc_tube_32016_device::device_rom_region() const +{ + return ROM_NAME( tube_32016 ); +} + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor bbc_tube_32016_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( tube_32016 ); +} + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// bbc_tube_32016_device - constructor +//------------------------------------------------- + +bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, BBC_TUBE_32016, tag, owner, clock) + , device_bbc_tube_interface(mconfig, *this) + , m_maincpu(*this, "maincpu") + , m_ula(*this, "ula") + , m_ram(*this, "ram") + , m_rom(*this, "rom") + , m_rom_enabled(true) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void bbc_tube_32016_device::device_start() +{ +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void bbc_tube_32016_device::device_reset() +{ + m_rom_enabled = true; +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +uint8_t bbc_tube_32016_device::host_r(offs_t offset) +{ + return m_ula->host_r(offset); +} + +void bbc_tube_32016_device::host_w(offs_t offset, uint8_t data) +{ + m_ula->host_w(offset, data); +} + + +READ8_MEMBER(bbc_tube_32016_device::read) +{ + uint16_t data = 0xffff; + + if (m_rom_enabled) + data = m_rom->base()[offset & 0x3fff]; + else if (offset < m_ram->size()) + data = m_ram->pointer()[offset]; + + return data; +} + +WRITE8_MEMBER(bbc_tube_32016_device::write) +{ + /* clear ROM select on first write */ + if (!machine().side_effects_disabled()) m_rom_enabled = false; + + if (offset < m_ram->size()) + m_ram->pointer()[offset] = data; +} diff --git a/src/devices/bus/bbc/tube/tube_32016.h b/src/devices/bus/bbc/tube/tube_32016.h new file mode 100644 index 00000000000..864b8173703 --- /dev/null +++ b/src/devices/bus/bbc/tube/tube_32016.h @@ -0,0 +1,71 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Acorn ANC05 32016 2nd processor + + http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Acorn_ANC05_320162ndproc.html + + Acorn ANC06 Cambridge Co-Processor + + http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Acorn_ANC06_CamCoPro.html + +**********************************************************************/ + + +#ifndef MAME_BUS_BBC_TUBE_32016_H +#define MAME_BUS_BBC_TUBE_32016_H + +#include "tube.h" +#include "cpu/ns32000/ns32000.h" +#include "machine/ram.h" +#include "machine/tube.h" + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> bbc_tube_32016_device + +class bbc_tube_32016_device : + public device_t, + public device_bbc_tube_interface +{ +public: + // construction/destruction + bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual ioport_constructor device_input_ports() const override; + + virtual uint8_t host_r(offs_t offset) override; + virtual void host_w(offs_t offset, uint8_t data) override; + +private: + required_device<ns32016_cpu_device> m_maincpu; + required_device<tube_device> m_ula; + required_device<ram_device> m_ram; + required_memory_region m_rom; + + DECLARE_READ8_MEMBER(read); + DECLARE_WRITE8_MEMBER(write); + + void tube_32016_mem(address_map &map); + + bool m_rom_enabled; +}; + + + +// device type definition +DECLARE_DEVICE_TYPE(BBC_TUBE_32016, bbc_tube_32016_device) + + +#endif /* MAME_BUS_BBC_TUBE_32016_H */ |