summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/atarifdc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/atarifdc.cpp')
-rw-r--r--src/mame/machine/atarifdc.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mame/machine/atarifdc.cpp b/src/mame/machine/atarifdc.cpp
index 977db4392d3..f8eb9c08829 100644
--- a/src/mame/machine/atarifdc.cpp
+++ b/src/mame/machine/atarifdc.cpp
@@ -13,9 +13,6 @@
#include "emu.h"
#include "atarifdc.h"
-#include "machine/6821pia.h"
-#include "sound/pokey.h"
-
#include "formats/atari_dsk.h"
#include <ctype.h>
@@ -393,11 +390,10 @@ void atari_fdc_device::add_serout(int expect_data)
void atari_fdc_device::clr_serin(int ser_delay)
{
- pokey_device *pokey = machine().device<pokey_device>("pokey");
m_serin_chksum = 0;
m_serin_offs = 0;
m_serin_count = 0;
- pokey->serin_ready(ser_delay * 40);
+ m_pokey->serin_ready(ser_delay * 40);
}
void atari_fdc_device::add_serin(uint8_t data, int with_checksum)
@@ -674,8 +670,6 @@ READ8_MEMBER( atari_fdc_device::serin_r )
if (m_serin_count)
{
- pokey_device *pokey = machine().device<pokey_device>("pokey");
-
data = m_serin_buff[m_serin_offs];
ser_delay = 2 * 40;
if (m_serin_offs < 3)
@@ -688,7 +682,7 @@ READ8_MEMBER( atari_fdc_device::serin_r )
if (--m_serin_count == 0)
m_serin_offs = 0;
else
- pokey->serin_ready(ser_delay);
+ m_pokey->serin_ready(ser_delay);
}
if (VERBOSE_SERIAL)
@@ -699,8 +693,6 @@ READ8_MEMBER( atari_fdc_device::serin_r )
WRITE8_MEMBER( atari_fdc_device::serout_w )
{
- pia6821_device *pia = machine().device<pia6821_device>( "pia" );
-
/* ignore serial commands if no floppy image is specified */
if( !m_drv[0].image )
return;
@@ -718,7 +710,7 @@ WRITE8_MEMBER( atari_fdc_device::serout_w )
/* exclusive or written checksum with calculated */
m_serout_chksum ^= data;
/* if the attention line is high, this should be data */
- if (pia->irq_b_state())
+ if (m_pia->irq_b_state())
a800_serial_write();
}
else
@@ -763,6 +755,8 @@ DEFINE_DEVICE_TYPE(ATARI_FDC, atari_fdc_device, "atari_fdc", "Atari FDC")
atari_fdc_device::atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARI_FDC, tag, owner, clock),
+ m_pokey(*this, "^pokey"),
+ m_pia(*this, "^pia"),
m_serout_count(0),
m_serout_offs(0),
m_serout_chksum(0),