econx25: Added the dual Z80 co-processor board (incomplete).

This commit is contained in:
Nigel Barnes 2021-02-28 12:16:12 +00:00
parent 990d35a6b3
commit fda2a0e482
5 changed files with 259 additions and 5 deletions

View File

@ -611,6 +611,8 @@ if (BUSES["BBC_TUBE"]~=null) then
MAME_DIR .. "src/devices/bus/bbc/tube/tube_cms6809.h",
MAME_DIR .. "src/devices/bus/bbc/tube/tube_rc6502.cpp",
MAME_DIR .. "src/devices/bus/bbc/tube/tube_rc6502.h",
MAME_DIR .. "src/devices/bus/bbc/tube/tube_x25.cpp",
MAME_DIR .. "src/devices/bus/bbc/tube/tube_x25.h",
MAME_DIR .. "src/devices/bus/bbc/tube/tube_z80.cpp",
MAME_DIR .. "src/devices/bus/bbc/tube/tube_z80.h",
MAME_DIR .. "src/devices/bus/bbc/tube/tube_zep100.cpp",

View File

@ -99,7 +99,7 @@ void bbc_tube_slot_device::host_w(offs_t offset, uint8_t data)
#include "tube_cms6809.h"
//#include "tube_pmsb2p.h"
#include "tube_rc6502.h"
//#include "tube_x25.h"
#include "tube_x25.h"
#include "tube_z80.h"
#include "tube_zep100.h"
@ -124,7 +124,7 @@ void bbc_tube_devices(device_slot_interface &device)
device.option_add("cms6809", BBC_TUBE_CMS6809); /* CMS 6809 2nd processor */
//device.option_add("pmsb2p", BBC_TUBE_PMSB2P); /* PMS B2P-6502 */
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("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+) */

View File

@ -0,0 +1,185 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Acorn Econet X25 Gateway
http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Acorn_EconetX25.html
TODO:
- everything to be verified when a schematic is found.
**********************************************************************/
#include "emu.h"
#include "tube_x25.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(BBC_TUBE_X25, bbc_tube_x25_device, "bbc_tube_x25", "Econet X25 Gateway Co-Processor")
//-------------------------------------------------
// ADDRESS_MAP( primary_mem )
//-------------------------------------------------
void bbc_tube_x25_device::primary_mem(address_map &map)
{
map(0x0000, 0x7fff).bankrw("bank0");
map(0x0000, 0x0fff).rom().region("boot", 0);
map(0x8000, 0xffff).bankrw("bank1");
}
//-------------------------------------------------
// ADDRESS_MAP( primary_io )
//-------------------------------------------------
void bbc_tube_x25_device::primary_io(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x1f).rw(m_ula, FUNC(tube_device::parasite_r), FUNC(tube_device::parasite_w));
}
//-------------------------------------------------
// ADDRESS_MAP( secondary_mem )
//-------------------------------------------------
void bbc_tube_x25_device::secondary_mem(address_map &map)
{
map(0x0000, 0x7fff).rom().region("x25", 0);
map(0x8000, 0xffff).bankrw("bank1");
}
//-------------------------------------------------
// ADDRESS_MAP( secondary_io )
//-------------------------------------------------
void bbc_tube_x25_device::secondary_io(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x03).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
map(0x04, 0x07).rw("sio", FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w));
}
//-------------------------------------------------
// ROM( tube_x25 )
//-------------------------------------------------
ROM_START(tube_x25)
ROM_REGION(0x1000, "boot", 0)
ROM_LOAD("0246,200_01-x25-boot.rom", 0x0000, 0x1000, CRC(8088edd9) SHA1(9692c77712d006596c89c18ae9cdf01d5be5b487))
ROM_REGION(0x8000, "x25", 0)
ROM_LOAD("0246,213_01-x25-lo-rom1.rom", 0x0000, 0x4000, CRC(43679e1d) SHA1(240a46f7fb9fb8eee834b36aa8526f1f3ff7e00c))
ROM_LOAD("0246,214_01-x25-hi-rom2.rom", 0x4000, 0x4000, CRC(e77ce291) SHA1(3d9e3f58f878d1f7c743b05e371845b3f7627129))
ROM_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
{ "sio" },
{ nullptr }
};
void bbc_tube_x25_device::device_add_mconfig(machine_config &config)
{
Z80(config, m_z80[0], 12_MHz_XTAL / 2);
m_z80[0]->set_addrmap(AS_PROGRAM, &bbc_tube_x25_device::primary_mem);
m_z80[0]->set_addrmap(AS_IO, &bbc_tube_x25_device::primary_io);
m_z80[0]->set_irq_acknowledge_callback(FUNC(bbc_tube_x25_device::irq_callback));
TUBE(config, m_ula);
m_ula->pnmi_handler().set_inputline(m_z80[0], INPUT_LINE_NMI);
m_ula->pirq_handler().set_inputline(m_z80[0], INPUT_LINE_IRQ0);
Z80(config, m_z80[1], 12_MHz_XTAL / 4);
m_z80[1]->set_addrmap(AS_PROGRAM, &bbc_tube_x25_device::secondary_mem);
m_z80[1]->set_addrmap(AS_IO, &bbc_tube_x25_device::secondary_io);
m_z80[1]->set_daisy_config(daisy_chain);
z80sio_device& sio(Z80SIO(config, "sio", 12_MHz_XTAL / 4));
sio.out_int_callback().set_inputline(m_z80[1], INPUT_LINE_IRQ0);
z80ctc_device& ctc(Z80CTC(config, "ctc", 12_MHz_XTAL / 4));
ctc.zc_callback<0>().set("sio", FUNC(z80sio_device::rxca_w));
ctc.zc_callback<0>().append("sio", FUNC(z80sio_device::txca_w));
ctc.zc_callback<1>().set("sio", FUNC(z80sio_device::rxcb_w));
ctc.zc_callback<1>().append("sio", FUNC(z80sio_device::txcb_w));
ctc.intr_callback().set_inputline(m_z80[1], INPUT_LINE_IRQ0);
}
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const tiny_rom_entry *bbc_tube_x25_device::device_rom_region() const
{
return ROM_NAME( tube_x25 );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// bbc_tube_x25_device - constructor
//-------------------------------------------------
bbc_tube_x25_device::bbc_tube_x25_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BBC_TUBE_X25, tag, owner, clock)
, device_bbc_tube_interface(mconfig, *this)
, m_z80(*this, "z80_%u", 0)
, m_ula(*this, "ula")
, m_bank(*this, "bank%u", 0)
, m_ram(nullptr)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void bbc_tube_x25_device::device_start()
{
m_ram = make_unique_clear<uint8_t[]>(0x10000);
m_bank[0]->set_base(m_ram.get());
m_bank[1]->set_base(m_ram.get() + 0x8000);
/* register for save states */
save_pointer(NAME(m_ram), 0x10000);
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
uint8_t bbc_tube_x25_device::host_r(offs_t offset)
{
return m_ula->host_r(offset);
}
void bbc_tube_x25_device::host_w(offs_t offset, uint8_t data)
{
m_ula->host_w(offset, data);
}
//-------------------------------------------------
// irq vector callback
//-------------------------------------------------
IRQ_CALLBACK_MEMBER(bbc_tube_x25_device::irq_callback)
{
return 0xfe;
}

View File

@ -0,0 +1,67 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Acorn Econet X25 Gateway
http://chrisacorns.computinghistory.org.uk/32bit_UpgradesA2G/Acorn_EconetX25.html
**********************************************************************/
#ifndef MAME_BUS_BBC_TUBE_X25_H
#define MAME_BUS_BBC_TUBE_X25_H
#include "tube.h"
#include "cpu/z80/z80.h"
#include "machine/z80ctc.h"
#include "machine/z80sio.h"
#include "machine/tube.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> bbc_tube_x25_device
class bbc_tube_x25_device :
public device_t,
public device_bbc_tube_interface
{
public:
// construction/destruction
bbc_tube_x25_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static constexpr feature_type unemulated_features() { return feature::LAN; }
protected:
// device-level overrides
virtual void device_start() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual uint8_t host_r(offs_t offset) override;
virtual void host_w(offs_t offset, uint8_t data) override;
private:
IRQ_CALLBACK_MEMBER( irq_callback );
required_device_array<z80_device, 2> m_z80;
required_device<tube_device> m_ula;
required_memory_bank_array<2> m_bank;
std::unique_ptr<uint8_t[]> m_ram;
void primary_mem(address_map &map);
void primary_io(address_map &map);
void secondary_mem(address_map &map);
void secondary_io(address_map &map);
};
// device type definition
DECLARE_DEVICE_TYPE(BBC_TUBE_X25, bbc_tube_x25_device)
#endif /* MAME_BUS_BBC_TUBE_X25_H */

View File

@ -1556,8 +1556,8 @@ void bbcbp_state::econx25(machine_config &config)
//config.device_remove("wd_fdc")
/* Add Econet X25 Gateway co-processor */
//m_tube->set_default_option("x25");
//m_tube->set_fixed(true);
m_tube->set_default_option("x25");
m_tube->set_fixed(true);
/* software lists */
config.device_remove("cass_ls");
@ -2415,7 +2415,7 @@ ROM_START(econx25)
ROM_LOAD("2201,248_03_anfs.rom", 0x1c000, 0x4000, CRC(744a60a7) SHA1(c733b108d74cf3b1c5de395335236800a7c9c0d8))
ROM_LOAD("0201,241_01_bpos2.rom", 0x20000, 0x8000, CRC(9f356396) SHA1(ea7d3a7e3ee1ecfaa1483af994048057362b01f2))
/* X25 TSI is in IC37 which is supposed to take a speech PHROM, so not sure where this is mapped */
ROM_LOAD("0246,215_02_x25tsi_v0.51.rom", 0x30000, 0x4000, CRC(71dd84e4) SHA1(bbfa892fdcc6f753dda5134ecb97cc7c42b959c2))
ROM_LOAD("0246,215_02_x25tsi_v0.51.rom", 0x0c000, 0x4000, CRC(71dd84e4) SHA1(bbfa892fdcc6f753dda5134ecb97cc7c42b959c2))
ROM_REGION(0x4000, "mos", 0)
ROM_COPY("swr", 0x40000, 0, 0x4000)