summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/jaguar.c
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2014-01-22 13:52:40 +0000
committer smf- <smf-@users.noreply.github.com>2014-01-22 13:52:40 +0000
commit57f53a1d90dff06f2a97db2920757f0550678672 (patch)
treed7695feabac1de840ab0bf492fd3bda3f9698248 /src/mame/drivers/jaguar.c
parent24f1903f15eb1da58fdb3151c0656aed6c6ec2e1 (diff)
added a hack for mametesters 05256 [smf]
Diffstat (limited to 'src/mame/drivers/jaguar.c')
-rw-r--r--src/mame/drivers/jaguar.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/mame/drivers/jaguar.c b/src/mame/drivers/jaguar.c
index 60b19f83842..d77dfe81814 100644
--- a/src/mame/drivers/jaguar.c
+++ b/src/mame/drivers/jaguar.c
@@ -366,6 +366,38 @@ IRQ_CALLBACK_MEMBER(jaguar_state::jaguar_irq_callback)
}
+/// HACK: Maximum force requests data but doesn't transfer it all before issuing another command.
+/// According to the ATA specification this is not allowed, more investigation is required.
+
+#include "machine/idehd.h"
+
+extern const device_type COJAG_HARDDISK;
+
+class cojag_hdd : public ide_hdd_device
+{
+public:
+ cojag_hdd(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : ide_hdd_device(mconfig, COJAG_HARDDISK, "cojag HDD", tag, owner, clock, "cojag_hdd", __FILE__)
+ {
+ }
+
+ virtual WRITE16_HANDLER(write_cs0)
+ {
+ // the first write is to the device head register
+ if( offset == 6 && (m_status & IDE_STATUS_DRQ))
+ {
+ m_status &= ~IDE_STATUS_DRQ;
+ }
+
+ ide_hdd_device::write_cs0(space, offset, data, mem_mask);
+ }
+};
+
+const device_type COJAG_HARDDISK = &device_creator<cojag_hdd>;
+
+SLOT_INTERFACE_START(cojag_devices)
+ SLOT_INTERFACE("hdd", COJAG_HARDDISK)
+SLOT_INTERFACE_END
/*************************************
*
@@ -1785,7 +1817,7 @@ static MACHINE_CONFIG_START( cojagr3k, jaguar_state )
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_VT83C461_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_VT83C461_ADD("ide", cojag_devices, "hdd", NULL, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(jaguar_state, external_int))
/* video hardware */