From 18e9f7521bc4cb7d1a892739d59c360d0968704c Mon Sep 17 00:00:00 2001 From: smf- Date: Sun, 8 Sep 2013 15:04:00 +0000 Subject: [PATCH] Use 2864 for ROM. This allows XTIDECFG to flash the rom. Tested with 2.0.0 beta 3. You must disable SDP because eeprompar doesn't emulate it & you must load from a file as if you load from eeprom then it only finds zeros. [smf] --- src/mess/machine/isa_ide8.c | 9 ++++++--- src/mess/machine/isa_ide8.h | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mess/machine/isa_ide8.c b/src/mess/machine/isa_ide8.c index d4f348a6e69..d0dd36b2fd9 100644 --- a/src/mess/machine/isa_ide8.c +++ b/src/mess/machine/isa_ide8.c @@ -118,6 +118,8 @@ WRITE_LINE_MEMBER(isa8_ide_device::ide_interrupt) static MACHINE_CONFIG_FRAGMENT( ide8_config ) MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, false) MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(isa8_ide_device, ide_interrupt)) + + MCFG_EEPROM_2864_ADD("eeprom") MACHINE_CONFIG_END static INPUT_PORTS_START( ide8_port ) @@ -169,7 +171,7 @@ static INPUT_PORTS_START( ide8_port ) INPUT_PORTS_END ROM_START( ide8 ) - ROM_REGION(0x02000,"ide8", 0) + ROM_REGION(0x02000,"eeprom", 0) ROM_DEFAULT_BIOS("xub200b3xt") @@ -294,7 +296,8 @@ const rom_entry *isa8_ide_device::device_rom_region() const isa8_ide_device::isa8_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, ISA8_IDE, "XT-IDE Fixed Drive Adapter", tag, owner, clock, "isa8_ide", __FILE__), device_isa8_card_interface( mconfig, *this ), - m_ata(*this, "ata") + m_ata(*this, "ata"), + m_eeprom(*this, "eeprom") { } @@ -317,7 +320,7 @@ void isa8_ide_device::device_reset() int io_address = ((ioport("IO_ADDRESS")->read() & 0x0F) * 0x20) + 0x200; m_irq_number = (ioport("IRQ")->read() & 0x07); - m_isa->install_rom(this, base_address, base_address + 0x1fff, 0, 0, "ide8", "ide8"); + m_isa->install_memory(base_address, base_address + 0x1fff, 0, 0, read8_delegate(FUNC(eeprom_parallel_28xx_device::read), &(*m_eeprom)), write8_delegate(FUNC(eeprom_parallel_28xx_device::write), &(*m_eeprom))); m_isa->install_device(io_address, io_address + 0xf, 0, 0, read8_delegate(FUNC(isa8_ide_device::ide8_r), this), write8_delegate(FUNC(isa8_ide_device::ide8_w), this)); //logerror("isa8_ide_device::device_reset(), bios_base=0x%5X to 0x%5X, I/O=0x%3X, IRQ=%d\n",base_address,base_address + (16*1024) -1 ,io_address,irq); diff --git a/src/mess/machine/isa_ide8.h b/src/mess/machine/isa_ide8.h index 16caa824571..39cfc8fb621 100644 --- a/src/mess/machine/isa_ide8.h +++ b/src/mess/machine/isa_ide8.h @@ -4,7 +4,8 @@ #define __ISA_IDE8_H__ #include "emu.h" -#include "machine/idectrl.h" +#include "machine/ataintf.h" +#include "machine/eeprompar.h" #include "machine/isa.h" //************************************************************************** @@ -37,6 +38,7 @@ protected: private: required_device m_ata; + required_device m_eeprom; UINT8 m_irq_number; UINT8 m_d8_d15_latch;