mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
bus/bbc/tube: Added the CMS 6809, Acorn 16032, and Acorn A500 2nd processors.
This commit is contained in:
parent
217b830c4b
commit
2a4a487ec2
@ -601,10 +601,14 @@ if (BUSES["BBC_TUBE"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_80186.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_80286.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_80286.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_a500.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_a500.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_arm.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_arm.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_casper.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_casper.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/tube/tube_cms6809.cpp",
|
||||
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_z80.cpp",
|
||||
|
@ -93,9 +93,10 @@ void bbc_tube_slot_device::host_w(offs_t offset, uint8_t data)
|
||||
#include "tube_6502.h"
|
||||
#include "tube_80186.h"
|
||||
#include "tube_80286.h"
|
||||
//#include "tube_a500.h"
|
||||
#include "tube_a500.h"
|
||||
#include "tube_arm.h"
|
||||
#include "tube_casper.h"
|
||||
#include "tube_cms6809.h"
|
||||
//#include "tube_pmsb2p.h"
|
||||
#include "tube_rc6502.h"
|
||||
//#include "tube_x25.h"
|
||||
@ -112,12 +113,15 @@ 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("z80w", BBC_TUBE_Z80W); /* Acorn ANC04 Z80 2nd processor (Winchester) */
|
||||
device.option_add("16032", BBC_TUBE_16032); /* Acorn 16032 2nd processor */
|
||||
device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */
|
||||
device.option_add("32016l", BBC_TUBE_32016L); /* Acorn Large 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("a500", BBC_TUBE_A500); /* Acorn A500 2nd Processor */
|
||||
device.option_add("casper", BBC_TUBE_CASPER); /* Casper 68000 2nd Processor */
|
||||
//device.option_add("cms6502", BBC_TUBE_CMS6502); /* CMS 6502 2nd processor */
|
||||
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 */
|
||||
@ -147,7 +151,7 @@ void bbc_extube_devices(device_slot_interface &device)
|
||||
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("pcplus", BBC_TUBE_PCPLUS); /* Solidisk PC-Plus co-processor */
|
||||
//device.option_add("a500", BBC_TUBE_A500); /* Acorn A500 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) */
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(BBC_TUBE_32016, bbc_tube_32016_device, "bbc_tube_32016", "Acorn 32016 2nd processor")
|
||||
DEFINE_DEVICE_TYPE(BBC_TUBE_16032, bbc_tube_16032_device, "bbc_tube_16032", "Acorn 16032 2nd processor (prototype)")
|
||||
DEFINE_DEVICE_TYPE(BBC_TUBE_32016L, bbc_tube_32016l_device, "bbc_tube_32016l", "Acorn Large 32016 2nd processor")
|
||||
|
||||
|
||||
@ -59,6 +60,20 @@ ROM_START(tube_32016)
|
||||
ROMX_LOAD("pan061hi.rom", 0x0001, 0x4000, CRC(c00b1ab0) SHA1(e6a705232278c518340ddc69ea51af91965fa332), ROM_SKIP(1) | ROM_BIOS(2))
|
||||
ROM_END
|
||||
|
||||
ROM_START(tube_16032)
|
||||
ROM_REGION16_LE(0x8000, "rom", 0)
|
||||
ROM_SYSTEM_BIOS(0, "052", "Tiny Kernel v0.52")
|
||||
ROMX_LOAD("tk052lo.rom", 0x0000, 0x2000, CRC(4daa7bfd) SHA1(c5f3dffc87f828e2420a036b6bc49ec07d712010), ROM_SKIP(1) | ROM_BIOS(0))
|
||||
ROM_RELOAD( 0x4000, 0x2000)
|
||||
ROMX_LOAD("tk052hi.rom", 0x0001, 0x2000, CRC(8611ff90) SHA1(bb1852fb2f3e7b3eb135ef52b8cbb6ebc521831a), ROM_SKIP(1) | ROM_BIOS(0))
|
||||
ROM_RELOAD( 0x4001, 0x2000)
|
||||
ROM_SYSTEM_BIOS(1, "060", "Pandora v0.60")
|
||||
ROMX_LOAD("pan060lo.rom", 0x0000, 0x2000, CRC(76c9984e) SHA1(05346f9dbcba52ed12d8ce3a84cacc522ae07a67), ROM_SKIP(1) | ROM_BIOS(1))
|
||||
ROM_RELOAD( 0x4000, 0x2000)
|
||||
ROMX_LOAD("pan060hi.rom", 0x0001, 0x2000, CRC(2d49514c) SHA1(2ec67a74a81811d8c4ffaa3583e7a9c5fb2485ba), ROM_SKIP(1) | ROM_BIOS(1))
|
||||
ROM_RELOAD( 0x4001, 0x2000)
|
||||
ROM_END
|
||||
|
||||
ROM_START(tube_32016l)
|
||||
ROM_REGION16_LE(0x8000, "rom", 0)
|
||||
ROM_SYSTEM_BIOS(0, "200", "Pandora v2.00")
|
||||
@ -121,21 +136,28 @@ void bbc_tube_32016_device::device_add_mconfig(machine_config &config)
|
||||
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_extra_options("256K").set_default_value(0);
|
||||
|
||||
/* software lists */
|
||||
SOFTWARE_LIST(config, "flop_ls_32016").set_original("bbc_flop_32016");
|
||||
}
|
||||
|
||||
|
||||
void bbc_tube_16032_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
bbc_tube_32016_device::device_add_mconfig(config);
|
||||
|
||||
m_maincpu->set_clock(16_MHz_XTAL / 2);
|
||||
|
||||
m_ram->set_default_size("256K").set_extra_options("1M").set_default_value(0);
|
||||
}
|
||||
|
||||
|
||||
void bbc_tube_32016l_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
bbc_tube_32016_device::device_add_mconfig(config);
|
||||
|
||||
m_maincpu->set_clock(16_MHz_XTAL / 2);
|
||||
|
||||
/* internal ram */
|
||||
m_ram->set_default_size("4M").set_extra_options("1M").set_default_value(0);
|
||||
}
|
||||
|
||||
@ -148,6 +170,11 @@ const tiny_rom_entry *bbc_tube_32016_device::device_rom_region() const
|
||||
return ROM_NAME( tube_32016 );
|
||||
}
|
||||
|
||||
const tiny_rom_entry *bbc_tube_16032_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( tube_16032 );
|
||||
}
|
||||
|
||||
const tiny_rom_entry *bbc_tube_32016l_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( tube_32016l );
|
||||
@ -186,6 +213,11 @@ bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, cons
|
||||
{
|
||||
}
|
||||
|
||||
bbc_tube_16032_device::bbc_tube_16032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: bbc_tube_32016_device(mconfig, BBC_TUBE_16032, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
bbc_tube_32016l_device::bbc_tube_32016l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: bbc_tube_32016_device(mconfig, BBC_TUBE_32016L, tag, owner, clock)
|
||||
{
|
||||
|
@ -63,6 +63,18 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class bbc_tube_16032_device : public bbc_tube_32016_device
|
||||
{
|
||||
public:
|
||||
bbc_tube_16032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
};
|
||||
|
||||
|
||||
class bbc_tube_32016l_device : public bbc_tube_32016_device
|
||||
{
|
||||
public:
|
||||
@ -78,6 +90,7 @@ protected:
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(BBC_TUBE_32016, bbc_tube_32016_device)
|
||||
DECLARE_DEVICE_TYPE(BBC_TUBE_16032, bbc_tube_16032_device)
|
||||
DECLARE_DEVICE_TYPE(BBC_TUBE_32016L, bbc_tube_32016l_device)
|
||||
|
||||
|
||||
|
150
src/devices/bus/bbc/tube/tube_a500.cpp
Normal file
150
src/devices/bus/bbc/tube/tube_a500.cpp
Normal file
@ -0,0 +1,150 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Acorn A500 2nd processor
|
||||
|
||||
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Acorn_A5002ndProc.html
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "tube_a500.h"
|
||||
#include "softlist_dev.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(BBC_TUBE_A500, bbc_tube_a500_device, "bbc_tube_a500", "Acorn A500 2nd Processor")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ADDRESS_MAP( a500_map )
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_a500_device::arm_mem(address_map &map)
|
||||
{
|
||||
map(0x00000000, 0x01ffffff).rw(m_memc, FUNC(acorn_memc_device::logical_r), FUNC(acorn_memc_device::logical_w));
|
||||
map(0x02000000, 0x03ffffff).rw(m_memc, FUNC(acorn_memc_device::high_mem_r), FUNC(acorn_memc_device::high_mem_w));
|
||||
}
|
||||
|
||||
void bbc_tube_a500_device::a500_map(address_map &map)
|
||||
{
|
||||
map(0x00000000, 0x01ffffff).rw(m_memc, FUNC(acorn_memc_device::logical_r), FUNC(acorn_memc_device::logical_w));
|
||||
map(0x02000000, 0x023fffff).ram().mirror(0xc00000);
|
||||
map(0x03000000, 0x033fffff).m(m_ioc, FUNC(acorn_ioc_device::map));
|
||||
map(0x03400000, 0x035fffff).w(m_vidc, FUNC(acorn_vidc10_device::write));
|
||||
map(0x03600000, 0x037fffff).w(m_memc, FUNC(acorn_memc_device::registers_w));
|
||||
map(0x03800000, 0x039fffff).rom().mirror(0x600000).region("maincpu", 0).w(m_memc, FUNC(acorn_memc_device::page_w));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( tube_a500 )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START(tube_a500)
|
||||
ROM_REGION(0x200000, "maincpu", 0)
|
||||
// TODO: verify ROMs, they are claimed to be from an Acorn M4 but contents suggest A500 2nd processor
|
||||
ROM_LOAD32_BYTE("m4_brazil_8mbaddr_rom0.bin", 0x000000, 0x04000, CRC(f01fb7a6) SHA1(840a15882797572db4764f37b725cf9c5a07a8cb))
|
||||
ROM_LOAD32_BYTE("m4_brazil_8mbaddr_rom1.bin", 0x000001, 0x04000, CRC(924e4181) SHA1(4f1903ef83cb6e0cef130005b0442a6548915b8a))
|
||||
ROM_LOAD32_BYTE("m4_brazil_8mbaddr_rom2.bin", 0x000002, 0x04000, CRC(c210e9a5) SHA1(ee09b8bac275153467ec31f7a16c366a0f97b550))
|
||||
ROM_LOAD32_BYTE("m4_brazil_8mbaddr_rom3.bin", 0x000003, 0x04000, CRC(1e520555) SHA1(9b6bdeef8d7fb22ef0203c2f531a4e0a55e22c6f))
|
||||
ROM_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_a500_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
ARM(config, m_maincpu, 24_MHz_XTAL / 3);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &bbc_tube_a500_device::arm_mem);
|
||||
|
||||
INPUT_MERGER_ANY_HIGH(config, m_fiqs).output_handler().set_inputline(m_maincpu, ARM_FIRQ_LINE);
|
||||
INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set_inputline(m_maincpu, ARM_IRQ_LINE);
|
||||
|
||||
TUBE(config, m_ula);
|
||||
m_ula->pnmi_handler().set(m_fiqs, FUNC(input_merger_device::in_w<0>));
|
||||
m_ula->pirq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>));
|
||||
|
||||
ACORN_MEMC(config, m_memc, 24_MHz_XTAL / 3, m_vidc);
|
||||
m_memc->set_addrmap(0, &bbc_tube_a500_device::a500_map);
|
||||
m_memc->sirq_w().set(m_ioc, FUNC(acorn_ioc_device::il1_w));
|
||||
|
||||
ACORN_IOC(config, m_ioc, 24_MHz_XTAL / 3);
|
||||
m_ioc->fiq_w().set(m_fiqs, FUNC(input_merger_device::in_w<1>));
|
||||
m_ioc->irq_w().set(m_irqs, FUNC(input_merger_device::in_w<1>));
|
||||
m_ioc->kout_w().set("keyboard", FUNC(archimedes_keyboard_device::kin_w));
|
||||
m_ioc->peripheral_r<4>().set(m_ula, FUNC(tube_device::parasite_r));
|
||||
m_ioc->peripheral_w<4>().set(m_ula, FUNC(tube_device::parasite_w));
|
||||
m_ioc->peripheral_r<6>().set_log("IOC: External Expansion R");
|
||||
m_ioc->peripheral_w<6>().set_log("IOC: External Expansion W");
|
||||
|
||||
ARCHIMEDES_KEYBOARD(config, "keyboard").kout().set(m_ioc, FUNC(acorn_ioc_device::kin_w));
|
||||
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.screen_vblank().set(m_ioc, FUNC(acorn_ioc_device::ir_w));
|
||||
|
||||
ACORN_VIDC10(config, m_vidc, 24_MHz_XTAL);
|
||||
m_vidc->set_screen("screen");
|
||||
m_vidc->vblank().set(m_memc, FUNC(acorn_memc_device::vidrq_w));
|
||||
m_vidc->sound_drq().set(m_memc, FUNC(acorn_memc_device::sndrq_w));
|
||||
|
||||
//SOFTWARE_LIST(config, "flop_ls_arm").set_original("BBC_flop_arm").set_filter("A500");
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const tiny_rom_entry *bbc_tube_a500_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( tube_a500 );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_tube_a500_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_tube_a500_device::bbc_tube_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, BBC_TUBE_A500, tag, owner, clock)
|
||||
, device_bbc_tube_interface(mconfig, *this)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_ioc(*this, "ioc")
|
||||
, m_memc(*this, "memc")
|
||||
, m_vidc(*this, "vidc")
|
||||
, m_ula(*this, "ula")
|
||||
, m_irqs(*this, "irqs")
|
||||
, m_fiqs(*this, "fiqs")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_a500_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
uint8_t bbc_tube_a500_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_ula->host_r(offset);
|
||||
}
|
||||
|
||||
void bbc_tube_a500_device::host_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_ula->host_w(offset, data);
|
||||
}
|
70
src/devices/bus/bbc/tube/tube_a500.h
Normal file
70
src/devices/bus/bbc/tube/tube_a500.h
Normal file
@ -0,0 +1,70 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Acorn A500 2nd processor
|
||||
|
||||
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Acorn_A5002ndProc.html
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#ifndef MAME_BUS_BBC_TUBE_A500_H
|
||||
#define MAME_BUS_BBC_TUBE_A500_H
|
||||
|
||||
#include "tube.h"
|
||||
#include "cpu/arm/arm.h"
|
||||
#include "machine/tube.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "machine/acorn_ioc.h"
|
||||
#include "machine/acorn_memc.h"
|
||||
#include "machine/acorn_vidc.h"
|
||||
#include "machine/archimedes_keyb.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> bbc_tube_a500_device
|
||||
|
||||
class bbc_tube_a500_device :
|
||||
public device_t,
|
||||
public device_bbc_tube_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_tube_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
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:
|
||||
required_device<arm_cpu_device> m_maincpu;
|
||||
required_device<acorn_ioc_device> m_ioc;
|
||||
required_device<acorn_memc_device> m_memc;
|
||||
required_device<acorn_vidc10_device> m_vidc;
|
||||
required_device<tube_device> m_ula;
|
||||
required_device<input_merger_device> m_irqs;
|
||||
required_device<input_merger_device> m_fiqs;
|
||||
|
||||
void arm_mem(address_map &map);
|
||||
void a500_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(BBC_TUBE_A500, bbc_tube_a500_device)
|
||||
|
||||
|
||||
#endif /* MAME_BUS_BBC_TUBE_A500_H */
|
122
src/devices/bus/bbc/tube/tube_cms6809.cpp
Normal file
122
src/devices/bus/bbc/tube/tube_cms6809.cpp
Normal file
@ -0,0 +1,122 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
CMS 6809 2nd Processor
|
||||
|
||||
Start with *FLEX:
|
||||
f0 - OSCLI command
|
||||
f1 - display help
|
||||
CTRL+F - boot FLEX from ROM
|
||||
U <drive> - boot from floppy drive
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "tube_cms6809.h"
|
||||
#include "softlist_dev.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(BBC_TUBE_CMS6809, bbc_tube_cms6809_device, "bbc_tube_cms6809", "CMS 6809 2nd Processor")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ADDRESS_MAP( tube_cms6809_mem )
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_cms6809_device::tube_cms6809_mem(address_map &map)
|
||||
{
|
||||
map(0x0000, 0xffff).ram();
|
||||
map(0xef00, 0xef0f).m(m_via[1], FUNC(via6522_device::map));
|
||||
map(0xf000, 0xffff).rom().region("boot", 0);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( tube_cms6809 )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START(tube_cms6809)
|
||||
ROM_REGION(0x4000, "exp_rom", 0)
|
||||
ROM_LOAD("cmsflex_v3.01.rom", 0x0000, 0x4000, CRC(87c7b09f) SHA1(7f2f8666298276713f6035f1dd12d1237cb8a81b))
|
||||
|
||||
ROM_REGION(0x1000, "boot", 0)
|
||||
ROM_LOAD("cms6809_v6.rom", 0x0000, 0x1000, CRC(93e3b8f4) SHA1(f431f27941e13a92cdd0a9e2eda891c73d59d835))
|
||||
ROM_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_cms6809_device::device_add_mconfig(machine_config& config)
|
||||
{
|
||||
MC6809(config, m_maincpu, 4_MHz_XTAL / 4);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &bbc_tube_cms6809_device::tube_cms6809_mem);
|
||||
|
||||
MOS6522(config, m_via[0], 4_MHz_XTAL / 4);
|
||||
m_via[0]->readpb_handler().set_constant(0xff);
|
||||
m_via[0]->writepb_handler().set(m_via[1], FUNC(via6522_device::write_pa));
|
||||
m_via[0]->ca2_handler().set(m_via[1], FUNC(via6522_device::write_cb1));
|
||||
m_via[0]->cb2_handler().set(m_via[1], FUNC(via6522_device::write_ca1));
|
||||
m_via[0]->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_tube_slot_device::irq_w));
|
||||
|
||||
MOS6522(config, m_via[1], 4_MHz_XTAL / 4);
|
||||
m_via[1]->writepb_handler().set(m_via[0], FUNC(via6522_device::write_pa));
|
||||
m_via[1]->ca2_handler().set(m_via[0], FUNC(via6522_device::write_cb1));
|
||||
m_via[1]->cb2_handler().set(m_via[0], FUNC(via6522_device::write_ca1));
|
||||
m_via[1]->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);
|
||||
|
||||
//SOFTWARE_LIST(config, "flop_ls_6809").set_original("bbc_flop_6809").set_filter("CMS");
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const tiny_rom_entry *bbc_tube_cms6809_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( tube_cms6809 );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_tube_cms6809_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_tube_cms6809_device::bbc_tube_cms6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, BBC_TUBE_CMS6809, tag, owner, clock)
|
||||
, device_bbc_tube_interface(mconfig, *this)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_via(*this, "via%u", 0)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_tube_cms6809_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
uint8_t bbc_tube_cms6809_device::host_r(offs_t offset)
|
||||
{
|
||||
return m_via[0]->read(offset & 0xf);
|
||||
}
|
||||
|
||||
void bbc_tube_cms6809_device::host_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_via[0]->write(offset & 0xf, data);
|
||||
}
|
54
src/devices/bus/bbc/tube/tube_cms6809.h
Normal file
54
src/devices/bus/bbc/tube/tube_cms6809.h
Normal file
@ -0,0 +1,54 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
CMS 6809 2nd Processor
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#ifndef MAME_BUS_BBC_TUBE_CMS6809_H
|
||||
#define MAME_BUS_BBC_TUBE_CMS6809_H
|
||||
|
||||
#include "tube.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "machine/6522via.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> bbc_tube_cms6809_device
|
||||
|
||||
class bbc_tube_cms6809_device :
|
||||
public device_t,
|
||||
public device_bbc_tube_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_tube_cms6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
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:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device_array<via6522_device, 2> m_via;
|
||||
|
||||
void tube_cms6809_mem(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(BBC_TUBE_CMS6809, bbc_tube_cms6809_device)
|
||||
|
||||
|
||||
#endif /* MAME_BUS_BBC_TUBE_CMS6809_H */
|
Loading…
Reference in New Issue
Block a user