summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2021-05-19 10:27:18 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2021-05-19 10:27:18 +0700
commit2b642fe458d22e4d31dd7b57d80b3f957050c4e6 (patch)
treef70ffef2343623a742d0b80cacc8b18dd4c9dd81
parentdb98a0b858eb7cd81aa9cdc9b5c8ad7647b0385f (diff)
tekigw: don't crash when hard disk is missing
-rw-r--r--src/mame/drivers/tekigw.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mame/drivers/tekigw.cpp b/src/mame/drivers/tekigw.cpp
index d2b7d462cc0..ab292c97871 100644
--- a/src/mame/drivers/tekigw.cpp
+++ b/src/mame/drivers/tekigw.cpp
@@ -69,6 +69,7 @@ public:
, m_fdd(*this, "fdc:%u:525dd", 0U)
//, m_dma(*this, "dma")
, m_hdc(*this, "hdc")
+ , m_hdd(*this, "hdc:0")
, m_lan(*this, "lan")
, m_led(*this, "led")
{
@@ -123,6 +124,7 @@ protected:
optional_device_array<floppy_image_device, 2> m_fdd;
//required_device<am9516a_device> m_dma;
required_device<wd1010_device> m_hdc;
+ required_device<harddisk_image_device> m_hdd;
required_device<i82586_device> m_lan;
output_finder<> m_led;
@@ -395,7 +397,7 @@ enum hcr_mask : u8
void tek6100_state::hcr_w(u8 data)
{
- m_hdc->drdy_w(bool(data & HCR_DRSEL));
+ m_hdc->drdy_w(m_hdd->exists() && bool(data & HCR_DRSEL));
m_hdc->brdy_w(bool(data & HCR_BFRDY));
if (!(data & HCR_BCCLR))
@@ -530,7 +532,7 @@ void tek6100_state::tek6130(machine_config &config)
m_hdc->out_data_callback().set(FUNC(tek6100_state::buf_w<u8>));
m_hdc->out_bcr_callback().set([this](int state) { if (state) m_hdc_ptr = 0; });
- HARDDISK(config, "hdc:0", 0);
+ HARDDISK(config, m_hdd, 0);
I82586(config, m_lan, 16_MHz_XTAL / 2);
m_lan->set_addrmap(0, &tek6100_state::lan_map);