summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus/a2zipdrive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/a2bus/a2zipdrive.cpp')
-rw-r--r--src/devices/bus/a2bus/a2zipdrive.cpp107
1 files changed, 100 insertions, 7 deletions
diff --git a/src/devices/bus/a2bus/a2zipdrive.cpp b/src/devices/bus/a2bus/a2zipdrive.cpp
index aaeb6ed6219..41034fab231 100644
--- a/src/devices/bus/a2bus/a2zipdrive.cpp
+++ b/src/devices/bus/a2bus/a2zipdrive.cpp
@@ -2,16 +2,19 @@
// copyright-holders:R. Belmont
/*********************************************************************
- a2zipdrive.c
+ a2zipdrive.cpp
ZIP Technologies ZipDrive IDE card
+ Parsons Engineering Focus Drive IDE card
- NOTE: No known dump exists of the formatter utility and the
+ These cards are very, very similar. Maybe Parsons designed both?
+
+ NOTE: No known dump exists of the Zip 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
+ PLEASE use it only on a backup copy of said dump and contact MAMEdev
if you have one!
Partition block format:
@@ -29,6 +32,7 @@
//**************************************************************************
DEFINE_DEVICE_TYPE(A2BUS_ZIPDRIVE, a2bus_zipdrive_device, "a2zipdrv", "Zip Technologies ZipDrive")
+DEFINE_DEVICE_TYPE(A2BUS_FOCUSDRIVE, a2bus_focusdrive_device, "a2focdrv", "Parsons Engineering Focus Drive")
#define ZIPDRIVE_ROM_REGION "zipdrive_rom"
#define ZIPDRIVE_ATA_TAG "zipdrive_ata"
@@ -38,6 +42,11 @@ ROM_START( zipdrive )
ROM_LOAD( "zip drive - rom.bin", 0x000000, 0x002000, CRC(fd800a40) SHA1(46636bfed88c864139e3d2826661908a8c07c459) )
ROM_END
+ROM_START( focusdrive )
+ ROM_REGION(0x2000, ZIPDRIVE_ROM_REGION, 0)
+ ROM_LOAD( "focusrom.bin", 0x001000, 0x001000, CRC(0fd0ba25) SHA1(acf414aa145fcfa1c12aca0269f1f7ada82f1c04) )
+ROM_END
+
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
@@ -60,6 +69,11 @@ const tiny_rom_entry *a2bus_zipdrivebase_device::device_rom_region() const
return ROM_NAME( zipdrive );
}
+const tiny_rom_entry *a2bus_focusdrive_device::device_rom_region() const
+{
+ return ROM_NAME( focusdrive );
+}
+
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
@@ -76,6 +90,11 @@ a2bus_zipdrive_device::a2bus_zipdrive_device(const machine_config &mconfig, cons
{
}
+a2bus_focusdrive_device::a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ a2bus_zipdrivebase_device(mconfig, A2BUS_FOCUSDRIVE, tag, owner, clock)
+{
+}
+
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -89,9 +108,12 @@ void a2bus_zipdrivebase_device::device_start()
void a2bus_zipdrivebase_device::device_reset()
{
- popmessage("Zip Drive partition format unknown, contact MESSdev if you have the software or a drive dump!");
}
+void a2bus_focusdrive_device::device_reset()
+{
+ m_rom[0x1c6c] = 0x03; // eat 3 IDE words here instead of 1, fixes a bug? in the original ROM
+}
/*-------------------------------------------------
read_c0nx - called for reads from this card's c0nx space
@@ -112,7 +134,7 @@ uint8_t a2bus_zipdrivebase_device::read_c0nx(uint8_t offset)
return m_ata->read_cs0(offset, 0xff);
case 8: // data port
- m_lastdata = m_ata->read_cs0(offset);
+ m_lastdata = m_ata->read_cs0(offset, 0xffff);
// printf("%04x @ IDE data\n", m_lastdata);
return m_lastdata&0xff;
@@ -120,13 +142,42 @@ uint8_t a2bus_zipdrivebase_device::read_c0nx(uint8_t offset)
return (m_lastdata>>8) & 0xff;
default:
- logerror("a2zipdrive: unhandled read @ C0n%x\n", offset);
+ logerror("unhandled read @ C0n%x\n", offset);
break;
}
return 0xff;
}
+uint8_t a2bus_focusdrive_device::read_c0nx(uint8_t offset)
+{
+ switch (offset)
+ {
+ case 8:
+ case 9:
+ case 0xa:
+ case 0xb:
+ case 0xc:
+ case 0xd:
+ case 0xe:
+ case 0xf:
+ return m_ata->read_cs0(offset&7, 0xff);
+
+ case 0: // data port
+ m_lastdata = m_ata->read_cs0(offset, 0xffff);
+ //printf("%04x @ IDE data\n", m_lastdata);
+ return m_lastdata&0xff;
+
+ case 1:
+ return (m_lastdata>>8) & 0xff;
+
+ default:
+ logerror("unhandled read @ C0n%x\n", offset);
+ break;
+ }
+
+ return 0xff;
+}
/*-------------------------------------------------
write_c0nx - called for writes to this card's c0nx space
@@ -157,7 +208,7 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data)
// printf("%02x to IDE data hi\n", data);
m_lastdata &= 0x00ff;
m_lastdata |= (data << 8);
- m_ata->write_cs0(0, m_lastdata);
+ m_ata->write_cs0(0, m_lastdata, 0xffff);
break;
default:
@@ -166,6 +217,48 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data)
}
}
+void a2bus_focusdrive_device::write_c0nx(uint8_t offset, uint8_t data)
+{
+ switch (offset)
+ {
+ case 8:
+ case 9:
+ case 0xa:
+ case 0xb:
+ case 0xc:
+ case 0xd:
+ case 0xe:
+ case 0xf:
+ // due to a bug in the 6502 firmware, eat data if DRQ is set
+ #if 0
+ while (m_ata->read_cs0(7, 0xff) & 0x08)
+ {
+ m_ata->read_cs0(0, 0xffff);
+ printf("eating 2 bytes to clear DRQ\n");
+ }
+ #endif
+// printf("%02x to IDE controller @ %x\n", data, offset);
+ m_ata->write_cs0(offset & 7, data, 0xff);
+ break;
+
+ case 0:
+// printf("%02x to IDE data lo\n", data);
+ m_lastdata = data;
+ break;
+
+ case 1:
+// printf("%02x to IDE data hi\n", data);
+ m_lastdata &= 0x00ff;
+ m_lastdata |= (data << 8);
+ m_ata->write_cs0(0, m_lastdata, 0xffff);
+ break;
+
+ default:
+ printf("focus: write %02x @ unhandled C0n%x\n", data, offset);
+ break;
+ }
+}
+
/*-------------------------------------------------
read_cnxx - called for reads from this card's cnxx space
-------------------------------------------------*/