(MESS) Refactored the Commodore 1541/1551/1571/2031 disk drives to use the modern floppy system. [Curt Coder]

This commit is contained in:
Curt Coder 2014-02-03 15:59:54 +00:00
parent 44add8d8ef
commit b10cef380b
25 changed files with 478 additions and 565 deletions

4
.gitattributes vendored
View File

@ -2773,10 +2773,14 @@ src/lib/formats/d64_dsk.c svneol=native#text/plain
src/lib/formats/d64_dsk.h svneol=native#text/plain
src/lib/formats/d67_dsk.c svneol=native#text/plain
src/lib/formats/d67_dsk.h svneol=native#text/plain
src/lib/formats/d71_dsk.c svneol=native#text/plain
src/lib/formats/d71_dsk.h svneol=native#text/plain
src/lib/formats/d80_dsk.c svneol=native#text/plain
src/lib/formats/d80_dsk.h svneol=native#text/plain
src/lib/formats/d81_dsk.c svneol=native#text/plain
src/lib/formats/d81_dsk.h svneol=native#text/plain
src/lib/formats/d82_dsk.c svneol=native#text/plain
src/lib/formats/d82_dsk.h svneol=native#text/plain
src/lib/formats/d88_dsk.c svneol=native#text/plain
src/lib/formats/d88_dsk.h svneol=native#text/plain
src/lib/formats/dfi_dsk.c svneol=native#text/plain

View File

@ -613,7 +613,7 @@ READ8_MEMBER( c1541c_device::via0_pa_r )
*/
return !floppy_tk00_r(m_image);
return !m_floppy->trk00_r();
}
@ -644,7 +644,7 @@ READ8_MEMBER( base_c1541_device::via1_pb_r )
UINT8 data = 0;
// write protect sense
data |= !floppy_wpt_r(m_image) << 4;
data |= !m_floppy->wpt_r() << 4;
// SYNC detect line
data |= m_ga->sync_r() << 7;
@ -699,40 +699,24 @@ WRITE_LINE_MEMBER( base_c1541_device::byte_w )
m_via1->write_ca1(state);
}
static C64H156_INTERFACE( ga_intf )
{
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, base_c1541_device, atn_w),
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, base_c1541_device, byte_w)
};
//-------------------------------------------------
// SLOT_INTERFACE( c1540_floppies )
//-------------------------------------------------
static SLOT_INTERFACE_START( c1540_floppies )
SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
SLOT_INTERFACE_END
//-------------------------------------------------
// LEGACY_FLOPPY_OPTIONS( c1541 )
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
static LEGACY_FLOPPY_OPTIONS_START( c1541 )
LEGACY_FLOPPY_OPTION( c1541, "g64", "Commodore 1541 GCR Disk Image", g64_dsk_identify, g64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTION( c1541, "d64", "Commodore 1541 Disk Image", d64_dsk_identify, d64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTIONS_END
//-------------------------------------------------
// floppy_interface c1541_floppy_interface
//-------------------------------------------------
static const floppy_interface c1541_floppy_interface =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
FLOPPY_STANDARD_5_25_SSDD,
LEGACY_FLOPPY_OPTIONS_NAME(c1541),
"floppy_5_25",
NULL
};
FLOPPY_FORMATS_MEMBER( base_c1541_device::floppy_formats )
FLOPPY_D64_FORMAT,
FLOPPY_G64_FORMAT
FLOPPY_FORMATS_END
READ8_MEMBER( c1541_prologic_dos_classic_device::pia_r )
@ -802,8 +786,10 @@ static MACHINE_CONFIG_FRAGMENT( c1541 )
MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(C64H156_TAG, c64h156_device, oe_w))
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(base_c1541_device, via1_irq_w))
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1541_floppy_interface)
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_ATN_CALLBACK(WRITELINE(base_c1541_device, atn_w))
MCFG_64H156_BYTE_CALLBACK(WRITELINE(base_c1541_device, byte_w))
MCFG_FLOPPY_DRIVE_ADD(C64H156_TAG":0", c1540_floppies, "525ssqd", base_c1541_device::floppy_formats)
MACHINE_CONFIG_END
@ -974,7 +960,7 @@ base_c1541_device:: base_c1541_device(const machine_config &mconfig, device_type
m_via0(*this, M6522_0_TAG),
m_via1(*this, M6522_1_TAG),
m_ga(*this, C64H156_TAG),
m_image(*this, FLOPPY_0),
m_floppy(*this, C64H156_TAG":0:525ssqd"),
m_address(*this, "ADDRESS"),
m_data_out(1),
m_via0_irq(CLEAR_LINE),
@ -1075,7 +1061,7 @@ c1541_prologic_dos_classic_device::c1541_prologic_dos_classic_device(const machi
void base_c1541_device::device_start()
{
// install image callbacks
m_ga->set_floppy(m_image);
m_ga->set_floppy(m_floppy);
// register for state saving
save_item(NAME(m_data_out));

View File

@ -17,14 +17,11 @@
#include "emu.h"
#include "cbmiec.h"
#include "bus/c64/bn1541.h"
#include "bus/centronics/ctronics.h"
#include "cpu/m6502/m6502.h"
#include "imagedev/flopdrv.h"
#include "formats/d64_dsk.h"
#include "formats/g64_dsk.h"
#include "machine/64h156.h"
#include "machine/6522via.h"
#include "machine/6821pia.h"
#include "bus/centronics/ctronics.h"
@ -43,13 +40,17 @@
// ======================> base_c1541_device
class base_c1541_device : public device_t,
public device_cbm_iec_interface,
public device_c64_floppy_parallel_interface
public device_cbm_iec_interface,
public device_c64_floppy_parallel_interface
{
public:
// construction/destruction
base_c1541_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
virtual ioport_constructor device_input_ports() const;
DECLARE_WRITE_LINE_MEMBER( via0_irq_w );
virtual DECLARE_READ8_MEMBER( via0_pa_r );
DECLARE_WRITE8_MEMBER( via0_pa_w );
@ -62,9 +63,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( atn_w );
DECLARE_WRITE_LINE_MEMBER( byte_w );
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
virtual ioport_constructor device_input_ports() const;
DECLARE_FLOPPY_FORMATS( floppy_formats );
protected:
// device-level overrides
@ -91,7 +90,7 @@ protected:
required_device<via6522_device> m_via0;
required_device<via6522_device> m_via1;
required_device<c64h156_device> m_ga;
required_device<legacy_floppy_image_device> m_image;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
// IEC bus

View File

@ -13,8 +13,7 @@
TODO:
- modernize floppy
- refactor 64H156
- WD1770 set_floppy
- 1571CR
- MOS5710
- ICT Mini Chief MC-20
@ -23,7 +22,6 @@
*/
#include "c1541.h"
#include "c1571.h"
@ -201,7 +199,7 @@ READ8_MEMBER( c1571_device::via0_pa_r )
UINT8 data = 0;
// track 0 sense
data |= floppy_tk00_r(m_image);
data |= m_floppy->trk00_r();
// byte ready
data |= m_ga->byte_r() << 7;
@ -230,7 +228,7 @@ WRITE8_MEMBER( c1571_device::via0_pa_w )
m_ser_dir = BIT(data, 1);
// side select
m_ga->set_side(BIT(data, 2));
m_floppy->ss_w(BIT(data, 2));
// 1/2 MHz
int clock_1_2 = BIT(data, 5);
@ -272,7 +270,7 @@ WRITE8_MEMBER( c1571cr_device::via0_pa_w )
*/
// side select
m_ga->set_side(BIT(data, 2));
m_floppy->ss_w(BIT(data, 2));
// 1/2 MHz
int clock_1_2 = BIT(data, 5);
@ -429,7 +427,7 @@ READ8_MEMBER( c1571_device::via1_pb_r )
UINT8 data = 0;
// write protect sense
data |= !floppy_wpt_r(m_image) << 4;
data |= !m_floppy->wpt_r() << 4;
// SYNC detect line
data |= m_ga->sync_r() << 7;
@ -490,12 +488,14 @@ WRITE_LINE_MEMBER( c1571_device::cia_pc_w )
WRITE_LINE_MEMBER( c1571_device::cia_cnt_w )
{
m_cnt_out = state;
update_iec();
}
WRITE_LINE_MEMBER( c1571_device::cia_sp_w )
{
m_sp_out = state;
update_iec();
}
@ -555,95 +555,39 @@ WRITE8_MEMBER( mini_chief_device::cia_pb_w )
WRITE_LINE_MEMBER( c1571_device::byte_w )
{
m_via1->write_ca1(state);
m_maincpu->set_input_line(M6502_SET_OVERFLOW, state);
}
static C64H156_INTERFACE( ga_intf )
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c1571_device, byte_w)
};
//-------------------------------------------------
// SLOT_INTERFACE( c1570_floppies )
//-------------------------------------------------
/*
static SLOT_INTERFACE_START( c1570_floppies )
SLOT_INTERFACE( "525ssdd", FLOPPY_525_SSDD )
SLOT_INTERFACE_END
*/
//-------------------------------------------------
// SLOT_INTERFACE( c1571_floppies )
//-------------------------------------------------
/*
static SLOT_INTERFACE_START( c1571_floppies )
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
SLOT_INTERFACE_END
*/
//-------------------------------------------------
// LEGACY_FLOPPY_OPTIONS( c1571 )
//-------------------------------------------------
static LEGACY_FLOPPY_OPTIONS_START( c1571 )
LEGACY_FLOPPY_OPTION( c1571, "g64,g71", "Commodore 1541/1571 GCR Disk Image", g64_dsk_identify, g64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTION( c1571, "d64", "Commodore 1541 Disk Image", d64_dsk_identify, d64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTION( c1571, "d71", "Commodore 1571 Disk Image", d71_dsk_identify, d64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTIONS_END
//-------------------------------------------------
// floppy_interface c1571_floppy_interface
//-------------------------------------------------
WRITE_LINE_MEMBER( c1571_device::wpt_w )
void c1571_device::wpt_callback(floppy_image_device *floppy, int state)
{
m_via0->write_ca2(!state);
}
static const floppy_interface c1571_floppy_interface =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c1571_device, wpt_w),
DEVCB_NULL,
FLOPPY_STANDARD_5_25_DSDD,
LEGACY_FLOPPY_OPTIONS_NAME(c1571),
"floppy_5_25",
NULL
};
//-------------------------------------------------
// LEGACY_FLOPPY_OPTIONS( c1541 )
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
static LEGACY_FLOPPY_OPTIONS_START( c1541 )
LEGACY_FLOPPY_OPTION( c1541, "g64", "Commodore 1541 GCR Disk Image", g64_dsk_identify, g64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTION( c1541, "d64", "Commodore 1541 Disk Image", d64_dsk_identify, d64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTIONS_END
//-------------------------------------------------
// floppy_interface c1570_floppy_interface
//-------------------------------------------------
static const floppy_interface c1570_floppy_interface =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c1571_device, wpt_w),
DEVCB_NULL,
FLOPPY_STANDARD_5_25_SSDD,
LEGACY_FLOPPY_OPTIONS_NAME(c1541),
"floppy_5_25",
NULL
};
FLOPPY_FORMATS_MEMBER( c1571_device::floppy_formats )
FLOPPY_D64_FORMAT,
FLOPPY_G64_FORMAT,
FLOPPY_D71_FORMAT
FLOPPY_FORMATS_END
//-------------------------------------------------
@ -699,11 +643,11 @@ static MACHINE_CONFIG_FRAGMENT( c1570 )
MCFG_MOS6526_ADD(M6526_TAG, XTAL_16MHz/16, 0, WRITELINE(c1571_device, cia_irq_w))
MCFG_MOS6526_SERIAL_CALLBACKS(WRITELINE(c1571_device, cia_cnt_w), WRITELINE(c1571_device, cia_sp_w))
MCFG_MOS6526_PORT_B_CALLBACKS(READ8(c1571_device, cia_pb_r), WRITE8(c1571_device, cia_pb_w), WRITELINE(c1571_device, cia_pc_w))
MCFG_WD1770x_ADD(WD1770_TAG, XTAL_16MHz/2)
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1570_floppy_interface)
//MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":0", c1570_floppies, "525ssdd", 0, c1571_device::floppy_formats)
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_BYTE_CALLBACK(WRITELINE(c1571_device, byte_w))
MCFG_FLOPPY_DRIVE_ADD(C64H156_TAG":0", c1571_floppies, "525qd", c1571_device::floppy_formats)
MACHINE_CONFIG_END
@ -746,11 +690,11 @@ static MACHINE_CONFIG_FRAGMENT( c1571 )
MCFG_MOS6526_ADD(M6526_TAG, XTAL_16MHz/16, 0, WRITELINE(c1571_device, cia_irq_w))
MCFG_MOS6526_SERIAL_CALLBACKS(WRITELINE(c1571_device, cia_cnt_w), WRITELINE(c1571_device, cia_sp_w))
MCFG_MOS6526_PORT_B_CALLBACKS(READ8(c1571_device, cia_pb_r), WRITE8(c1571_device, cia_pb_w), WRITELINE(c1571_device, cia_pc_w))
MCFG_WD1770x_ADD(WD1770_TAG, XTAL_16MHz/2)
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1571_floppy_interface)
//MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":0", c1571_floppies, "525dd", 0, c1571_device::floppy_formats)
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_BYTE_CALLBACK(WRITELINE(c1571_device, byte_w))
MCFG_FLOPPY_DRIVE_ADD(C64H156_TAG":0", c1571_floppies, "525qd", c1571_device::floppy_formats)
MACHINE_CONFIG_END
@ -793,10 +737,9 @@ static MACHINE_CONFIG_FRAGMENT( c1571cr )
//MCFG_MOS5710_ADD(M5710_TAG, XTAL_16MHz/16, 0)
MCFG_WD1770x_ADD(WD1770_TAG, XTAL_16MHz/2)
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1571_floppy_interface)
//MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":0", c1571_floppies, "525dd", 0, c1571_device::floppy_formats)
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_BYTE_CALLBACK(WRITELINE(c1571_device, byte_w))
MCFG_FLOPPY_DRIVE_ADD(C64H156_TAG":0", c1571_floppies, "525qd", c1571_device::floppy_formats)
MACHINE_CONFIG_END
@ -839,11 +782,11 @@ static MACHINE_CONFIG_FRAGMENT( mini_chief )
MCFG_MOS6526_ADD(M6526_TAG, XTAL_16MHz/16, 0, WRITELINE(c1571_device, cia_irq_w))
MCFG_MOS6526_SERIAL_CALLBACKS(WRITELINE(c1571_device, cia_cnt_w), WRITELINE(c1571_device, cia_sp_w))
MCFG_MOS6526_PORT_B_CALLBACKS(READ8(c1571_device, cia_pb_r), WRITE8(c1571_device, cia_pb_w), WRITELINE(c1571_device, cia_pc_w))
MCFG_WD1770x_ADD(WD1770_TAG, XTAL_16MHz/2)
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1571_floppy_interface)
//MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":0", c1571_floppies, "525dd", 0, c1571_device::floppy_formats)
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
MCFG_WD1770x_ADD(WD1770_TAG, XTAL_16MHz/2)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_BYTE_CALLBACK(WRITELINE(c1571_device, byte_w))
MCFG_FLOPPY_DRIVE_ADD(C64H156_TAG":0", c1571_floppies, "525qd", c1571_device::floppy_formats)
MCFG_ISA8_BUS_ADD(ISA_BUS_TAG, M6502_TAG, isabus_intf)
MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa1", mini_chief_isa8_cards, "wd1002a_wx1", false)
@ -904,7 +847,7 @@ c1571_device::c1571_device(const machine_config &mconfig, device_type type, cons
m_cia(*this, M6526_TAG),
m_fdc(*this, WD1770_TAG),
m_ga(*this, C64H156_TAG),
m_image(*this, FLOPPY_0),
m_floppy(*this, C64H156_TAG":0:525qd"),
m_address(*this, "ADDRESS"),
m_1_2mhz(0),
m_data_out(1),
@ -927,7 +870,7 @@ c1571_device::c1571_device(const machine_config &mconfig, const char *tag, devic
m_cia(*this, M6526_TAG),
m_fdc(*this, WD1770_TAG),
m_ga(*this, C64H156_TAG),
m_image(*this, FLOPPY_0),
m_floppy(*this, C64H156_TAG":0:525qd"),
m_address(*this, "ADDRESS"),
m_1_2mhz(0),
m_data_out(1),
@ -937,7 +880,6 @@ c1571_device::c1571_device(const machine_config &mconfig, const char *tag, devic
m_via0_irq(CLEAR_LINE),
m_via1_irq(CLEAR_LINE),
m_cia_irq(CLEAR_LINE)
//m_floppy(*this, WD1770_TAG":0:525dd")
{
}
@ -948,7 +890,6 @@ c1571_device::c1571_device(const machine_config &mconfig, const char *tag, devic
c1570_device::c1570_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: c1571_device(mconfig, C1570, "C1570", tag, owner, clock, "c1570", __FILE__)
//m_floppy(*this, WD1770_TAG":0:525ssdd")
{
}
@ -959,7 +900,6 @@ c1570_device::c1570_device(const machine_config &mconfig, const char *tag, devic
c1571cr_device::c1571cr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: c1571_device(mconfig, C1571CR, "C1571CR", tag, owner, clock, "c1571cr", __FILE__)
//m_floppy(*this, WD1770_TAG":0:525dd")
{
}
@ -970,7 +910,6 @@ c1571cr_device::c1571cr_device(const machine_config &mconfig, const char *tag, d
mini_chief_device::mini_chief_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: c1571_device(mconfig, MINI_CHIEF, "ICT Mini Chief", tag, owner, clock, "minichif", __FILE__)
//m_floppy(*this, WD1770_TAG":0:525dd")
{
}
@ -982,8 +921,9 @@ mini_chief_device::mini_chief_device(const machine_config &mconfig, const char *
void c1571_device::device_start()
{
// install image callbacks
m_ga->set_floppy(m_image);
m_ga->set_floppy(m_floppy);
//m_fdc->set_floppy(m_floppy);
m_floppy->setup_wpt_cb(floppy_image_device::wpt_cb(FUNC(c1571_device::wpt_callback), this));
// register for state saving
save_item(NAME(m_1_2mhz));

View File

@ -18,15 +18,12 @@
#include "cbmiec.h"
#include "bus/c64/bn1541.h"
#include "cpu/m6502/m6502.h"
#include "imagedev/flopdrv.h"
#include "formats/d64_dsk.h"
#include "formats/g64_dsk.h"
#include "machine/64h156.h"
#include "machine/6522via.h"
#include "machine/isa.h"
#include "machine/isa_wd1002a_wx1.h"
#include "machine/mos6526.h"
#include "machine/wd_fdc.h"
#include "machine/isa_wd1002a_wx1.h"
@ -45,8 +42,8 @@
// ======================> c1571_device
class c1571_device : public device_t,
public device_cbm_iec_interface,
public device_c64_floppy_parallel_interface
public device_cbm_iec_interface,
public device_c64_floppy_parallel_interface
{
public:
// construction/destruction
@ -81,6 +78,10 @@ public:
DECLARE_WRITE_LINE_MEMBER( wpt_w );
DECLARE_FLOPPY_FORMATS( floppy_formats );
void wpt_callback(floppy_image_device *floppy, int state);
protected:
// device-level overrides
virtual void device_start();
@ -110,8 +111,7 @@ protected:
required_device<mos6526_device> m_cia;
required_device<wd1770_t> m_fdc;
required_device<c64h156_device> m_ga;
required_device<legacy_floppy_image_device> m_image;
//required_device<floppy_image_device> m_floppy;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
// signals

View File

@ -230,7 +230,7 @@ READ8_MEMBER( c2031_device::via1_pb_r )
UINT8 data = 0;
// write protect sense
data |= !floppy_wpt_r(m_image) << 4;
data |= !m_floppy->wpt_r() << 4;
// SYNC detect line
data |= m_ga->sync_r() << 7;
@ -280,40 +280,24 @@ WRITE_LINE_MEMBER( c2031_device::byte_w )
m_via1->write_ca1(state);
}
static C64H156_INTERFACE( ga_intf )
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c2031_device, byte_w)
};
//-------------------------------------------------
// SLOT_INTERFACE( c2031_floppies )
//-------------------------------------------------
static SLOT_INTERFACE_START( c2031_floppies )
SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
SLOT_INTERFACE_END
//-------------------------------------------------
// LEGACY_FLOPPY_OPTIONS( c1541 )
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
static LEGACY_FLOPPY_OPTIONS_START( c1541 )
LEGACY_FLOPPY_OPTION( c1541, "g64", "Commodore 1541 GCR Disk Image", g64_dsk_identify, g64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTION( c1541, "d64", "Commodore 1541 Disk Image", d64_dsk_identify, d64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTIONS_END
//-------------------------------------------------
// floppy_interface c2031_floppy_interface
//-------------------------------------------------
static const floppy_interface c2031_floppy_interface =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
FLOPPY_STANDARD_5_25_SSDD,
LEGACY_FLOPPY_OPTIONS_NAME(c1541),
"floppy_5_25",
NULL
};
FLOPPY_FORMATS_MEMBER( c2031_device::floppy_formats )
FLOPPY_D64_FORMAT,
FLOPPY_G64_FORMAT
FLOPPY_FORMATS_END
//-------------------------------------------------
@ -341,8 +325,9 @@ static MACHINE_CONFIG_FRAGMENT( c2031 )
MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(C64H156_TAG, c64h156_device, oe_w))
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(c2031_device, via1_irq_w))
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c2031_floppy_interface)
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_BYTE_CALLBACK(WRITELINE(c2031_device, byte_w))
MCFG_FLOPPY_DRIVE_ADD(C64H156_TAG":0", c2031_floppies, "525ssqd", c2031_device::floppy_formats)
MACHINE_CONFIG_END
@ -422,7 +407,7 @@ c2031_device::c2031_device(const machine_config &mconfig, const char *tag, devic
m_via0(*this, M6522_0_TAG),
m_via1(*this, M6522_1_TAG),
m_ga(*this, C64H156_TAG),
m_image(*this, FLOPPY_0),
m_floppy(*this, C64H156_TAG":0:525ssqd"),
m_address(*this, "ADDRESS"),
m_nrfd_out(1),
m_ndac_out(1),
@ -440,7 +425,7 @@ c2031_device::c2031_device(const machine_config &mconfig, const char *tag, devic
void c2031_device::device_start()
{
// install image callbacks
m_ga->set_floppy(m_image);
m_ga->set_floppy(m_floppy);
// register for state saving
save_item(NAME(m_nrfd_out));

View File

@ -17,7 +17,6 @@
#include "emu.h"
#include "ieee488.h"
#include "cpu/m6502/m6502.h"
#include "imagedev/flopdrv.h"
#include "machine/64h156.h"
#include "machine/6522via.h"
@ -30,12 +29,17 @@
// ======================> c2031_device
class c2031_device : public device_t,
public device_ieee488_interface
public device_ieee488_interface
{
public:
// construction/destruction
c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual const rom_entry *device_rom_region() const;
virtual machine_config_constructor device_mconfig_additions() const;
virtual ioport_constructor device_input_ports() const;
DECLARE_WRITE_LINE_MEMBER( via0_irq_w );
DECLARE_READ8_MEMBER( via0_pa_r );
DECLARE_WRITE8_MEMBER( via0_pa_w );
@ -46,10 +50,7 @@ public:
DECLARE_WRITE8_MEMBER( via1_pb_w );
DECLARE_WRITE_LINE_MEMBER( byte_w );
// optional information overrides
virtual const rom_entry *device_rom_region() const;
virtual machine_config_constructor device_mconfig_additions() const;
virtual ioport_constructor device_input_ports() const;
DECLARE_FLOPPY_FORMATS( floppy_formats );
protected:
// device-level overrides
@ -66,7 +67,7 @@ protected:
required_device<via6522_device> m_via0;
required_device<via6522_device> m_via1;
required_device<c64h156_device> m_ga;
required_device<legacy_floppy_image_device> m_image;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
// IEEE-488 bus

View File

@ -24,13 +24,6 @@
#define PLA_TAG "u1"
enum
{
LED_POWER = 0,
LED_ACT
};
//**************************************************************************
// DEVICE DEFINITIONS
@ -86,7 +79,7 @@ READ8_MEMBER( c1551_device::port_r )
UINT8 data = 0;
// write protect sense
data |= !floppy_wpt_r(m_image) << 4;
data |= !m_floppy->wpt_r() << 4;
// byte latched
data |= m_ga->atn_r() << 7;
@ -124,6 +117,7 @@ WRITE8_MEMBER( c1551_device::port_w )
m_ga->ds_w((data >> 5) & 0x03);
}
//-------------------------------------------------
// tpi6525_interface tpi0_intf
//-------------------------------------------------
@ -357,43 +351,22 @@ ADDRESS_MAP_END
//-------------------------------------------------
// C64H156_INTERFACE( ga_intf )
// SLOT_INTERFACE( c1551_floppies )
//-------------------------------------------------
static C64H156_INTERFACE( ga_intf )
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF, c64h156_device, atni_w)
};
static SLOT_INTERFACE_START( c1551_floppies )
SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
SLOT_INTERFACE_END
//-------------------------------------------------
// LEGACY_FLOPPY_OPTIONS( c1541 )
// FLOPPY_FORMATS( floppy_formats )
//-------------------------------------------------
static LEGACY_FLOPPY_OPTIONS_START( c1541 )
LEGACY_FLOPPY_OPTION( c1541, "g64", "Commodore 1541 GCR Disk Image", g64_dsk_identify, g64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTION( c1541, "d64", "Commodore 1541 Disk Image", d64_dsk_identify, d64_dsk_construct, NULL, NULL )
LEGACY_FLOPPY_OPTIONS_END
//-------------------------------------------------
// floppy_interface c1551_floppy_interface
//-------------------------------------------------
static const floppy_interface c1551_floppy_interface =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
FLOPPY_STANDARD_5_25_SSDD,
LEGACY_FLOPPY_OPTIONS_NAME(c1541),
"floppy_5_25",
NULL
};
FLOPPY_FORMATS_MEMBER( c1551_device::floppy_formats )
FLOPPY_D64_FORMAT,
FLOPPY_G64_FORMAT
FLOPPY_FORMATS_END
//-------------------------------------------------
@ -410,8 +383,9 @@ static MACHINE_CONFIG_FRAGMENT( c1551 )
MCFG_TPI6525_ADD(M6523_0_TAG, tpi0_intf)
MCFG_TPI6525_ADD(M6523_1_TAG, tpi1_intf)
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1551_floppy_interface)
MCFG_64H156_ADD(C64H156_TAG, XTAL_16MHz, ga_intf)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_BYTE_CALLBACK(DEVWRITELINE(C64H156_TAG, c64h156_device, atni_w))
MCFG_FLOPPY_DRIVE_ADD(C64H156_TAG":0", c1551_floppies, "525ssqd", c1551_device::floppy_formats)
MCFG_PLUS4_PASSTHRU_EXPANSION_SLOT_ADD()
MACHINE_CONFIG_END
@ -467,7 +441,7 @@ c1551_device::c1551_device(const machine_config &mconfig, const char *tag, devic
m_tpi1(*this, M6523_1_TAG),
m_ga(*this, C64H156_TAG),
m_pla(*this, PLA_TAG),
m_image(*this, FLOPPY_0),
m_floppy(*this, C64H156_TAG":0:525ssqd"),
m_exp(*this, PLUS4_EXPANSION_SLOT_TAG),
m_jp1(*this, "JP1"),
m_tcbm_data(0xff),
@ -490,7 +464,7 @@ void c1551_device::device_start()
m_irq_timer->adjust(attotime::zero, CLEAR_LINE);
// install image callbacks
m_ga->set_floppy(m_image);
m_ga->set_floppy(m_floppy);
// register for state saving
save_item(NAME(m_tcbm_data));

View File

@ -14,13 +14,9 @@
#ifndef __C1551__
#define __C1551__
#include "emu.h"
#include "exp.h"
#include "cpu/m6502/m6510t.h"
#include "imagedev/flopdrv.h"
#include "formats/d64_dsk.h"
#include "formats/g64_dsk.h"
#include "machine/64h156.h"
#include "machine/6525tpi.h"
#include "machine/pla.h"
@ -34,7 +30,7 @@
// ======================> c1551_device
class c1551_device : public device_t,
public device_plus4_expansion_card_interface
public device_plus4_expansion_card_interface
{
public:
// construction/destruction
@ -63,6 +59,8 @@ public:
DECLARE_READ8_MEMBER( tpi1_pc_r );
DECLARE_WRITE8_MEMBER( tpi1_pc_w );
DECLARE_FLOPPY_FORMATS( floppy_formats );
protected:
// device-level overrides
virtual void device_start();
@ -74,6 +72,12 @@ protected:
virtual void plus4_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
private:
enum
{
LED_POWER = 0,
LED_ACT
};
bool tpi1_selected(offs_t offset);
required_device<m6510t_device> m_maincpu;
@ -81,7 +85,7 @@ private:
required_device<tpi6525_device> m_tpi1;
required_device<c64h156_device> m_ga;
required_device<pls100_device> m_pla;
required_device<legacy_floppy_image_device> m_image;
required_device<floppy_image_device> m_floppy;
required_device<plus4_expansion_slot_device> m_exp;
required_ioport m_jp1;

View File

@ -562,7 +562,7 @@ UINT32 floppy_image_device::find_position(attotime &base, attotime when)
revc++;
}
return (delta*rpm/300).as_ticks(1000000000);
return (delta*rpm/300.).as_ticks(1000000000);
}
attotime floppy_image_device::get_next_transition(attotime from_when)
@ -592,7 +592,7 @@ attotime floppy_image_device::get_next_transition(attotime from_when)
next_position = 200000000 + (buf[1] & floppy_image::TIME_MASK);
// logerror("Floppy: cuspos=%d nextpos=%d\n", position, next_position);
return base + attotime::from_nsec(UINT64(next_position)*300/rpm);
return base + attotime::from_nsec(UINT64(next_position)*300./rpm);
}
void floppy_image_device::write_flux(attotime start, attotime end, int transition_count, const attotime *transitions)

View File

@ -91,6 +91,7 @@ public:
UINT32* get_buffer() { return image->get_buffer(cyl, ss); }
UINT32 get_len() { return image->get_track_size(cyl, ss); }
int get_cyl() { return cyl; }
void mon_w(int state);
bool ready_r();

View File

@ -13,15 +13,13 @@
TODO:
http://staff.washington.edu/rrcc/uwweb/1541early/1540-2.GIF
http://personalpages.tds.net/~rcarlsen/cbm/1541/1541%20EARLY/1540-2.GIF
- model disk rotation for proper track alignment
- write circuitry
- cycle exact M6502
- cycle exact VIA
- refactor to use modern floppy system
- get these running and we're golden
- Bounty Bob Strikes Back (aligned halftracks)
- Quiwi (speed change within track)
- Defender of the Crown (V-MAX! v2, density checks)
- Test Drive / Cabal (HLS, sub-cycle jitter)
@ -29,9 +27,7 @@
*/
#include "emu.h"
#include "64h156.h"
#include "formats/g64_dsk.h"
@ -53,28 +49,6 @@
const device_type C64H156 = &device_creator<c64h156_device>;
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
void c64h156_device::device_config_complete()
{
// inherit a copy of the static data
const c64h156_interface *intf = reinterpret_cast<const c64h156_interface *>(static_config());
if (intf != NULL)
*static_cast<c64h156_interface *>(this) = *intf;
// or initialize to defaults if none provided
else
{
memset(&m_out_atn_cb, 0, sizeof(m_out_atn_cb));
memset(&m_out_sync_cb, 0, sizeof(m_out_sync_cb));
memset(&m_out_byte_cb, 0, sizeof(m_out_byte_cb));
}
}
//**************************************************************************
@ -87,55 +61,17 @@ void c64h156_device::device_config_complete()
inline void c64h156_device::set_atn_line()
{
m_out_atn_func(ATN);
m_write_atn(ATN);
}
//-------------------------------------------------
// read_current_track -
// get_next_edge -
//-------------------------------------------------
inline void c64h156_device::read_current_track()
inline void c64h156_device::get_next_edge(attotime when)
{
int track_length = G64_BUFFER_SIZE;
// read track data
floppy_drive_read_track_data_info_buffer(m_floppy, m_side, m_track_buffer, &track_length);
// extract track length
m_track_len = floppy_drive_get_current_track_size(m_floppy, m_side);
// set bit pointer to track start
m_buffer_pos = 0;
m_bit_pos = 7;
m_bit_count = 0;
m_zero_count = 0;
if (m_track_len)
{
memcpy(m_speed_buffer, m_track_buffer + m_track_len, G64_SPEED_BLOCK_SIZE);
update_cycles_until_next_bit();
}
}
//-------------------------------------------------
// update_cycles_until_next_bit -
//-------------------------------------------------
inline void c64h156_device::update_cycles_until_next_bit()
{
int speed_offset = m_buffer_pos / 4;
int speed_shift = (3 - (m_buffer_pos % 4)) * 2;
UINT8 speed = m_speed_buffer[speed_offset];
int ds = (speed >> speed_shift) & 0x03;
m_cycles_until_next_bit = (16 - ds) * 4;
if (LOG) logerror("buff %04x:%u speed %04x shift %u ds %u cycles %u\n", m_buffer_pos, m_bit_pos, speed_offset, speed_shift, ds, m_cycles_until_next_bit);
m_edge = m_floppy->get_next_transition(when);
}
@ -145,63 +81,13 @@ inline void c64h156_device::update_cycles_until_next_bit()
inline void c64h156_device::receive_bit()
{
if (!m_track_len)
{
m_bit_sync = 0;
}
else
{
if (m_cycles_until_next_bit == 0)
{
m_bit_sync = BIT(m_track_buffer[m_buffer_pos], m_bit_pos);
attotime when = machine().time();
attotime next = when + m_period;
if (m_bit_sync)
{
m_zero_count = 0;
m_cycles_until_random_flux = (rand() % 31) + 289;
}
else
{
m_zero_count++;
}
m_bit_sync = (m_edge.is_never() || m_edge >= next) ? 0 : 1;
if (m_zero_count >= m_cycles_until_random_flux)
{
// receive phantom bit
if (LOG) logerror("PHANTOM BIT SYNC 1 after %u cycles\n", m_zero_count);
m_bit_sync = 1;
m_zero_count = 0;
m_cycles_until_random_flux = (rand() % 367) + 33;
}
else
{
if (LOG) logerror("BIT SYNC %u\n", m_bit_sync);
}
m_shift <<= 1;
m_shift |= m_bit_sync;
m_bit_pos--;
m_bit_count++;
if (m_bit_pos < 0)
{
m_bit_pos = 7;
m_buffer_pos++;
if (m_buffer_pos >= m_track_len)
{
// loop to the start of the track
m_buffer_pos = 0;
}
}
update_cycles_until_next_bit();
}
m_cycles_until_next_bit--;
if (m_bit_sync) {
get_next_edge(when);
}
}
@ -231,7 +117,7 @@ inline void c64h156_device::decode_bit()
}
}
if (LOG) logerror("UE7 CTR %01x TC %u, ", m_ue7, ue7_tc);
if (LOG) logerror("%s UE7 CTR %01x TC %u, ", machine().time().as_string(),m_ue7, ue7_tc);
// UF4
@ -306,11 +192,7 @@ inline void c64h156_device::decode_bit()
{
// clock UE3
m_ue3++;
if (m_ue3 == 16)
{
m_ue3 = 0;
}
m_ue3 &= 0x0f;
if (LOG) logerror("++");
}
@ -334,7 +216,7 @@ inline void c64h156_device::decode_bit()
if (LOG) logerror("BYTE %u SOE %u\n", byte_sync, m_soe);
// UD3
#ifdef WRITE_SUPPORTED
int uf3b = !(uc1b && uf4_qa && uf4_qb);
if (!uf3b)
@ -349,19 +231,19 @@ inline void c64h156_device::decode_bit()
int uf5b = !(!uf4_qb && ud3_qh);
if (!m_oe && m_wp)
if (!m_oe && m_floppy->wpt_r())
{
// TODO write bit to disk
if (LOG) logerror("WRITE BIT %u\n", uf5b);
}
}
#endif
// prepare for next cycle
if (m_block_sync != block_sync)
{
m_block_sync = block_sync;
m_out_sync_func(m_block_sync);
m_write_sync(m_block_sync);
}
if (m_byte_sync != byte_sync)
@ -374,18 +256,16 @@ inline void c64h156_device::decode_bit()
{
m_accl_yb = m_ud2;
m_accl_byte_sync = byte_sync;
m_out_byte_func(m_accl_byte_sync);
m_write_byte(m_accl_byte_sync);
}
}
else
{
m_out_byte_func(m_byte_sync);
m_write_byte(m_byte_sync);
}
}
m_uf4_qb = uf4_qb;
m_bit_sync = 0;
}
@ -402,16 +282,16 @@ c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, C64H156, "64H156", tag, owner, clock, "c64h156", __FILE__),
device_execute_interface(mconfig, *this),
m_icount(0),
m_write_atn(*this),
m_write_sync(*this),
m_write_byte(*this),
m_floppy(NULL),
m_track_buffer(*this, "track_buffer"),
m_speed_buffer(*this, "speed_buffer"),
m_side(0),
m_track_len(0),
m_buffer_pos(0),
m_bit_pos(0),
m_bit_count(0),
m_period(attotime::from_hz(clock)),
m_edge(attotime::never),
m_shift(0),
m_mtr(0),
m_accl(0),
m_stp(-1),
m_ds(0),
m_soe(0),
m_oe(0),
@ -431,8 +311,7 @@ c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, d
m_u4a(0),
m_u4b(0),
m_ue3(0),
m_uc1b(0),
m_wp(0)
m_uc1b(0)
{
}
@ -446,27 +325,16 @@ void c64h156_device::device_start()
// set our instruction counter
m_icountptr = &m_icount;
// allocate track buffer
m_track_buffer.allocate(G64_BUFFER_SIZE);
m_speed_buffer.allocate(G64_SPEED_BLOCK_SIZE);
// resolve callbacks
m_out_atn_func.resolve(m_out_atn_cb, *this);
m_out_sync_func.resolve(m_out_sync_cb, *this);
m_out_byte_func.resolve(m_out_byte_cb, *this);
m_write_atn.resolve_safe();
m_write_sync.resolve_safe();
m_write_byte.resolve_safe();
// register for state saving
save_item(NAME(m_shift));
save_item(NAME(m_side));
save_item(NAME(m_track_len));
save_item(NAME(m_buffer_pos));
save_item(NAME(m_bit_pos));
save_item(NAME(m_bit_count));
save_item(NAME(m_cycles_until_next_bit));
save_item(NAME(m_zero_count));
save_item(NAME(m_cycles_until_random_flux));
save_item(NAME(m_mtr));
save_item(NAME(m_accl));
save_item(NAME(m_stp));
save_item(NAME(m_ds));
save_item(NAME(m_soe));
save_item(NAME(m_oe));
@ -489,7 +357,6 @@ void c64h156_device::device_start()
save_item(NAME(m_uc1b));
save_item(NAME(m_via_pa));
save_item(NAME(m_ud3));
save_item(NAME(m_wp));
}
@ -504,10 +371,9 @@ void c64h156_device::execute_run()
if (m_mtr)
{
receive_bit();
decode_bit();
}
decode_bit();
m_icount--;
} while (m_icount > 0);
}
@ -608,7 +474,8 @@ WRITE_LINE_MEMBER( c64h156_device::ted_w )
if (m_accl && !m_accl_byte_sync && !state)
{
m_accl_byte_sync = 1;
m_out_byte_func(m_accl_byte_sync);
m_write_byte(m_accl_byte_sync);
}
}
@ -623,15 +490,11 @@ WRITE_LINE_MEMBER( c64h156_device::mtr_w )
{
if (LOG) logerror("MTR %u\n", state);
if (state)
{
// read track data
read_current_track();
}
floppy_mon_w(m_floppy, !state);
m_floppy->mon_w(!state);
m_mtr = state;
get_next_edge(machine().time());
}
}
@ -702,13 +565,9 @@ WRITE_LINE_MEMBER( c64h156_device::atna_w )
// set_floppy -
//-------------------------------------------------
void c64h156_device::set_floppy(legacy_floppy_image_device *floppy)
void c64h156_device::set_floppy(floppy_image_device *floppy)
{
m_floppy = floppy;
// install image callbacks
floppy_install_unload_proc(m_floppy, c64h156_device::on_disk_change);
floppy_install_load_proc(m_floppy, c64h156_device::on_disk_change);
}
@ -716,26 +575,37 @@ void c64h156_device::set_floppy(legacy_floppy_image_device *floppy)
// stp_w -
//-------------------------------------------------
void c64h156_device::stp_w(int data)
void c64h156_device::stp_w(int stp)
{
if (m_mtr)
{
int track = floppy_drive_get_current_track(m_floppy);
int tracks = (data - track) & 0x03;
if (tracks == 3)
if (m_stp != stp)
{
tracks = -1;
int track = m_floppy->get_cyl();
int tracks = (stp - track) & 0x03;
if (tracks == 3)
{
tracks = -1;
}
if (tracks == -1)
{
m_floppy->dir_w(1);
m_floppy->stp_w(1);
m_floppy->stp_w(0);
}
else if (tracks == 1)
{
m_floppy->dir_w(0);
m_floppy->stp_w(1);
m_floppy->stp_w(0);
}
}
if (tracks == -1 || tracks == 1)
{
// step read/write head
floppy_drive_seek(m_floppy, tracks);
m_stp = stp;
// read new track data
read_current_track();
}
get_next_edge(machine().time());
}
}
@ -744,35 +614,9 @@ void c64h156_device::stp_w(int data)
// ds_w - density select
//-------------------------------------------------
void c64h156_device::ds_w(int data)
void c64h156_device::ds_w(int ds)
{
m_ds = data;
}
//-------------------------------------------------
// set_side -
//-------------------------------------------------
void c64h156_device::set_side(int side)
{
if (m_side != side)
{
m_side = side;
// read new track data
read_current_track();
}
}
//-------------------------------------------------
// on_disk_change -
//-------------------------------------------------
void c64h156_device::on_disk_change(device_image_interface &image)
{
//m_wp = !floppy_wpt_r(image);
//read_current_track();
if (LOG) logerror("DS %u\n", ds & 0x03);
m_ds = ds & 0x03;
}

View File

@ -62,11 +62,11 @@
#ifndef __C64H156__
#define __C64H156__
#include "emu.h"
#include "imagedev/flopdrv.h"
#include "imagedev/floppy.h"
#include "formats/d64_dsk.h"
#include "formats/g64_dsk.h"
#include "formats/d71_dsk.h"
@ -74,12 +74,14 @@
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_64H156_ADD(_tag, _clock, _config) \
MCFG_DEVICE_ADD(_tag, C64H156, _clock) \
MCFG_DEVICE_CONFIG(_config)
#define MCFG_64H156_ATN_CALLBACK(_write) \
devcb = &c64h156_device::set_atn_wr_callback(*device, DEVCB2_##_write);
#define C64H156_INTERFACE(_name) \
const c64h156_interface (_name) =
#define MCFG_64H156_SYNC_CALLBACK(_write) \
devcb = &c64h156_device::set_sync_wr_callback(*device, DEVCB2_##_write);
#define MCFG_64H156_BYTE_CALLBACK(_write) \
devcb = &c64h156_device::set_byte_wr_callback(*device, DEVCB2_##_write);
@ -87,25 +89,19 @@
// TYPE DEFINITIONS
//**************************************************************************
// ======================> c64h156_interface
struct c64h156_interface
{
devcb_write_line m_out_atn_cb;
devcb_write_line m_out_sync_cb;
devcb_write_line m_out_byte_cb;
};
// ======================> c64h156_device
class c64h156_device : public device_t,
public device_execute_interface,
public c64h156_interface
public device_execute_interface
{
public:
// construction/destruction
c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
template<class _Object> static devcb2_base &set_atn_wr_callback(device_t &device, _Object object) { return downcast<c64h156_device &>(device).m_write_atn.set_callback(object); }
template<class _Object> static devcb2_base &set_sync_wr_callback(device_t &device, _Object object) { return downcast<c64h156_device &>(device).m_write_sync.set_callback(object); }
template<class _Object> static devcb2_base &set_byte_wr_callback(device_t &device, _Object object) { return downcast<c64h156_device &>(device).m_write_byte.set_callback(object); }
DECLARE_READ8_MEMBER( yb_r );
DECLARE_WRITE8_MEMBER( yb_w );
DECLARE_WRITE_LINE_MEMBER( test_w );
@ -120,17 +116,13 @@ public:
DECLARE_WRITE_LINE_MEMBER( atni_w );
DECLARE_WRITE_LINE_MEMBER( atna_w );
void set_floppy(legacy_floppy_image_device *floppy);
void set_floppy(floppy_image_device *floppy);
void stp_w(int data);
void ds_w(int data);
void set_side(int side);
static void on_disk_change(device_image_interface &image);
void stp_w(int stp);
void ds_w(int ds);
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
// device_execute_interface overrides
@ -139,36 +131,28 @@ protected:
int m_icount;
inline void set_atn_line();
inline void read_current_track();
inline void update_cycles_until_next_bit();
inline void receive_bit();
inline void decode_bit();
inline void get_next_edge(attotime when);
private:
devcb_resolved_write_line m_out_atn_func;
devcb_resolved_write_line m_out_sync_func;
devcb_resolved_write_line m_out_byte_func;
devcb2_write_line m_write_atn;
devcb2_write_line m_write_sync;
devcb2_write_line m_write_byte;
legacy_floppy_image_device *m_floppy;
optional_shared_ptr<UINT8> m_track_buffer; // track data buffer
optional_shared_ptr<UINT8> m_speed_buffer; // speed block buffer
floppy_image_device *m_floppy;
// track
attotime m_period;
attotime m_edge;
UINT16 m_shift;
int m_side; // disk side
int m_track_len; // track length
offs_t m_buffer_pos; // current byte position within track buffer
int m_bit_pos; // current bit position within track buffer byte
int m_bit_count; // current data byte bit counter
int m_cycles_until_next_bit;
int m_zero_count;
int m_cycles_until_random_flux;
// motors
int m_mtr; // spindle motor on
// signals
int m_accl; // 1/2 MHz select
int m_stp;
int m_ds; // density select
int m_soe; // serial output enable
int m_oe; // output enable (0 = write, 1 = read)
@ -197,7 +181,6 @@ private:
// write logic
UINT8 m_via_pa;
UINT8 m_ud3;
int m_wp;
};

View File

@ -4,7 +4,9 @@
formats/d64_dsk.c
Commodore 2040/1541/1571 sector disk image format
Commodore 4040/1541/1551 sector disk image format
http://unusedino.de/ec64/technical/formats/d64.html
*********************************************************************/
@ -28,12 +30,12 @@ const char *d64_format::name() const
const char *d64_format::description() const
{
return "Commodore 4040/1541/1571 disk image";
return "Commodore 4040/1541/1551 disk image";
}
const char *d64_format::extensions() const
{
return "d64,d71";
return "d64";
}
const d64_format::format d64_format::file_formats[] = {
@ -46,9 +48,6 @@ const d64_format::format d64_format::file_formats[] = {
{ // d64, dos 2, 42 tracks, head 48 tpi, stepper 96 tpi
floppy_image::FF_525, floppy_image::SSSD, 802, 42, 1, 256, 9, 8
},
{ // d71, dos 2, 35 tracks, 2 heads, head 48 tpi, stepper 96 tpi
floppy_image::FF_525, floppy_image::DSSD, 683, 35, 2, 256, 9, 8
},
{}
};
@ -85,9 +84,9 @@ int d64_format::find_size(io_generic *io, UINT32 form_factor)
UINT64 size = io_generic_size(io);
for(int i=0; formats[i].sector_count; i++) {
const format &f = formats[i];
if(size == (UINT32) f.sector_count*f.sector_base_size)
if(size == (UINT32) f.sector_count*f.sector_base_size*f.head_count)
return i;
if(size == (UINT32) (f.sector_count*f.sector_base_size) + f.sector_count)
if(size == (UINT32) (f.sector_count*f.sector_base_size*f.head_count) + f.sector_count)
return i;
}
return -1;
@ -97,12 +96,13 @@ int d64_format::identify(io_generic *io, UINT32 form_factor)
{
int type = find_size(io, form_factor);
if(type != -1)
if (type != -1)
return 50;
return 0;
}
int d64_format::get_physical_track(const format &f, int track)
int d64_format::get_physical_track(const format &f, int head, int track)
{
// skip halftracks
return track * 2;
@ -110,7 +110,8 @@ int d64_format::get_physical_track(const format &f, int track)
int d64_format::get_disk_id_offset(const format &f)
{
return 101144;
// t18s0 +0xa2
return 0x165a2;
}
void d64_format::get_disk_id(const format &f, io_generic *io, UINT8 &id1, UINT8 &id2)
@ -131,7 +132,7 @@ int d64_format::get_sectors_per_track(const format &f, int track)
return sectors_per_track[track];
}
floppy_image_format_t::desc_e* d64_format::get_sector_desc(const format &f, int &current_size, int track, int sector_count, UINT8 id1, UINT8 id2, int gap_2)
floppy_image_format_t::desc_e* d64_format::get_sector_desc(const format &f, int &current_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2)
{
static floppy_image_format_t::desc_e desc[] = {
/* 00 */ { SECTOR_LOOP_START, 0, -1 },
@ -140,7 +141,7 @@ floppy_image_format_t::desc_e* d64_format::get_sector_desc(const format &f, int
/* 03 */ { CRC, 1 },
/* 04 */ { CRC_CBM_START, 1 },
/* 05 */ { SECTOR_ID_GCR5 },
/* 06 */ { GCR5, track, 1 },
/* 06 */ { TRACK_ID_DOS2_GCR5 },
/* 07 */ { GCR5, id2, 1 },
/* 08 */ { GCR5, id1, 1 },
/* 09 */ { CRC_END, 1 },
@ -168,7 +169,7 @@ floppy_image_format_t::desc_e* d64_format::get_sector_desc(const format &f, int
void d64_format::build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, offs_t error_offs, desc_s *sectors, int sector_count) const
{
for(int i=0; i<sector_count; i++) {
for (int i = 0; i < sector_count; i++) {
sectors[i].data = sectdata + sect_offs;
sectors[i].size = f.sector_base_size;
sectors[i].sector_id = i;
@ -186,6 +187,7 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
return false;
const format &f = formats[type];
UINT64 size = io_generic_size(io);
UINT8 *img;
@ -199,22 +201,20 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
io_generic_read(io, img, 0, size);
floppy_image_format_t::desc_e *desc;
desc_s sectors[40];
int track_offset = 0, error_offset = f.sector_count*f.sector_base_size;
UINT8 id1 = 0, id2 = 0;
get_disk_id(f, io, id1, id2);
for(int head=0; head < f.head_count; head++) {
for(int track=0; track < f.track_count; track++) {
for (int head = 0; head < f.head_count; head++) {
for (int track = 0; track < f.track_count; track++) {
int current_size = 0;
int total_size = 200000000/this->get_cell_size(f, track);
int physical_track = this->get_physical_track(f, track);
int total_size = 200000000./this->get_cell_size(f, track);
int physical_track = this->get_physical_track(f, head, track);
int sector_count = this->get_sectors_per_track(f, track);
int track_size = sector_count*f.sector_base_size;
desc = get_sector_desc(f, current_size, track+1, sector_count, id1, id2, f.gap_2);
floppy_image_format_t::desc_e *desc = this->get_sector_desc(f, current_size, sector_count, id1, id2, f.gap_2);
int remaining_size = total_size - current_size;
if(remaining_size < 0)
@ -223,11 +223,13 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
// Fixup the end gap
desc[21].p2 = remaining_size / 8;
desc[22].p2 = remaining_size & 7;
desc[22].p1 >>= 8-(remaining_size & 7);
desc[22].p1 >>= remaining_size & 0x01;
desc_s sectors[40];
build_sector_description(f, img, track_offset, error_offset, sectors, sector_count);
generate_track(desc, physical_track, head, sectors, sector_count, total_size, image);
track_offset += track_size;
error_offset += sector_count;
}
@ -240,15 +242,6 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
return true;
}
void d64_format::extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head)
{
}
bool d64_format::save(io_generic *io, floppy_image *image)
{
return false;
}
bool d64_format::supports_save() const
{
return false;

View File

@ -4,7 +4,7 @@
formats/d64_dsk.h
Commodore 2040/1541/1571 sector disk image format
Commodore 4040/1541/1551 sector disk image format
*********************************************************************/
@ -36,7 +36,6 @@ public:
virtual int identify(io_generic *io, UINT32 form_factor);
virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
virtual bool save(io_generic *io, floppy_image *image);
virtual bool supports_save() const;
protected:
@ -59,14 +58,13 @@ protected:
const format *formats;
int find_size(io_generic *io, UINT32 form_factor);
virtual int get_physical_track(const format &f, int track);
virtual int get_physical_track(const format &f, int head, int track);
virtual UINT32 get_cell_size(const format &f, int track);
virtual int get_sectors_per_track(const format &f, int track);
virtual int get_disk_id_offset(const format &f);
void get_disk_id(const format &f, io_generic *io, UINT8 &id1, UINT8 &id2);
floppy_image_format_t::desc_e* get_sector_desc(const format &f, int &current_size, int track, int sector_count, UINT8 id1, UINT8 id2, int gap_2);
floppy_image_format_t::desc_e* get_sector_desc(const format &f, int &current_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2);
void build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, offs_t error_offs, desc_s *sectors, int sector_count) const;
void extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head);
static const format file_formats[];

40
src/lib/formats/d71_dsk.c Normal file
View File

@ -0,0 +1,40 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/*********************************************************************
formats/d71_dsk.c
Commodore 1571 sector disk image format
*********************************************************************/
#include "emu.h"
#include "formats/d71_dsk.h"
d71_format::d71_format() : d64_format(formats)
{
}
const char *d71_format::name() const
{
return "d71";
}
const char *d71_format::description() const
{
return "Commodore 1571 disk image";
}
const char *d71_format::extensions() const
{
return "d71";
}
const d71_format::format d71_format::formats[] = {
{ // d71, dos 2, 35 tracks, 2 heads, head 48 tpi, stepper 96 tpi
floppy_image::FF_525, floppy_image::DSSD, 683, 35, 2, 256, 9, 8
},
{}
};
const floppy_format_type FLOPPY_D71_FORMAT = &floppy_image_format_creator<d71_format>;

32
src/lib/formats/d71_dsk.h Normal file
View File

@ -0,0 +1,32 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/*********************************************************************
formats/d71_dsk.h
Commodore 2040 sector disk image format
*********************************************************************/
#ifndef D71_DSK_H_
#define D71_DSK_H_
#include "d64_dsk.h"
class d71_format : public d64_format {
public:
d71_format();
virtual const char *name() const;
virtual const char *description() const;
virtual const char *extensions() const;
protected:
static const format formats[];
};
extern const floppy_format_type FLOPPY_D71_FORMAT;
#endif

View File

@ -4,7 +4,7 @@
formats/d80_dsk.c
Commodore 8050/8250/SFD-1001 sector disk image format
Commodore 8050 sector disk image format
*********************************************************************/
@ -15,6 +15,11 @@ d80_format::d80_format() : d64_format(formats)
{
}
d80_format::d80_format(const format *_formats)
{
formats = _formats;
}
const char *d80_format::name() const
{
return "d80";
@ -22,21 +27,18 @@ const char *d80_format::name() const
const char *d80_format::description() const
{
return "Commodore 8050/8250/SFD-1001 disk image";
return "Commodore 8050 disk image";
}
const char *d80_format::extensions() const
{
return "d80,d82";
return "d80";
}
const d80_format::format d80_format::formats[] = {
const d80_format::format d80_format::file_formats[] = {
{ // d80, dos 2.5, 77 tracks, head/stepper 100 tpi
floppy_image::FF_525, floppy_image::SSQD, 2083, 77, 1, 256, 9, 8
},
{ // d82, dos 2.5, 77 tracks, 2 heads, head/stepper 100 tpi
floppy_image::FF_525, floppy_image::DSQD, 2083, 77, 2, 256, 9, 8
},
{}
};
@ -68,7 +70,7 @@ const int d80_format::speed_zone[] =
0, 0, 0, 0, 0, 0, 0 // 78-84
};
int d80_format::get_physical_track(const format &f, int track)
int d80_format::get_physical_track(const format &f, int head, int track)
{
return track;
}
@ -85,7 +87,43 @@ int d80_format::get_sectors_per_track(const format &f, int track)
int d80_format::get_disk_id_offset(const format &f)
{
return 282136;
// t39s0 +0x18
return 0x44e18;
}
floppy_image_format_t::desc_e* d80_format::get_sector_desc(const format &f, int &current_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2)
{
static floppy_image_format_t::desc_e desc[] = {
/* 00 */ { SECTOR_LOOP_START, 0, -1 },
/* 01 */ { RAWBYTE, 0xff, 5 },
/* 02 */ { GCR5, 0x08, 1 },
/* 03 */ { CRC, 1 },
/* 04 */ { CRC_CBM_START, 1 },
/* 05 */ { SECTOR_ID_GCR5 },
/* 06 */ { TRACK_ID_DOS25_GCR5 },
/* 07 */ { GCR5, id2, 1 },
/* 08 */ { GCR5, id1, 1 },
/* 09 */ { CRC_END, 1 },
/* 10 */ { GCR5, 0x0f, 2 },
/* 11 */ { RAWBYTE, 0x55, f.gap_1 },
/* 12 */ { RAWBYTE, 0xff, 5 },
/* 13 */ { GCR5, 0x07, 1 },
/* 14 */ { CRC_CBM_START, 2 },
/* 15 */ { SECTOR_DATA_GCR5, -1 },
/* 16 */ { CRC_END, 2 },
/* 17 */ { CRC, 2 },
/* 18 */ { GCR5, 0x00, 2 },
/* 19 */ { RAWBYTE, 0x55, gap_2 },
/* 20 */ { SECTOR_LOOP_END },
/* 21 */ { RAWBYTE, 0x55, 0 },
/* 22 */ { RAWBITS, 0x5555, 0 },
/* 23 */ { END }
};
current_size = 40 + (1+1+4+2)*10 + (f.gap_1)*8 + 40 + (1+f.sector_base_size+1+2)*10 + gap_2*8;
current_size *= sector_count;
return desc;
}
const floppy_format_type FLOPPY_D80_FORMAT = &floppy_image_format_creator<d80_format>;

View File

@ -4,7 +4,7 @@
formats/d80_dsk.h
Commodore 8050/8250/SFD-1001 sector disk image format
Commodore 8050 sector disk image format
*********************************************************************/
@ -16,18 +16,22 @@
class d80_format : public d64_format {
public:
d80_format();
d80_format(const format *formats);
virtual const char *name() const;
virtual const char *description() const;
virtual const char *extensions() const;
protected:
virtual int get_physical_track(const format &f, int track);
const format *formats;
virtual int get_physical_track(const format &f, int head, int track);
virtual UINT32 get_cell_size(const format &f, int track);
virtual int get_sectors_per_track(const format &f, int track);
virtual int get_disk_id_offset(const format &f);
floppy_image_format_t::desc_e* get_sector_desc(const format &f, int &current_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2);
static const format formats[];
static const format file_formats[];
static const UINT32 cell_size[];
static const int speed_zone[];

40
src/lib/formats/d82_dsk.c Normal file
View File

@ -0,0 +1,40 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/*********************************************************************
formats/d82_dsk.c
Commodore 8250/SFD-1001 sector disk image format
*********************************************************************/
#include "emu.h"
#include "formats/d82_dsk.h"
d82_format::d82_format() : d80_format(formats)
{
}
const char *d82_format::name() const
{
return "d82";
}
const char *d82_format::description() const
{
return "Commodore 8250/SFD-1001 disk image";
}
const char *d82_format::extensions() const
{
return "d82";
}
const d82_format::format d82_format::formats[] = {
{ // d82, dos 2.5, 77 tracks, 2 heads, head/stepper 100 tpi
floppy_image::FF_525, floppy_image::DSQD, 2083, 77, 2, 256, 9, 8
},
{}
};
const floppy_format_type FLOPPY_D82_FORMAT = &floppy_image_format_creator<d82_format>;

32
src/lib/formats/d82_dsk.h Normal file
View File

@ -0,0 +1,32 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/*********************************************************************
formats/d82_dsk.h
Commodore 8250/SFD-1001 sector disk image format
*********************************************************************/
#ifndef D82_DSK_H_
#define D82_DSK_H_
#include "d80_dsk.h"
class d82_format : public d80_format {
public:
d82_format();
virtual const char *name() const;
virtual const char *description() const;
virtual const char *extensions() const;
protected:
static const format formats[];
};
extern const floppy_format_type FLOPPY_D82_FORMAT;
#endif

View File

@ -1235,7 +1235,7 @@ void floppy_image_format_t::fixup_crc_cbm(UINT32 *buffer, const gen_crc_info *cr
v = v ^ gcr5bw_tb[bitn_r(buffer, o+5, 5)];
}
int offset = crc->write;
gcr5_w(buffer, offset, 8, v);
gcr5_w(buffer, offset, 10, v);
}
UINT16 floppy_image_format_t::calc_crc_ccitt(const UINT32 *buffer, int start, int end)
@ -1385,7 +1385,7 @@ void floppy_image_format_t::generate_track(const desc_e *desc, int track, int he
case GCR5:
for(int i=0; i<desc[index].p2; i++)
gcr5_w(buffer, offset, 8, desc[index].p1);
gcr5_w(buffer, offset, 10, desc[index].p1);
break;
case _8N1:
@ -1415,6 +1415,14 @@ void floppy_image_format_t::generate_track(const desc_e *desc, int track, int he
fm_w(buffer, offset, 8, track);
break;
case TRACK_ID_DOS2_GCR5:
gcr5_w(buffer, offset, 10, 1 + (track >> 1) + (head * 35));
break;
case TRACK_ID_DOS25_GCR5:
gcr5_w(buffer, offset, 10, 1 + track + (head * 77));
break;
case TRACK_ID_GCR6:
raw_w(buffer, offset, 8, gcr6fw_tb[track & 0x3f]);
break;
@ -1448,7 +1456,7 @@ void floppy_image_format_t::generate_track(const desc_e *desc, int track, int he
break;
case SECTOR_ID_GCR5:
gcr5_w(buffer, offset, 8, sect[sector_idx].sector_id);
gcr5_w(buffer, offset, 10, sect[sector_idx].sector_id);
break;
case SECTOR_ID_GCR6:
@ -1575,7 +1583,7 @@ void floppy_image_format_t::generate_track(const desc_e *desc, int track, int he
case SECTOR_DATA_GCR5: {
const desc_s *csect = sect + (desc[index].p1 >= 0 ? desc[index].p1 : sector_idx);
for(int i=0; i != csect->size; i++)
gcr5_w(buffer, offset, 8, csect->data[i]);
gcr5_w(buffer, offset, 10, csect->data[i]);
break;
}

View File

@ -308,6 +308,8 @@ protected:
RAWBITS, //!< A value of p2 bits in p1 to be copied as-is, msb first
TRACK_ID, //!< Track id byte, mfm-encoded
TRACK_ID_FM, //!< Track id byte, fm-encoded
TRACK_ID_DOS2_GCR5, //!< Track id byte, gcr5-encoded
TRACK_ID_DOS25_GCR5, //!< Track id byte, gcr5-encoded
TRACK_ID_GCR6, //!< Track id low 6 bits, gcr6-encoded
TRACK_ID_8N1, //!< Track id byte, 8N1-encoded
HEAD_ID, //!< Head id byte, mfm-encoded

View File

@ -6,6 +6,8 @@
Commodore 1541/1571 GCR disk image format
http://unusedino.de/ec64/technical/formats/g64.html
*********************************************************************/
#include "emu.h"
@ -29,7 +31,7 @@ const char *g64_format::description() const
const char *g64_format::extensions() const
{
return "g64,g41,g71";
return "g64,g41";
}
const UINT32 g64_format::c1541_cell_size[] =
@ -62,12 +64,13 @@ bool g64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
}
int track_count = img[TRACK_COUNT];
int head = 0;
int splice_pos = 0;
for (int track = 0; track < track_count; track++)
{
offs_t track_offset = pick_integer_le(img, TRACK_OFFSET + (track * 4), 4);
if (track_offset > size) throw emu_fatalerror("g64_format: Track %u offset %06x out of bounds", track, track_offset);
if (!track_offset) continue;
offs_t speed_zone = pick_integer_le(img, SPEED_ZONE + (track * 4), 4);
if (speed_zone > 3) throw emu_fatalerror("g64_format: Unsupported variable speed zones on track %d", track);
@ -75,13 +78,14 @@ bool g64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
size_t max_cells = 200000000/cell_size;
size_t track_bytes = pick_integer_le(img, track_offset, 2);
track_offset += 2;
size_t track_cells = track_bytes * 8;
size_t track_size = MAX(track_cells, max_cells);
UINT32 *trackbuf = global_alloc_array_clear(UINT32, track_size);
offs_t trackbuf_offs = 0;
track_offset += 2;
while (trackbuf_offs < track_cells) {
for (int bit=7; bit>=0; bit--) {
bit_w(trackbuf, trackbuf_offs++, BIT(img[track_offset], bit), cell_size);
@ -89,14 +93,13 @@ bool g64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
track_offset++;
}
// pad the remainder of the track with sync
// pad the remainder of the track with gap
int gap = 0;
while (trackbuf_offs < max_cells) {
bit_w(trackbuf, trackbuf_offs++, 1, cell_size);
bit_w(trackbuf, trackbuf_offs++, gap, cell_size);
gap = !gap;
}
int head = 0;
int splice_pos = 0;
generate_track_from_levels(track, head, trackbuf, track_size, splice_pos, image);
global_free(trackbuf);

View File

@ -127,8 +127,10 @@ FORMATSOBJS = \
$(LIBOBJ)/formats/csw_cas.o \
$(LIBOBJ)/formats/d64_dsk.o \
$(LIBOBJ)/formats/d67_dsk.o \
$(LIBOBJ)/formats/d71_dsk.o \
$(LIBOBJ)/formats/d80_dsk.o \
$(LIBOBJ)/formats/d81_dsk.o \
$(LIBOBJ)/formats/d82_dsk.o \
$(LIBOBJ)/formats/d88_dsk.o \
$(LIBOBJ)/formats/dfi_dsk.o \
$(LIBOBJ)/formats/dim_dsk.o \