summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2013-02-18 21:11:17 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2013-02-18 21:11:17 +0000
commitd9cdaf16491d1ed13fb85054484d1b3fd9ed84f1 (patch)
tree5ab2831e8b5a6525590518cb3812021ea39caa9d /src/mess
parentb151e90f28ce25999e616f45dc6da1cacfb39036 (diff)
(MESS) Apple II: Added support for Street Electronics Echo Plus and Zip Technologies ZipDrive cards [R. Belmont, Lord Nightmare]
Diffstat (limited to 'src/mess')
-rw-r--r--src/mess/drivers/apple2.c3
-rw-r--r--src/mess/drivers/apple2gs.c13
-rw-r--r--src/mess/machine/a2mockingboard.c58
-rw-r--r--src/mess/machine/a2mockingboard.h15
-rw-r--r--src/mess/machine/a2zipdrive.c199
-rw-r--r--src/mess/machine/a2zipdrive.h63
-rw-r--r--src/mess/mess.mak1
7 files changed, 349 insertions, 3 deletions
diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c
index 2c04a0dc02f..070a7412628 100644
--- a/src/mess/drivers/apple2.c
+++ b/src/mess/drivers/apple2.c
@@ -212,6 +212,7 @@ Apple 3.5 and Apple 5.25 drives - up to three devices
#include "machine/a2echoii.h"
#include "machine/a2arcadebd.h"
#include "machine/a2midi.h"
+#include "machine/a2zipdrive.h"
#include "machine/a2estd80col.h"
#include "machine/a2eext80col.h"
#include "machine/a2eramworks3.h"
@@ -634,6 +635,8 @@ static SLOT_INTERFACE_START(apple2_cards)
SLOT_INTERFACE("vtc2", A2BUS_VTC2) /* Unknown VideoTerm clone #2 */
SLOT_INTERFACE("arcbd", A2BUS_ARCADEBOARD) /* Third Millenium Engineering Arcade Board */
SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */
+ SLOT_INTERFACE("zipdrive", A2BUS_ZIPDRIVE) /* ZIP Technologies IDE card */
+ SLOT_INTERFACE("echoiiplus", A2BUS_ECHOPLUS) /* Street Electronics Echo Plus (Echo II + Mockingboard clone) */
// SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */
SLOT_INTERFACE_END
diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c
index d4a805d2735..77a8b74b6c5 100644
--- a/src/mess/drivers/apple2gs.c
+++ b/src/mess/drivers/apple2gs.c
@@ -64,12 +64,16 @@
#include "machine/a2cffa.h"
#include "machine/a2memexp.h"
#include "machine/a2scsi.h"
+#include "machine/a2thunderclock.h"
+#include "machine/a2ssc.h"
#include "machine/a2softcard.h"
#include "machine/a2sam.h"
#include "machine/a2alfam2.h"
+#include "machine/a2echoii.h"
+#include "machine/a2arcadebd.h"
#include "machine/a2midi.h"
#include "machine/a2vulcan.h"
-#include "machine/a2ssc.h"
+#include "machine/a2zipdrive.h"
static const gfx_layout apple2gs_text_layout =
{
@@ -293,11 +297,16 @@ static SLOT_INTERFACE_START(apple2_cards)
SLOT_INTERFACE("cffa202", A2BUS_CFFA2_6502) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */
SLOT_INTERFACE("memexp", A2BUS_MEMEXP) /* Apple II Memory Expansion Card */
SLOT_INTERFACE("ramfactor", A2BUS_RAMFACTOR) /* Applied Engineering RamFactor */
+ SLOT_INTERFACE("thclock", A2BUS_THUNDERCLOCK) /* ThunderWare ThunderClock Plus */
+ SLOT_INTERFACE("ssc", A2BUS_SSC) /* Apple Super Serial Card */
SLOT_INTERFACE("sam", A2BUS_SAM) /* SAM Software Automated Mouth (8-bit DAC + speaker) */
SLOT_INTERFACE("alfam2", A2BUS_ALFAM2) /* ALF Apple Music II */
+ SLOT_INTERFACE("echoii", A2BUS_ECHOII) /* Street Electronics Echo II */
+ SLOT_INTERFACE("arcbd", A2BUS_ARCADEBOARD) /* Third Millenium Engineering Arcade Board */
SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */
SLOT_INTERFACE("vulcan", A2BUS_VULCAN) /* AE Vulcan IDE card */
- SLOT_INTERFACE("ssc", A2BUS_SSC) /* Apple Super Serial Card */
+ SLOT_INTERFACE("zipdrive", A2BUS_ZIPDRIVE) /* ZIP Technologies IDE card */
+ SLOT_INTERFACE("echoiiplus", A2BUS_ECHOPLUS) /* Street Electronics Echo Plus (Echo II + Mockingboard clone) */
// SLOT_INTERFACE("softcard", A2BUS_SOFTCARD) /* Microsoft SoftCard */ // appears not to be IIgs compatible?
// SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */
SLOT_INTERFACE_END
diff --git a/src/mess/machine/a2mockingboard.c b/src/mess/machine/a2mockingboard.c
index fe8bf52cd45..0c896f19d3a 100644
--- a/src/mess/machine/a2mockingboard.c
+++ b/src/mess/machine/a2mockingboard.c
@@ -3,6 +3,7 @@
a2mockingboard.c
Implementation of the Sweet Micro Systems Mockingboard card
+ and friends.
*********************************************************************/
@@ -20,6 +21,7 @@
#define AY2_TAG "mockbd_ay2"
#define AY3_TAG "mockbd_ay3"
#define AY4_TAG "mockbd_ay4"
+#define E2P_TMS_TAG "tms5220"
//**************************************************************************
// GLOBAL VARIABLES
@@ -27,6 +29,7 @@
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 =
{
@@ -90,6 +93,23 @@ MACHINE_CONFIG_FRAGMENT( phasor )
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, 720000)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "echosp", 1.0)
+MACHINE_CONFIG_END
+
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
@@ -105,6 +125,11 @@ 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
//**************************************************************************
@@ -137,6 +162,15 @@ a2bus_phasor_device::a2bus_phasor_device(const machine_config &mconfig, const ch
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),
+ m_tms(*this, E2P_TMS_TAG)
+{
+ m_shortname = "a2echop";
+ m_isPhasor = false;
+ m_PhasorNative = false;
+}
+
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -156,7 +190,7 @@ void a2bus_ayboard_device::device_reset()
}
/*-------------------------------------------------
- read_cnxx - called for reads from this card's c0nx space
+ read_cnxx - called for reads from this card's cnxx space
-------------------------------------------------*/
UINT8 a2bus_ayboard_device::read_cnxx(address_space &space, UINT8 offset)
@@ -508,3 +542,25 @@ void a2bus_ayboard_device::write_c0nx(address_space &space, UINT8 offset, UINT8
m_PhasorNative = (offset & 1) ? true : false;
}
}
+
+UINT8 a2bus_echoplus_device::read_c0nx(address_space &space, UINT8 offset)
+{
+ switch (offset)
+ {
+ case 0:
+ return 0x1f | tms5220_status_r(m_tms, space, 0);
+ }
+
+ return 0;
+}
+
+void a2bus_echoplus_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
+{
+ switch (offset)
+ {
+ case 0:
+ tms5220_data_w(m_tms, space, offset, data);
+ break;
+ }
+}
+
diff --git a/src/mess/machine/a2mockingboard.h b/src/mess/machine/a2mockingboard.h
index c6f69efae59..48ea8d2566e 100644
--- a/src/mess/machine/a2mockingboard.h
+++ b/src/mess/machine/a2mockingboard.h
@@ -13,6 +13,7 @@
#include "machine/a2bus.h"
#include "machine/6522via.h"
#include "sound/ay8910.h"
+#include "sound/tms5220.h"
//**************************************************************************
// TYPE DEFINITIONS
@@ -77,8 +78,22 @@ public:
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/a2zipdrive.c b/src/mess/machine/a2zipdrive.c
new file mode 100644
index 00000000000..c3bdefe2a73
--- /dev/null
+++ b/src/mess/machine/a2zipdrive.c
@@ -0,0 +1,199 @@
+/*********************************************************************
+
+ 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/idectrl.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_IDE_TAG "zipdrive_ide"
+
+static MACHINE_CONFIG_FRAGMENT( zipdrive )
+ MCFG_IDE_CONTROLLER_ADD(ZIPDRIVE_IDE_TAG, ide_image_devices, "hdd", "hdd", 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) :
+ device_t(mconfig, type, name, tag, owner, clock),
+ device_a2bus_card_interface(mconfig, *this),
+ m_ide(*this, ZIPDRIVE_IDE_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)
+{
+ m_shortname = "a2zipdrv";
+}
+
+//-------------------------------------------------
+// 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 ide_controller_r(m_ide, 0x1f0+offset, 1);
+
+ case 8: // data port
+ m_lastdata = ide_controller_r(m_ide, 0x1f0, 2);
+// 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);
+ ide_controller_w(m_ide, 0x1f0+offset, 1, data);
+ 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);
+ ide_controller_w(m_ide, 0x1f0, 2, m_lastdata);
+ 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
new file mode 100644
index 00000000000..ac0006639ec
--- /dev/null
+++ b/src/mess/machine/a2zipdrive.h
@@ -0,0 +1,63 @@
+/*********************************************************************
+
+ 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/idectrl.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);
+
+ // 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<ide_controller_device> m_ide;
+
+ 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/mess.mak b/src/mess/mess.mak
index 746b5936420..148fe4a0dde 100644
--- a/src/mess/mess.mak
+++ b/src/mess/mess.mak
@@ -689,6 +689,7 @@ $(MESSOBJ)/apple.a: \
$(MESS_MACHINE)/a2arcadebd.o \
$(MESS_MACHINE)/a2midi.o \
$(MESS_MACHINE)/a2vulcan.o \
+ $(MESS_MACHINE)/a2zipdrive.o \
$(MESS_MACHINE)/a2estd80col.o \
$(MESS_MACHINE)/a2eext80col.o \
$(MESS_MACHINE)/a2eramworks3.o \