From e6b70f43732ae989d1a5a7ae406455b074a21b19 Mon Sep 17 00:00:00 2001 From: smf- Date: Wed, 2 Oct 2013 00:17:45 +0000 Subject: [PATCH] fixed mametesters 05318 [smf] --- src/emu/machine/atahle.c | 10 ++++++++++ src/emu/machine/atahle.h | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/emu/machine/atahle.c b/src/emu/machine/atahle.c index 6632b3753ee..38c7a918ef7 100644 --- a/src/emu/machine/atahle.c +++ b/src/emu/machine/atahle.c @@ -52,6 +52,7 @@ ata_hle_device::ata_hle_device(const machine_config &mconfig, device_type type, m_status(0), m_command(0), m_device_control(0), + m_revert_to_defaults(true), m_csel(0), m_daspin(0), m_daspout(0), @@ -87,6 +88,7 @@ void ata_hle_device::device_start() save_item(NAME(m_status)); save_item(NAME(m_command)); save_item(NAME(m_device_control)); + save_item(NAME(m_revert_to_defaults)); save_item(NAME(m_single_device)); save_item(NAME(m_resetting)); @@ -285,6 +287,14 @@ bool ata_hle_device::set_features() return set_dma_mode(88); } break; + + case IDE_SET_FEATURES_DISABLE_REVERTING_TO_POWER_ON_DEFAULTS: + m_revert_to_defaults = false; + return true; + + case IDE_SET_FEATURES_ENABLE_REVERTING_TO_POWER_ON_DEFAULTS: + m_revert_to_defaults = true; + return true; } return false; diff --git a/src/emu/machine/atahle.h b/src/emu/machine/atahle.h index 770223b4e50..ad43d319b47 100644 --- a/src/emu/machine/atahle.h +++ b/src/emu/machine/atahle.h @@ -131,7 +131,9 @@ protected: enum { - IDE_SET_FEATURES_TRANSFER_MODE = 0x03 + IDE_SET_FEATURES_TRANSFER_MODE = 0x03, + IDE_SET_FEATURES_DISABLE_REVERTING_TO_POWER_ON_DEFAULTS = 0x66, + IDE_SET_FEATURES_ENABLE_REVERTING_TO_POWER_ON_DEFAULTS = 0xcc }; enum ide_transfer_type_t @@ -183,6 +185,7 @@ protected: UINT8 m_device_control; UINT16 m_identify_buffer[256]; + bool m_revert_to_defaults; private: void update_irq();