diff options
author | Nigel Barnes <Pernod70@users.noreply.github.com> | 2020-07-13 14:13:46 +0100 |
---|---|---|
committer | Nigel Barnes <Pernod70@users.noreply.github.com> | 2020-07-13 14:34:33 +0100 |
commit | c99f9471305b1fc05134ab94838908b0dc1f4fb0 (patch) | |
tree | 31dfdb584745f77393d93847524ae0c11640c150 /src/devices/bus | |
parent | e1b0a04f72c6c333d2f546688ae30dceb2d0209a (diff) |
bus/bbc/tube: Added Torch Z80 Communicator variants for B, B+ and Master.
Diffstat (limited to 'src/devices/bus')
-rw-r--r-- | src/devices/bus/bbc/tube/tube.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/bbc/tube/tube_zep100.cpp | 74 | ||||
-rw-r--r-- | src/devices/bus/bbc/tube/tube_zep100.h | 38 |
3 files changed, 107 insertions, 11 deletions
diff --git a/src/devices/bus/bbc/tube/tube.cpp b/src/devices/bus/bbc/tube/tube.cpp index 12e1c3294d0..b632f7b5821 100644 --- a/src/devices/bus/bbc/tube/tube.cpp +++ b/src/devices/bus/bbc/tube/tube.cpp @@ -121,8 +121,8 @@ void bbc_tube_devices(device_slot_interface &device) device.option_add("pcplus", BBC_TUBE_PCPLUS); /* Solidisk PC-Plus co-processor */ //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) (Model B) */ - //device.option_add("zep100w", BBC_TUBE_ZEP100W); /* Torch Z80 Communicator (ZEP100) (Model B+) */ + 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 */ @@ -147,7 +147,7 @@ void bbc_extube_devices(device_slot_interface &device) device.option_add("pcplus", BBC_TUBE_PCPLUS); /* Solidisk PC-Plus co-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) */ + 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 */ diff --git a/src/devices/bus/bbc/tube/tube_zep100.cpp b/src/devices/bus/bbc/tube/tube_zep100.cpp index 87e6f2b2d88..32d9a556bfa 100644 --- a/src/devices/bus/bbc/tube/tube_zep100.cpp +++ b/src/devices/bus/bbc/tube/tube_zep100.cpp @@ -19,6 +19,9 @@ //************************************************************************** DEFINE_DEVICE_TYPE(BBC_TUBE_ZEP100, bbc_tube_zep100_device, "bbc_tube_zep100", "Torch Z80 Communicator") +DEFINE_DEVICE_TYPE(BBC_TUBE_ZEP100L, bbc_tube_zep100l_device, "bbc_tube_zep100l", "Torch Z80 Communicator (Model B)") +DEFINE_DEVICE_TYPE(BBC_TUBE_ZEP100W, bbc_tube_zep100w_device, "bbc_tube_zep100w", "Torch Z80 Communicator (Model B+)") +DEFINE_DEVICE_TYPE(BBC_TUBE_ZEP100M, bbc_tube_zep100m_device, "bbc_tube_zep100m", "Torch Z80 Communicator (Master)") //------------------------------------------------- @@ -61,6 +64,35 @@ ROM_START( tube_zep100 ) ROMX_LOAD("cccp094.rom", 0x0000, 0x2000, CRC(49989bd4) SHA1(62b57c858a3baa4ff943c31f77d331c414772a61), ROM_BIOS(2)) ROM_END +ROM_START( tube_zep100l ) + ROM_REGION(0x4000, "exp_rom", 0) + ROM_SYSTEM_BIOS(0, "mcp121", "MCP v1.21 (ABL)") // 1985 + ROMX_LOAD("mcp121abl.rom", 0x0000, 0x4000, CRC(216f1074) SHA1(ec3d285f757b1b35bd0cc65155048a55cc1146ed), ROM_BIOS(0)) + + ROM_REGION(0x2000, "rom", 0) + ROM_LOAD("cccp102.rom", 0x0000, 0x2000, CRC(2eb40a21) SHA1(e6ee738e5f2f8556002b79d18caa8ef21f14e08d)) +ROM_END + +ROM_START( tube_zep100w ) + ROM_REGION(0x4000, "exp_rom", 0) + ROM_SYSTEM_BIOS(0, "mcp122", "MCP v1.22 (ABW)") // 1986 + ROMX_LOAD("mcp122abw.rom", 0x0000, 0x4000, CRC(7124e9a6) SHA1(39cdd4367bfb2c8d6599b4a4420e6d311f8acaa9), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "mcp121", "MCP v1.21 (ABW)") // 1985 + ROMX_LOAD("mcp121abw.rom", 0x0000, 0x4000, CRC(5e4a4a56) SHA1(27172e29f1020147c7ae52111b4234ee4a22e627), ROM_BIOS(1)) + + ROM_REGION(0x2000, "rom", 0) + ROM_LOAD("cccp102.rom", 0x0000, 0x2000, CRC(2eb40a21) SHA1(e6ee738e5f2f8556002b79d18caa8ef21f14e08d)) +ROM_END + +ROM_START( tube_zep100m ) + ROM_REGION(0x4000, "exp_rom", 0) + ROM_SYSTEM_BIOS(0, "mcp122", "MCP v1.22 (ABM)") // 1986 + ROMX_LOAD("mcp122abm.rom", 0x0000, 0x4000, CRC(596be795) SHA1(35843ace281494ab40463a69a263244d0cb0ecd6), ROM_BIOS(0)) + + ROM_REGION(0x2000, "rom", 0) + ROM_LOAD("cccp102.rom", 0x0000, 0x2000, CRC(2eb40a21) SHA1(e6ee738e5f2f8556002b79d18caa8ef21f14e08d)) +ROM_END + //------------------------------------------------- // device_add_mconfig - add device configuration //------------------------------------------------- @@ -82,9 +114,6 @@ void bbc_tube_zep100_device::device_add_mconfig(machine_config &config) m_ppi->in_pb_callback().set(FUNC(bbc_tube_zep100_device::ppi_pb_r)); m_ppi->out_pc_callback().set(FUNC(bbc_tube_zep100_device::ppi_pc_w)); - /* internal ram */ - RAM(config, m_ram).set_default_size("64K").set_default_value(0x00); - /* software lists */ SOFTWARE_LIST(config, "flop_ls_torch").set_original("bbc_flop_torch").set_filter("Z80"); } @@ -98,6 +127,21 @@ const tiny_rom_entry *bbc_tube_zep100_device::device_rom_region() const return ROM_NAME( tube_zep100 ); } +const tiny_rom_entry *bbc_tube_zep100l_device::device_rom_region() const +{ + return ROM_NAME( tube_zep100l ); +} + +const tiny_rom_entry *bbc_tube_zep100w_device::device_rom_region() const +{ + return ROM_NAME( tube_zep100w ); +} + +const tiny_rom_entry *bbc_tube_zep100m_device::device_rom_region() const +{ + return ROM_NAME( tube_zep100m ); +} + //************************************************************************** // LIVE DEVICE //************************************************************************** @@ -113,7 +157,6 @@ bbc_tube_zep100_device::bbc_tube_zep100_device(const machine_config &mconfig, de , m_z80(*this, "z80") , m_via(*this, "via") , m_ppi(*this, "ppi") - , m_ram(*this, "ram") , m_rom(*this, "rom") , m_port_b(0) { @@ -124,12 +167,31 @@ bbc_tube_zep100_device::bbc_tube_zep100_device(const machine_config &mconfig, co { } +bbc_tube_zep100l_device::bbc_tube_zep100l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : bbc_tube_zep100_device(mconfig, BBC_TUBE_ZEP100L, tag, owner, clock) +{ +} + +bbc_tube_zep100w_device::bbc_tube_zep100w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : bbc_tube_zep100_device(mconfig, BBC_TUBE_ZEP100W, tag, owner, clock) +{ +} + +bbc_tube_zep100m_device::bbc_tube_zep100m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : bbc_tube_zep100_device(mconfig, BBC_TUBE_ZEP100M, tag, owner, clock) +{ +} + //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- void bbc_tube_zep100_device::device_start() { + m_ram = std::make_unique<uint8_t[]>(0x10000); + + /* register for save states */ + save_pointer(NAME(m_ram), 0x100000); } //------------------------------------------------- @@ -167,14 +229,14 @@ uint8_t bbc_tube_zep100_device::mem_r(offs_t offset) if (m_rom_enabled) data = m_rom->base()[offset]; else - data = m_ram->pointer()[offset]; + data = m_ram[offset]; return data; } void bbc_tube_zep100_device::mem_w(offs_t offset, uint8_t data) { - m_ram->pointer()[offset] = data; + m_ram[offset] = data; } diff --git a/src/devices/bus/bbc/tube/tube_zep100.h b/src/devices/bus/bbc/tube/tube_zep100.h index b7f881fcfac..483abb91a61 100644 --- a/src/devices/bus/bbc/tube/tube_zep100.h +++ b/src/devices/bus/bbc/tube/tube_zep100.h @@ -16,7 +16,6 @@ #include "cpu/z80/z80.h" #include "machine/6522via.h" #include "machine/i8255.h" -#include "machine/ram.h" //************************************************************************** // TYPE DEFINITIONS @@ -52,9 +51,10 @@ private: required_device<z80_device> m_z80; required_device<via6522_device> m_via; required_device<i8255_device> m_ppi; - required_device<ram_device> m_ram; required_memory_region m_rom; + std::unique_ptr<uint8_t[]> m_ram; + uint8_t m_port_b; uint8_t mem_r(offs_t offset); @@ -70,9 +70,43 @@ private: void tube_zep100_mem(address_map &map); }; +class bbc_tube_zep100l_device : public bbc_tube_zep100_device +{ +public: + bbc_tube_zep100l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual const tiny_rom_entry *device_rom_region() const override; +}; + +class bbc_tube_zep100w_device : public bbc_tube_zep100_device +{ +public: + static constexpr feature_type imperfect_features() { return feature::DISK; } + + bbc_tube_zep100w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual const tiny_rom_entry *device_rom_region() const override; +}; + +class bbc_tube_zep100m_device : public bbc_tube_zep100_device +{ +public: + static constexpr feature_type imperfect_features() { return feature::DISK; } + + bbc_tube_zep100m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual const tiny_rom_entry *device_rom_region() const override; +}; + // device type definition DECLARE_DEVICE_TYPE(BBC_TUBE_ZEP100, bbc_tube_zep100_device) +DECLARE_DEVICE_TYPE(BBC_TUBE_ZEP100L, bbc_tube_zep100l_device) +DECLARE_DEVICE_TYPE(BBC_TUBE_ZEP100W, bbc_tube_zep100w_device) +DECLARE_DEVICE_TYPE(BBC_TUBE_ZEP100M, bbc_tube_zep100m_device) #endif /* MAME_BUS_BBC_TUBE_ZEP100_H */ |