summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2013-10-22 16:45:06 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2013-10-22 16:45:06 +0000
commitcd6f73b9c7a6a8b8ee734051cf4ae9fabff477da (patch)
tree49ff21880abf2d678c4b297fbf12115973af8bf7 /src/mess/machine
parentef774dd504626acb2e7648ada9ea8d8783937795 (diff)
(MESS) Apple II bus moving day (nw)
Diffstat (limited to 'src/mess/machine')
-rw-r--r--src/mess/machine/a2alfam2.c148
-rw-r--r--src/mess/machine/a2alfam2.h52
-rw-r--r--src/mess/machine/a2applicard.c284
-rw-r--r--src/mess/machine/a2applicard.h59
-rw-r--r--src/mess/machine/a2arcadebd.c159
-rw-r--r--src/mess/machine/a2arcadebd.h52
-rw-r--r--src/mess/machine/a2bus.c289
-rw-r--r--src/mess/machine/a2bus.h164
-rw-r--r--src/mess/machine/a2cffa.c265
-rw-r--r--src/mess/machine/a2cffa.h83
-rw-r--r--src/mess/machine/a2diskii.c159
-rw-r--r--src/mess/machine/a2diskii.h64
-rw-r--r--src/mess/machine/a2eauxslot.c197
-rw-r--r--src/mess/machine/a2eauxslot.h146
-rw-r--r--src/mess/machine/a2echoii.c101
-rw-r--r--src/mess/machine/a2echoii.h47
-rw-r--r--src/mess/machine/a2eext80col.c68
-rw-r--r--src/mess/machine/a2eext80col.h44
-rw-r--r--src/mess/machine/a2eramworks3.c92
-rw-r--r--src/mess/machine/a2eramworks3.h46
-rw-r--r--src/mess/machine/a2estd80col.c75
-rw-r--r--src/mess/machine/a2estd80col.h44
-rw-r--r--src/mess/machine/a2hsscsi.c326
-rw-r--r--src/mess/machine/a2hsscsi.h63
-rw-r--r--src/mess/machine/a2lang.c116
-rw-r--r--src/mess/machine/a2lang.h42
-rw-r--r--src/mess/machine/a2memexp.c229
-rw-r--r--src/mess/machine/a2memexp.h70
-rw-r--r--src/mess/machine/a2midi.c217
-rw-r--r--src/mess/machine/a2midi.h61
-rw-r--r--src/mess/machine/a2mockingboard.c562
-rw-r--r--src/mess/machine/a2mockingboard.h99
-rw-r--r--src/mess/machine/a2sam.c85
-rw-r--r--src/mess/machine/a2sam.h46
-rw-r--r--src/mess/machine/a2scsi.c326
-rw-r--r--src/mess/machine/a2scsi.h62
-rw-r--r--src/mess/machine/a2softcard.c189
-rw-r--r--src/mess/machine/a2softcard.h53
-rw-r--r--src/mess/machine/a2ssc.c249
-rw-r--r--src/mess/machine/a2ssc.h56
-rw-r--r--src/mess/machine/a2swyft.c137
-rw-r--r--src/mess/machine/a2swyft.h46
-rw-r--r--src/mess/machine/a2themill.c342
-rw-r--r--src/mess/machine/a2themill.h56
-rw-r--r--src/mess/machine/a2thunderclock.c178
-rw-r--r--src/mess/machine/a2thunderclock.h55
-rw-r--r--src/mess/machine/a2videoterm.c370
-rw-r--r--src/mess/machine/a2videoterm.h107
-rw-r--r--src/mess/machine/a2vulcan.c280
-rw-r--r--src/mess/machine/a2vulcan.h65
-rw-r--r--src/mess/machine/a2zipdrive.c197
-rw-r--r--src/mess/machine/a2zipdrive.h63
-rw-r--r--src/mess/machine/apple2.c20
-rw-r--r--src/mess/machine/laser128.c120
-rw-r--r--src/mess/machine/laser128.h51
-rw-r--r--src/mess/machine/ncr5380n.c585
-rw-r--r--src/mess/machine/ncr5380n.h225
57 files changed, 20 insertions, 8366 deletions
diff --git a/src/mess/machine/a2alfam2.c b/src/mess/machine/a2alfam2.c
deleted file mode 100644
index be0dc235c19..00000000000
--- a/src/mess/machine/a2alfam2.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*********************************************************************
-
- a2alfsm2.c
-
- Implementation of the ALF Apple Music II card (originally marketed as the "MC1")
-
-*********************************************************************/
-
-#include "a2alfam2.h"
-#include "includes/apple2.h"
-#include "sound/sn76496.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_ALFAM2 = &device_creator<a2bus_alfam2_device>;
-
-#define SN1_TAG "sn76489_1" // left
-#define SN2_TAG "sn76489_2" // center
-#define SN3_TAG "sn76489_3" // right
-
-//-------------------------------------------------
-// sn76496_config psg_intf
-//-------------------------------------------------
-
-static const sn76496_config psg_intf =
-{
- DEVCB_NULL
-};
-
-MACHINE_CONFIG_FRAGMENT( a2alfam2 )
- MCFG_SPEAKER_STANDARD_STEREO("alf_l", "alf_r")
- MCFG_SOUND_ADD(SN1_TAG, SN76489, 1020484)
- MCFG_SOUND_CONFIG(psg_intf)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
- MCFG_SOUND_ADD(SN2_TAG, SN76489, 1020484)
- MCFG_SOUND_CONFIG(psg_intf)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
- MCFG_SOUND_ADD(SN3_TAG, SN76489, 1020484)
- MCFG_SOUND_CONFIG(psg_intf)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
-MACHINE_CONFIG_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_alfam2_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2alfam2 );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_alfam2_device::a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_sn1(*this, SN1_TAG),
- m_sn2(*this, SN2_TAG),
- m_sn3(*this, SN3_TAG)
-{
-}
-
-a2bus_alfam2_device::a2bus_alfam2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_ALFAM2, "ALF MC1 / Apple Music II", tag, owner, clock, "a2alfam2", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_sn1(*this, SN1_TAG),
- m_sn2(*this, SN2_TAG),
- m_sn3(*this, SN3_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_alfam2_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
- m_latch0 = m_latch1 = m_latch2 = 0;
-
- save_item(NAME(m_latch0));
- save_item(NAME(m_latch1));
- save_item(NAME(m_latch2));
-}
-
-void a2bus_alfam2_device::device_reset()
-{
- m_latch0 = m_latch1 = m_latch2 = 0;
-}
-
-UINT8 a2bus_alfam2_device::read_c0nx(address_space &space, UINT8 offset)
-{
- // SN76489 can't be read, it appears from the schematics this is what happens
- switch (offset)
- {
- case 0:
- return m_latch0;
-
- case 1:
- return m_latch1;
-
- case 2:
- return m_latch2;
- }
-
- return 0xff;
-}
-
-void a2bus_alfam2_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- m_sn1->write(space, 0, data);
- m_latch0 = data;
- break;
-
- case 1:
- m_sn2->write(space, 0, data);
- m_latch1 = data;
- break;
-
- case 2:
- m_sn3->write(space, 0, data);
- m_latch2 = data;
- break;
- }
-}
-
-bool a2bus_alfam2_device::take_c800()
-{
- return false;
-}
diff --git a/src/mess/machine/a2alfam2.h b/src/mess/machine/a2alfam2.h
deleted file mode 100644
index 9ab0cba9ace..00000000000
--- a/src/mess/machine/a2alfam2.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*********************************************************************
-
- a2alfam2.h
-
- Implementation of the ALF Apple Music II card
-
-*********************************************************************/
-
-#ifndef __A2BUS_ALFAM2__
-#define __A2BUS_ALFAM2__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "sound/sn76496.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_alfam2_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_alfam2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- required_device<sn76489_device> m_sn1;
- required_device<sn76489_device> m_sn2;
- required_device<sn76489_device> m_sn3;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual bool take_c800();
-
-private:
- UINT8 m_latch0, m_latch1, m_latch2;
-};
-
-// device type definition
-extern const device_type A2BUS_ALFAM2;
-
-#endif /* __A2BUS_ALFAM2__ */
diff --git a/src/mess/machine/a2applicard.c b/src/mess/machine/a2applicard.c
deleted file mode 100644
index c568f1085d5..00000000000
--- a/src/mess/machine/a2applicard.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*********************************************************************
-
- a2applicard.c
-
- Implementation of the PCPI AppliCard Z-80 card
-
- Unlike the SoftCard and clones, this has its own 64k of RAM on board
- and the Z80 runs completely independently of the host's 6502.
-
-*********************************************************************/
-
-#include "a2applicard.h"
-#include "includes/apple2.h"
-#include "cpu/z80/z80.h"
-#include "machine/z80ctc.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_APPLICARD = &device_creator<a2bus_applicard_device>;
-
-#define Z80_TAG "z80"
-#define Z80_ROM_REGION "z80_rom"
-
-static ADDRESS_MAP_START( z80_mem, AS_PROGRAM, 8, a2bus_applicard_device )
- AM_RANGE(0x0000, 0xffff) AM_READWRITE(dma_r, dma_w)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( z80_io, AS_IO, 8, a2bus_applicard_device )
- AM_RANGE(0x00, 0x60) AM_MIRROR(0xff00) AM_READWRITE(z80_io_r, z80_io_w)
-ADDRESS_MAP_END
-
-MACHINE_CONFIG_FRAGMENT( a2applicard )
- MCFG_CPU_ADD(Z80_TAG, Z80, 6000000) // Z80 runs at 6 MHz
- MCFG_CPU_PROGRAM_MAP(z80_mem)
- MCFG_CPU_IO_MAP(z80_io)
-MACHINE_CONFIG_END
-
-ROM_START( a2applicard )
- ROM_REGION(0x800, Z80_ROM_REGION, 0)
- ROM_LOAD( "applicard-v9.bin", 0x000000, 0x000800, CRC(1d461000) SHA1(71d633be864b6084362e85108a4e600cbe6e44fe) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_applicard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2applicard );
-}
-
-//-------------------------------------------------
-// device_rom_region - device-specific ROMs
-//-------------------------------------------------
-
-const rom_entry *a2bus_applicard_device::device_rom_region() const
-{
- return ROM_NAME( a2applicard );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_z80(*this, Z80_TAG)
-{
-}
-
-a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_APPLICARD, "PCPI Applicard", tag, owner, clock, "a2aplcrd", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_z80(*this, Z80_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_applicard_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- // locate Z80 ROM
- astring tempstring;
- m_z80rom = device().machine().root_device().memregion(this->subtag(tempstring, Z80_ROM_REGION))->base();
-
- save_item(NAME(m_bROMAtZ80Zero));
- save_item(NAME(m_z80stat));
- save_item(NAME(m_6502stat));
- save_item(NAME(m_toz80));
- save_item(NAME(m_to6502));
- save_item(NAME(m_z80ram));
-
- memset(m_z80ram, 0, 64*1024);
-}
-
-void a2bus_applicard_device::device_reset()
-{
- m_bROMAtZ80Zero = true;
-}
-
-UINT8 a2bus_applicard_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset & 0xf)
- {
- case 0:
- m_6502stat = false;
- return m_to6502;
-
- case 1:
- return m_toz80;
-
- case 2:
- if (m_z80stat)
- {
- return 0x80;
- }
- return false;
-
- case 3:
- if (m_6502stat)
- {
- return 0x80;
- }
- return false;
-
- case 5:
- m_bROMAtZ80Zero = true;
- m_toz80 = false;
- m_to6502 = false;
- m_z80->reset();
- break;
-
- case 6: // IRQ on Z80 via CTC channel 3 (CP/M doesn't use the CTC or IRQs)
- fatalerror("Applicard: Z80 IRQ not supported yet\n");
- break;
-
- case 7: // NMI on Z80 (direct)
- m_z80->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
- break;
-
- }
- return 0xff;
-}
-
-void a2bus_applicard_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset & 0xf)
- {
- case 0: // are these legal to write?
- case 2:
- case 3:
- break;
-
- case 1:
- m_z80stat = true;
- m_toz80 = data;
- break;
-
- case 5:
- case 6:
- case 7:
- read_c0nx(space, offset); // let the read handler take care of these
- break;
- }
-}
-
-READ8_MEMBER( a2bus_applicard_device::z80_io_r )
-{
- UINT8 tmp = 0;
-
- switch (offset)
- {
- case 0:
- return m_to6502;
-
- case 0x20:
- m_z80stat = false;
- return m_toz80;
-
- case 0x40:
- if (m_z80stat)
- {
- tmp |= 0x80;
- }
- if (m_6502stat)
- {
- tmp |= 1;
- }
- return tmp;
-
- case 0x60:
- break;
- }
- return 0xff;
-}
-
-WRITE8_MEMBER( a2bus_applicard_device::z80_io_w )
-{
- switch (offset)
- {
- case 0:
- m_to6502 = data;
- m_6502stat = true;
- break;
-
- case 0x60:
- if (data & 1)
- {
- m_bROMAtZ80Zero = true;
- }
- else
- {
- m_bROMAtZ80Zero = false;
- }
- break;
- }
-}
-
-//-------------------------------------------------
-// dma_r -
-//-------------------------------------------------
-
-READ8_MEMBER( a2bus_applicard_device::dma_r )
-{
- if (offset < 0x8000)
- {
- if (m_bROMAtZ80Zero)
- {
- return m_z80rom[offset & 0x7ff];
- }
- else
- {
- return m_z80ram[offset];
- }
- }
- else
- {
- return m_z80ram[offset];
- }
- return 0xff;
-}
-
-
-//-------------------------------------------------
-// dma_w -
-//-------------------------------------------------
-
-WRITE8_MEMBER( a2bus_applicard_device::dma_w )
-{
- if (offset < 0x8000)
- {
- // writing only works if ROM not mapped from 0-7fff
- if (!m_bROMAtZ80Zero)
- {
- m_z80ram[offset] = data;
- }
- }
- else
- {
- m_z80ram[offset] = data;
- }
-}
-
-bool a2bus_applicard_device::take_c800()
-{
- return false;
-}
diff --git a/src/mess/machine/a2applicard.h b/src/mess/machine/a2applicard.h
deleted file mode 100644
index e02ce521bfc..00000000000
--- a/src/mess/machine/a2applicard.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*********************************************************************
-
- a2applicard.h
-
- Implementation of the PCPI AppliCard Z-80 card
-
-*********************************************************************/
-
-#ifndef __A2BUS_APPLICARD__
-#define __A2BUS_APPLICARD__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_applicard_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- DECLARE_READ8_MEMBER( dma_r );
- DECLARE_WRITE8_MEMBER( dma_w );
- DECLARE_READ8_MEMBER( z80_io_r );
- DECLARE_WRITE8_MEMBER( z80_io_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
- virtual const rom_entry *device_rom_region() const;
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual bool take_c800();
-
- required_device<cpu_device> m_z80;
-
-private:
- bool m_bROMAtZ80Zero;
- bool m_z80stat, m_6502stat;
- UINT8 m_toz80, m_to6502;
- UINT8 m_z80ram[64*1024];
- UINT8 *m_z80rom;
-};
-
-// device type definition
-extern const device_type A2BUS_APPLICARD;
-
-#endif /* __A2BUS_APPLICARD__ */
diff --git a/src/mess/machine/a2arcadebd.c b/src/mess/machine/a2arcadebd.c
deleted file mode 100644
index 7de1209735a..00000000000
--- a/src/mess/machine/a2arcadebd.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*********************************************************************
-
- a2arcadeboard.c
-
- Implementation of the Third Millenium Engineering Arcade Board
-
- TODO:
- - VDPTEST program seems to want more than 16K of RAM, but docs/ads/press releases say 16k, period
- - MLDEMO program needs vsync IRQ from the TMS but doesn't program the registers the way our emulation
- wants to enable IRQs
-
-*********************************************************************/
-
-#include "emu.h"
-#include "machine/a2arcadebd.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-#define TMS_TAG "arcbd_tms"
-#define AY_TAG "arcbd_ay"
-#define SCREEN_TAG "screen"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_ARCADEBOARD = &device_creator<a2bus_arcboard_device>;
-
-static const ay8910_interface arcadeboard_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
-
-static TMS9928A_INTERFACE(arcadeboard_tms9918a_interface)
-{
- 0x4000, // 16k of VRAM
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_arcboard_device, tms_irq_w)
-};
-
-MACHINE_CONFIG_FRAGMENT( arcadeboard )
- MCFG_TMS9928A_ADD( TMS_TAG, TMS9918A, arcadeboard_tms9918a_interface )
- MCFG_TMS9928A_SCREEN_ADD_NTSC( SCREEN_TAG )
- MCFG_SCREEN_UPDATE_DEVICE( TMS_TAG, tms9918a_device, screen_update )
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD(AY_TAG, AY8910, 1022727)
- MCFG_SOUND_CONFIG(arcadeboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_arcboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( arcadeboard );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_ARCADEBOARD, "Third Millenium Engineering Arcade Board", tag, owner, clock, "a2arcbd", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_tms(*this, TMS_TAG),
- m_ay(*this, AY_TAG)
-{
-}
-
-a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_tms(*this, TMS_TAG),
- m_ay(*this, AY_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_arcboard_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-}
-
-void a2bus_arcboard_device::device_reset()
-{
-}
-
-/*
- C0nx map:
- 0 - TMS read vram
- 1 - TMS read status
- 2 - TMS write vram
- 3 - TMS write register
- 5 - AY register select
- 6 - AY data
-*/
-
-UINT8 a2bus_arcboard_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- return m_tms->vram_read(space, 0);
-
- case 1:
- return m_tms->register_read(space, 0);
-
- case 6:
- return m_ay->data_r(space, 0);
- }
-
- return 0xff;
-}
-
-void a2bus_arcboard_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 2:
- m_tms->vram_write(space, 0, data);
- break;
-
- case 3:
- m_tms->register_write(space, 0, data);
- break;
-
- case 5:
- m_ay->address_w(space, 0, data);
- break;
-
- case 6:
- m_ay->data_w(space, 0, data);
- break;
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_arcboard_device::tms_irq_w )
-{
- if (state)
- {
- raise_slot_irq();
- }
- else
- {
- lower_slot_irq();
- }
-}
diff --git a/src/mess/machine/a2arcadebd.h b/src/mess/machine/a2arcadebd.h
deleted file mode 100644
index 2df441ee6e1..00000000000
--- a/src/mess/machine/a2arcadebd.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*********************************************************************
-
- a2arcadebd.h
-
- Third Millenium Engineering Arcade Board
-
-*********************************************************************/
-
-#ifndef __A2BUS_ARCADEBOARD__
-#define __A2BUS_ARCADEBOARD__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "video/tms9928a.h"
-#include "sound/ay8910.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_arcboard_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- DECLARE_WRITE_LINE_MEMBER( tms_irq_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
-
- required_device<tms9918a_device> m_tms;
- required_device<ay8910_device> m_ay;
-
-private:
-};
-
-// device type definition
-extern const device_type A2BUS_ARCADEBOARD;
-
-#endif /* __A2BUS_ARCADEBOARD__ */
diff --git a/src/mess/machine/a2bus.c b/src/mess/machine/a2bus.c
deleted file mode 100644
index b08a5b9427e..00000000000
--- a/src/mess/machine/a2bus.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/***************************************************************************
-
- a2bus.c - Apple II slot bus and card emulation
-
- by R. Belmont
-
- Pinout (/ indicates an inverted signal, ie, one that would have a bar over it
- on a schematic diagram)
-
- (rear of computer)
-
- GND 26 25 +5V
- DMA IN 27 24 DMA OUT
- INT IN 28 23 INT OUT
- /NMI 29 22 /DMA
- /IRQ 30 21 RDY
- /RES 31 20 /IOSTB
- /INH 32 19 N.C.
- -12V 33 18 R/W
- -5V 34 17 A15
- N.C. 35 16 A14
- 7M 36 15 A13
- Q3 37 14 A12
- PH1 38 13 A11
- USER 1 39 12 A10
- PH0 40 11 A9
- /DEVSEL 41 10 A8
- D7 42 9 A7
- D6 43 8 A6
- D5 44 7 A5
- D4 45 6 A4
- D3 46 5 A3
- D2 47 4 A2
- D1 48 3 A1
- D0 49 2 A0
- -12V 50 1 /IOSEL
-
- (front of computer)
-
- Signal descriptions:
- GND - power supply ground
- DMA IN - daisy chain of DMA signal from higher priority devices. usually connected to DMA OUT.
- INT IN - similar to DMA IN but for INT instead of DMA.
- /NMI - non-maskable interrupt input to the 6502
- /IRQ - maskable interrupt input to the 6502
- /RES - system reset signal
- /INH - On the II and II+, inhibits the motherboard ROMs, allowing a card to replace them.
- On the IIe, inhibits all motherboard RAM/ROM for both CPU and DMA accesses.
- On the IIgs, works like the IIe except for the address range 0x6000 to 0x9FFF where
- it will cause bus contention.
- -12V - negative 12 volts DC power
- -5V - negative 5 volts DC power
- 7M - 7 MHz clock (1/4th of the master clock on the IIgs, 1/2 on 8-bit IIs)
- Q3 - 2 MHz asymmetrical clock
- PH1 - 6502 phase 1 clock
- /DEVSEL - asserted on an access to C0nX, where n = the slot number plus 8.
- D0-D7 - 8-bit data bus
- +5V - 5 volts DC power
- DMA OUT - see DMA IN
- INT OUT - see INT IN
- /DMA - pulling this low disconnects the 6502 from the bus and halts it
- RDY - 6502 RDY input. Pulling this low when PH1 is active will halt the
- 6502 and latch the current address bus value.
- /IOSTB - asserted on an access between C800 and CFFF.
- A0-A15 - 16-bit address bus
- /IOSEL - asserted on accesses to CnXX where n is the slot number.
- Not present on slot 0.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "emuopts.h"
-#include "machine/a2bus.h"
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_SLOT = &device_creator<a2bus_slot_device>;
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// a2bus_slot_device - constructor
-//-------------------------------------------------
-a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_SLOT, "Apple II Slot", tag, owner, clock, "a2bus_slot", __FILE__),
- device_slot_interface(mconfig, *this)
-{
-}
-
-a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_slot_interface(mconfig, *this)
-{
-}
-
-void a2bus_slot_device::static_set_a2bus_slot(device_t &device, const char *tag, const char *slottag)
-{
- a2bus_slot_device &a2bus_card = dynamic_cast<a2bus_slot_device &>(device);
- a2bus_card.m_a2bus_tag = tag;
- a2bus_card.m_a2bus_slottag = slottag;
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_slot_device::device_start()
-{
- device_a2bus_card_interface *dev = dynamic_cast<device_a2bus_card_interface *>(get_card_device());
-
- if (dev) device_a2bus_card_interface::static_set_a2bus_tag(*dev, m_a2bus_tag, m_a2bus_slottag);
-}
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS = &device_creator<a2bus_device>;
-
-void a2bus_device::static_set_cputag(device_t &device, const char *tag)
-{
- a2bus_device &a2bus = downcast<a2bus_device &>(device);
- a2bus.m_cputag = tag;
-}
-
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void a2bus_device::device_config_complete()
-{
- // inherit a copy of the static data
- const a2bus_interface *intf = reinterpret_cast<const a2bus_interface *>(static_config());
- if (intf != NULL)
- {
- *static_cast<a2bus_interface *>(this) = *intf;
- }
-
- // or initialize to defaults if none provided
- else
- {
- memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
- memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb));
- memset(&m_out_inh_cb, 0, sizeof(m_out_inh_cb));
- }
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// a2bus_device - constructor
-//-------------------------------------------------
-
-a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS, "Apple II Bus", tag, owner, clock, "a2bus", __FILE__)
-{
-}
-
-a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source)
-{
-}
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_device::device_start()
-{
- m_maincpu = machine().device<cpu_device>(m_cputag);
-
- // resolve callbacks
- m_out_irq_func.resolve(m_out_irq_cb, *this);
- m_out_nmi_func.resolve(m_out_nmi_cb, *this);
- m_out_inh_func.resolve(m_out_inh_cb, *this);
-
- // clear slots
- for (int i = 0; i < 8; i++)
- {
- m_device_list[i] = NULL;
- }
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void a2bus_device::device_reset()
-{
-}
-
-device_a2bus_card_interface *a2bus_device::get_a2bus_card(int slot)
-{
- if (slot < 0)
- {
- return NULL;
- }
-
- if (m_device_list[slot])
- {
- return m_device_list[slot];
- }
-
- return NULL;
-}
-
-void a2bus_device::add_a2bus_card(int slot, device_a2bus_card_interface *card)
-{
- m_device_list[slot] = card;
-}
-
-void a2bus_device::set_irq_line(int state)
-{
- m_out_irq_func(state);
-}
-
-void a2bus_device::set_nmi_line(int state)
-{
- m_out_nmi_func(state);
-}
-
-void a2bus_device::set_inh_slotnum(int slot)
-{
- m_out_inh_func(slot);
-}
-
-// interrupt request from a2bus card
-WRITE_LINE_MEMBER( a2bus_device::irq_w ) { m_out_irq_func(state); }
-WRITE_LINE_MEMBER( a2bus_device::nmi_w ) { m_out_nmi_func(state); }
-
-//**************************************************************************
-// DEVICE CONFIG A2BUS CARD INTERFACE
-//**************************************************************************
-
-
-//**************************************************************************
-// DEVICE A2BUS CARD INTERFACE
-//**************************************************************************
-
-//-------------------------------------------------
-// device_a2bus_card_interface - constructor
-//-------------------------------------------------
-
-device_a2bus_card_interface::device_a2bus_card_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device),
- m_a2bus(NULL),
- m_a2bus_tag(NULL)
-{
-}
-
-
-//-------------------------------------------------
-// ~device_a2bus_card_interface - destructor
-//-------------------------------------------------
-
-device_a2bus_card_interface::~device_a2bus_card_interface()
-{
-}
-
-void device_a2bus_card_interface::static_set_a2bus_tag(device_t &device, const char *tag, const char *slottag)
-{
- device_a2bus_card_interface &a2bus_card = dynamic_cast<device_a2bus_card_interface &>(device);
- a2bus_card.m_a2bus_tag = tag;
- a2bus_card.m_a2bus_slottag = slottag;
-}
-
-void device_a2bus_card_interface::set_a2bus_device()
-{
- // extract the slot number from the last digit of the slot tag
- int tlen = strlen(m_a2bus_slottag);
-
- m_slot = (m_a2bus_slottag[tlen-1] - '0');
-
- if (m_slot < 0 || m_slot > 7)
- {
- fatalerror("Slot %x out of range for Apple II Bus\n", m_slot);
- }
-
- m_a2bus = dynamic_cast<a2bus_device *>(device().machine().device(m_a2bus_tag));
- m_a2bus->add_a2bus_card(m_slot, this);
-}
diff --git a/src/mess/machine/a2bus.h b/src/mess/machine/a2bus.h
deleted file mode 100644
index d08fffdc6e5..00000000000
--- a/src/mess/machine/a2bus.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/***************************************************************************
-
- a2bus.h - Apple II slot bus and card emulation
-
- by R. Belmont
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __A2BUS_H__
-#define __A2BUS_H__
-
-#include "emu.h"
-
-#define INH_SLOT_INVALID (255)
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_A2BUS_BUS_ADD(_tag, _cputag, _config) \
- MCFG_DEVICE_ADD(_tag, A2BUS, 0) \
- MCFG_DEVICE_CONFIG(_config) \
- a2bus_device::static_set_cputag(*device, _cputag);
-#define MCFG_A2BUS_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, A2BUS_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- a2bus_slot_device::static_set_a2bus_slot(*device, _nbtag, _tag);
-#define MCFG_A2BUS_SLOT_REMOVE(_tag) \
- MCFG_DEVICE_REMOVE(_tag)
-
-#define MCFG_A2BUS_ONBOARD_ADD(_nbtag, _tag, _dev_type, _def_inp) \
- MCFG_DEVICE_ADD(_tag, _dev_type, 0) \
- MCFG_DEVICE_INPUT_DEFAULTS(_def_inp) \
- device_a2bus_card_interface::static_set_a2bus_tag(*device, _nbtag, _tag);
-
-#define MCFG_A2BUS_BUS_REMOVE(_tag) \
- MCFG_DEVICE_REMOVE(_tag)
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_device;
-
-class a2bus_slot_device : public device_t,
- public device_slot_interface
-{
-public:
- // construction/destruction
- a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // device-level overrides
- virtual void device_start();
-
- // inline configuration
- static void static_set_a2bus_slot(device_t &device, const char *tag, const char *slottag);
-protected:
- // configuration
- const char *m_a2bus_tag, *m_a2bus_slottag;
-};
-
-// device type definition
-extern const device_type A2BUS_SLOT;
-
-// ======================> a2bus_interface
-
-struct a2bus_interface
-{
- devcb_write_line m_out_irq_cb;
- devcb_write_line m_out_nmi_cb;
- devcb_write_line m_out_inh_cb;
-};
-
-class device_a2bus_card_interface;
-// ======================> a2bus_device
-class a2bus_device : public device_t,
- public a2bus_interface
-{
-public:
- // construction/destruction
- a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- // inline configuration
- static void static_set_cputag(device_t &device, const char *tag);
-
- void add_a2bus_card(int slot, device_a2bus_card_interface *card);
- device_a2bus_card_interface *get_a2bus_card(int slot);
-
- void set_irq_line(int state);
- void set_nmi_line(int state);
- void set_inh_slotnum(int slot);
-
- DECLARE_WRITE_LINE_MEMBER( irq_w );
- DECLARE_WRITE_LINE_MEMBER( nmi_w );
-
-protected:
- // device-level overrides
- virtual void device_start();
- virtual void device_reset();
- virtual void device_config_complete();
-
- // internal state
- cpu_device *m_maincpu;
-
- devcb_resolved_write_line m_out_irq_func;
- devcb_resolved_write_line m_out_nmi_func;
- devcb_resolved_write_line m_out_inh_func;
-
- device_a2bus_card_interface *m_device_list[8];
- const char *m_cputag;
-};
-
-
-// device type definition
-extern const device_type A2BUS;
-
-// ======================> device_a2bus_card_interface
-
-// class representing interface-specific live a2bus card
-class device_a2bus_card_interface : public device_slot_card_interface
-{
- friend class a2bus_device;
-public:
- // construction/destruction
- device_a2bus_card_interface(const machine_config &mconfig, device_t &device);
- virtual ~device_a2bus_card_interface();
-
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset) { printf("a2bus: unhandled read at C0n%x\n", offset); return 0; } // C0nX - /DEVSEL
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data) { printf("a2bus: unhandled write %02x to C0n%x\n", data, offset); }
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset) { return 0; } // CnXX - /IOSEL
- virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data) { printf("a2bus: unhandled write %02x to Cn%02x\n", data, offset); }
- virtual UINT8 read_c800(address_space &space, UINT16 offset) { return 0; } // C800 - /IOSTB
- virtual void write_c800(address_space &space, UINT16 offset, UINT8 data) { printf("a2bus: unhandled write %02x to %04x\n", data, offset + 0xc800); }
- virtual bool take_c800() { return true; } // override and return false if your card doesn't take over the c800 space
- virtual UINT8 read_inh_rom(address_space &space, UINT16 offset) { return 0; }
- virtual void write_inh_rom(address_space &space, UINT16 offset, UINT8 data) { }
-
- device_a2bus_card_interface *next() const { return m_next; }
-
- void set_a2bus_device();
-
- UINT32 get_slotromspace() { return 0xc000 | (m_slot<<8); } // return Cn00 address for this slot
- UINT32 get_slotiospace() { return 0xc080 + (m_slot<<4); } // return C0n0 address for this slot
-
- void raise_slot_irq() { m_a2bus->set_irq_line(ASSERT_LINE); }
- void lower_slot_irq() { m_a2bus->set_irq_line(CLEAR_LINE); }
- void raise_slot_nmi() { m_a2bus->set_nmi_line(ASSERT_LINE); }
- void lower_slot_nmi() { m_a2bus->set_nmi_line(CLEAR_LINE); }
- void raise_slot_inh() { m_a2bus->set_inh_slotnum(m_slot); }
- void lower_slot_inh() { m_a2bus->set_inh_slotnum(INH_SLOT_INVALID); }
-
- // inline configuration
- static void static_set_a2bus_tag(device_t &device, const char *tag, const char *slottag);
-public:
- a2bus_device *m_a2bus;
- const char *m_a2bus_tag, *m_a2bus_slottag;
- int m_slot;
- device_a2bus_card_interface *m_next;
-};
-
-#endif /* __A2BUS_H__ */
diff --git a/src/mess/machine/a2cffa.c b/src/mess/machine/a2cffa.c
deleted file mode 100644
index f0ccdbcd832..00000000000
--- a/src/mess/machine/a2cffa.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*********************************************************************
-
- a2cffa.c
-
- Implementation of Rich Dreher's IDE/CompactFlash card
- for the Apple II.
-
- http://www.dreher.net/
-
-*********************************************************************/
-
-#include "a2cffa.h"
-#include "includes/apple2.h"
-#include "machine/ataintf.h"
-#include "imagedev/harddriv.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-#define LOG_A2CFFA 1
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_CFFA2 = &device_creator<a2bus_cffa2_device>;
-const device_type A2BUS_CFFA2_6502 = &device_creator<a2bus_cffa2_6502_device>;
-
-#define CFFA2_ROM_REGION "cffa2_rom"
-#define CFFA2_ATA_TAG "cffa2_ata"
-
-MACHINE_CONFIG_FRAGMENT( cffa2 )
- MCFG_ATA_INTERFACE_ADD(CFFA2_ATA_TAG, ata_devices, "hdd", NULL, false)
-
-// not yet, the core explodes
-// MCFG_SOFTWARE_LIST_ADD("hdd_list", "apple2gs_hdd")
-MACHINE_CONFIG_END
-
-ROM_START( cffa2 )
- ROM_REGION(0x1000, CFFA2_ROM_REGION, 0)
- ROM_LOAD( "cffa20eec02.bin", 0x000000, 0x001000, CRC(fb3726f8) SHA1(080ff88f19de22328e162954ee2b51ee65f9d5cd) )
-ROM_END
-
-ROM_START( cffa2_6502 )
- ROM_REGION(0x1000, CFFA2_ROM_REGION, 0)
- ROM_LOAD( "cffa20ee02.bin", 0x000000, 0x001000, CRC(3ecafce5) SHA1(d600692ed9626668233a22a48236af639410cb7b) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_cffa2000_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( cffa2 );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_cffa2000_device::device_rom_region() const
-{
- return ROM_NAME( cffa2 );
-}
-
-const rom_entry *a2bus_cffa2_6502_device::device_rom_region() const
-{
- return ROM_NAME( cffa2_6502 );
-}
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_cffa2000_device::a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_ata(*this, CFFA2_ATA_TAG)
-{
-}
-
-a2bus_cffa2_device::a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_cffa2000_device(mconfig, A2BUS_CFFA2, "CFFA2000 Compact Flash (65C02 firmware, www.dreher.net)", tag, owner, clock, "a2cffa2", __FILE__),
- device_nvram_interface(mconfig, *this)
-{
-}
-
-a2bus_cffa2_6502_device::a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_cffa2000_device(mconfig, A2BUS_CFFA2, "CFFA2000 Compact Flash (6502 firmware, www.dreher.net)", tag, owner, clock, "a2cffa02", __FILE__),
- device_nvram_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_cffa2000_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, CFFA2_ROM_REGION))->base();
-
- // patch default setting so slave device is enabled and up to 13 devices on both connectors
- m_rom[0x800] = 13;
- m_rom[0x801] = 13;
-
- save_item(NAME(m_lastdata));
- save_item(NAME(m_writeprotect));
- save_item(NAME(m_eeprom));
-}
-
-void a2bus_cffa2000_device::device_reset()
-{
- m_writeprotect = true;
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_cffa2000_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- return m_lastdata>>8;
-
- case 3:
- m_writeprotect = false;
- break;
-
- case 4:
- m_writeprotect = true;
- break;
-
- case 8:
- m_lastdata = m_ata->read_cs0(space, offset-8, 0xffff);
- return m_lastdata & 0xff;
-
- case 9:
- case 0xa:
- case 0xb:
- case 0xc:
- case 0xd:
- case 0xe:
- case 0xf:
- return m_ata->read_cs0(space, offset-8, 0xff);
- }
-
- return 0xff;
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_cffa2000_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- m_lastdata &= 0x00ff;
- m_lastdata |= data<<8;
- break;
-
- case 3:
- m_writeprotect = false;
- break;
-
- case 4:
- m_writeprotect = true;
- break;
-
- case 8:
- m_lastdata &= 0xff00;
- m_lastdata |= data;
- m_ata->write_cs0(space, offset-8, m_lastdata, 0xffff);
- break;
-
- case 9:
- case 0xa:
- case 0xb:
- case 0xc:
- case 0xd:
- case 0xe:
- case 0xf:
- m_ata->write_cs0(space, offset-8, data, 0xff);
- break;
- }
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_cffa2000_device::read_cnxx(address_space &space, UINT8 offset)
-{
- int slotimg = m_slot * 0x100;
-
- // ROM contains a CnXX image for each of slots 1-7
- return m_eeprom[offset+slotimg];
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_cffa2000_device::read_c800(address_space &space, UINT16 offset)
-{
- return m_eeprom[offset+0x800];
-}
-
-void a2bus_cffa2000_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
-{
- if (!m_writeprotect)
- {
-// printf("Write %02x to EEPROM at %x (PC=%x)\n", data, offset, space.device().safe_pc());
- m_eeprom[offset + 0x800] = data;
- }
-}
-
-// NVRAM device virtual overrides to provide saving/loading of settings changes
-void a2bus_cffa2_device::nvram_default()
-{
- memcpy(m_eeprom, m_rom, 0x1000);
-}
-
-void a2bus_cffa2_device::nvram_read(emu_file &file)
-{
- file.read(m_eeprom, 0x1000);
-}
-
-void a2bus_cffa2_device::nvram_write(emu_file &file)
-{
- file.write(m_eeprom, 0x1000);
-}
-
-void a2bus_cffa2_6502_device::nvram_default()
-{
- memcpy(m_eeprom, m_rom, 0x1000);
-}
-
-void a2bus_cffa2_6502_device::nvram_read(emu_file &file)
-{
- file.read(m_eeprom, 0x1000);
-}
-
-void a2bus_cffa2_6502_device::nvram_write(emu_file &file)
-{
- file.write(m_eeprom, 0x1000);
-}
diff --git a/src/mess/machine/a2cffa.h b/src/mess/machine/a2cffa.h
deleted file mode 100644
index 069548b76f1..00000000000
--- a/src/mess/machine/a2cffa.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*********************************************************************
-
- a2cffa.h
-
- Implementation of Rich Dreher's IDE/CompactFlash board for
- the Apple II
-
-*********************************************************************/
-
-#ifndef __A2BUS_CFFA2__
-#define __A2BUS_CFFA2__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/ataintf.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_cffa2000_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
- virtual void write_c800(address_space &space, UINT16 offset, UINT8 data);
-
- required_device<ata_interface_device> m_ata;
-
- UINT8 *m_rom;
- UINT8 m_eeprom[0x1000];
-
-private:
- UINT16 m_lastdata;
- bool m_writeprotect;
-};
-
-class a2bus_cffa2_device : public a2bus_cffa2000_device, public device_nvram_interface
-{
-public:
- a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- // device_config_nvram_interface overrides
- virtual void nvram_default();
- virtual void nvram_read(emu_file &file);
- virtual void nvram_write(emu_file &file);
-};
-
-class a2bus_cffa2_6502_device : public a2bus_cffa2000_device, public device_nvram_interface
-{
-public:
- a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- virtual const rom_entry *device_rom_region() const;
-
-protected:
- // device_config_nvram_interface overrides
- virtual void nvram_default();
- virtual void nvram_read(emu_file &file);
- virtual void nvram_write(emu_file &file);
-};
-
-// device type definition
-extern const device_type A2BUS_CFFA2;
-extern const device_type A2BUS_CFFA2_6502;
-
-#endif /* __A2BUS_CFFA2__ */
diff --git a/src/mess/machine/a2diskii.c b/src/mess/machine/a2diskii.c
deleted file mode 100644
index c73d1927dd5..00000000000
--- a/src/mess/machine/a2diskii.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*********************************************************************
-
- a2diskii.c
-
- Implementation of the Apple II Disk II controller card
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "imagedev/flopdrv.h"
-#include "formats/ap2_dsk.h"
-#include "machine/appldriv.h"
-#include "machine/applefdc.h"
-#include "machine/a2diskii.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_DISKII = &device_creator<a2bus_diskii_device>;
-const device_type A2BUS_IWM_FDC = &device_creator<a2bus_iwmflop_device>;
-
-#define DISKII_ROM_REGION "diskii_rom"
-#define FDC_TAG "diskii_fdc"
-
-const applefdc_interface fdc_interface =
-{
- apple525_set_lines, /* set_lines */
- apple525_set_enable_lines, /* set_enable_lines */
-
- apple525_read_data, /* read_data */
- apple525_write_data, /* write_data */
- apple525_read_status /* read_status */
-};
-
-static const floppy_interface floppy_interface =
-{
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- FLOPPY_STANDARD_5_25_DSHD,
- LEGACY_FLOPPY_OPTIONS_NAME(apple2),
- "floppy_5_25",
- NULL
-};
-
-MACHINE_CONFIG_FRAGMENT( diskii )
- MCFG_APPLEFDC_ADD(FDC_TAG, fdc_interface)
- MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_FRAGMENT( iwmflop )
- MCFG_IWM_ADD(FDC_TAG, fdc_interface)
- MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
-MACHINE_CONFIG_END
-
-ROM_START( diskii )
- ROM_REGION(0x100, DISKII_ROM_REGION, 0)
- ROM_LOAD( "341-0027-a.p5", 0x000000, 0x000100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16) )
-ROM_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_floppy_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( diskii );
-}
-
-machine_config_constructor a2bus_iwmflop_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( iwmflop );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_floppy_device::device_rom_region() const
-{
- return ROM_NAME( diskii );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_floppy_device::a2bus_floppy_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_fdc(*this, FDC_TAG)
-{
-}
-
-a2bus_diskii_device::a2bus_diskii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_floppy_device(mconfig, A2BUS_DISKII, "Apple Disk II controller", tag, owner, clock, "a2diskii", __FILE__)
-{
-}
-
-a2bus_iwmflop_device::a2bus_iwmflop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_floppy_device(mconfig, A2BUS_IWM_FDC, "Apple IWM floppy card", tag, owner, clock, "a2iwm_flop", __FILE__)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_floppy_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, DISKII_ROM_REGION))->base();
-}
-
-void a2bus_floppy_device::device_reset()
-{
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_floppy_device::read_c0nx(address_space &space, UINT8 offset)
-{
- return m_fdc->read(offset);
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_floppy_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- m_fdc->write(offset, data);
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_floppy_device::read_cnxx(address_space &space, UINT8 offset)
-{
- return m_rom[offset];
-}
diff --git a/src/mess/machine/a2diskii.h b/src/mess/machine/a2diskii.h
deleted file mode 100644
index 50393bc2430..00000000000
--- a/src/mess/machine/a2diskii.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*********************************************************************
-
- a2diskii.h
-
- Apple II Disk II Controller Card
-
-*********************************************************************/
-
-#ifndef __A2BUS_DISKII__
-#define __A2BUS_DISKII__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_floppy_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_floppy_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
-
- required_device<applefdc_base_device> m_fdc;
-
-private:
- UINT8 *m_rom;
-};
-
-class a2bus_diskii_device: public a2bus_floppy_device
-{
-public:
- a2bus_diskii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-class a2bus_iwmflop_device: public a2bus_floppy_device
-{
-public:
- a2bus_iwmflop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual machine_config_constructor device_mconfig_additions() const;
-};
-
-// device type definition
-extern const device_type A2BUS_DISKII;
-extern const device_type A2BUS_IWM_FDC;
-
-#endif /* __A2BUS_DISKII__ */
diff --git a/src/mess/machine/a2eauxslot.c b/src/mess/machine/a2eauxslot.c
deleted file mode 100644
index 9f4d01f15dd..00000000000
--- a/src/mess/machine/a2eauxslot.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/***************************************************************************
-
- a2eauxslot.c - Apple IIe auxiliary slot and card emulation
-
- by R. Belmont
-
-***************************************************************************/
-
-#include "emu.h"
-#include "emuopts.h"
-#include "machine/a2eauxslot.h"
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2EAUXSLOT_SLOT = &device_creator<a2eauxslot_slot_device>;
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// a2eauxslot_slot_device - constructor
-//-------------------------------------------------
-a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2EAUXSLOT_SLOT, "Apple IIe AUX Slot", tag, owner, clock, "a2eauxslot_slot", __FILE__),
- device_slot_interface(mconfig, *this)
-{
-}
-
-a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_slot_interface(mconfig, *this)
-{
-}
-
-void a2eauxslot_slot_device::static_set_a2eauxslot_slot(device_t &device, const char *tag, const char *slottag)
-{
- a2eauxslot_slot_device &a2eauxslot_card = dynamic_cast<a2eauxslot_slot_device &>(device);
- a2eauxslot_card.m_a2eauxslot_tag = tag;
- a2eauxslot_card.m_a2eauxslot_slottag = slottag;
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2eauxslot_slot_device::device_start()
-{
- device_a2eauxslot_card_interface *dev = dynamic_cast<device_a2eauxslot_card_interface *>(get_card_device());
-
- if (dev) device_a2eauxslot_card_interface::static_set_a2eauxslot_tag(*dev, m_a2eauxslot_tag, m_a2eauxslot_slottag);
-}
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2EAUXSLOT = &device_creator<a2eauxslot_device>;
-
-void a2eauxslot_device::static_set_cputag(device_t &device, const char *tag)
-{
- a2eauxslot_device &a2eauxslot = downcast<a2eauxslot_device &>(device);
- a2eauxslot.m_cputag = tag;
-}
-
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void a2eauxslot_device::device_config_complete()
-{
- // inherit a copy of the static data
- const a2eauxslot_interface *intf = reinterpret_cast<const a2eauxslot_interface *>(static_config());
- if (intf != NULL)
- {
- *static_cast<a2eauxslot_interface *>(this) = *intf;
- }
-
- // or initialize to defaults if none provided
- else
- {
- memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
- memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb));
- }
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// a2eauxslot_device - constructor
-//-------------------------------------------------
-
-a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2EAUXSLOT, "Apple IIe AUX Bus", tag, owner, clock, "a2eauxslot", __FILE__)
-{
-}
-
-a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source)
-{
-}
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2eauxslot_device::device_start()
-{
- m_maincpu = machine().device<cpu_device>(m_cputag);
-
- // resolve callbacks
- m_out_irq_func.resolve(m_out_irq_cb, *this);
- m_out_nmi_func.resolve(m_out_nmi_cb, *this);
-
- // clear slot
- m_device = NULL;
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void a2eauxslot_device::device_reset()
-{
-}
-
-device_a2eauxslot_card_interface *a2eauxslot_device::get_a2eauxslot_card()
-{
- return m_device;
-}
-
-void a2eauxslot_device::add_a2eauxslot_card(device_a2eauxslot_card_interface *card)
-{
- m_device = card;
-}
-
-void a2eauxslot_device::set_irq_line(int state)
-{
- m_out_irq_func(state);
-}
-
-void a2eauxslot_device::set_nmi_line(int state)
-{
- m_out_nmi_func(state);
-}
-
-// interrupt request from a2eauxslot card
-WRITE_LINE_MEMBER( a2eauxslot_device::irq_w ) { m_out_irq_func(state); }
-WRITE_LINE_MEMBER( a2eauxslot_device::nmi_w ) { m_out_nmi_func(state); }
-
-//**************************************************************************
-// DEVICE CONFIG A2EAUXSLOT CARD INTERFACE
-//**************************************************************************
-
-
-//**************************************************************************
-// DEVICE A2EAUXSLOT CARD INTERFACE
-//**************************************************************************
-
-//-------------------------------------------------
-// device_a2eauxslot_card_interface - constructor
-//-------------------------------------------------
-
-device_a2eauxslot_card_interface::device_a2eauxslot_card_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device),
- m_a2eauxslot(NULL),
- m_a2eauxslot_tag(NULL)
-{
-}
-
-
-//-------------------------------------------------
-// ~device_a2eauxslot_card_interface - destructor
-//-------------------------------------------------
-
-device_a2eauxslot_card_interface::~device_a2eauxslot_card_interface()
-{
-}
-
-void device_a2eauxslot_card_interface::static_set_a2eauxslot_tag(device_t &device, const char *tag, const char *slottag)
-{
- device_a2eauxslot_card_interface &a2eauxslot_card = dynamic_cast<device_a2eauxslot_card_interface &>(device);
- a2eauxslot_card.m_a2eauxslot_tag = tag;
- a2eauxslot_card.m_a2eauxslot_slottag = slottag;
-}
-
-void device_a2eauxslot_card_interface::set_a2eauxslot_device()
-{
- m_a2eauxslot = dynamic_cast<a2eauxslot_device *>(device().machine().device(m_a2eauxslot_tag));
- m_a2eauxslot->add_a2eauxslot_card(this);
-}
diff --git a/src/mess/machine/a2eauxslot.h b/src/mess/machine/a2eauxslot.h
deleted file mode 100644
index afcf7f1a781..00000000000
--- a/src/mess/machine/a2eauxslot.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/***************************************************************************
-
- a2eauxslot.h - Apple IIe auxiliary slot and card emulation
-
- by R. Belmont
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __A2EAUXSLOT_H__
-#define __A2EAUXSLOT_H__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_A2EAUXSLOT_BUS_ADD(_tag, _cputag, _config) \
- MCFG_DEVICE_ADD(_tag, A2EAUXSLOT, 0) \
- MCFG_DEVICE_CONFIG(_config) \
- a2eauxslot_device::static_set_cputag(*device, _cputag);
-#define MCFG_A2EAUXSLOT_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, A2EAUXSLOT_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- a2eauxslot_slot_device::static_set_a2eauxslot_slot(*device, _nbtag, _tag);
-#define MCFG_A2EAUXSLOT_SLOT_REMOVE(_tag) \
- MCFG_DEVICE_REMOVE(_tag)
-
-#define MCFG_A2EAUXSLOT_BUS_REMOVE(_tag) \
- MCFG_DEVICE_REMOVE(_tag)
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2eauxslot_device;
-
-class a2eauxslot_slot_device : public device_t,
- public device_slot_interface
-{
-public:
- // construction/destruction
- a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // device-level overrides
- virtual void device_start();
-
- // inline configuration
- static void static_set_a2eauxslot_slot(device_t &device, const char *tag, const char *slottag);
-protected:
- // configuration
- const char *m_a2eauxslot_tag, *m_a2eauxslot_slottag;
-};
-
-// device type definition
-extern const device_type A2EAUXSLOT_SLOT;
-
-// ======================> a2eauxslot_interface
-
-struct a2eauxslot_interface
-{
- devcb_write_line m_out_irq_cb;
- devcb_write_line m_out_nmi_cb;
-};
-
-class device_a2eauxslot_card_interface;
-// ======================> a2eauxslot_device
-class a2eauxslot_device : public device_t,
- public a2eauxslot_interface
-{
-public:
- // construction/destruction
- a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2eauxslot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- // inline configuration
- static void static_set_cputag(device_t &device, const char *tag);
-
- void add_a2eauxslot_card(device_a2eauxslot_card_interface *card);
- device_a2eauxslot_card_interface *get_a2eauxslot_card();
-
- void set_irq_line(int state);
- void set_nmi_line(int state);
-
- DECLARE_WRITE_LINE_MEMBER( irq_w );
- DECLARE_WRITE_LINE_MEMBER( nmi_w );
-
-protected:
- // device-level overrides
- virtual void device_start();
- virtual void device_reset();
- virtual void device_config_complete();
-
- // internal state
- cpu_device *m_maincpu;
-
- devcb_resolved_write_line m_out_irq_func;
- devcb_resolved_write_line m_out_nmi_func;
-
- device_a2eauxslot_card_interface *m_device;
- const char *m_cputag;
-};
-
-
-// device type definition
-extern const device_type A2EAUXSLOT;
-
-// ======================> device_a2eauxslot_card_interface
-
-// class representing interface-specific live a2eauxslot card
-class device_a2eauxslot_card_interface : public device_slot_card_interface
-{
- friend class a2eauxslot_device;
-public:
- // construction/destruction
- device_a2eauxslot_card_interface(const machine_config &mconfig, device_t &device);
- virtual ~device_a2eauxslot_card_interface();
-
- virtual UINT8 read_auxram(UINT16 offset) { printf("a2eauxslot: unhandled auxram read @ %04x\n", offset); return 0xff; }
- virtual void write_auxram(UINT16 offset, UINT8 data) { printf("a2eauxslot: unhandled auxram write %02x @ %04x\n", data, offset); }
- virtual void write_c07x(address_space &space, UINT8 offset, UINT8 data) {}
- virtual UINT8 *get_vram_ptr() = 0;
- virtual bool allow_dhr() { return true; }
-
- device_a2eauxslot_card_interface *next() const { return m_next; }
-
- void set_a2eauxslot_device();
-
- void raise_slot_irq() { m_a2eauxslot->set_irq_line(ASSERT_LINE); }
- void lower_slot_irq() { m_a2eauxslot->set_irq_line(CLEAR_LINE); }
- void raise_slot_nmi() { m_a2eauxslot->set_nmi_line(ASSERT_LINE); }
- void lower_slot_nmi() { m_a2eauxslot->set_nmi_line(CLEAR_LINE); }
-
- // inline configuration
- static void static_set_a2eauxslot_tag(device_t &device, const char *tag, const char *slottag);
-public:
- a2eauxslot_device *m_a2eauxslot;
- const char *m_a2eauxslot_tag, *m_a2eauxslot_slottag;
- int m_slot;
- device_a2eauxslot_card_interface *m_next;
-};
-
-#endif /* __A2EAUXSLOT_H__ */
diff --git a/src/mess/machine/a2echoii.c b/src/mess/machine/a2echoii.c
deleted file mode 100644
index 3d4da6b9116..00000000000
--- a/src/mess/machine/a2echoii.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*********************************************************************
-
- a2echoii.c
-
- Implementation of the Street Electronics Echo II speech card
-
-*********************************************************************/
-
-#include "a2echoii.h"
-#include "includes/apple2.h"
-#include "sound/tms5220.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_ECHOII = &device_creator<a2bus_echoii_device>;
-
-#define TMS_TAG "tms5220"
-
-MACHINE_CONFIG_FRAGMENT( a2echoii )
- MCFG_SPEAKER_STANDARD_MONO("echoii")
- MCFG_SOUND_ADD(TMS_TAG, TMS5220, 640000) // Note the Echo II card has a "FREQ" potentiometer which can be used to adjust the tms5220's clock frequency; 640khz is the '8khz' value according to the tms5220 datasheet
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "echoii", 1.0)
-MACHINE_CONFIG_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_echoii_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2echoii );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_tms(*this, TMS_TAG)
-{
-}
-
-a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_ECHOII, "Street Electronics Echo II", tag, owner, clock, "a2echoii", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_tms(*this, TMS_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_echoii_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-}
-
-void a2bus_echoii_device::device_reset()
-{
-}
-
-UINT8 a2bus_echoii_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- return 0x1f | m_tms->status_r(space, 0);
- }
-
- return 0;
-}
-
-void a2bus_echoii_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- m_tms->data_w(space, offset, data);
- break;
- }
-}
-
-bool a2bus_echoii_device::take_c800()
-{
- return false;
-}
diff --git a/src/mess/machine/a2echoii.h b/src/mess/machine/a2echoii.h
deleted file mode 100644
index fee9eefa95e..00000000000
--- a/src/mess/machine/a2echoii.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*********************************************************************
-
- a2echoii.h
-
- Implementation of the Street Electronics Echo II speech card
-
-*********************************************************************/
-
-#ifndef __A2BUS_ECHOII__
-#define __A2BUS_ECHOII__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "sound/tms5220.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_echoii_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- required_device<tms5220_device> m_tms;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual bool take_c800();
-};
-
-// device type definition
-extern const device_type A2BUS_ECHOII;
-
-#endif /* __A2BUS_ECHOII__ */
diff --git a/src/mess/machine/a2eext80col.c b/src/mess/machine/a2eext80col.c
deleted file mode 100644
index 18e8c5b987d..00000000000
--- a/src/mess/machine/a2eext80col.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*********************************************************************
-
- a2eext80col.c
-
- Apple IIe Extended 80 Column Card (64K of RAM, double-hi-res)
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "machine/a2eext80col.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2EAUX_EXT80COL = &device_creator<a2eaux_ext80col_device>;
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2EAUX_EXT80COL, "Apple IIe Extended 80-Column Card", tag, owner, clock, "a2eext80", __FILE__),
- device_a2eauxslot_card_interface(mconfig, *this)
-{
-}
-
-a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2eauxslot_card_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2eaux_ext80col_device::device_start()
-{
- set_a2eauxslot_device();
- memset(m_ram, 0, sizeof(m_ram));
- save_item(NAME(m_ram));
-}
-
-void a2eaux_ext80col_device::device_reset()
-{
-}
-
-UINT8 a2eaux_ext80col_device::read_auxram(UINT16 offset)
-{
- return m_ram[offset];
-}
-
-void a2eaux_ext80col_device::write_auxram(UINT16 offset, UINT8 data)
-{
- m_ram[offset] = data;
-}
-
-UINT8 *a2eaux_ext80col_device::get_vram_ptr()
-{
- return &m_ram[0];
-}
diff --git a/src/mess/machine/a2eext80col.h b/src/mess/machine/a2eext80col.h
deleted file mode 100644
index 6c1126d047f..00000000000
--- a/src/mess/machine/a2eext80col.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*********************************************************************
-
- a2eext80col.c
-
- Apple IIe Extended 80 Column Card
-
-*********************************************************************/
-
-#ifndef __A2EAUX_EXT80COL__
-#define __A2EAUX_EXT80COL__
-
-#include "emu.h"
-#include "machine/a2eauxslot.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2eaux_ext80col_device:
- public device_t,
- public device_a2eauxslot_card_interface
-{
-public:
- // construction/destruction
- a2eaux_ext80col_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2eaux_ext80col_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- virtual UINT8 read_auxram(UINT16 offset);
- virtual void write_auxram(UINT16 offset, UINT8 data);
- virtual UINT8 *get_vram_ptr();
- virtual bool allow_dhr() { return true; }
-
-private:
- UINT8 m_ram[64*1024];
-};
-
-// device type definition
-extern const device_type A2EAUX_EXT80COL;
-
-#endif /* __A2EAUX_EXT80COL__ */
diff --git a/src/mess/machine/a2eramworks3.c b/src/mess/machine/a2eramworks3.c
deleted file mode 100644
index bd7a24b7807..00000000000
--- a/src/mess/machine/a2eramworks3.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*********************************************************************
-
- a2eramworks3.c
-
- Applied Engineering RamWorks III
-
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "machine/a2eramworks3.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2EAUX_RAMWORKS3 = &device_creator<a2eaux_ramworks3_device>;
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2EAUX_RAMWORKS3, "Applied Engineering RamWorks III", tag, owner, clock, "a2erwks3", __FILE__),
- device_a2eauxslot_card_interface(mconfig, *this)
-{
-}
-
-a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2eauxslot_card_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2eaux_ramworks3_device::device_start()
-{
- set_a2eauxslot_device();
- save_item(NAME(m_ram));
- save_item(NAME(m_bank));
-}
-
-void a2eaux_ramworks3_device::device_reset()
-{
- m_bank = 0;
-}
-
-UINT8 a2eaux_ramworks3_device::read_auxram(UINT16 offset)
-{
- return m_ram[offset+m_bank];
-}
-
-void a2eaux_ramworks3_device::write_auxram(UINT16 offset, UINT8 data)
-{
- m_ram[offset+m_bank] = data;
-}
-
-UINT8 *a2eaux_ramworks3_device::get_vram_ptr()
-{
- return &m_ram[0];
-}
-
-/*
- These cards are split into 64k logical banks.
-
- On a RW3:
- Banks 00-0F is the first MB
- Banks 10-17 are the next 512K
- Banks 30-37 are the next 512K
- Banks 50-57 are the next 512K
- Banks 70-77 are the next 512K
-
- However, the software will recognize and correctly use a configuration in which
- all of banks 00-7F are populated for a total of 8 megabytes. So that's what we do.
-*/
-void a2eaux_ramworks3_device::write_c07x(address_space &space, UINT8 offset, UINT8 data)
-{
- // write to C073?
- if (offset == 3)
- {
- m_bank = 0x10000 * (data & 0x7f);
- }
-}
diff --git a/src/mess/machine/a2eramworks3.h b/src/mess/machine/a2eramworks3.h
deleted file mode 100644
index 92f128859e2..00000000000
--- a/src/mess/machine/a2eramworks3.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*********************************************************************
-
- a2eramworks3.c
-
- Applied Engineering RamWorks III
-
-*********************************************************************/
-
-#ifndef __A2EAUX_RAMWORKS3__
-#define __A2EAUX_RAMWORKS3__
-
-#include "emu.h"
-#include "machine/a2eauxslot.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2eaux_ramworks3_device:
- public device_t,
- public device_a2eauxslot_card_interface
-{
-public:
- // construction/destruction
- a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- virtual UINT8 read_auxram(UINT16 offset);
- virtual void write_auxram(UINT16 offset, UINT8 data);
- virtual UINT8 *get_vram_ptr();
- virtual bool allow_dhr() { return true; }
- virtual void write_c07x(address_space &space, UINT8 offset, UINT8 data);
-
-private:
- UINT8 m_ram[8*1024*1024];
- int m_bank;
-};
-
-// device type definition
-extern const device_type A2EAUX_RAMWORKS3;
-
-#endif /* __A2EAUX_RAMWORKS3__ */
diff --git a/src/mess/machine/a2estd80col.c b/src/mess/machine/a2estd80col.c
deleted file mode 100644
index 666a8c66081..00000000000
--- a/src/mess/machine/a2estd80col.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*********************************************************************
-
- a2estd80col.c
-
- Apple IIe Standard 80 Column Card (2K of RAM, no double-hi-res)
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "machine/a2estd80col.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2EAUX_STD80COL = &device_creator<a2eaux_std80col_device>;
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2EAUX_STD80COL, "Apple IIe Standard 80-Column Card", tag, owner, clock, "a2estd80", __FILE__),
- device_a2eauxslot_card_interface(mconfig, *this)
-{
-}
-
-a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2eauxslot_card_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2eaux_std80col_device::device_start()
-{
- set_a2eauxslot_device();
- save_item(NAME(m_ram));
-}
-
-void a2eaux_std80col_device::device_reset()
-{
-}
-
-UINT8 a2eaux_std80col_device::read_auxram(UINT16 offset)
-{
- if (offset < 0x800)
- {
- return m_ram[offset];
- }
-
- return 0xff;
-}
-
-void a2eaux_std80col_device::write_auxram(UINT16 offset, UINT8 data)
-{
- if (offset < 0x800)
- {
- m_ram[offset] = data;
- }
-}
-
-UINT8 *a2eaux_std80col_device::get_vram_ptr()
-{
- return &m_ram[0];
-}
diff --git a/src/mess/machine/a2estd80col.h b/src/mess/machine/a2estd80col.h
deleted file mode 100644
index 56cb6d22283..00000000000
--- a/src/mess/machine/a2estd80col.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*********************************************************************
-
- a2estd80col.c
-
- Apple IIe Standard 80 Column Card
-
-*********************************************************************/
-
-#ifndef __A2EAUX_STD80COL__
-#define __A2EAUX_STD80COL__
-
-#include "emu.h"
-#include "machine/a2eauxslot.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2eaux_std80col_device:
- public device_t,
- public device_a2eauxslot_card_interface
-{
-public:
- // construction/destruction
- a2eaux_std80col_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2eaux_std80col_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- virtual UINT8 read_auxram(UINT16 offset);
- virtual void write_auxram(UINT16 offset, UINT8 data);
- virtual UINT8 *get_vram_ptr();
- virtual bool allow_dhr() { return false; } // we don't allow DHR
-
-private:
- UINT8 m_ram[2*1024];
-};
-
-// device type definition
-extern const device_type A2EAUX_STD80COL;
-
-#endif /* __A2EAUX_STD80COL__ */
diff --git a/src/mess/machine/a2hsscsi.c b/src/mess/machine/a2hsscsi.c
deleted file mode 100644
index 3c74d555371..00000000000
--- a/src/mess/machine/a2hsscsi.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*********************************************************************
-
- a2hsscsi.c
-
- Implementation of the Apple II High Speed SCSI Card
-
- This uses an ASIC called "Sandwich II"; the card itself is
- sometimes known as "Cocoon".
-
- Notes:
- C0n0-C0n7 = NCR5380 registers in normal order
- C0n8 = DMA address low
- C0n9 = DMA address high
- C0nA = DMA count low
- C0nB = DMA count high
- C0nC = DMA control
- C0nD = Enable DMA / reset 5380
- C0nE = Priority (read bits 5-7) / Fire watchdog (write bit 7) / RAM bank (write bits 0-3)
- C0nF = DMA speed (bit 7 = 0 for fast, 1 for slow) / ROM bank (write bits 0-4)
-
- DMA control register (C0nC):
- 0x01 = pseudo-DMA enable
- 0x02 = DMA enable
- 0x04 = test mode
- 0x08 = disable stop-DMA-on-IRQ
- 0x10 = DMA direction (read only)
- 0x20 = 5380 IRQ enable
- 0x40 = system DMA status (read only)
- 0x80 = DMA stopped due to IRQ
-
- Enable DMA / reset 5380 register (C0nD):
- 0x01 = Resume DMA after rollover or IRQ
- 0x02 = Reset the 5380
- 0x40 = Clear test mode
- 0x80 = Set test mode
-
-*********************************************************************/
-
-#include "a2hsscsi.h"
-#include "includes/apple2.h"
-#include "machine/scsibus.h"
-#include "machine/nscsi_cd.h"
-#include "machine/nscsi_hd.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_HSSCSI = &device_creator<a2bus_hsscsi_device>;
-
-#define SCSI_ROM_REGION "scsi_rom"
-#define SCSI_BUS_TAG "scsibus"
-#define SCSI_5380_TAG "scsibus:7:ncr5380"
-
-static MACHINE_CONFIG_FRAGMENT( ncr5380 )
- MCFG_DEVICE_MODIFY(DEVICE_SELF)
- MCFG_DEVICE_CLOCK(10000000)
- MCFG_NCR5380N_DRQ_HANDLER(DEVWRITELINE("^^", a2bus_hsscsi_device, drq_w))
-MACHINE_CONFIG_END
-
-static SLOT_INTERFACE_START( hsscsi_devices )
- SLOT_INTERFACE("cdrom", NSCSI_CDROM)
- SLOT_INTERFACE("harddisk", NSCSI_HARDDISK)
- SLOT_INTERFACE_INTERNAL("ncr5380", NCR5380N)
-SLOT_INTERFACE_END
-
-static MACHINE_CONFIG_FRAGMENT( hsscsi )
- MCFG_SCSIBUS_ADD("scsi")
- MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
- MCFG_NSCSI_ADD("scsibus:0", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:1", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:2", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:3", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:4", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:5", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:6", hsscsi_devices, "harddisk", false)
- MCFG_NSCSI_ADD("scsibus:7", hsscsi_devices, "ncr5380", true)
- MCFG_DEVICE_CARD_MACHINE_CONFIG("ncr5380", ncr5380)
-MACHINE_CONFIG_END
-
-ROM_START( hsscsi )
- ROM_REGION(0x8000, SCSI_ROM_REGION, 0)
- ROM_LOAD( "341-0803.bin", 0x0000, 0x8000, CRC(2c15618b) SHA1(7d32227299933bfc1b7f8bc2062906fdfe530674) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_hsscsi_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( hsscsi );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_hsscsi_device::device_rom_region() const
-{
- return ROM_NAME( hsscsi );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_hsscsi_device::a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_ncr5380(*this, SCSI_5380_TAG),
- m_scsibus(*this, SCSI_BUS_TAG)
-{
-}
-
-a2bus_hsscsi_device::a2bus_hsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_HSSCSI, "Apple II High-Speed SCSI Card", tag, owner, clock, "a2hsscsi", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_ncr5380(*this, SCSI_5380_TAG),
- m_scsibus(*this, SCSI_BUS_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_hsscsi_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SCSI_ROM_REGION))->base();
-
- memset(m_ram, 0, 8192);
-
- save_item(NAME(m_ram));
- save_item(NAME(m_rambank));
- save_item(NAME(m_rombank));
- save_item(NAME(m_bank));
- save_item(NAME(m_drq));
- save_item(NAME(m_816block));
-}
-
-void a2bus_hsscsi_device::device_reset()
-{
- m_rambank = 0;
- m_rombank = 0;
- m_c0ne = m_c0nf = 0;
- m_816block = false;
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_hsscsi_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
-// printf("Read 5380 @ %x\n", offset);
- return m_ncr5380->read(space, offset);
- break;
-
- case 0xc:
- return 0x00; // indicate watchdog?
-
- case 0xe: // code at cf32 wants to RMW this without killing the ROM bank
- return m_c0ne;
-
- case 0xf:
- return m_c0nf;
-
- default:
- printf("Read c0n%x (PC=%x)\n", offset, space.device().safe_pc());
- break;
- }
-
- return 0xff;
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_hsscsi_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
-// printf("%02x to 5380 reg %x\n", data, offset);
- m_ncr5380->write(space, offset, data);
- break;
-#if 0
- case 8: // DMA address low
- break;
-
- case 9: // DMA address high
- break;
-
- case 0xa: // DMA count low
- break;
-
- case 0xb: // DMA count high
- break;
-
- case 0xc: // DMA control
- break;
-#endif
-
- case 0xd: // DMA enable / reset
- printf("%02x to DMA enable/reset\n", data);
- if (data & 0x2)
- {
- // printf("Resetting SCSI: %02x at %x\n", data, space.device().safe_pc());
- m_ncr5380->reset();
- }
- break;
-
- case 0xe:
- m_c0ne = data;
- m_rombank = (data & 0x1f) * 0x400;
- printf("c0ne to %x (ROM bank %x)\n", data & 0x1f, m_rombank);
- break;
-
- case 0xf:
- m_c0nf = data;
- m_rambank = (data & 0x7) * 0x400;
- printf("c0nf to %x (RAM bank %x)\n", data & 0x7, m_rambank);
- break;
-
- default:
- printf("Write %02x to c0n%x (PC=%x)\n", data, offset, space.device().safe_pc());
- break;
- }
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_hsscsi_device::read_cnxx(address_space &space, UINT8 offset)
-{
- // one slot image at the start of the ROM, it appears
- return m_rom[offset];
-}
-
-void a2bus_hsscsi_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data)
-{
-// printf("Write %02x to cn%02x (PC=%x)\n", data, offset, space.device().safe_pc());
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_hsscsi_device::read_c800(address_space &space, UINT16 offset)
-{
- // bankswitched RAM at c800-cbff
- // bankswitched ROM at cc00-cfff
- if (offset < 0x400)
- {
-// printf("Read RAM at %x = %02x\n", offset+m_rambank, m_ram[offset + m_rambank]);
- if (m_816block)
- {
- return m_ncr5380->dma_r();
- }
-
- return m_ram[offset + m_rambank];
- }
- else
- {
- return m_rom[(offset-0x400) + m_rombank];
- }
-}
-
-/*-------------------------------------------------
- write_c800 - called for writes to this card's c800 space
--------------------------------------------------*/
-void a2bus_hsscsi_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
-{
- if (offset < 0x400)
- {
-// printf("%02x to RAM at %x\n", data, offset+m_rambank);
- if (m_816block)
- {
- m_ncr5380->dma_w(data);
- }
- else
- {
- m_ram[offset + m_rambank] = data;
- }
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_hsscsi_device::drq_w )
-{
- m_drq = (state ? 0x80 : 0x00);
-}
diff --git a/src/mess/machine/a2hsscsi.h b/src/mess/machine/a2hsscsi.h
deleted file mode 100644
index 1e4f43bf5bd..00000000000
--- a/src/mess/machine/a2hsscsi.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*********************************************************************
-
- a2hsscsi.h
-
- Implementation of the Apple II High Speed SCSI Card
-
-*********************************************************************/
-
-#ifndef __A2BUS_HSSCSI__
-#define __A2BUS_HSSCSI__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/ncr5380n.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_hsscsi_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_hsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
- required_device<ncr5380n_device> m_ncr5380;
- required_device<nscsi_bus_device> m_scsibus;
-
- DECLARE_WRITE_LINE_MEMBER( drq_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
- virtual void write_c800(address_space &space, UINT16 offset, UINT8 data);
-
-private:
- UINT8 *m_rom;
- UINT8 m_ram[8192]; // 8 banks of 1024 bytes
- int m_rambank, m_rombank;
- UINT8 m_drq;
- UINT8 m_bank;
- bool m_816block;
- UINT8 m_c0ne, m_c0nf;
-};
-
-// device type definition
-extern const device_type A2BUS_HSSCSI;
-
-#endif /* __A2BUS_HSSCSI__ */
diff --git a/src/mess/machine/a2lang.c b/src/mess/machine/a2lang.c
deleted file mode 100644
index 82b514a1f5e..00000000000
--- a/src/mess/machine/a2lang.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*********************************************************************
-
- a2lang.c
-
- Implementation of the Apple II Language Card
-
- TODO: refactor machine/apple2.c so it's possible to have an Apple II
- and II Plus without a language card (and to emulate other
- slot 0 stuff like hack/freezer cards).
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "machine/a2lang.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-#define LOG_LANGCARD 0
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_LANG = &device_creator<a2bus_lang_device>;
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_lang_device::a2bus_lang_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_LANG, "Apple II Language Card", tag, owner, clock, "a2lang", __FILE__),
- device_a2bus_card_interface(mconfig, *this)
-{
-}
-
-a2bus_lang_device::a2bus_lang_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_lang_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-}
-
-void a2bus_lang_device::device_reset()
-{
-}
-
-/*-------------------------------------------------
- apple2_langcard_touch - device read callback
--------------------------------------------------*/
-
-void a2bus_lang_device::langcard_touch(offs_t offset)
-{
- UINT32 val, mask;
-
- if (LOG_LANGCARD)
- logerror("language card bankswitch read, offset: $c08%0x\n", offset);
-
- /* determine which flags to change */
- mask = VAR_LCWRITE | VAR_LCRAM | VAR_LCRAM2;
- val = 0;
-
- if (offset & 0x01)
- val |= VAR_LCWRITE;
-
- switch(offset & 0x03)
- {
- case 0x03:
- case 0x00:
- val |= VAR_LCRAM;
- break;
- }
-
- if ((offset & 0x08) == 0)
- val |= VAR_LCRAM2;
-
- /* change the flags */
- apple2_state *state = machine().driver_data<apple2_state>();
- state->apple2_setvar(val, mask);
-}
-
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_lang_device::read_c0nx(address_space &space, UINT8 offset)
-{
- langcard_touch(offset);
- return 0;
-}
-
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_lang_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- langcard_touch(offset);
-}
diff --git a/src/mess/machine/a2lang.h b/src/mess/machine/a2lang.h
deleted file mode 100644
index 510b8ca2cb5..00000000000
--- a/src/mess/machine/a2lang.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*********************************************************************
-
- a2lang.h
-
- Apple II Language Card
-
-*********************************************************************/
-
-#ifndef __A2BUS_LANG__
-#define __A2BUS_LANG__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_lang_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_lang_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2bus_lang_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
-
-private:
- void langcard_touch(offs_t offset);
-};
-
-// device type definition
-extern const device_type A2BUS_LANG;
-
-#endif /* __A2BUS_LANG__ */
diff --git a/src/mess/machine/a2memexp.c b/src/mess/machine/a2memexp.c
deleted file mode 100644
index 2608e89e760..00000000000
--- a/src/mess/machine/a2memexp.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*********************************************************************
-
- a2memexp.c
-
- Implementation of the Apple II Memory Expansion Card
-
-*********************************************************************/
-
-#include "a2memexp.h"
-#include "includes/apple2.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_MEMEXP = &device_creator<a2bus_memexpapple_device>;
-const device_type A2BUS_RAMFACTOR = &device_creator<a2bus_ramfactor_device>;
-
-#define MEMEXP_ROM_REGION "memexp_rom"
-
-MACHINE_CONFIG_FRAGMENT( memexp )
-MACHINE_CONFIG_END
-
-ROM_START( memexp )
- ROM_REGION(0x1000, MEMEXP_ROM_REGION, 0)
- ROM_LOAD( "341-0344a.bin", 0x0000, 0x1000, CRC(1e994e17) SHA1(6e823a1fa40ed37eeddcef23f5df24da2ea1463e) )
-ROM_END
-
-ROM_START( ramfactor )
- ROM_REGION(0x8000, MEMEXP_ROM_REGION, 0)
- ROM_LOAD( "ae ramfactor rom v1.4.bin", 0x0000, 0x2000, CRC(1c56d646) SHA1(32cb02a6a915dd3962bfa1f0184a94253e03ba6b) )
- ROM_LOAD( "ae ramfactor rom v1.3.bin", 0x2000, 0x2000, CRC(434f5c45) SHA1(cf31a370951bd9a10d5b77f179134b358683b8fa) )
- ROM_LOAD( "ae ramfactor rom v1.1.bin", 0x4000, 0x2000, CRC(328907a3) SHA1(dc25b4133a52609799098d8918a289fd973d28d9) )
- ROM_LOAD( "ae ramfactor rom v1.0.bin", 0x6000, 0x2000, CRC(39c2162a) SHA1(9286d35907939aadb1fffd3e1d75603fe3e846ad) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_memexp_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( memexp );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_memexp_device::device_rom_region() const
-{
- return ROM_NAME( memexp );
-}
-
-const rom_entry *a2bus_ramfactor_device::device_rom_region() const
-{
- return ROM_NAME( ramfactor );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_memexp_device::a2bus_memexp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this)
-{
-}
-
-a2bus_memexpapple_device::a2bus_memexpapple_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_memexp_device(mconfig, A2BUS_MEMEXP, "Apple II Memory Expansion Card", tag, owner, clock, "a2memexp", __FILE__)
-{
- m_isramfactor = false;
- m_bankhior = 0xf0;
- m_addrmask = 0xfffff;
-}
-
-a2bus_ramfactor_device::a2bus_ramfactor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_memexp_device(mconfig, A2BUS_RAMFACTOR, "Applied Engineering RamFactor", tag, owner, clock, "a2ramfac", __FILE__)
-{
- m_isramfactor = true;
- m_bankhior = 0x00;
- m_addrmask = 0x7fffff;
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_memexp_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, MEMEXP_ROM_REGION))->base();
-
- memset(m_ram, 0xff, 1024*1024*sizeof(UINT8));
-
- save_item(NAME(m_regs));
- save_item(NAME(m_ram));
- save_item(NAME(m_wptr));
- save_item(NAME(m_liveptr));
-}
-
-void a2bus_memexp_device::device_reset()
-{
- memset(m_regs, 0, sizeof(UINT8) * 0x10);
- m_wptr = m_liveptr = 0;
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_memexp_device::read_c0nx(address_space &space, UINT8 offset)
-{
- UINT8 retval = m_regs[offset];
-
- if (offset == 3)
- {
- retval = m_ram[m_liveptr&m_addrmask];
-// printf("Read RAM[%x] = %02x\n", m_liveptr, retval);
- m_liveptr++;
- m_regs[0] = m_liveptr & 0xff;
- m_regs[1] = (m_liveptr>>8) & 0xff;
- m_regs[2] = ((m_liveptr>>16) & 0xff) | m_bankhior;
- }
-
-// printf("Read c0n%x (PC=%x) = %02x\n", offset, space.device().safe_pc(), retval);
-
- return retval;
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_memexp_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
-// printf("Write %02x to c0n%x (PC=%x)\n", data, offset, space.device().safe_pc());
-
- switch (offset)
- {
- case 0:
- m_wptr &= ~0xff;
- m_wptr |= data;
- m_regs[0] = m_wptr & 0xff;
- m_regs[1] = (m_wptr>>8) & 0xff;
- m_regs[2] = ((m_wptr>>16) & 0xff) | m_bankhior;
- m_liveptr = m_wptr;
- break;
-
- case 1:
- m_wptr &= ~0xff00;
- m_wptr |= (data<<8);
- m_regs[0] = m_wptr & 0xff;
- m_regs[1] = (m_wptr>>8) & 0xff;
- m_regs[2] = ((m_wptr>>16) & 0xff) | m_bankhior;
- m_liveptr = m_wptr;
- break;
-
- case 2:
- m_wptr &= ~0xff0000;
- m_wptr |= (data<<16);
- m_regs[0] = m_wptr & 0xff;
- m_regs[1] = (m_wptr>>8) & 0xff;
- m_regs[2] = ((m_wptr>>16) & 0xff) | m_bankhior;
- m_liveptr = m_wptr;
- break;
-
- case 3:
-// printf("Write %02x to RAM[%x]\n", data, m_liveptr);
- m_ram[(m_liveptr&m_addrmask)] = data;
- m_liveptr++;
- m_regs[0] = m_liveptr & 0xff;
- m_regs[1] = (m_liveptr>>8) & 0xff;
- m_regs[2] = ((m_liveptr>>16) & 0xff) | m_bankhior;
- break;
-
- default:
- m_regs[offset] = data;
- break;
- }
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_memexp_device::read_cnxx(address_space &space, UINT8 offset)
-{
- int slotimg = m_slot * 0x100;
-
- // first 0x400 of ROM contains a CnXX image for each of slots 1-7, last 0x400 is c800 image
- if ((m_isramfactor) && (m_regs[0xf] & 0x01))
- {
- return m_rom[offset+slotimg+0x1000];
- }
-
- return m_rom[offset+slotimg];
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_memexp_device::read_c800(address_space &space, UINT16 offset)
-{
- // c70a diags confirm: bit 1 of cn0F banks in the second half of the ROM
- if ((m_isramfactor) && (m_regs[0xf] & 0x01))
- {
- return m_rom[offset+0x1800];
- }
-
- return m_rom[offset+0x800];
-}
diff --git a/src/mess/machine/a2memexp.h b/src/mess/machine/a2memexp.h
deleted file mode 100644
index c6c4044fb9d..00000000000
--- a/src/mess/machine/a2memexp.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*********************************************************************
-
- a2memexp.h
-
- Implementation of the Apple II Memory Expansion Card
-
-*********************************************************************/
-
-#ifndef __A2BUS_MEMEXP__
-#define __A2BUS_MEMEXP__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_memexp_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_memexp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
- bool m_isramfactor;
- UINT8 m_bankhior;
- int m_addrmask;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
-
-private:
- UINT8 *m_rom;
- UINT8 m_regs[0x10];
- UINT8 m_ram[8*1024*1024];
- int m_wptr, m_liveptr;
-};
-
-class a2bus_memexpapple_device : public a2bus_memexp_device
-{
-public:
- a2bus_memexpapple_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-class a2bus_ramfactor_device : public a2bus_memexp_device
-{
-public:
- a2bus_ramfactor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual const rom_entry *device_rom_region() const;
-};
-
-// device type definition
-extern const device_type A2BUS_MEMEXP;
-extern const device_type A2BUS_RAMFACTOR;
-
-#endif /* __A2BUS_MEMEXP__ */
diff --git a/src/mess/machine/a2midi.c b/src/mess/machine/a2midi.c
deleted file mode 100644
index d1c2ebd2463..00000000000
--- a/src/mess/machine/a2midi.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/*********************************************************************
-
- a2midi.c
-
- Apple II 6850 MIDI card, as made by Passport, Yamaha, and others.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "machine/a2midi.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_MIDI = &device_creator<a2bus_midi_device>;
-
-#define MIDI_PTM_TAG "midi_ptm"
-#define MIDI_ACIA_TAG "midi_acia"
-
-static struct ptm6840_interface ptm_interface =
-{
- 1021800.0f,
- { 1021800.0f, 1021800.0f, 1021800.0f },
- { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL },
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, ptm_irq_w)
-};
-
-static struct acia6850_interface acia_interface =
-{
- 31250*16, // tx clock
- 0, // rx clock (we manually clock rx)
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, rx_in), // rx in
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, tx_out), // tx out
- DEVCB_NULL, // cts in
- DEVCB_NULL, // rts out
- DEVCB_NULL, // dcd in
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, acia_irq_w)
-};
-
-static SLOT_INTERFACE_START(midiin_slot)
- SLOT_INTERFACE("midiin", MIDIIN_PORT)
-SLOT_INTERFACE_END
-
-static const serial_port_interface midiin_intf =
-{
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, midi_rx_w)
-};
-
-static SLOT_INTERFACE_START(midiout_slot)
- SLOT_INTERFACE("midiout", MIDIOUT_PORT)
-SLOT_INTERFACE_END
-
-static const serial_port_interface midiout_intf =
-{
- DEVCB_NULL // midi out ports don't transmit inward
-};
-
-MACHINE_CONFIG_FRAGMENT( midi )
- MCFG_PTM6840_ADD(MIDI_PTM_TAG, ptm_interface)
- MCFG_ACIA6850_ADD(MIDI_ACIA_TAG, acia_interface)
- MCFG_SERIAL_PORT_ADD("mdin", midiin_intf, midiin_slot, "midiin")
- MCFG_SERIAL_PORT_ADD("mdout", midiout_intf, midiout_slot, "midiout")
-MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_midi_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( midi );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_midi_device::a2bus_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_MIDI, "6850 MIDI card", tag, owner, clock, "a2midi", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_ptm(*this, MIDI_PTM_TAG),
- m_acia(*this, MIDI_ACIA_TAG),
- m_mdout(*this, "mdout")
-{
-}
-
-a2bus_midi_device::a2bus_midi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_ptm(*this, MIDI_PTM_TAG),
- m_acia(*this, MIDI_ACIA_TAG),
- m_mdout(*this, "mdout")
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_midi_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-}
-
-void a2bus_midi_device::device_reset()
-{
- m_acia_irq = m_ptm_irq = false;
- m_rx_state = 0;
-}
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_midi_device::read_c0nx(address_space &space, UINT8 offset)
-{
- // PTM at C0n0-C0n7, ACIA at C0n8-C0n9, drum sync (?) at C0nA-C0nB
-
- if (offset < 8)
- {
- return m_ptm->read(space, offset & 7);
- }
- else if (offset == 8)
- {
- return m_acia->status_read(space, 0);
- }
- else if (offset == 9)
- {
- UINT8 ret = m_acia->data_read(space, 0);
- return ret;
- }
-
- return 0;
-}
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_midi_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- if (offset < 8)
- {
- m_ptm->write(space, offset & 7, data);
- }
- else if (offset == 8)
- {
- // HACK: GS/OS's CARD6850.MIDI driver sets 8-N-2, which is not valid MIDI.
- // This works on h/w pretty much by accident; we'll make it right here.
- if ((data & 0x1c) == 0x10)
- {
- data |= 0x04; // change wordbits from 0x10 to 0x14
- }
-
- m_acia->control_write(space, 0, data);
- }
- else if (offset == 9)
- {
- m_acia->data_write(space, 0, data);
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_midi_device::acia_irq_w )
-{
- m_acia_irq = state ? true : false;
-
- if (m_acia_irq || m_ptm_irq)
- {
- raise_slot_irq();
- }
- else
- {
- lower_slot_irq();
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_midi_device::ptm_irq_w )
-{
- m_acia_irq = state ? true : false;
-
- if (m_acia_irq || m_ptm_irq)
- {
- raise_slot_irq();
- }
- else
- {
- lower_slot_irq();
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_midi_device::midi_rx_w )
-{
- m_rx_state = state;
- for (int i = 0; i < 16; i++) // divider is set to 16
- {
- m_acia->rx_clock_in();
- }
-}
-
-READ_LINE_MEMBER( a2bus_midi_device::rx_in )
-{
- return m_rx_state;
-}
-
-WRITE_LINE_MEMBER( a2bus_midi_device::tx_out )
-{
- m_mdout->tx(state);
-}
diff --git a/src/mess/machine/a2midi.h b/src/mess/machine/a2midi.h
deleted file mode 100644
index 5482ca5eff2..00000000000
--- a/src/mess/machine/a2midi.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*********************************************************************
-
- a2midi.h
-
- Apple II 6850 MIDI card, as made by Passport, Yamaha, and others.
-
-*********************************************************************/
-
-#ifndef __A2BUS_MIDI__
-#define __A2BUS_MIDI__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/6840ptm.h"
-#include "machine/6850acia.h"
-#include "machine/serial.h"
-#include "machine/midiinport.h"
-#include "machine/midioutport.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_midi_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2bus_midi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
- DECLARE_WRITE_LINE_MEMBER( ptm_irq_w );
- DECLARE_WRITE_LINE_MEMBER( midi_rx_w );
- DECLARE_READ_LINE_MEMBER( rx_in );
- DECLARE_WRITE_LINE_MEMBER( tx_out );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
-
- required_device<ptm6840_device> m_ptm;
- required_device<acia6850_device> m_acia;
- required_device<serial_port_device> m_mdout;
-
-private:
- bool m_acia_irq, m_ptm_irq;
- int m_rx_state;
-};
-
-// device type definition
-extern const device_type A2BUS_MIDI;
-
-#endif /* __A2BUS_MIDI__ */
diff --git a/src/mess/machine/a2mockingboard.c b/src/mess/machine/a2mockingboard.c
deleted file mode 100644
index 07ccf0d80ca..00000000000
--- a/src/mess/machine/a2mockingboard.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/*********************************************************************
-
- a2mockingboard.c
-
- Implementation of the Sweet Micro Systems Mockingboard card
- and friends.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "machine/a2mockingboard.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-#define VIA1_TAG "mockbd_via1"
-#define VIA2_TAG "mockbd_via2"
-#define AY1_TAG "mockbd_ay1"
-#define AY2_TAG "mockbd_ay2"
-#define AY3_TAG "mockbd_ay3"
-#define AY4_TAG "mockbd_ay4"
-#define E2P_TMS_TAG "tms5220"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_MOCKINGBOARD = &device_creator<a2bus_mockingboard_device>;
-const device_type A2BUS_PHASOR = &device_creator<a2bus_phasor_device>;
-const device_type A2BUS_ECHOPLUS = &device_creator<a2bus_echoplus_device>;
-
-static const ay8910_interface mockingboard_ay8910_interface =
-{
- AY8910_LEGACY_OUTPUT,
- AY8910_DEFAULT_LOADS,
- DEVCB_NULL
-};
-
-const via6522_interface mockingboard_via1_intf =
-{
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via1_in_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via1_in_b),
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via1_out_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via1_out_b),
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via1_irq_w)
-};
-
-const via6522_interface mockingboard_via2_intf =
-{
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via2_in_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via2_in_b),
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via2_out_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via2_out_b),
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_NULL, DEVCB_NULL,
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_ayboard_device, via2_irq_w)
-};
-
-MACHINE_CONFIG_FRAGMENT( mockingboard )
- MCFG_VIA6522_ADD(VIA1_TAG, 1022727, mockingboard_via1_intf)
- MCFG_VIA6522_ADD(VIA2_TAG, 1022727, mockingboard_via2_intf)
-
- MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_FRAGMENT( phasor )
- MCFG_VIA6522_ADD(VIA1_TAG, 1022727, mockingboard_via1_intf)
- MCFG_VIA6522_ADD(VIA2_TAG, 1022727, mockingboard_via2_intf)
-
- MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SPEAKER_STANDARD_STEREO("lspeaker2", "rspeaker2")
- MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker2", 1.0)
- MCFG_SOUND_ADD(AY3_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_SOUND_ADD(AY4_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker2", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_FRAGMENT( echoplus )
- MCFG_VIA6522_ADD(VIA1_TAG, 1022727, mockingboard_via1_intf)
- MCFG_VIA6522_ADD(VIA2_TAG, 1022727, mockingboard_via2_intf)
-
- MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
- MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_SPEAKER_STANDARD_MONO("echosp")
- MCFG_SOUND_ADD(E2P_TMS_TAG, TMS5220, 640000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "echosp", 1.0)
-MACHINE_CONFIG_END
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_ayboard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( mockingboard );
-}
-
-machine_config_constructor a2bus_phasor_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( phasor );
-}
-
-machine_config_constructor a2bus_echoplus_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( echoplus );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_ayboard_device::a2bus_ayboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_via1(*this, VIA1_TAG),
- m_via2(*this, VIA2_TAG),
- m_ay1(*this, AY1_TAG),
- m_ay2(*this, AY2_TAG),
- m_ay3(*this, AY3_TAG),
- m_ay4(*this, AY4_TAG)
-{
-}
-
-a2bus_mockingboard_device::a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_ayboard_device(mconfig, A2BUS_MOCKINGBOARD, "Sweet Micro Systems Mockingboard", tag, owner, clock, "a2mockbd", __FILE__)
-{
- m_isPhasor = false;
- m_PhasorNative = false;
-}
-
-a2bus_phasor_device::a2bus_phasor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_ayboard_device(mconfig, A2BUS_PHASOR, "Applied Engineering Phasor", tag, owner, clock, "a2phasor", __FILE__)
-{
- m_isPhasor = true;
- m_PhasorNative = false;
-}
-
-a2bus_echoplus_device::a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_ayboard_device(mconfig, A2BUS_ECHOPLUS, "Street Electronics Echo Plus", tag, owner, clock, "a2echop", __FILE__),
- m_tms(*this, E2P_TMS_TAG)
-{
- m_isPhasor = false;
- m_PhasorNative = false;
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_ayboard_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- save_item(NAME(m_porta1));
- save_item(NAME(m_porta2));
-}
-
-void a2bus_ayboard_device::device_reset()
-{
- m_porta1 = m_porta2 = 0;
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_ayboard_device::read_cnxx(address_space &space, UINT8 offset)
-{
-// printf("Mockingboard(%d): read @ Cn%02X (PC=%x)\n", m_slot, offset, space.device().safe_pc());
- if (m_isPhasor)
- {
- UINT8 retVal = 0;
- int viaSel;
-
- if (m_PhasorNative)
- {
- viaSel = ((offset & 0x80)>> 6) | ((offset & 0x10)>> 4);
- }
- else
- {
- viaSel = (offset & 0x80) ? 2 : 1;
- }
-
- if ((offset <= 0x20) || (offset >= 0x80 && offset <= 0xa0))
- {
- if (viaSel & 1)
- {
- retVal |= m_via1->read(space, offset & 0xf);
- }
-
- if (viaSel & 2)
- {
- retVal |= m_via2->read(space, offset & 0xf);
- }
- }
-
- return retVal;
- }
- else
- {
- if (offset <= 0x10)
- {
- return m_via1->read(space, offset & 0xf);
- }
- else if (offset >= 0x80 && offset <= 0x90)
- {
- return m_via2->read(space, offset & 0xf);
- }
- }
-
- return 0;
-}
-
-/*-------------------------------------------------
- write_cnxx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_ayboard_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data)
-{
- if (m_isPhasor)
- {
- if ((offset <= 0x20) || (offset >= 0x80 && offset <= 0xa0))
- {
- int viaSel;
-
- if (m_PhasorNative)
- {
- viaSel = ((offset & 0x80)>> 6) | ((offset & 0x10)>> 4);
- }
- else
- {
- viaSel = (offset & 0x80) ? 2 : 1;
- }
-
-// printf("Phasor(%d): write %02x to Cn%02X (PC=%x) (native %d viaSel %d)\n", m_slot, data, offset, space.device().safe_pc(), m_PhasorNative ? 1 : 0, viaSel);
-
- if (viaSel & 1)
- {
- m_via1->write(space, offset&0xf, data);
- }
- if (viaSel & 2)
- {
- m_via2->write(space, offset&0xf, data);
- }
- }
- }
- else
- {
- if (offset <= 0x10)
- {
- m_via1->write(space, offset & 0xf, data);
- }
- else if (offset >= 0x80 && offset <= 0x90)
- {
- m_via2->write(space, offset & 0xf, data);
- }
- else
- {
- printf("Mockingboard(%d): unk write %02x to Cn%02X (PC=%x)\n", m_slot, data, offset, space.device().safe_pc());
- }
- }
-}
-
-
-WRITE_LINE_MEMBER( a2bus_ayboard_device::via1_irq_w )
-{
- if (state)
- {
- raise_slot_irq();
- }
- else
- {
- lower_slot_irq();
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_ayboard_device::via2_irq_w )
-{
- if (state)
- {
- raise_slot_irq();
- }
- else
- {
- lower_slot_irq();
- }
-}
-
-READ8_MEMBER( a2bus_ayboard_device::via1_in_a )
-{
- return 0;
-}
-
-WRITE8_MEMBER( a2bus_ayboard_device::via1_out_a )
-{
- m_porta1 = data;
-}
-
-READ8_MEMBER( a2bus_ayboard_device::via1_in_b )
-{
- return 0;
-}
-
-WRITE8_MEMBER( a2bus_ayboard_device::via1_out_b )
-{
- if (!(data & 4))
- {
- m_ay1->reset_w(space, 0, 0);
- if (m_isPhasor && m_PhasorNative)
- {
- m_ay2->reset_w(space, 0, 0);
- }
- }
- else
- {
- if (!m_isPhasor)
- {
- switch (data & 3)
- {
- case 0: // BDIR=0, BC1=0 (inactive)
- break;
-
- case 1: // BDIR=0, BC1=1 (read PSG)
- m_porta1 = m_ay1->data_r(space, 0);
- break;
-
- case 2: // BDIR=1, BC1=0 (write PSG)
- m_ay1->data_w(space, 0, m_porta1);
- break;
-
- case 3: // BDIR=1, BC1=1 (latch)
- m_ay1->address_w(space, 0, m_porta1);
- break;
- }
- }
- else
- {
- int chipSel;
-
- if (m_PhasorNative)
- {
- chipSel = (~(data >> 3) & 3);
- }
- else
- {
- chipSel = 1;
- }
-
-// printf("Phasor: %02x to AY1/2 CS %02x (BDIR/BC1 %02x, data %02x)\n", m_porta1, chipSel, data & 3, data);
- switch (data & 3)
- {
- case 0: // BDIR=0, BC1=0 (inactive)
- break;
-
- case 1: // BDIR=0, BC1=1 (read PSG)
- if (chipSel & 1)
- {
- m_porta1 = m_ay1->data_r(space, 0);
- }
- if (chipSel & 2)
- {
- m_porta1 = m_ay2->data_r(space, 0);
- }
- break;
-
- case 2: // BDIR=1, BC1=0 (write PSG)
- if (chipSel & 1)
- {
- m_ay1->data_w(space, 0, m_porta1);
- }
- if (chipSel & 2)
- {
- m_ay2->data_w(space, 0, m_porta1);
- }
- break;
-
- case 3: // BDIR=1, BC1=1 (latch)
- if (chipSel & 1)
- {
- m_ay1->address_w(space, 0, m_porta1);
- }
- if (chipSel & 2)
- {
- m_ay2->address_w(space, 0, m_porta1);
- }
- break;
- }
- }
- }
-}
-
-READ8_MEMBER( a2bus_ayboard_device::via2_in_a )
-{
- return 0;
-}
-
-WRITE8_MEMBER( a2bus_ayboard_device::via2_out_a )
-{
- m_porta2 = data;
-}
-
-READ8_MEMBER( a2bus_ayboard_device::via2_in_b )
-{
- return 0;
-}
-
-WRITE8_MEMBER( a2bus_ayboard_device::via2_out_b )
-{
- if (!(data & 4))
- {
- if (m_isPhasor && m_PhasorNative)
- {
- m_ay3->reset_w(space, 0, 0);
- m_ay4->reset_w(space, 0, 0);
- }
- else
- {
- m_ay2->reset_w(space, 0, 0);
- }
- }
- else
- {
- if (!m_isPhasor)
- {
- switch (data & 3)
- {
- case 0: // BDIR=0, BC1=0 (inactive)
- break;
-
- case 1: // BDIR=0, BC1=1 (read PSG)
- m_porta2 = m_ay2->data_r(space, 0);
- break;
-
- case 2: // BDIR=1, BC1=0 (write PSG)
- m_ay2->data_w(space, 0, m_porta2);
- break;
-
- case 3: // BDIR=1, BC1=1 (latch)
- m_ay2->address_w(space, 0, m_porta2);
- break;
- }
- }
- else
- {
- int chipSel;
-
- if (m_PhasorNative)
- {
- chipSel = (~(data >> 3) & 3);
- }
- else
- {
- chipSel = 1;
- }
-
-// printf("Phasor: %02x to AY3/4 CS %02x (BDIR/BC1 %02x, data %02x)\n", m_porta2, chipSel, data & 3, data);
- switch (data & 3)
- {
- case 0: // BDIR=0, BC1=0 (inactive)
- break;
-
- case 1: // BDIR=0, BC1=1 (read PSG)
- if (chipSel & 1)
- {
- m_porta2 = m_ay3->data_r(space, 0);
- }
- if (chipSel & 2)
- {
- m_porta2 = m_ay4->data_r(space, 0);
- }
- break;
-
- case 2: // BDIR=1, BC1=0 (write PSG)
- if (chipSel & 1)
- {
- m_ay3->data_w(space, 0, m_porta2);
- }
- if (chipSel & 2)
- {
- m_ay4->data_w(space, 0, m_porta2);
- }
- break;
-
- case 3: // BDIR=1, BC1=1 (latch)
- if (chipSel & 1)
- {
- m_ay3->address_w(space, 0, m_porta2);
- }
- if (chipSel & 2)
- {
- m_ay4->address_w(space, 0, m_porta2);
- }
- break;
- }
- }
- }
-}
-
-UINT8 a2bus_ayboard_device::read_c0nx(address_space &space, UINT8 offset)
-{
- if (m_isPhasor)
- {
- m_PhasorNative = (offset & 1) ? true : false;
- }
-
- return 0xff;
-}
-
-void a2bus_ayboard_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- if (m_isPhasor)
- {
- m_PhasorNative = (offset & 1) ? true : false;
- }
-}
-
-UINT8 a2bus_echoplus_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- return 0x1f | m_tms->status_r(space, 0);
- }
-
- return 0;
-}
-
-void a2bus_echoplus_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- m_tms->data_w(space, offset, data);
- break;
- }
-}
diff --git a/src/mess/machine/a2mockingboard.h b/src/mess/machine/a2mockingboard.h
deleted file mode 100644
index 9c779ccf9fe..00000000000
--- a/src/mess/machine/a2mockingboard.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*********************************************************************
-
- a2mockingboard.h
-
- Sweet Micro Systems Mockingboard and compatibles
-
-*********************************************************************/
-
-#ifndef __A2BUS_MOCKINGBOARD__
-#define __A2BUS_MOCKINGBOARD__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/6522via.h"
-#include "sound/ay8910.h"
-#include "sound/tms5220.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_ayboard_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_ayboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- DECLARE_WRITE_LINE_MEMBER( via1_irq_w );
- DECLARE_WRITE_LINE_MEMBER( via2_irq_w );
- DECLARE_READ8_MEMBER(via1_in_a);
- DECLARE_READ8_MEMBER(via1_in_b);
- DECLARE_WRITE8_MEMBER(via1_out_a);
- DECLARE_WRITE8_MEMBER(via1_out_b);
- DECLARE_READ8_MEMBER(via2_in_a);
- DECLARE_READ8_MEMBER(via2_in_b);
- DECLARE_WRITE8_MEMBER(via2_out_a);
- DECLARE_WRITE8_MEMBER(via2_out_b);
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data);
-
- required_device<via6522_device> m_via1;
- required_device<via6522_device> m_via2;
- required_device<ay8913_device> m_ay1;
- required_device<ay8913_device> m_ay2;
- optional_device<ay8913_device> m_ay3;
- optional_device<ay8913_device> m_ay4;
-
- bool m_isPhasor, m_PhasorNative;
-
-private:
- UINT8 m_porta1, m_porta2;
-};
-
-class a2bus_mockingboard_device : public a2bus_ayboard_device
-{
-public:
- a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-class a2bus_phasor_device : public a2bus_ayboard_device
-{
-public:
- a2bus_phasor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual machine_config_constructor device_mconfig_additions() const;
-};
-
-class a2bus_echoplus_device : public a2bus_ayboard_device
-{
-public:
- a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
-
- required_device<tms5220_device> m_tms;
-
- virtual machine_config_constructor device_mconfig_additions() const;
-};
-
-// device type definition
-extern const device_type A2BUS_MOCKINGBOARD;
-extern const device_type A2BUS_PHASOR;
-extern const device_type A2BUS_ECHOPLUS;
-
-#endif /* __A2BUS_MOCKINGBOARD__ */
diff --git a/src/mess/machine/a2sam.c b/src/mess/machine/a2sam.c
deleted file mode 100644
index b9a73d95d06..00000000000
--- a/src/mess/machine/a2sam.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*********************************************************************
-
- a2sam.c
-
- Implementation of the S.A.M. "Software Automated Mouth" card
-
-*********************************************************************/
-
-#include "a2sam.h"
-#include "includes/apple2.h"
-#include "sound/dac.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_SAM = &device_creator<a2bus_sam_device>;
-
-#define DAC_TAG "dac"
-
-MACHINE_CONFIG_FRAGMENT( a2sam )
- MCFG_SPEAKER_STANDARD_MONO("samspkr")
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "samspkr", 1.00)
-MACHINE_CONFIG_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_sam_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2sam );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_dac(*this, DAC_TAG)
-{
-}
-
-a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_SAM, "Don't Ask Software SAM", tag, owner, clock, "a2sam", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_dac(*this, DAC_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_sam_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-}
-
-void a2bus_sam_device::device_reset()
-{
-}
-
-void a2bus_sam_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- m_dac->write_unsigned8(data);
-}
-
-bool a2bus_sam_device::take_c800()
-{
- return false;
-}
diff --git a/src/mess/machine/a2sam.h b/src/mess/machine/a2sam.h
deleted file mode 100644
index ebc91831d8c..00000000000
--- a/src/mess/machine/a2sam.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*********************************************************************
-
- a2sam.h
-
- Implementation of the S.A.M. "Software Automated Mouth" card
-
-*********************************************************************/
-
-#ifndef __A2BUS_SAM__
-#define __A2BUS_SAM__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "sound/dac.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_sam_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- required_device<dac_device> m_dac;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual bool take_c800();
-};
-
-// device type definition
-extern const device_type A2BUS_SAM;
-
-#endif /* __A2BUS_SAM__ */
diff --git a/src/mess/machine/a2scsi.c b/src/mess/machine/a2scsi.c
deleted file mode 100644
index d27903464b4..00000000000
--- a/src/mess/machine/a2scsi.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*********************************************************************
-
- a2scsi.c
-
- Implementation of the Apple II SCSI Card
-
- Schematic at:
- http://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/SCSI%20Controllers/Apple%20II%20SCSI%20Card/Schematics/Rev.%20C%20SCSI%20Schematic%20-%20Updated%202-23-6.jpg
-
-
- Notes:
- C0n0-C0n7 = NCR5380 registers in normal order
- C0n8 = pseudo-DMA read/write and DACK
- C0n9 = DIP switches
- C0na = RAM and ROM bank switching
- C0nb = reset 5380
- C0nc = set IIgs block mode
- C0nd = set pseudo-DMA
- C0ne = read DRQ status in bit 7
-
- In IIgs block mode, any read from C800-CBFF window fetches
- the next byte from the 5380's DMA port. This lets you use the
- 65816 MVN/MVP operations to burst-transfer up to 1K at a time.
- (Requires a cycle-by-cycle haltable 65816 core; don't install the
- GS/OS driver right now to avoid this)
-
- Pseudo-DMA works similarly to the Mac implementation; use C0n8
- to read/write "DMA" bytes in that mode.
-
-*********************************************************************/
-
-#include "a2scsi.h"
-#include "includes/apple2.h"
-#include "machine/scsibus.h"
-#include "machine/nscsi_cd.h"
-#include "machine/nscsi_hd.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_SCSI = &device_creator<a2bus_scsi_device>;
-
-#define SCSI_ROM_REGION "scsi_rom"
-#define SCSI_BUS_TAG "scsibus"
-#define SCSI_5380_TAG "scsibus:7:ncr5380"
-
-static MACHINE_CONFIG_FRAGMENT( ncr5380 )
- MCFG_DEVICE_MODIFY(DEVICE_SELF)
- MCFG_DEVICE_CLOCK(10000000)
- MCFG_NCR5380N_DRQ_HANDLER(DEVWRITELINE("^^", a2bus_scsi_device, drq_w))
-MACHINE_CONFIG_END
-
-static SLOT_INTERFACE_START( scsi_devices )
- SLOT_INTERFACE("cdrom", NSCSI_CDROM)
- SLOT_INTERFACE("harddisk", NSCSI_HARDDISK)
- SLOT_INTERFACE_INTERNAL("ncr5380", NCR5380N)
-SLOT_INTERFACE_END
-
-MACHINE_CONFIG_FRAGMENT( scsi )
- MCFG_SCSIBUS_ADD("scsi")
- MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
- MCFG_NSCSI_ADD("scsibus:0", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:1", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:2", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:3", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:4", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:5", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:6", scsi_devices, "harddisk", false)
- MCFG_NSCSI_ADD("scsibus:7", scsi_devices, "ncr5380", true)
- MCFG_DEVICE_CARD_MACHINE_CONFIG("ncr5380", ncr5380)
-MACHINE_CONFIG_END
-
-ROM_START( scsi )
- ROM_REGION(0x4000, SCSI_ROM_REGION, 0) // this is the Rev. C ROM
- ROM_LOAD( "341-0437-a.bin", 0x0000, 0x4000, CRC(5aff85d3) SHA1(451c85c46b92e6ad2ad930f055ccf0fe3049936d) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_scsi_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( scsi );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_scsi_device::device_rom_region() const
-{
- return ROM_NAME( scsi );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_scsi_device::a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_ncr5380(*this, SCSI_5380_TAG),
- m_scsibus(*this, SCSI_BUS_TAG)
-{
-}
-
-a2bus_scsi_device::a2bus_scsi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_SCSI, "Apple II SCSI Card", tag, owner, clock, "a2scsi", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_ncr5380(*this, SCSI_5380_TAG),
- m_scsibus(*this, SCSI_BUS_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_scsi_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SCSI_ROM_REGION))->base();
-
- memset(m_ram, 0, 8192);
-
- save_item(NAME(m_ram));
- save_item(NAME(m_rambank));
- save_item(NAME(m_rombank));
- save_item(NAME(m_bank));
- save_item(NAME(m_drq));
- save_item(NAME(m_816block));
-}
-
-void a2bus_scsi_device::device_reset()
-{
- m_rambank = m_rombank = 0; // CLR on 74LS273 at U3E is connected to RES, so these clear on reset
- m_816block = false;
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_scsi_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
-// printf("Read 5380 @ %x\n", offset);
- return m_ncr5380->read(space, offset);
- break;
-
- case 8: // read and DACK
- return m_ncr5380->dma_r();
-
- case 9: // our SCSI ID (normally 0x80 = 7)
- return (1<<7);
-
- case 0xa: // RAM/ROM bank
- return m_bank;
-
- case 0xe: // DRQ status in bit 7
- return m_drq;
-
- default:
- printf("Read c0n%x (PC=%x)\n", offset, space.device().safe_pc());
- break;
- }
-
- return 0xff;
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_scsi_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
-// printf("%02x to 5380 reg %x\n", data, offset);
- m_ncr5380->write(space, offset, data);
- break;
-
- case 8: // write and DACK
- m_ncr5380->dma_w(data);
- break;
-
- case 0xa: // ROM and RAM banking (74LS273 at U3E)
- /*
- ROM banking:
- (bits EA8-EA13 are all zeroed when /IOSEL is asserted, so CnXX always gets the first page of the ROM)
- EA10 = bit 0
- EA11 = bit 1
- EA12 = bit 2
- EA13 = bit 3 (N/C)
-
- RAM banking:
- RA10 = bit 4
- RA11 = bit 5
- RA12 = bit 6
- */
-
- m_rambank = ((data>>4) & 0x7) * 0x400;
- m_rombank = (data & 0xf) * 0x400;
- m_bank = data;
-// printf("RAM bank to %x, ROM bank to %x\n", m_rambank, m_rombank);
- m_816block = false; // does this reset block mode?
- break;
-
- case 0xb: // reset 5380
-// printf("Resetting SCSI: %02x at %x\n", data, space.device().safe_pc());
- m_ncr5380->reset();
- m_816block = false;
- break;
-
- case 0xc: // set IIgs block mode DMA
- printf("%02x to block-mode DMA mode\n", data);
- m_816block = true;
- break;
-
- case 0xd: // set Mac-style pseudo-DMA
-// printf("%02x to pseudo-DMA mode\n", data);
- m_816block = false;
- break;
-
- default:
- printf("Write %02x to c0n%x (PC=%x)\n", data, offset, space.device().safe_pc());
- break;
- }
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_scsi_device::read_cnxx(address_space &space, UINT8 offset)
-{
- // one slot image at the start of the ROM, it appears
- return m_rom[offset];
-}
-
-void a2bus_scsi_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data)
-{
- // there are writes to cn0A, possibly misguided C0nA (bank select?) writes?
-// printf("Write %02x to cn%02x (PC=%x)\n", data, offset, space.device().safe_pc());
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_scsi_device::read_c800(address_space &space, UINT16 offset)
-{
- // bankswitched RAM at c800-cbff
- // bankswitched ROM at cc00-cfff
- if (offset < 0x400)
- {
-// printf("Read RAM at %x = %02x\n", offset+m_rambank, m_ram[offset + m_rambank]);
- if (m_816block)
- {
- return m_ncr5380->dma_r();
- }
-
- return m_ram[offset + m_rambank];
- }
- else
- {
- return m_rom[(offset-0x400) + m_rombank];
- }
-}
-
-/*-------------------------------------------------
- write_c800 - called for writes to this card's c800 space
--------------------------------------------------*/
-void a2bus_scsi_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
-{
- if (offset < 0x400)
- {
-// printf("%02x to RAM at %x\n", data, offset+m_rambank);
- if (m_816block)
- {
- m_ncr5380->dma_w(data);
- }
- else
- {
- m_ram[offset + m_rambank] = data;
- }
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_scsi_device::drq_w )
-{
- m_drq = (state ? 0x80 : 0x00);
-}
diff --git a/src/mess/machine/a2scsi.h b/src/mess/machine/a2scsi.h
deleted file mode 100644
index 9e0f20661fa..00000000000
--- a/src/mess/machine/a2scsi.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*********************************************************************
-
- a2scsi.h
-
- Implementation of the Apple II SCSI Card
-
-*********************************************************************/
-
-#ifndef __A2BUS_SCSI__
-#define __A2BUS_SCSI__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/ncr5380n.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_scsi_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_scsi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
- required_device<ncr5380n_device> m_ncr5380;
- required_device<nscsi_bus_device> m_scsibus;
-
- DECLARE_WRITE_LINE_MEMBER( drq_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
- virtual void write_c800(address_space &space, UINT16 offset, UINT8 data);
-
-private:
- UINT8 *m_rom;
- UINT8 m_ram[8192]; // 8 banks of 1024 bytes
- int m_rambank, m_rombank;
- UINT8 m_drq;
- UINT8 m_bank;
- bool m_816block;
-};
-
-// device type definition
-extern const device_type A2BUS_SCSI;
-
-#endif /* __A2BUS_SCSI__ */
diff --git a/src/mess/machine/a2softcard.c b/src/mess/machine/a2softcard.c
deleted file mode 100644
index abe14856625..00000000000
--- a/src/mess/machine/a2softcard.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*********************************************************************
-
- a2softcard.c
-
- Implementation of the Microsoft SoftCard Z-80 card
-
-*********************************************************************/
-
-#include "a2softcard.h"
-#include "includes/apple2.h"
-#include "cpu/z80/z80.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_SOFTCARD = &device_creator<a2bus_softcard_device>;
-
-#define Z80_TAG "z80"
-
-static ADDRESS_MAP_START( z80_mem, AS_PROGRAM, 8, a2bus_softcard_device )
- AM_RANGE(0x0000, 0xffff) AM_READWRITE(dma_r, dma_w)
-ADDRESS_MAP_END
-
-MACHINE_CONFIG_FRAGMENT( a2softcard )
- MCFG_CPU_ADD(Z80_TAG, Z80, 1021800*2) // Z80 runs on double the Apple II's clock
- MCFG_CPU_PROGRAM_MAP(z80_mem)
-MACHINE_CONFIG_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_softcard_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2softcard );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_z80(*this, Z80_TAG),
- m_6502space(NULL)
-{
-}
-
-a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_SOFTCARD, "Microsoft SoftCard", tag, owner, clock, "a2softcard", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_z80(*this, Z80_TAG),
- m_6502space(NULL)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_softcard_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- save_item(NAME(m_bEnabled));
- save_item(NAME(m_FirstZ80Boot));
-}
-
-void a2bus_softcard_device::device_reset()
-{
- m_bEnabled = false;
- m_6502space = NULL;
- m_FirstZ80Boot = true;
- m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
-}
-
-void a2bus_softcard_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data)
-{
- apple2_state *state = machine().driver_data<apple2_state>();
-
- if (!m_bEnabled)
- {
- // steal the 6502's address space
- m_6502space = &space;
-
- m_z80->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
- state->m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
-
- if (m_FirstZ80Boot)
- {
- m_FirstZ80Boot = false;
- m_z80->reset();
- }
-
- m_bEnabled = true;
- }
- else
- {
- m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
- state->m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
- m_bEnabled = false;
- }
-}
-
-READ8_MEMBER( a2bus_softcard_device::dma_r )
-{
- if (m_6502space)
- {
- if (offset <= 0xafff)
- {
- return m_6502space->read_byte(offset+0x1000);
- }
- else if (offset <= 0xbfff) // LC bank 2 d000-dfff
- {
- return m_6502space->read_byte((offset&0xfff) + 0xd000);
- }
- else if (offset <= 0xcfff) // LC e000-efff
- {
- return m_6502space->read_byte((offset&0xfff) + 0xe000);
- }
- else if (offset <= 0xdfff) // LC f000-ffff (or ROM?)
- {
- return m_6502space->read_byte((offset&0xfff) + 0xf000);
- }
- else if (offset <= 0xefff) // I/O space c000-cfff
- {
- return m_6502space->read_byte((offset&0xfff) + 0xc000);
- }
- else // zero page
- {
- return m_6502space->read_byte(offset&0xfff);
- }
- }
-
- return 0xff;
-}
-
-
-//-------------------------------------------------
-// dma_w -
-//-------------------------------------------------
-
-WRITE8_MEMBER( a2bus_softcard_device::dma_w )
-{
- if (m_6502space)
- {
- if (offset <= 0xafff)
- {
- m_6502space->write_byte(offset+0x1000, data);
- }
- else if (offset <= 0xbfff) // LC bank 2 d000-dfff
- {
- m_6502space->write_byte((offset&0xfff) + 0xd000, data);
- }
- else if (offset <= 0xcfff) // LC e000-efff
- {
- m_6502space->write_byte((offset&0xfff) + 0xe000, data);
- }
- else if (offset <= 0xdfff) // LC f000-ffff (or ROM?)
- {
- m_6502space->write_byte((offset&0xfff) + 0xf000, data);
- }
- else if (offset <= 0xefff) // I/O space c000-cfff
- {
- m_6502space->write_byte((offset&0xfff) + 0xc000, data);
- }
- else // zero page
- {
- m_6502space->write_byte(offset&0xfff, data);
- }
- }
-}
-
-bool a2bus_softcard_device::take_c800()
-{
- return false;
-}
diff --git a/src/mess/machine/a2softcard.h b/src/mess/machine/a2softcard.h
deleted file mode 100644
index d66595f0917..00000000000
--- a/src/mess/machine/a2softcard.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*********************************************************************
-
- a2softcard.h
-
- Implementation of the Microsoft SoftCard Z-80 card
-
-*********************************************************************/
-
-#ifndef __A2BUS_SOFTCARD__
-#define __A2BUS_SOFTCARD__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_softcard_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_softcard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_softcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- DECLARE_READ8_MEMBER( dma_r );
- DECLARE_WRITE8_MEMBER( dma_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data);
- virtual bool take_c800();
-
- required_device<cpu_device> m_z80;
-
-private:
- bool m_bEnabled;
- bool m_FirstZ80Boot;
- address_space *m_6502space;
-};
-
-// device type definition
-extern const device_type A2BUS_SOFTCARD;
-
-#endif /* __A2BUS_SOFTCARD__ */
diff --git a/src/mess/machine/a2ssc.c b/src/mess/machine/a2ssc.c
deleted file mode 100644
index 85cf151cdca..00000000000
--- a/src/mess/machine/a2ssc.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*********************************************************************
-
- a2ssc.c
-
- Apple II Super Serial Card
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "machine/a2ssc.h"
-#include "machine/terminal.h"
-#include "machine/null_modem.h"
-#include "machine/serial.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_SSC = &device_creator<a2bus_ssc_device>;
-
-#define SSC_ROM_REGION "ssc_rom"
-#define SSC_ACIA_TAG "ssc_acia"
-#define SSC_RS232_TAG "ssc_rs232"
-
-static SLOT_INTERFACE_START( rs232_devices )
- SLOT_INTERFACE("serial_terminal", SERIAL_TERMINAL)
- SLOT_INTERFACE("null_modem", NULL_MODEM)
-SLOT_INTERFACE_END
-
-static const rs232_port_interface rs232_intf =
-{
- DEVCB_DEVICE_LINE_MEMBER(SSC_ACIA_TAG, mos6551_device, rxd_w),
- DEVCB_DEVICE_LINE_MEMBER(SSC_ACIA_TAG, mos6551_device, dcd_w),
- DEVCB_DEVICE_LINE_MEMBER(SSC_ACIA_TAG, mos6551_device, dsr_w),
- DEVCB_NULL,
- DEVCB_DEVICE_LINE_MEMBER(SSC_ACIA_TAG, mos6551_device, cts_w)
-};
-
-MACHINE_CONFIG_FRAGMENT( ssc )
- MCFG_MOS6551_ADD(SSC_ACIA_TAG, XTAL_1_8432MHz, WRITELINE(a2bus_ssc_device, acia_irq_w))
- MCFG_MOS6551_RXD_TXD_CALLBACKS(NULL, DEVWRITELINE(SSC_RS232_TAG, rs232_port_device, tx))
-
- MCFG_RS232_PORT_ADD(SSC_RS232_TAG, rs232_intf, rs232_devices, NULL)
-MACHINE_CONFIG_END
-
-ROM_START( ssc )
- ROM_REGION(0x000800, SSC_ROM_REGION, 0)
- ROM_LOAD( "341-0065-a.bin", 0x000000, 0x000800, CRC(b7539d4c) SHA1(6dab633470c6bc4cb3e81d09fda46597caf8ee57) )
-ROM_END
-
-static INPUT_PORTS_START( ssc )
- PORT_START("DSW1")
- PORT_DIPNAME( 0xf0, 0xf0, "Baud rate" )
- PORT_DIPSETTING( 0x00, "Undefined/115200" )
- PORT_DIPSETTING( 0x10, "50" )
- PORT_DIPSETTING( 0x20, "75" )
- PORT_DIPSETTING( 0x30, "110" )
- PORT_DIPSETTING( 0x40, "135" )
- PORT_DIPSETTING( 0x50, "150" )
- PORT_DIPSETTING( 0x60, "300" )
- PORT_DIPSETTING( 0x70, "600" )
- PORT_DIPSETTING( 0x80, "1200" )
- PORT_DIPSETTING( 0x90, "1800" )
- PORT_DIPSETTING( 0xa0, "2400" )
- PORT_DIPSETTING( 0xb0, "3600" )
- PORT_DIPSETTING( 0xc0, "4800" )
- PORT_DIPSETTING( 0xd0, "7200" )
- PORT_DIPSETTING( 0xe0, "9600" )
- PORT_DIPSETTING( 0xf0, "19200" )
-
- PORT_DIPNAME( 0x0c, 0x00, "Mode" )
- PORT_DIPSETTING( 0x00, "Communications Mode" )
- PORT_DIPSETTING( 0x04, "SIC P8 Emulation Mode" )
- PORT_DIPSETTING( 0x08, "Printer Mode" )
- PORT_DIPSETTING( 0x0c, "SIC P8A Emulation Mode" )
-
- PORT_DIPNAME( 0x01, 0x00, "Clear To Send" )
- PORT_DIPSETTING( 0x00, "Normal Clear To Send" )
- PORT_DIPSETTING( 0x01, "Secondary Clear To Send" )
-
- PORT_START("DSW2")
- PORT_DIPNAME( 0xc0, 0x00, "Format" )
- PORT_DIPSETTING( 0x00, "8 data, 1 stop")
- PORT_DIPSETTING( 0x40, "7 data, 1 stop")
- PORT_DIPSETTING( 0x80, "8 data, 2 stop")
- PORT_DIPSETTING( 0xc0, "7 data, 2 stop")
-
- PORT_DIPNAME( 0x30, 0x00, "Parity" )
- PORT_DIPSETTING( 0x00, "None")
- PORT_DIPSETTING( 0x10, "Odd")
- PORT_DIPSETTING( 0x30, "Even")
-
- PORT_DIPNAME( 0x08, 0x08, "End of Line" )
- PORT_DIPSETTING( 0x00, "Add LF after CR")
- PORT_DIPSETTING( 0x08, "Don't add LF after CR")
-
- PORT_DIPNAME( 0x04, 0x04, "Interrupts" )
- PORT_DIPSETTING( 0x00, "On")
- PORT_DIPSETTING( 0x04, "Off")
-INPUT_PORTS_END
-
-//-------------------------------------------------
-// input_ports - device-specific input ports
-//-------------------------------------------------
-
-ioport_constructor a2bus_ssc_device::device_input_ports() const
-{
- return INPUT_PORTS_NAME( ssc );
-}
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_ssc_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( ssc );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_ssc_device::device_rom_region() const
-{
- return ROM_NAME( ssc );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_SSC, "Apple Super Serial Card", tag, owner, clock, "a2ssc", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_dsw1(*this, "DSW1"),
- m_dsw2(*this, "DSW2"),
- m_acia(*this, SSC_ACIA_TAG)
-{
-}
-
-a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_dsw1(*this, "DSW1"),
- m_dsw2(*this, "DSW2"),
- m_acia(*this, SSC_ACIA_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_ssc_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SSC_ROM_REGION))->base();
-}
-
-void a2bus_ssc_device::device_reset()
-{
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_ssc_device::read_cnxx(address_space &space, UINT8 offset)
-{
- return m_rom[(offset&0xff)+0x700];
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_ssc_device::read_c800(address_space &space, UINT16 offset)
-{
- return m_rom[offset];
-}
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_ssc_device::read_c0nx(address_space &space, UINT8 offset)
-{
- // dips at C0n1/C0n2, ACIA at C0n8/9/A/B
-
- switch (offset)
- {
- case 1:
- return m_dsw1->read();
- case 2:
- return m_dsw2->read();
-
- case 8:
- case 9:
- case 0xa:
- case 0xb:
- return m_acia->read(space, offset-8);
-
- }
-
- return 0;
-}
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_ssc_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 8:
- case 9:
- case 0xa:
- case 0xb:
- m_acia->write(space, offset-8, data);
- break;
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_ssc_device::acia_irq_w )
-{
- if (!(m_dsw2->read() & 4))
- {
- if (state)
- {
- raise_slot_irq();
- }
- else
- {
- lower_slot_irq();
- }
- }
-}
diff --git a/src/mess/machine/a2ssc.h b/src/mess/machine/a2ssc.h
deleted file mode 100644
index 41837a5098f..00000000000
--- a/src/mess/machine/a2ssc.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*********************************************************************
-
- a2ssc.h
-
- Apple II Super Serial Card
-
-*********************************************************************/
-
-#ifndef __A2BUS_SSC__
-#define __A2BUS_SSC__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/mos6551.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_ssc_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
- virtual ioport_constructor device_input_ports() const;
-
- required_ioport m_dsw1, m_dsw2;
-
- DECLARE_WRITE_LINE_MEMBER( acia_irq_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
-
- required_device<mos6551_device> m_acia;
-
-private:
- UINT8 *m_rom;
-};
-
-// device type definition
-extern const device_type A2BUS_SSC;
-
-#endif /* __A2BUS_SSC__ */
diff --git a/src/mess/machine/a2swyft.c b/src/mess/machine/a2swyft.c
deleted file mode 100644
index dae9cefe92a..00000000000
--- a/src/mess/machine/a2swyft.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*********************************************************************
-
- a2swyft.c
-
- Implementation of the IAI SwyftCard
-
-*********************************************************************/
-
-#include "emu.h"
-#include "includes/apple2.h"
-#include "machine/a2swyft.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_SWYFT = &device_creator<a2bus_swyft_device>;
-
-#define SWYFT_ROM_REGION "swyft_rom"
-
-ROM_START( swyft )
- ROM_REGION(0x4000, SWYFT_ROM_REGION, 0)
- ROM_LOAD( "840-003a.bin", 0x000000, 0x004000, CRC(5d6673e9) SHA1(1554bd03c536789f0ff7d1ef6c992265e311935d) )
- ROM_REGION(0x1000, "pal16r4", 0)
- ROM_LOAD( "swyft_pal16r4.jed", 0x0000, 0x08EF, CRC(462a6938) SHA1(38be885539cf91423a246378c411ac8b2f150ec6) ) // swyft3.pal derived by D. Elvey, works as a replacement pal (original is protected?)
-ROM_END
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_swyft_device::device_rom_region() const
-{
- return ROM_NAME( swyft );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_SWYFT, "IAI SwyftCard", tag, owner, clock, "a2swyft", __FILE__),
- device_a2bus_card_interface(mconfig, *this)
-{
-}
-
-a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_swyft_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SWYFT_ROM_REGION))->base();
-
- save_item(NAME(m_rombank));
-}
-
-void a2bus_swyft_device::device_reset()
-{
- m_rombank = 0;
-
- // take over the machine
- apple2_state *state = machine().driver_data<apple2_state>();
- raise_slot_inh();
- state->m_maincpu->reset();
-}
-
-UINT8 a2bus_swyft_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- m_rombank = 0;
- raise_slot_inh();
- break;
-
- case 1:
- m_rombank = 0;
- lower_slot_inh();
- break;
-
- case 2:
- m_rombank = 0x1000;
- raise_slot_inh();
- break;
- }
-
- return 0xff;
-}
-
-void a2bus_swyft_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- m_rombank = 0;
- raise_slot_inh();
- break;
-
- case 1:
- m_rombank = 0;
- lower_slot_inh();
- break;
-
- case 2:
- m_rombank = 0x1000;
- raise_slot_inh();
- break;
- }
-}
-
-UINT8 a2bus_swyft_device::read_inh_rom(address_space &space, UINT16 offset)
-{
- if (offset < 0x1000) // banked area d000-dfff
- {
- return m_rom[offset + m_rombank];
- }
- else // fixed area e000-ffff
- {
- return m_rom[offset - 0x1000 + 0x2000];
- }
-}
diff --git a/src/mess/machine/a2swyft.h b/src/mess/machine/a2swyft.h
deleted file mode 100644
index a0f2cb22788..00000000000
--- a/src/mess/machine/a2swyft.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*********************************************************************
-
- a2swyft.h
-
- IAI SwyftCard
-
-*********************************************************************/
-
-#ifndef __A2BUS_SWYFT__
-#define __A2BUS_SWYFT__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_swyft_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- a2bus_swyft_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- virtual const rom_entry *device_rom_region() const;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_inh_rom(address_space &space, UINT16 offset);
-
-private:
- UINT8 *m_rom;
- int m_rombank;
-};
-
-// device type definition
-extern const device_type A2BUS_SWYFT;
-
-#endif /* __A2BUS_SWYFT__ */
diff --git a/src/mess/machine/a2themill.c b/src/mess/machine/a2themill.c
deleted file mode 100644
index 2eba107063e..00000000000
--- a/src/mess/machine/a2themill.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*********************************************************************
-
- a2themill.c
-
- Implementation of the Stellation Two The Mill 6809 card
-
- The OS9 add-on changes the address mapping as follows:
- 6809 0x0000-0xafff -> 6502 0x1000-0xbfff
- 6809 0xb000-0xdfff -> 6502 0xd000-0xffff
- 6809 0xe000-0xefff -> 6502 0xc000-0xcfff
- 6809 0xf000-0xffff -> 6502 0x0000-0x0fff
-
- (reference: http://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Hardware/mill.6809 )
-
- ProDOS "Stellation The Mill Disk.po" requires Mill in slot 2; boot
- the disc and type "-DEMO1" and press Enter to launch the simple demo.
-
- The OS9 disk image available around the internet seems to be bad - the
- 6809 boot vector is 0x4144 which maps to 6502 0x5144 and there's all
- zeros from 6502 1000-8fff. There is valid 6809 code from 9000-BFFF
- at the point where it wants to boot the 6809, but I don't know what
- is supposed to be the entry point.
-
-*********************************************************************/
-
-#include "a2themill.h"
-#include "includes/apple2.h"
-#include "cpu/m6809/m6809.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-#define MILL_VERBOSE (0)
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_THEMILL = &device_creator<a2bus_themill_device>;
-
-#define M6809_TAG "m6809"
-
-static ADDRESS_MAP_START( m6809_mem, AS_PROGRAM, 8, a2bus_themill_device )
- AM_RANGE(0x0000, 0xffff) AM_READWRITE(dma_r, dma_w)
-ADDRESS_MAP_END
-
-MACHINE_CONFIG_FRAGMENT( a2themill )
- MCFG_CPU_ADD(M6809_TAG, M6809, 1021800) // M6809 runs at ~1 MHz as per Stellation Two's print ads
- MCFG_CPU_PROGRAM_MAP(m6809_mem)
-MACHINE_CONFIG_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_themill_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2themill );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_6809(*this, M6809_TAG),
- m_6502space(NULL)
-{
-}
-
-a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_THEMILL, "Stellation Two The Mill", tag, owner, clock, "a2themill", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_6809(*this, M6809_TAG),
- m_6502space(NULL)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_themill_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- save_item(NAME(m_bEnabled));
- save_item(NAME(m_flipAddrSpace));
- save_item(NAME(m_6809Mode));
- save_item(NAME(m_status));
-}
-
-void a2bus_themill_device::device_reset()
-{
- m_bEnabled = false;
- m_6502space = NULL;
- m_flipAddrSpace = false;
- m_6809Mode = false;
- m_status = 0xc0; // OS9 loader relies on this
- m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
- m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
-}
-
-UINT8 a2bus_themill_device::read_c0nx(address_space &space, UINT8 offset)
-{
- return m_status;
-}
-
-void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0: // 6502 IRQ
- if (data & 0x80)
- {
- m_status |= 0x01;
- lower_slot_irq();
- }
- else
- {
- m_status &= ~0x01;
- raise_slot_irq();
- }
- break;
-
- case 2: // 6809 reset
- if (data & 0x80)
- {
- // steal the 6502's address space
- m_6502space = &space;
- m_6809->reset();
-
- m_6809->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
- m_6809->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
-
- m_bEnabled = true;
- m_status &= ~0x04;
- }
- else
- {
- m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
- m_bEnabled = false;
- m_status |= 0x04;
- }
- break;
-
- case 1: // 6809 halt
- if (data & 0x80) // release reset
- {
- m_status |= 0x02;
- }
- else
- {
- m_6809->reset();
- m_status &= ~0x02;
- }
- break;
-
- case 3: // 6809 NMI
- if (data & 0x80)
- {
- m_6809->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
- m_status |= 0x08;
- }
- else
- {
- m_6809->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
- m_status &= ~0x08;
- }
- break;
-
- case 4: // 6809 FIRQ
- if (data & 0x80)
- {
- m_6809->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
- m_status |= 0x10;
- }
- else
- {
- m_6809->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
- m_status &= ~0x10;
- }
- break;
-
- case 5: // 6809 IRQ
- if (data & 0x80)
- {
- m_6809->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
- m_status |= 0x20;
- }
- else
- {
- m_6809->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
- m_status &= ~0x20;
- }
- break;
-
- case 6:
- if (data & 0x80) // enable ROM socket
- {
- m_status |= 0x40;
- printf("The Mill: on-board ROM socket enabled; because none of these ROMs are dumped, the 6809 will not run!\n");
- }
- else
- {
- m_status &= ~0x40;
- }
- break;
-
- case 7: // 6809 mapping
- if (data & 0x80)
- {
- m_status |= 0x80;
- m_flipAddrSpace = false;
- }
- else
- {
- m_status &= ~0x80;
- m_flipAddrSpace = true;
- }
- break;
-
- case 0xa: // addresses >= 0x8 are direct status writes? "Excel Flex 9" disc seems to indicate so.
- m_status = data;
- break;
-
- default:
- printf("The Mill: %02x to unhandled c0n%x\n", data, offset);
- break;
- }
-}
-
-READ8_MEMBER( a2bus_themill_device::dma_r )
-{
- if (m_6502space)
- {
- if (m_6809Mode)
- {
- if (offset <= 0xafff)
- {
- return m_6502space->read_byte(offset+0x1000);
- }
- else if (offset <= 0xbfff)
- {
- return m_6502space->read_byte((offset&0xfff) + 0xd000);
- }
- else if (offset <= 0xcfff)
- {
- return m_6502space->read_byte((offset&0xfff) + 0xe000);
- }
- else if (offset <= 0xdfff)
- {
- return m_6502space->read_byte((offset&0xfff) + 0xf000);
- }
- else if (offset <= 0xefff)
- {
- return m_6502space->read_byte((offset&0xfff) + 0xc000);
- }
- else // 6809 Fxxx -> 6502 ZP
- {
- return m_6502space->read_byte(offset&0xfff);
- }
- }
- else
- {
- if (m_flipAddrSpace)
- {
- return m_6502space->read_byte(offset^0x8000);
- }
- else
- {
- return m_6502space->read_byte(offset);
- }
- }
- }
-
- return 0xff;
-}
-
-
-//-------------------------------------------------
-// dma_w -
-//-------------------------------------------------
-
-WRITE8_MEMBER( a2bus_themill_device::dma_w )
-{
- if (m_6502space)
- {
- if (m_6809Mode)
- {
- if (offset <= 0xafff)
- {
- m_6502space->write_byte(offset+0x1000, data);
- }
- else if (offset <= 0xbfff)
- {
- m_6502space->write_byte((offset&0xfff) + 0xd000, data);
- }
- else if (offset <= 0xcfff)
- {
- m_6502space->write_byte((offset&0xfff) + 0xe000, data);
- }
- else if (offset <= 0xdfff)
- {
- m_6502space->write_byte((offset&0xfff) + 0xf000, data);
- }
- else if (offset <= 0xefff)
- {
- m_6502space->write_byte((offset&0xfff) + 0xc000, data);
- }
- else // 6809 Fxxx -> 6502 ZP
- {
- m_6502space->write_byte(offset&0xfff, data);
- }
- }
- else
- {
- if (m_flipAddrSpace)
- {
- m_6502space->write_byte(offset^0x8000, data);
- }
- else
- {
- m_6502space->write_byte(offset, data);
- }
- }
- }
-}
-
-bool a2bus_themill_device::take_c800()
-{
- return false;
-}
diff --git a/src/mess/machine/a2themill.h b/src/mess/machine/a2themill.h
deleted file mode 100644
index bdbd0c97dcb..00000000000
--- a/src/mess/machine/a2themill.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*********************************************************************
-
- a2themill.h
-
- Implementation of the Stellation Two The Mill 6809 card
-
-*********************************************************************/
-
-#ifndef __A2BUS_THEMILL__
-#define __A2BUS_THEMILL__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_themill_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_themill_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_themill_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- DECLARE_READ8_MEMBER( dma_r );
- DECLARE_WRITE8_MEMBER( dma_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual bool take_c800();
-
- required_device<cpu_device> m_6809;
-
-private:
- bool m_bEnabled;
- bool m_flipAddrSpace;
- bool m_6809Mode;
- address_space *m_6502space;
- UINT8 m_status;
-};
-
-// device type definition
-extern const device_type A2BUS_THEMILL;
-
-#endif /* __A2BUS_THEMILL__ */
diff --git a/src/mess/machine/a2thunderclock.c b/src/mess/machine/a2thunderclock.c
deleted file mode 100644
index ea5604521b6..00000000000
--- a/src/mess/machine/a2thunderclock.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*********************************************************************
-
- a2thunderclock.c
-
- Implemention of the Thunderware Thunderclock Plus.
-
-
- PCB Layout: (B1/B2 are batteries)
- _______________________________________________________________
- | |
- | | | | | uPD1990 CD4050 74LS174 74LS132 |
- | | | | | _ _ _ _ _ |
- | | | | | | | | | | | | | | | |
- | | | | | |_| |_| |_| |_| |_| |
- | B1 B2 74LS08 |
- | 74LS74 74LS109 74LS126 ____________ 74LS27 |
- | _ _ _ | | _ |
- | | | | | | | | 2716 | | | |
- | |_| |_| |_| |____________| |_| |
- |______________________________________ _|
- | |
- |______________________|
-
-*********************************************************************/
-
-#include "a2thunderclock.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_THUNDERCLOCK = &device_creator<a2bus_thunderclock_device>;
-
-#define THUNDERCLOCK_ROM_REGION "thunclk_rom"
-#define THUNDERCLOCK_UPD1990_TAG "thunclk_upd"
-
-MACHINE_CONFIG_FRAGMENT( thunderclock )
- MCFG_UPD1990A_ADD(THUNDERCLOCK_UPD1990_TAG, 1021800, DEVWRITELINE(DEVICE_SELF, a2bus_thunderclock_device, upd_dataout_w), NULL)
-MACHINE_CONFIG_END
-
-ROM_START( thunderclock )
- ROM_REGION(0x800, THUNDERCLOCK_ROM_REGION, 0)
- ROM_LOAD( "thunderclock plus rom.bin", 0x0000, 0x0800, CRC(1b99c4e3) SHA1(60f434f5325899d7ea257a6e56e6f53eae65146a) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_thunderclock_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( thunderclock );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_thunderclock_device::device_rom_region() const
-{
- return ROM_NAME( thunderclock );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_upd1990ac(*this, THUNDERCLOCK_UPD1990_TAG)
-{
-}
-
-a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_THUNDERCLOCK, "ThunderWare ThunderClock Plus", tag, owner, clock, "a2thunpl", __FILE__),
- device_a2bus_card_interface(mconfig, *this),
- m_upd1990ac(*this, THUNDERCLOCK_UPD1990_TAG)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_thunderclock_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, THUNDERCLOCK_ROM_REGION))->base();
-
- save_item(NAME(m_dataout));
-}
-
-void a2bus_thunderclock_device::device_reset()
-{
- m_dataout = 0;
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_thunderclock_device::read_c0nx(address_space &space, UINT8 offset)
-{
- return (m_dataout << 7);
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_thunderclock_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- // uPD1990AC hookup:
- // bit 0 = DATA IN?
- // bit 1 = CLK
- // bit 2 = STB
- // bit 3 = C0
- // bit 4 = C1
- // bit 5 = C2
- // bit 7 = data out
- if (offset == 0)
- {
- m_upd1990ac->cs_w(1);
- m_upd1990ac->oe_w(1);
- m_upd1990ac->data_in_w(data&0x01);
- m_upd1990ac->c0_w((data&0x08) >> 3);
- m_upd1990ac->c1_w((data&0x10) >> 4);
- m_upd1990ac->c2_w((data&0x20) >> 5);
- m_upd1990ac->stb_w((data&0x04) >> 2);
- m_upd1990ac->clk_w((data&0x02) >> 1);
- }
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_thunderclock_device::read_cnxx(address_space &space, UINT8 offset)
-{
- // ROM is primarily a c800 image, but the first page is also the CnXX ROM
- return m_rom[offset];
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_thunderclock_device::read_c800(address_space &space, UINT16 offset)
-{
- return m_rom[offset];
-}
-
-WRITE_LINE_MEMBER( a2bus_thunderclock_device::upd_dataout_w )
-{
- if (state)
- {
- m_dataout = 1;
- }
- else
- {
- m_dataout = 0;
- }
-}
diff --git a/src/mess/machine/a2thunderclock.h b/src/mess/machine/a2thunderclock.h
deleted file mode 100644
index 296010fe341..00000000000
--- a/src/mess/machine/a2thunderclock.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*********************************************************************
-
- a2thunderclock.h
-
- Implemention of the Thunderware Thunderclock Plus.
-
-*********************************************************************/
-
-#ifndef __A2BUS_THUNDERCLOCK__
-#define __A2BUS_THUNDERCLOCK__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/upd1990a.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_thunderclock_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_thunderclock_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_thunderclock_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
- DECLARE_WRITE_LINE_MEMBER( upd_dataout_w );
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
-
- required_device<upd1990a_device> m_upd1990ac;
-
-private:
- UINT8 *m_rom;
- int m_dataout;
-};
-
-// device type definition
-extern const device_type A2BUS_THUNDERCLOCK;
-
-#endif /* __A2BUS_THUNDERCLOCK__ */
diff --git a/src/mess/machine/a2videoterm.c b/src/mess/machine/a2videoterm.c
deleted file mode 100644
index 35b14f2c3c7..00000000000
--- a/src/mess/machine/a2videoterm.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/*********************************************************************
-
- a2videoterm.c
-
- Implementation of the Videx VideoTerm 80-column card
-
- Notes (from Videoterm user's manual, which contains
- schematics and firmware source listings).
-
- C0nX: C0n0 is 6845 register address,
- C0n1 is 6845 register data.
-
- Bits 2 & 3 on any access to C0nX set the VRAM page at CC00.
-
- C800-CBFF: ROM
- CC00-CDFF: VRAM window
-
- TODO:
- Cursor is probably not completely right.
- Add font ROM select.
-
-*********************************************************************/
-
-#include "a2videoterm.h"
-#include "includes/apple2.h"
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_VIDEOTERM = &device_creator<a2bus_videoterm_device>;
-const device_type A2BUS_IBSAP16 = &device_creator<a2bus_ap16_device>;
-const device_type A2BUS_IBSAP16ALT = &device_creator<a2bus_ap16alt_device>;
-const device_type A2BUS_VTC1 = &device_creator<a2bus_vtc1_device>;
-const device_type A2BUS_VTC2 = &device_creator<a2bus_vtc2_device>;
-
-#define VIDEOTERM_ROM_REGION "vterm_rom"
-#define VIDEOTERM_GFX_REGION "vterm_gfx"
-#define VIDEOTERM_SCREEN_NAME "vterm_screen"
-#define VIDEOTERM_MC6845_NAME "mc6845_vterm"
-
-#define MDA_CLOCK 16257000
-
-static MC6845_UPDATE_ROW( videoterm_update_row );
-
-static MC6845_INTERFACE( mc6845_mda_intf )
-{
- false, /* show border area */
- 8, /* number of pixels per video memory address */
- NULL, /* begin_update */
- videoterm_update_row, /* update_row */
- NULL, /* end_update */
- DEVCB_NULL, /* on_de_changed */
- DEVCB_NULL, /* on_cur_changed */
- DEVCB_NULL, /* on hsync changed */
- DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_videx80_device, vsync_changed), /* on_vsync_changed */
- NULL
-};
-
-MACHINE_CONFIG_FRAGMENT( a2videoterm )
- MCFG_SCREEN_ADD( VIDEOTERM_SCREEN_NAME, RASTER) // 560x216? (80x24 7x9 characters)
- MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 882, 0, 720, 370, 0, 350 )
- MCFG_SCREEN_UPDATE_DEVICE( VIDEOTERM_MC6845_NAME, mc6845_device, screen_update )
-
- MCFG_MC6845_ADD( VIDEOTERM_MC6845_NAME, MC6845, VIDEOTERM_SCREEN_NAME, MDA_CLOCK/9, mc6845_mda_intf)
-MACHINE_CONFIG_END
-
-ROM_START( a2videoterm )
- ROM_REGION(0x400, VIDEOTERM_ROM_REGION, 0)
- ROM_LOAD( "videx videoterm rom 2.4.bin", 0x000000, 0x000400, CRC(bbe3bb28) SHA1(bb653836e84850ce3197f461d4e19355f738cfbf) )
-
- ROM_REGION(0x5000, VIDEOTERM_GFX_REGION, 0)
- ROM_LOAD( "videx videoterm character rom normal.bin", 0x000000, 0x000800, CRC(87f89f08) SHA1(410b54f33d13c82e3857f1be906d93a8c5b8d321) )
- ROM_LOAD( "videx videoterm character rom normal uppercase.bin", 0x000800, 0x000800, CRC(3d94a7a4) SHA1(5518254f24bc945aab13bc71ecc9526d6dd8e033) )
- ROM_LOAD( "videx videoterm character rom apl.bin", 0x001000, 0x000800, CRC(1adb704e) SHA1(a95df910eca33188cacee333b1325aa47edbcc25) )
- ROM_LOAD( "videx videoterm character rom epson.bin", 0x001800, 0x000800, CRC(0c6ef8d0) SHA1(db72c0c120086f1aa4a87120c5d7993c4a9d3a18) )
- ROM_LOAD( "videx videoterm character rom french.bin", 0x002000, 0x000800, CRC(266aa837) SHA1(2c6b4e9d342dbb2de8e278740f11925a9d8c6616) )
- ROM_LOAD( "videx videoterm character rom german.bin", 0x002800, 0x000800, CRC(df7324fa) SHA1(0ce58d2ffadbebc8db9f85bbb9a08a4f142af682) )
- ROM_LOAD( "videx videoterm character rom katakana.bin", 0x003000, 0x000800, CRC(b728690e) SHA1(e018fa66b0ff560313bb35757c9ce7adecae0c3a) )
- ROM_LOAD( "videx videoterm character rom spanish.bin", 0x003800, 0x000800, CRC(439eac08) SHA1(d6f9f8eb7702440d9ae39129ea4f480b80fc4608) )
- ROM_LOAD( "videx videoterm character rom super and subscript.bin", 0x004000, 0x000800, CRC(08b7c538) SHA1(7f4029d97be05680fe695debe07cea07666419e0) )
- ROM_LOAD( "videx videoterm character rom symbol.bin", 0x004800, 0x000800, CRC(82bce582) SHA1(29dfa8c5257dbf25651c6bffa9cdb453482aa70e) )
-ROM_END
-
-ROM_START( a2ap16 )
- ROM_REGION(0x2000, VIDEOTERM_ROM_REGION, 0)
- ROM_LOAD( "space 84 video ap16.bin", 0x000000, 0x002000, CRC(0e188da2) SHA1(9a29250b6cc7b576fdc67769944de35e6f54b9d5) )
-
- ROM_REGION(0x4000, VIDEOTERM_GFX_REGION, 0)
- ROM_LOAD( "space 84 video chargen ap16.bin", 0x000000, 0x002000, CRC(b9447088) SHA1(19c95f91a67b948fc00a14621d574d629479d451) )
-ROM_END
-
-ROM_START( a2ap16alt )
- ROM_REGION(0x1000, VIDEOTERM_ROM_REGION, 0)
- ROM_LOAD( "unknown apple ii clone video 3.bin", 0x000000, 0x001000, CRC(af1226d2) SHA1(18a569f417a47f54a17bd9046d306a54b46ed049) )
-
- ROM_REGION(0x4000, VIDEOTERM_GFX_REGION, 0)
- ROM_LOAD( "unknown apple ii clone video 1.bin", 0x000000, 0x001000, CRC(cf84811c) SHA1(135f4f35607dd74941f0a3cae813227bf8a8a020) )
-ROM_END
-
-ROM_START( vtc1 )
- ROM_REGION(0x800, VIDEOTERM_ROM_REGION, 0)
- ROM_LOAD( "10.ic10.bin", 0x000000, 0x000800, CRC(ddbbc2fb) SHA1(15d6142b177b47c016f2745e1d95767b440d77c7) )
-
- ROM_REGION(0x1000, VIDEOTERM_GFX_REGION, 0)
- ROM_LOAD( "9.ic9.bin", 0x000000, 0x000800, CRC(094670f1) SHA1(aefae76fb07740d042cf294f01424efa7cc7a199) )
- ROM_LOAD( "8.ic8.bin", 0x000800, 0x000800, CRC(fbd98d77) SHA1(0d9b1c3917e23ca35d5fbd405f05ff6e87122b92) )
-ROM_END
-
-ROM_START( vtc2 )
- ROM_REGION(0x800, VIDEOTERM_ROM_REGION, 0)
- ROM_LOAD( "6.ic6.bin", 0x000000, 0x000800, CRC(5776fa24) SHA1(19f69011ed7d2551c39d5c1cac1f5a2defc8f8fb) )
-
- ROM_REGION(0x1000, VIDEOTERM_GFX_REGION, 0)
- ROM_LOAD( "5.ic5.bin", 0x000000, 0x000800, CRC(aafa7085) SHA1(54d7c358f1927ba8f3b61145215a806d8cb6b673) )
- ROM_LOAD( "4.ic4.bin", 0x000800, 0x000800, CRC(8a497a48) SHA1(50c3df528109c65491a001ec74e50351a652c1fd) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_videx80_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2videoterm );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_videoterm_device::device_rom_region() const
-{
- return ROM_NAME( a2videoterm );
-}
-
-const rom_entry *a2bus_ap16_device::device_rom_region() const
-{
- return ROM_NAME( a2ap16 );
-}
-
-const rom_entry *a2bus_ap16alt_device::device_rom_region() const
-{
- return ROM_NAME( a2ap16alt );
-}
-
-const rom_entry *a2bus_vtc1_device::device_rom_region() const
-{
- return ROM_NAME( vtc1 );
-}
-
-const rom_entry *a2bus_vtc2_device::device_rom_region() const
-{
- return ROM_NAME( vtc2 );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_videx80_device::a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_crtc(*this, VIDEOTERM_MC6845_NAME)
-{
-}
-
-a2bus_videoterm_device::a2bus_videoterm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_videx80_device(mconfig, A2BUS_VIDEOTERM, "Videx VideoTerm", tag, owner, clock, "a2vidtrm", __FILE__)
-{
-}
-
-a2bus_ap16_device::a2bus_ap16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_videx80_device(mconfig, A2BUS_IBSAP16, "IBS AP-16 80 column card", tag, owner, clock, "a2ap16", __FILE__)
-{
-}
-
-a2bus_ap16alt_device::a2bus_ap16alt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_videx80_device(mconfig, A2BUS_IBSAP16ALT, "IBS AP-16 80 column card (alt. version)", tag, owner, clock, "a2ap16a", __FILE__)
-{
-}
-
-a2bus_vtc1_device::a2bus_vtc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_videx80_device(mconfig, A2BUS_VTC1, "Unknown VideoTerm clone #1", tag, owner, clock, "a2vtc1", __FILE__)
-{
-}
-
-a2bus_vtc2_device::a2bus_vtc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_videx80_device(mconfig, A2BUS_VTC2, "Unknown VideoTerm clone #2", tag, owner, clock, "a2vtc2", __FILE__)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_videx80_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, VIDEOTERM_ROM_REGION))->base();
-
- astring tempstring2;
- m_chrrom = device().machine().root_device().memregion(this->subtag(tempstring2, VIDEOTERM_GFX_REGION))->base();
-
- memset(m_ram, 0, 4*512);
-
- save_item(NAME(m_ram));
- save_item(NAME(m_framecnt));
- save_item(NAME(m_rambank));
-}
-
-void a2bus_videx80_device::device_reset()
-{
- m_rambank = 0;
- m_framecnt = 0;
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_videx80_device::read_c0nx(address_space &space, UINT8 offset)
-{
-// printf("Read c0n%x (PC=%x)\n", offset, space.device().safe_pc());
-
- m_rambank = ((offset>>2) & 3) * 512;
-
- if (offset == 1)
- {
- return m_crtc->register_r(space, offset); // status_r?
- }
-
- return 0xff;
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_videx80_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
-// printf("Write %02x to c0n%x (PC=%x)\n", data, offset, space.device().safe_pc());
-
- if (offset == 0)
- {
- m_crtc->address_w(space, offset, data);
- }
- else if (offset == 1)
- {
- m_crtc->register_w(space, offset, data);
- }
-
- m_rambank = ((offset>>2) & 3) * 512;
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_videx80_device::read_cnxx(address_space &space, UINT8 offset)
-{
- return m_rom[offset+0x300];
-}
-
-UINT8 a2bus_ap16_device::read_cnxx(address_space &space, UINT8 offset)
-{
- return m_rom[offset+0x1f00];
-}
-
-UINT8 a2bus_ap16alt_device::read_cnxx(address_space &space, UINT8 offset)
-{
- return m_rom[offset+0xb00];
-}
-
-/*-------------------------------------------------
- write_cnxx - called for writes to this card's cnxx space
- the firmware writes here to switch in our $C800 a lot
--------------------------------------------------*/
-void a2bus_videx80_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data)
-{
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_videx80_device::read_c800(address_space &space, UINT16 offset)
-{
- // ROM at c800-cbff
- // bankswitched RAM at cc00-cdff
- if (offset < 0x400)
- {
-// printf("Read VRAM at %x = %02x\n", offset+m_rambank, m_ram[offset + m_rambank]);
- return m_rom[offset];
- }
- else
- {
- return m_ram[(offset-0x400) + m_rambank];
- }
-}
-
-/*-------------------------------------------------
- write_c800 - called for writes to this card's c800 space
--------------------------------------------------*/
-void a2bus_videx80_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
-{
- if (offset >= 0x400)
- {
-// printf("%02x to VRAM at %x\n", data, offset-0x400+m_rambank);
- m_ram[(offset-0x400) + m_rambank] = data;
- }
-}
-
-static MC6845_UPDATE_ROW( videoterm_update_row )
-{
- a2bus_videx80_device *vterm = downcast<a2bus_videx80_device *>(device->owner());
- const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
- UINT32 *p = &bitmap.pix32(y);
- UINT16 chr_base = ra; //( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
- int i;
-
- for ( i = 0; i < x_count; i++ )
- {
- UINT16 offset = ( ma + i ) & 0x7ff;
- UINT8 chr = vterm->m_ram[ offset ];
- UINT8 data = vterm->m_chrrom[ chr_base + chr * 16 ];
- UINT8 fg = 15;
- UINT8 bg = 0;
-
- if ( i == cursor_x )
- {
- if ( vterm->m_framecnt & 0x08 )
- {
- data = 0xFF;
- }
- }
-
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
- }
-}
-
-WRITE_LINE_MEMBER( a2bus_videx80_device::vsync_changed )
-{
- if ( state )
- {
- m_framecnt++;
- }
-}
diff --git a/src/mess/machine/a2videoterm.h b/src/mess/machine/a2videoterm.h
deleted file mode 100644
index 403bd7af405..00000000000
--- a/src/mess/machine/a2videoterm.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*********************************************************************
-
- a2videoterm.h
-
- Implementation of the Apple II Memory Expansion Card
-
-*********************************************************************/
-
-#ifndef __A2BUS_VIDEOTERM__
-#define __A2BUS_VIDEOTERM__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "video/mc6845.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_videx80_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
- DECLARE_WRITE_LINE_MEMBER(vsync_changed);
-
- UINT8 *m_rom, *m_chrrom;
- UINT8 m_ram[512*4];
- int m_framecnt;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
- virtual void write_c800(address_space &space, UINT16 offset, UINT8 data);
-
- required_device<mc6845_device> m_crtc;
-
-private:
- int m_rambank;
-};
-
-class a2bus_videoterm_device : public a2bus_videx80_device
-{
-public:
- a2bus_videoterm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual const rom_entry *device_rom_region() const;
-};
-
-class a2bus_ap16_device : public a2bus_videx80_device
-{
-public:
- a2bus_ap16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual const rom_entry *device_rom_region() const;
-
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
-};
-
-
-class a2bus_ap16alt_device : public a2bus_videx80_device
-{
-public:
- a2bus_ap16alt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual const rom_entry *device_rom_region() const;
-
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
-};
-
-class a2bus_vtc1_device : public a2bus_videx80_device
-{
-public:
- a2bus_vtc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual const rom_entry *device_rom_region() const;
-};
-
-class a2bus_vtc2_device : public a2bus_videx80_device
-{
-public:
- a2bus_vtc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual const rom_entry *device_rom_region() const;
-};
-
-// device type definition
-extern const device_type A2BUS_VIDEOTERM;
-extern const device_type A2BUS_IBSAP16;
-extern const device_type A2BUS_IBSAP16ALT;
-extern const device_type A2BUS_VTC1;
-extern const device_type A2BUS_VTC2;
-
-#endif /* __A2BUS_VIDEOTERM__ */
diff --git a/src/mess/machine/a2vulcan.c b/src/mess/machine/a2vulcan.c
deleted file mode 100644
index 280e100a211..00000000000
--- a/src/mess/machine/a2vulcan.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*********************************************************************
-
- a2vulcan.c
-
- Applied Engineering Vulcan IDE controller
-
- Our copy of ROM version 1.4 will refuse any drive > 40 megs (top 2 bytes of # blocks >= 0x15b).
- Protection against field upgrades?
-
- Vulcan Gold ROMs omit this protection but don't work with the version of the partitioner program
- we have.
-
- Recognized drives by IDE features parameters:
- (# of cylinders is never checked, just heads, sectors, and the vendor specific at 0x0A)
-
- H S Vendor specific #5
- 8, 33 + 0x69 0x31d blocks (400K?!)
- 2, 33 + 0x69 0xa208 blocks (20 megs, 21237760 bytes)
- 4, 26 + 0x69 0x14500 blocks (40 megs, 42598400 bytes)
- 5, 29 + (any) 0x25c5b blocks (80 megs, 79214080 bytes) (chs = 1067,5,29)
- 7, 29 + 0x44 0x34e19 blocks (100 megs, 110899712 bytes)
- 9, 29 + (any) 0x44068 blocks (140 megs, 142659584 bytes) (chs = 1068,9,29)
- 9, 36 + 0x44 0x54888 blocks (180 megs, 177278976 bytes)
- 9, 36 + 0xff 0x645a8 blocks (200 megs, 210456576 bytes)
- 7, 34 + (any) 0x32252 blocks (100 megs, 105161728 bytes) (chs = 863,7,34)
- 4, 17 + 0x55 0xa218 blocks (20 megs, 21245952 bytes)
- 4, 26 + 0x55 0xa218 blocks (20 megs, 21245952 bytes)
- 5, 17 + 0x55 0x15234 blocks (40 megs, 44328960 bytes)
- 6, 26 + 0x55 0x15234 blocks (40 megs, 44328960 bytes)
- 2, 28 + 0x36 0xa250 blocks (20 megs, 21274624 bytes)
- 4, 28 + 0x36 0x143c0 blocks (40 megs, 42434450 bytes)
- 4, 28 + 0x67 0x143c0 blocks (40 megs, 42434450 bytes)
- 4, 27 + 0x43 0x147cc blocks (40 megs, 42964992 bytes)
- 5, 17 + 0x26 0x13ec0 blocks (40 megs, 41779200 bytes) (chs = 960,5,17)
- 15, 32 + 0x43 0x5f6e0 blocks (200 megs, 200130560 bytes)
- 16, 38 + 0x94 0x6540c blocks (200 megs, 212342784 bytes)
- 10, 17 + (any) 0x2792f blocks (80 megs, 82992640 bytes) (chs = 954,10,17)
-
- Partition block:
- +0000: 0xAE 0xAE signature
- +0002: bytesum of remaining 508 bytes of partition block
- +0005: total # of blocks (3 bytes)
- +000E: boot partition # (0 based)
- +0100: partition records
-
- Partition record:
- +02: partition number (seems to be only valud for non-CLEAR partitions)
- +03: little-endian unsigned word: # of 512 byte blocks
- +06: bit 6 set for ON, bits 0-2 = 0 CLEAR, 1 PRODOS, 2 DOS 3.3, 3 PASCAL, 4 CP/M
- +07: Partition name (Apple high-ASCII, zero terminated unless full 10 chars)
-
-*********************************************************************/
-
-#include "a2vulcan.h"
-#include "includes/apple2.h"
-#include "machine/ataintf.h"
-#include "imagedev/harddriv.h"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_VULCAN = &device_creator<a2bus_vulcan_device>;
-
-#define VULCAN_ROM_REGION "vulcan_rom"
-#define VULCAN_ATA_TAG "vulcan_ata"
-
-static MACHINE_CONFIG_FRAGMENT( vulcan )
- MCFG_ATA_INTERFACE_ADD(VULCAN_ATA_TAG, ata_devices, "hdd", NULL, false)
-MACHINE_CONFIG_END
-
-ROM_START( vulcan )
- ROM_REGION(0x4000, VULCAN_ROM_REGION, 0)
- ROM_LOAD( "ae vulcan rom v1.4.bin", 0x000000, 0x004000, CRC(798d5825) SHA1(1d668e856e33c6eeb10fe26975341afa8acb81f5) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_vulcanbase_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( vulcan );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_vulcanbase_device::device_rom_region() const
-{
- return ROM_NAME( vulcan );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_vulcanbase_device::a2bus_vulcanbase_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_ata(*this, VULCAN_ATA_TAG)
-{
-}
-
-a2bus_vulcan_device::a2bus_vulcan_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_vulcanbase_device(mconfig, A2BUS_VULCAN, "Applied Engineering Vulcan IDE controller", tag, owner, clock, "a2vulcan", __FILE__)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_vulcanbase_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, VULCAN_ROM_REGION))->base();
-
- // disable 40 meg partition size limit / protection
- m_rom[0x59e] = 0xea;
- m_rom[0x59f] = 0xea;
-
- save_item(NAME(m_lastdata));
- save_item(NAME(m_ram));
- save_item(NAME(m_rombank));
- save_item(NAME(m_rambank));
-}
-
-void a2bus_vulcanbase_device::device_reset()
-{
- m_rombank = m_rambank = 0;
- m_last_read_was_0 = false;
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_vulcanbase_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- m_lastdata = m_ata->read_cs0(space, offset, 0xffff);
-// printf("IDE: read %04x\n", m_lastdata);
- m_last_read_was_0 = true;
- return m_lastdata&0xff;
-
- case 1:
- if (m_last_read_was_0)
- {
- m_last_read_was_0 = false;
- return (m_lastdata>>8) & 0xff;
- }
- else
- {
- return m_ata->read_cs0(space, offset, 0xff);
- }
- break;
-
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- return m_ata->read_cs0(space, offset, 0xff);
-
- default:
-// printf("Read @ C0n%x\n", offset);
- break;
-
- }
-
- return 0xff;
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_vulcanbase_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- m_lastdata = data;
- m_last_read_was_0 = true;
- break;
-
- case 1:
- if (m_last_read_was_0)
- {
- m_last_read_was_0 = false;
- m_lastdata &= 0x00ff;
- m_lastdata |= (data << 8);
-// printf("IDE: write %04x\n", m_lastdata);
- m_ata->write_cs0(space, 0, m_lastdata, 0xffff);
- }
- else
- {
- m_ata->write_cs0(space, offset, data, 0xff);
- }
- break;
-
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
-// printf("%02x to IDE controller @ %x\n", data, offset);
- m_ata->write_cs0(space, offset, data, 0xff);
- break;
-
- case 9: // ROM bank
-// printf("%x (%x) to ROM bank\n", data, (data & 0xf) * 0x400);
- m_rombank = (data & 0xf) * 0x400;
- break;
-
- case 0xa: // RAM bank
-// printf("%x to RAM bank\n", data);
- m_rambank = (data & 7) * 0x400;
- break;
-
- default:
- logerror("a2vulcan: write %02x @ unhandled C0n%x\n", data, offset);
- break;
- }
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_vulcanbase_device::read_cnxx(address_space &space, UINT8 offset)
-{
- int slotimg = m_slot * 0x100;
-
- // ROM contains a CnXX image for each of slots 1-7 at 0x3400
- return m_rom[offset+slotimg+0x3400];
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_vulcanbase_device::read_c800(address_space &space, UINT16 offset)
-{
- offset &= 0x7ff;
- if (offset < 0x400) // c800-cbff is banked RAM window, cc00-cfff is banked ROM window
- {
-// printf("read RAM @ %x (bank %x)\n", offset, m_rambank);
- return m_ram[offset + m_rambank];
- }
-
- offset -= 0x400;
- return m_rom[offset+m_rombank];
-}
-
-void a2bus_vulcanbase_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
-{
- offset &= 0x7ff;
- if (offset < 0x400)
- {
-// printf("%02x to RAM @ %x (bank %x)\n", data, offset, m_rambank);
- m_ram[offset + m_rambank] = data;
- }
-}
diff --git a/src/mess/machine/a2vulcan.h b/src/mess/machine/a2vulcan.h
deleted file mode 100644
index 45da45ca27d..00000000000
--- a/src/mess/machine/a2vulcan.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*********************************************************************
-
- a2vulcan.h
-
- Applied Engineering Vulcan IDE controller
-
-*********************************************************************/
-
-#ifndef __A2BUS_VULCAN__
-#define __A2BUS_VULCAN__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/ataintf.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_vulcanbase_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_vulcanbase_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
- virtual void write_c800(address_space &space, UINT16 offset, UINT8 data);
-
- required_device<ata_interface_device> m_ata;
-
- UINT8 *m_rom;
- UINT8 m_ram[8*1024];
-
-private:
- UINT16 m_lastdata;
- int m_rombank, m_rambank;
- bool m_last_read_was_0;
-};
-
-class a2bus_vulcan_device : public a2bus_vulcanbase_device
-{
-public:
- a2bus_vulcan_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
-};
-
-// device type definition
-extern const device_type A2BUS_VULCAN;
-
-#endif /* __A2BUS_VULCAN__ */
diff --git a/src/mess/machine/a2zipdrive.c b/src/mess/machine/a2zipdrive.c
deleted file mode 100644
index 61ccb2d9495..00000000000
--- a/src/mess/machine/a2zipdrive.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*********************************************************************
-
- a2zipdrive.c
-
- ZIP Technologies ZipDrive IDE card
-
- NOTE: No known dump exists of the formatter utility and the
- format of the custom partition record (block 0) that the card
- expects has not yet been determined, so this is largely untested
- and will work only with a drive dump from real h/w.
-
- PLEASE use it only on a backup copy of said dump and contact MESSdev
- if you have one!
-
- Partition block format:
- +0000: ASCII "Zip Technologies"
-
-*********************************************************************/
-
-#include "a2zipdrive.h"
-#include "includes/apple2.h"
-#include "machine/ataintf.h"
-#include "imagedev/harddriv.h"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_ZIPDRIVE = &device_creator<a2bus_zipdrive_device>;
-
-#define ZIPDRIVE_ROM_REGION "zipdrive_rom"
-#define ZIPDRIVE_ATA_TAG "zipdrive_ata"
-
-static MACHINE_CONFIG_FRAGMENT( zipdrive )
- MCFG_ATA_INTERFACE_ADD(ZIPDRIVE_ATA_TAG, ata_devices, "hdd", NULL, false)
-MACHINE_CONFIG_END
-
-ROM_START( zipdrive )
- ROM_REGION(0x2000, ZIPDRIVE_ROM_REGION, 0)
- ROM_LOAD( "zip drive - rom.bin", 0x000000, 0x002000, CRC(fd800a40) SHA1(46636bfed88c864139e3d2826661908a8c07c459) )
-ROM_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_zipdrivebase_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( zipdrive );
-}
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *a2bus_zipdrivebase_device::device_rom_region() const
-{
- return ROM_NAME( zipdrive );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_zipdrivebase_device::a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_ata(*this, ZIPDRIVE_ATA_TAG)
-{
-}
-
-a2bus_zipdrive_device::a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- a2bus_zipdrivebase_device(mconfig, A2BUS_ZIPDRIVE, "Zip Technologies ZipDrive", tag, owner, clock, "a2zipdrv", __FILE__)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_zipdrivebase_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-
- astring tempstring;
- m_rom = device().machine().root_device().memregion(this->subtag(tempstring, ZIPDRIVE_ROM_REGION))->base();
-
- save_item(NAME(m_lastdata));
-}
-
-void a2bus_zipdrivebase_device::device_reset()
-{
- popmessage("Zip Drive partition format unknown, contact MESSdev if you have the software or a drive dump!");
-}
-
-
-/*-------------------------------------------------
- read_c0nx - called for reads from this card's c0nx space
--------------------------------------------------*/
-
-UINT8 a2bus_zipdrivebase_device::read_c0nx(address_space &space, UINT8 offset)
-{
- switch (offset)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- return m_ata->read_cs0(space, offset, 0xff);
-
- case 8: // data port
- m_lastdata = m_ata->read_cs0(space, offset, 0xffff);
-// printf("%04x @ IDE data\n", m_lastdata);
- return m_lastdata&0xff;
-
- case 9:
- return (m_lastdata>>8) & 0xff;
-
- default:
- logerror("a2zipdrive: unhandled read @ C0n%x\n", offset);
- break;
- }
-
- return 0xff;
-}
-
-
-/*-------------------------------------------------
- write_c0nx - called for writes to this card's c0nx space
--------------------------------------------------*/
-
-void a2bus_zipdrivebase_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
- switch (offset)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
-// printf("%02x to IDE controller @ %x\n", data, offset);
- m_ata->write_cs0(space, offset, data, 0xff);
- break;
-
- case 8:
-// printf("%02x to IDE data lo\n", data);
- m_lastdata = data;
- break;
-
- case 9:
-// printf("%02x to IDE data hi\n", data);
- m_lastdata &= 0x00ff;
- m_lastdata |= (data << 8);
- m_ata->write_cs0(space, 0, m_lastdata, 0xffff);
- break;
-
- default:
- logerror("a2zipdrive: write %02x @ unhandled C0n%x\n", data, offset);
- break;
- }
-}
-
-/*-------------------------------------------------
- read_cnxx - called for reads from this card's cnxx space
--------------------------------------------------*/
-
-UINT8 a2bus_zipdrivebase_device::read_cnxx(address_space &space, UINT8 offset)
-{
- int slotimg = m_slot * 0x100;
-
- // ROM contains CnXX images for each of slots 1-7 at 0x0 and 0x1000
- return m_rom[offset+slotimg+0x1000];
-}
-
-/*-------------------------------------------------
- read_c800 - called for reads from this card's c800 space
--------------------------------------------------*/
-
-UINT8 a2bus_zipdrivebase_device::read_c800(address_space &space, UINT16 offset)
-{
- offset &= 0x7ff;
-
- return m_rom[offset+0x1800];
-}
diff --git a/src/mess/machine/a2zipdrive.h b/src/mess/machine/a2zipdrive.h
deleted file mode 100644
index 77f35506638..00000000000
--- a/src/mess/machine/a2zipdrive.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*********************************************************************
-
- a2zipdrive.h
-
- ZIP Technologies ZipDrive IDE card
-
- See important NOTE at the top of a2zipdrive.c!
-
-*********************************************************************/
-
-#ifndef __A2BUS_ZIPDRIVE__
-#define __A2BUS_ZIPDRIVE__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-#include "machine/ataintf.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_zipdrivebase_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual const rom_entry *device_rom_region() const;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
-
- required_device<ata_interface_device> m_ata;
-
- UINT8 *m_rom;
-
-private:
- UINT16 m_lastdata;
-};
-
-class a2bus_zipdrive_device : public a2bus_zipdrivebase_device
-{
-public:
- a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
-};
-
-// device type definition
-extern const device_type A2BUS_ZIPDRIVE;
-
-#endif /* __A2BUS_ZIPDRIVE__ */
diff --git a/src/mess/machine/apple2.c b/src/mess/machine/apple2.c
index 5a8dca11a64..7bbd2968258 100644
--- a/src/mess/machine/apple2.c
+++ b/src/mess/machine/apple2.c
@@ -2226,6 +2226,26 @@ MACHINE_START_MEMBER(apple2_state,space84)
apple2_setup_memory(&mem_cfg);
}
+MACHINE_START_MEMBER(apple2_state,laba2p)
+{
+ apple2_memmap_config mem_cfg;
+ void *apple2cp_ce00_ram = NULL;
+
+ // II and II+ have no internal ROM or internal slot 3 h/w, so don't allow these states
+ m_flags_mask = VAR_INTCXROM|VAR_SLOTC3ROM;
+
+ m_machinetype = LABA2P;
+
+ apple2_init_common();
+
+ /* setup memory */
+ memset(&mem_cfg, 0, sizeof(mem_cfg));
+ mem_cfg.first_bank = 1;
+ mem_cfg.memmap = apple2_memmap_entries;
+ mem_cfg.auxmem = (UINT8*)apple2cp_ce00_ram;
+ apple2_setup_memory(&mem_cfg);
+}
+
MACHINE_START_MEMBER(apple2_state,tk2000)
{
apple2_memmap_config mem_cfg;
diff --git a/src/mess/machine/laser128.c b/src/mess/machine/laser128.c
deleted file mode 100644
index 301a3f01d61..00000000000
--- a/src/mess/machine/laser128.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*********************************************************************
-
- laser128.c
-
- Helper to implement the Laser 128's built-in slot peripherals
-
-*********************************************************************/
-
-#include "laser128.h"
-#include "includes/apple2.h"
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type A2BUS_LASER128 = &device_creator<a2bus_laser128_device>;
-
-MACHINE_CONFIG_FRAGMENT( a2laser128 )
-MACHINE_CONFIG_END
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor a2bus_laser128_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( a2laser128 );
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this)
-{
-}
-
-a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, A2BUS_LASER128, "VTech Laser 128 Internal Device", tag, owner, clock, "a2laser128", __FILE__),
- device_a2bus_card_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void a2bus_laser128_device::device_start()
-{
- // set_a2bus_device makes m_slot valid
- set_a2bus_device();
-}
-
-void a2bus_laser128_device::device_reset()
-{
- m_rom = device().machine().root_device().memregion("maincpu")->base();
- m_slot7_bank = 0;
-}
-
-UINT8 a2bus_laser128_device::read_c0nx(address_space &space, UINT8 offset)
-{
- return 0x00;
-}
-
-void a2bus_laser128_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
-{
-}
-
-UINT8 a2bus_laser128_device::read_cnxx(address_space &space, UINT8 offset)
-{
- return m_rom[offset + (m_slot * 0x100) + 0x4000];
-}
-
-UINT8 a2bus_laser128_device::read_c800(address_space &space, UINT16 offset)
-{
- switch (m_slot)
- {
- case 1:
- return m_rom[(offset & 0x7ff) + 0x4800];
-
- case 2:
- return m_rom[(offset & 0x7ff) + 0x5800];
-
- case 5:
- return m_rom[(offset & 0x7ff) + 0x5000];
-
- case 6:
- return m_rom[(offset & 0x7ff) + 0x7800];
-
- case 7:
- return m_rom[(offset & 0x7ff) + 0x5c00 + m_slot7_bank];
- }
-
- return 0xff;
-}
-
-void a2bus_laser128_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
-{
-}
-
-bool a2bus_laser128_device::take_c800()
-{
- if ((m_slot == 1) || (m_slot == 2) || (m_slot == 5) || (m_slot == 7))
- {
- return true;
- }
-
- return false;
-}
diff --git a/src/mess/machine/laser128.h b/src/mess/machine/laser128.h
deleted file mode 100644
index db9edc3c679..00000000000
--- a/src/mess/machine/laser128.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*********************************************************************
-
- laser128.h
-
- Helper to implement the Laser 128's built-in slot peripherals
-
-*********************************************************************/
-
-#ifndef __A2BUS_LASER128__
-#define __A2BUS_LASER128__
-
-#include "emu.h"
-#include "machine/a2bus.h"
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class a2bus_laser128_device:
- public device_t,
- public device_a2bus_card_interface
-{
-public:
- // construction/destruction
- a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const;
-
-protected:
- virtual void device_start();
- virtual void device_reset();
-
- // overrides of standard a2bus slot functions
- virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
- virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
- virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
- virtual UINT8 read_c800(address_space &space, UINT16 offset);
- virtual void write_c800(address_space &space, UINT16 offset, UINT8 data);
- virtual bool take_c800();
-
-private:
- UINT8 *m_rom;
- int m_slot7_bank;
-};
-
-// device type definition
-extern const device_type A2BUS_LASER128;
-
-#endif /* __A2BUS_LASER128__ */
diff --git a/src/mess/machine/ncr5380n.c b/src/mess/machine/ncr5380n.c
deleted file mode 100644
index f05e26faf6c..00000000000
--- a/src/mess/machine/ncr5380n.c
+++ /dev/null
@@ -1,585 +0,0 @@
-/*********************************************************************
-
- ncr5380n.c
-
- Implementation of the NCR 5380, aka the Zilog Z5380
-
- TODO:
- - IRQs
- - Target mode
-
- 40801766 - IIx ROM waiting point for "next read fails"
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ncr5380n.h"
-
-const device_type NCR5380N = &device_creator<ncr5380n_device>;
-
-DEVICE_ADDRESS_MAP_START(map, 8, ncr5380n_device)
- AM_RANGE(0x0, 0x0) AM_READWRITE(scsidata_r, outdata_w)
- AM_RANGE(0x1, 0x1) AM_READWRITE(icmd_r, icmd_w)
- AM_RANGE(0x2, 0x2) AM_READWRITE(mode_r, mode_w)
- AM_RANGE(0x3, 0x3) AM_READWRITE(command_r, command_w)
- AM_RANGE(0x4, 0x4) AM_READWRITE(status_r, selenable_w)
- AM_RANGE(0x5, 0x5) AM_READWRITE(busandstatus_r, startdmasend_w)
- AM_RANGE(0x6, 0x6) AM_READWRITE(indata_r, startdmatargetrx_w)
- AM_RANGE(0x7, 0x7) AM_READWRITE(resetparityirq_r, startdmainitrx_w)
-ADDRESS_MAP_END
-
-ncr5380n_device::ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : nscsi_device(mconfig, NCR5380N, "5380 SCSI (new)", tag, owner, clock, "ncr5380", __FILE__),
- m_irq_handler(*this),
- m_drq_handler(*this)
-{
-}
-
-void ncr5380n_device::device_start()
-{
- save_item(NAME(m_tcommand));
- save_item(NAME(m_icommand));
- save_item(NAME(status));
- save_item(NAME(istatus));
- save_item(NAME(m_busstatus));
- save_item(NAME(tcount));
- save_item(NAME(mode));
- save_item(NAME(irq));
- save_item(NAME(drq));
- save_item(NAME(clock_conv));
- save_item(NAME(m_dmalatch));
-
- m_irq_handler.resolve_safe();
- m_drq_handler.resolve_safe();
-
- tcount = 0;
- status = 0;
- bus_id = 0;
- select_timeout = 0;
- tm = timer_alloc(0);
-}
-
-void ncr5380n_device::device_reset()
-{
- clock_conv = 2;
- sync_period = 5;
- sync_offset = 0;
- seq = 0;
- status = 0;
- m_tcommand = 0;
- m_icommand = 0;
- istatus = 0;
- m_busstatus = 0;
- irq = false;
- m_irq_handler(irq);
- reset_soft();
-}
-
-void ncr5380n_device::reset_soft()
-{
- state = IDLE;
- scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); // clear any signals we're driving
- scsi_bus->ctrl_wait(scsi_refid, S_ALL, S_ALL);
- status = 0;
- drq = false;
- m_drq_handler(drq);
- reset_disconnect();
-}
-
-void ncr5380n_device::reset_disconnect()
-{
- mode = MODE_D;
-}
-
-//static int last_phase = -1;
-
-void ncr5380n_device::scsi_ctrl_changed()
-{
- UINT32 ctrl = scsi_bus->ctrl_r();
-
-// printf("scsi_ctrl_changed: lines now %x\n", ctrl);
-
-/* if ((ctrl & (S_PHASE_MASK|S_SEL|S_BSY)) != last_phase)
- {
- printf("phase now %d, REQ %x SEL %x BSY %x\n", ctrl & S_PHASE_MASK, ctrl & S_REQ, ctrl & S_SEL, ctrl & S_BSY);
- last_phase = (S_PHASE_MASK|S_SEL|S_BSY);
- }*/
-
- // recalculate phase match
- m_busstatus &= ~BAS_PHASEMATCH;
- if ((ctrl & S_PHASE_MASK) == (m_tcommand & S_PHASE_MASK))
- {
- m_busstatus |= BAS_PHASEMATCH;
- }
-
- if (m_mode & MODE_DMA)
- {
- // if BSY drops or the phase goes mismatch, that terminates the DMA
- if ((!(ctrl & S_BSY)) || !(m_busstatus & BAS_PHASEMATCH))
- {
-// printf("BSY dropped or phase mismatch during DMA, ending DMA\n");
- m_mode &= ~MODE_DMA;
- m_busstatus |= BAS_ENDOFDMA;
- drq_clear();
- }
- }
-
- if(ctrl & S_RST) {
- logerror("%s: scsi bus reset\n", tag());
- return;
- }
-
- step(false);
-}
-
-void ncr5380n_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
-{
- step(true);
-}
-
-void ncr5380n_device::step(bool timeout)
-{
- UINT32 ctrl = scsi_bus->ctrl_r();
- UINT32 data = scsi_bus->data_r();
-
- if(0)
- printf("%s: state=%d.%d %s\n",
- tag(), state & STATE_MASK, (state & SUB_MASK) >> SUB_SHIFT,
- timeout ? "timeout" : "change");
-
- if(mode == MODE_I && !(ctrl & S_BSY)) {
- state = IDLE;
- reset_disconnect();
- check_irq();
- }
- switch(state & SUB_MASK ? state & SUB_MASK : state & STATE_MASK) {
- case IDLE:
- break;
-
- case ARB_COMPLETE << SUB_SHIFT: {
- if(!timeout)
- break;
-
- int win;
- for(win=7; win>=0 && !(data & (1<<win)); win--);
-// printf("arb complete: data %02x win %02x scsi_id %02x\n", data, win, scsi_id);
- if(win != scsi_id) {
- scsi_bus->data_w(scsi_refid, 0);
- scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
- fatalerror("need to wait for bus free\n");
- break;
- }
-
- state &= STATE_MASK;
- step(true);
- break;
- }
-
- case SEND_WAIT_SETTLE << SUB_SHIFT:
- if(!timeout)
- break;
-
- state = (state & STATE_MASK) | (SEND_WAIT_REQ_0 << SUB_SHIFT);
- step(false);
- break;
-
- case SEND_WAIT_REQ_0 << SUB_SHIFT:
- if(ctrl & S_REQ)
- break;
- state = state & STATE_MASK;
- scsi_bus->data_w(scsi_refid, 0);
- scsi_bus->ctrl_w(scsi_refid, 0, S_ACK);
- step(false);
-
- // byte's done, ask for another if the target hasn't said otherwise
- if (m_mode & MODE_DMA)
- {
- drq_set();
- }
- break;
-
- case RECV_WAIT_REQ_1 << SUB_SHIFT:
- if(!(ctrl & S_REQ))
- break;
-
- state = (state & STATE_MASK) | (RECV_WAIT_SETTLE << SUB_SHIFT);
- delay_cycles(sync_period);
- break;
-
- case RECV_WAIT_SETTLE << SUB_SHIFT:
- if(!timeout)
- break;
-
- m_dmalatch = scsi_bus->data_r();
- scsi_bus->ctrl_w(scsi_refid, S_ACK, S_ACK);
- state = (state & STATE_MASK) | (RECV_WAIT_REQ_0 << SUB_SHIFT);
- step(false);
- break;
-
- case RECV_WAIT_REQ_0 << SUB_SHIFT:
- if(ctrl & S_REQ)
- break;
- state = state & STATE_MASK;
- step(false);
-
- drq_set(); // raise DRQ now that we've completed
- break;
-
- default:
- printf("%s: step() unexpected state %d.%d\n",
- tag(),
- state & STATE_MASK, (state & SUB_MASK) >> SUB_SHIFT);
- exit(0);
- }
-}
-
-void ncr5380n_device::send_byte()
-{
- state = (state & STATE_MASK) | (SEND_WAIT_SETTLE << SUB_SHIFT);
- scsi_bus->data_w(scsi_refid, m_dmalatch);
-
- scsi_bus->ctrl_w(scsi_refid, S_ACK, S_ACK);
- scsi_bus->ctrl_wait(scsi_refid, S_REQ, S_REQ);
- delay_cycles(sync_period);
-}
-
-void ncr5380n_device::recv_byte()
-{
- state = (state & STATE_MASK) | (RECV_WAIT_REQ_1 << SUB_SHIFT);
- step(false);
-}
-
-void ncr5380n_device::function_bus_complete()
-{
- state = IDLE;
-// istatus |= I_FUNCTION|I_BUS;
- check_irq();
-}
-
-void ncr5380n_device::function_complete()
-{
- state = IDLE;
-// istatus |= I_FUNCTION;
- check_irq();
-}
-
-void ncr5380n_device::bus_complete()
-{
- state = IDLE;
-// istatus |= I_BUS;
- check_irq();
-}
-
-void ncr5380n_device::delay(int cycles)
-{
- if(!clock_conv)
- return;
- cycles *= clock_conv;
- tm->adjust(clocks_to_attotime(cycles));
-}
-
-void ncr5380n_device::delay_cycles(int cycles)
-{
- tm->adjust(clocks_to_attotime(cycles));
-}
-
-READ8_MEMBER(ncr5380n_device::scsidata_r)
-{
- return scsi_bus->data_r();
-}
-
-WRITE8_MEMBER(ncr5380n_device::outdata_w)
-{
- m_outdata = data;
-
- // are we driving the data bus?
- if (m_icommand & IC_DBUS)
- {
- scsi_bus->data_w(scsi_refid, data);
- }
-}
-
-READ8_MEMBER(ncr5380n_device::icmd_r)
-{
- return m_icommand;
-}
-
-WRITE8_MEMBER(ncr5380n_device::icmd_w)
-{
- // asserting to drive the data bus?
- if ((data & IC_DBUS) && !(m_icommand & IC_DBUS))
- {
-// printf("%s: driving data bus with %02x\n", tag(), m_outdata);
- scsi_bus->data_w(scsi_refid, m_outdata);
- delay(2);
- }
-
- // any control lines changing?
- UINT8 mask = (data & IC_PHASEMASK) ^ (m_icommand & IC_PHASEMASK);
- if (mask)
- {
- // translate data to nscsi
- UINT8 newdata = 0;
-
- newdata = (data & IC_RST ? S_RST : 0) |
- (data & IC_ACK ? S_ACK : 0) |
- (data & IC_BSY ? S_BSY : 0) |
- (data & IC_SEL ? S_SEL : 0) |
- (data & IC_ATN ? S_ATN : 0);
-
-// printf("%s: changing control lines %04x\n", tag(), newdata);
- scsi_bus->ctrl_w(scsi_refid, newdata, S_RST|S_ACK|S_BSY|S_SEL|S_ATN);
- }
-
- m_icommand = (data & IC_WRITEMASK);
- delay(2);
-}
-
-READ8_MEMBER(ncr5380n_device::mode_r)
-{
- return m_mode;
-}
-
-WRITE8_MEMBER(ncr5380n_device::mode_w)
-{
-// printf("%s: mode_w %02x (%08x)\n", tag(), data, space.device().safe_pc());
- // arbitration bit being set?
- if ((data & MODE_ARBITRATE) && !(m_mode & MODE_ARBITRATE))
- {
- // if SEL is selected and the assert SEL bit in the initiator
- // command register is clear, fail
- if ((scsi_bus->ctrl_r() & S_SEL) && !(m_icommand & IC_SEL))
- {
- m_icommand |= IC_ARBLOST;
- }
- else
- {
- seq = 0;
-// state = DISC_SEL_ARBITRATION;
- arbitrate();
- }
- }
- else if (!(data & MODE_ARBITRATE) && (m_mode & MODE_ARBITRATE))
- {
- // arbitration in progress bit ONLY clears when the host disables arbitration. (thanks, Zilog Z8530 manual!)
- // the Apple II High Speed SCSI Card boot code explicitly requires this.
- m_icommand &= ~ IC_ARBITRATION;
- }
- m_mode = data;
-}
-
-READ8_MEMBER(ncr5380n_device::command_r)
-{
-// logerror("%s: command_r %02x (%08x)\n", tag(), m_tcommand, space.device().safe_pc());
- return m_tcommand;
-}
-
-WRITE8_MEMBER(ncr5380n_device::command_w)
-{
-// printf("%s: command_w %02x (%08x)\n", tag(), data, space.device().safe_pc());
- m_tcommand = data;
-
- // recalculate phase match
- m_busstatus &= ~BAS_PHASEMATCH;
- if ((scsi_bus->ctrl_r() & S_PHASE_MASK) == (m_tcommand & S_PHASE_MASK))
- {
- m_busstatus |= BAS_PHASEMATCH;
- }
-}
-
-void ncr5380n_device::arbitrate()
-{
- m_icommand &= ~IC_ARBLOST;
- m_icommand |= IC_ARBITRATION; // set in progress flag
- state = (state & STATE_MASK) | (ARB_COMPLETE << SUB_SHIFT);
- scsi_bus->data_w(scsi_refid, m_outdata);
- scsi_bus->ctrl_w(scsi_refid, S_BSY, S_BSY);
- delay(11);
-}
-
-void ncr5380n_device::check_irq()
-{
- #if 0
- bool oldirq = irq;
- irq = istatus != 0;
- if(irq != oldirq)
- m_irq_handler(irq);
- #endif
-}
-
-READ8_MEMBER(ncr5380n_device::status_r)
-{
- UINT32 ctrl = scsi_bus->ctrl_r();
- UINT8 res = status |
- (ctrl & S_RST ? ST_RST : 0) |
- (ctrl & S_BSY ? ST_BSY : 0) |
- (ctrl & S_REQ ? ST_REQ : 0) |
- (ctrl & S_MSG ? ST_MSG : 0) |
- (ctrl & S_CTL ? ST_CD : 0) |
- (ctrl & S_INP ? ST_IO : 0) |
- (ctrl & S_SEL ? ST_SEL : 0);
-
-// printf("%s: status_r %02x (%08x)\n", tag(), res, space.device().safe_pc());
- return res;
-}
-
-WRITE8_MEMBER(ncr5380n_device::selenable_w)
-{
-}
-
-READ8_MEMBER(ncr5380n_device::busandstatus_r)
-{
- UINT32 ctrl = scsi_bus->ctrl_r();
- UINT8 res = m_busstatus |
- (ctrl & S_ATN ? BAS_ATN : 0) |
- (ctrl & S_ACK ? BAS_ACK : 0);
-
-// printf("%s: busandstatus_r %02x (%08x)\n", tag(), res, space.device().safe_pc());
-
- return res;
-}
-
-WRITE8_MEMBER(ncr5380n_device::startdmasend_w)
-{
- printf("%02x to start dma send\n", data);
- drq_set();
-}
-
-READ8_MEMBER(ncr5380n_device::indata_r)
-{
- return dma_r();
-}
-
-WRITE8_MEMBER(ncr5380n_device::startdmatargetrx_w)
-{
- printf("%02x to start dma target Rx\n", data);
-}
-
-READ8_MEMBER(ncr5380n_device::resetparityirq_r)
-{
- return 0;
-}
-
-WRITE8_MEMBER(ncr5380n_device::startdmainitrx_w)
-{
-// printf("%02x to start dma initiator Rx\n", data);
- recv_byte();
-}
-
-void ncr5380n_device::dma_w(UINT8 val)
-{
- // drop DRQ until we're ready for another byte
- drq_clear();
-
- if (m_mode & MODE_DMA)
- {
- m_dmalatch = val;
- send_byte();
- }
-}
-
-UINT8 ncr5380n_device::dma_r()
-{
- // drop DRQ
- drq_clear();
-
- // set up to receive our next byte if still in DMA mode
- scsi_bus->ctrl_w(scsi_refid, 0, S_ACK);
- if (m_mode & MODE_DMA)
- {
- recv_byte();
- }
- return m_dmalatch;
-}
-
-void ncr5380n_device::drq_set()
-{
- if(!drq)
- {
- drq = true;
- m_busstatus |= BAS_DMAREQUEST;
- m_drq_handler(drq);
- }
-}
-
-void ncr5380n_device::drq_clear()
-{
- if(drq)
- {
- drq = false;
- m_busstatus &= ~BAS_DMAREQUEST;
- m_drq_handler(drq);
- }
-}
-
-READ8_MEMBER(ncr5380n_device::read)
-{
- switch (offset & 7)
- {
- case 0:
- return scsidata_r(space, offset);
-
- case 1:
- return icmd_r(space, offset);
-
- case 2:
- return mode_r(space, offset);
-
- case 3:
- return command_r(space, offset);
-
- case 4:
- return status_r(space, offset);
-
- case 5:
- return busandstatus_r(space, offset);
-
- case 6:
- return indata_r(space, offset);
-
- case 7:
- return resetparityirq_r(space, offset);
- }
-
- return 0xff;
-}
-
-WRITE8_MEMBER(ncr5380n_device::write)
-{
-// printf("%x to 5380 @ %x\n", data, offset);
- switch (offset & 7)
- {
- case 0:
- outdata_w(space, offset, data);
- break;
-
- case 1:
- icmd_w(space, offset, data);
- break;
-
- case 2:
- mode_w(space, offset, data);
- break;
-
- case 3:
- command_w(space, offset, data);
- break;
-
- case 4:
- selenable_w(space, offset, data);
- break;
-
- case 5:
- startdmasend_w(space, offset, data);
- break;
-
- case 6:
- startdmatargetrx_w(space, offset, data);
- break;
-
- case 7:
- startdmainitrx_w(space, offset, data);
- break;
- }
-}
-
diff --git a/src/mess/machine/ncr5380n.h b/src/mess/machine/ncr5380n.h
deleted file mode 100644
index 2b0a0dd1105..00000000000
--- a/src/mess/machine/ncr5380n.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/*********************************************************************
-
- ncr5380n.c
-
- Implementation of the NCR 5380
-
-*********************************************************************/
-
-#ifndef NCR5380_H
-#define NCR5380_H
-
-#include "machine/nscsi_bus.h"
-
-#define MCFG_NCR5380N_IRQ_HANDLER(_devcb) \
- devcb = &ncr5380n_device::set_irq_handler(*device, DEVCB2_##_devcb);
-
-#define MCFG_NCR5380N_DRQ_HANDLER(_devcb) \
- devcb = &ncr5380n_device::set_drq_handler(*device, DEVCB2_##_devcb);
-
-class ncr5380n_device : public nscsi_device
-{
-public:
- ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // static configuration helpers
- template<class _Object> static devcb2_base &set_irq_handler(device_t &device, _Object object) { return downcast<ncr5380n_device &>(device).m_irq_handler.set_callback(object); }
- template<class _Object> static devcb2_base &set_drq_handler(device_t &device, _Object object) { return downcast<ncr5380n_device &>(device).m_drq_handler.set_callback(object); }
-
- DECLARE_ADDRESS_MAP(map, 8);
-
- DECLARE_READ8_MEMBER(scsidata_r);
- DECLARE_WRITE8_MEMBER(outdata_w);
- DECLARE_READ8_MEMBER(icmd_r);
- DECLARE_WRITE8_MEMBER(icmd_w);
- DECLARE_READ8_MEMBER(mode_r);
- DECLARE_WRITE8_MEMBER(mode_w);
- DECLARE_READ8_MEMBER(command_r);
- DECLARE_WRITE8_MEMBER(command_w);
- DECLARE_READ8_MEMBER(status_r);
- DECLARE_WRITE8_MEMBER(selenable_w);
- DECLARE_READ8_MEMBER(busandstatus_r);
- DECLARE_WRITE8_MEMBER(startdmasend_w);
- DECLARE_READ8_MEMBER(indata_r);
- DECLARE_WRITE8_MEMBER(startdmatargetrx_w);
- DECLARE_READ8_MEMBER(resetparityirq_r);
- DECLARE_WRITE8_MEMBER(startdmainitrx_w);
-
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
-
- virtual void scsi_ctrl_changed();
-
- UINT8 dma_r();
- void dma_w(UINT8 val);
-
-protected:
- virtual void device_start();
- virtual void device_reset();
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
-private:
- enum { MODE_D, MODE_T, MODE_I };
- enum { IDLE };
-
- enum {
- // Bus initiated sequences
- BUSINIT_SETTLE_DELAY = 1,
- BUSINIT_ASSERT_BUS_SEL,
- BUSINIT_MSG_OUT,
- BUSINIT_RECV_BYTE,
- BUSINIT_ASSERT_BUS_RESEL,
- BUSINIT_WAIT_REQ,
- BUSINIT_RECV_BYTE_NACK,
-
- // Bus SCSI Reset
- BUSRESET_WAIT_INT,
- BUSRESET_RESET_BOARD,
-
- // Disconnected state commands
- DISC_SEL_ARBITRATION,
- DISC_SEL_ATN_WAIT_REQ,
- DISC_SEL_ATN_SEND_BYTE,
- DISC_SEL_WAIT_REQ,
- DISC_SEL_SEND_BYTE,
- DISC_REC_ARBITRATION,
- DISC_REC_MSG_IN,
- DISC_REC_SEND_BYTE,
- DISC_RESET,
-
- // Command sequence
- CMDSEQ_CMD_PHASE,
- CMDSEQ_RECV_BYTE,
-
- // Target commands
- TARGET_SEND_BYTE,
- TARGET_CMD_RECV_BYTE,
- TARGET_MSG_RECV_BYTE,
- TARGET_MSG_RECV_PAD,
- TARGET_DISC_SEND_BYTE,
- TARGET_DISC_MSG_IN,
- TARGET_DISC_SEND_BYTE_2,
-
- // Initiator commands
- INIT_MSG_WAIT_REQ,
- INIT_XFR,
- INIT_XFR_SEND_BYTE,
- INIT_XFR_SEND_PAD_WAIT_REQ,
- INIT_XFR_SEND_PAD,
- INIT_XFR_RECV_PAD_WAIT_REQ,
- INIT_XFR_RECV_PAD,
- INIT_XFR_RECV_BYTE_ACK,
- INIT_XFR_RECV_BYTE_NACK,
- INIT_XFR_WAIT_REQ,
- INIT_CPT_RECV_BYTE_ACK,
- INIT_CPT_RECV_WAIT_REQ,
- INIT_CPT_RECV_BYTE_NACK,
- };
-
- enum {
- // Arbitration
- ARB_WAIT_BUS_FREE = 1,
- ARB_COMPLETE,
- ARB_ASSERT_SEL,
- ARB_SET_DEST,
- ARB_RELEASE_BUSY,
- ARB_TIMEOUT_BUSY,
- ARB_TIMEOUT_ABORT,
- ARB_DESKEW_WAIT,
-
- // Send/recieve byte
- SEND_WAIT_SETTLE,
- SEND_WAIT_REQ_0,
- RECV_WAIT_REQ_1,
- RECV_WAIT_SETTLE,
- RECV_WAIT_REQ_0,
- };
-
- enum {
- STATE_MASK = 0x00ff,
- SUB_SHIFT = 8,
- SUB_MASK = 0xff00,
- };
-
- enum { BUS_BUSY, BUS_FREE_WAIT, BUS_FREE };
-
- enum {
- ST_RST = 0x80,
- ST_BSY = 0x40,
- ST_REQ = 0x20,
- ST_MSG = 0x10,
- ST_CD = 0x08,
- ST_IO = 0x04,
- ST_SEL = 0x02,
- ST_DBP = 0x01,
-
- BAS_ENDOFDMA = 0x80,
- BAS_DMAREQUEST = 0x40,
- BAS_PARITYERROR = 0x20,
- BAS_IRQACTIVE = 0x10,
- BAS_PHASEMATCH = 0x08,
- BAS_BUSYERROR = 0x04,
- BAS_ATN = 0x02,
- BAS_ACK = 0x01,
-
- IC_RST = 0x80,
- IC_ARBITRATION = 0x40,
- IC_ARBLOST = 0x20,
- IC_ACK = 0x10,
- IC_BSY = 0x08,
- IC_SEL = 0x04,
- IC_ATN = 0x02,
- IC_DBUS = 0x01,
- IC_PHASEMASK = 0x9e,
- IC_WRITEMASK = 0x9f,
-
- MODE_BLOCKDMA = 0x80,
- MODE_TARGET = 0x40,
- MODE_PARITYCHK = 0x20,
- MODE_PARITYIRQ = 0x10,
- MODE_EOPIRQ = 0x08,
- MODE_BSYIRQ = 0x04,
- MODE_DMA = 0x02,
- MODE_ARBITRATE = 0x01,
- };
-
- enum { DMA_NONE, DMA_IN, DMA_OUT };
-
- emu_timer *tm;
-
- UINT8 status, istatus, m_mode, m_outdata, m_busstatus, m_dmalatch;
- UINT8 m_icommand, m_tcommand;
- UINT8 clock_conv, sync_offset, sync_period, bus_id, select_timeout, seq;
- UINT16 tcount;
- int mode;
- int state/*, xfr_phase*/;
-
- bool irq, drq;
-
- void drq_set();
- void drq_clear();
-
- void step(bool timeout);
- void function_complete();
- void function_bus_complete();
- void bus_complete();
-
- void arbitrate();
- void check_irq();
-
- void reset_soft();
- void reset_disconnect();
-
- void send_byte();
- void recv_byte();
-
- void delay(int cycles);
- void delay_cycles(int cycles);
-
- devcb2_write_line m_irq_handler;
- devcb2_write_line m_drq_handler;
-};
-
-extern const device_type NCR5380N;
-
-#endif