summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/wozfdc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/wozfdc.cpp')
-rw-r--r--src/devices/machine/wozfdc.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp
index 1350ce4b126..df7570f7cd7 100644
--- a/src/devices/machine/wozfdc.cpp
+++ b/src/devices/machine/wozfdc.cpp
@@ -41,12 +41,22 @@ const tiny_rom_entry *wozfdc_device::device_rom_region() const
return ROM_NAME( diskiing );
}
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_MEMBER( wozfdc_device::device_add_mconfig )
+ MCFG_DEVICE_ADD("phaselatch", F9334, 0) // 9334 on circuit diagram but 74LS259 in parts list; actual chip may vary
+ MCFG_ADDRESSABLE_LATCH_PARALLEL_OUT_CB(WRITE8(wozfdc_device, set_phase))
+MACHINE_CONFIG_END
+
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
wozfdc_device::wozfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, type, tag, owner, clock)
+ device_t(mconfig, type, tag, owner, clock),
+ m_phaselatch(*this, "phaselatch")
{
}
@@ -75,7 +85,6 @@ void wozfdc_device::device_start()
save_item(NAME(mode_write));
save_item(NAME(mode_load));
save_item(NAME(active));
- save_item(NAME(phases));
save_item(NAME(external_io_select));
save_item(NAME(cycles));
save_item(NAME(data_reg));
@@ -91,7 +100,6 @@ void wozfdc_device::device_reset()
{
floppy = nullptr;
active = MODE_IDLE;
- phases = 0x00;
mode_write = false;
mode_load = false;
last_6502_write = 0x00;
@@ -208,21 +216,16 @@ WRITE8_MEMBER(wozfdc_device::write)
last_6502_write = data;
}
-void wozfdc_device::phase(int ph, bool on)
+WRITE8_MEMBER(wozfdc_device::set_phase)
{
- if(on)
- phases |= 1 << ph;
- else
- phases &= ~(1 << ph);
-
- if(floppy && active)
- floppy->seek_phase_w(phases);
+ if (floppy && active)
+ floppy->seek_phase_w(data);
}
void wozfdc_device::control(int offset)
{
if(offset < 8)
- phase(offset >> 1, offset & 1);
+ m_phaselatch->write_bit(offset >> 1, offset & 1);
else
switch(offset) {