mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
e01: added acorn filestore floppy format and softlist
This commit is contained in:
parent
6ea15072a7
commit
e4ea1303b3
30
hash/e01_flop.xml
Normal file
30
hash/e01_flop.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
|
||||||
|
|
||||||
|
<!-- Acorn FileStore Discs -->
|
||||||
|
|
||||||
|
<softwarelist name="e01_flop" description="Acorn FileStore Discs">
|
||||||
|
|
||||||
|
<software name="fsinit">
|
||||||
|
<description>FileStore Initial Disc</description>
|
||||||
|
<year>198?</year>
|
||||||
|
<publisher>Acorn</publisher>
|
||||||
|
<part name="flop1" interface="floppy_3_5">
|
||||||
|
<dataarea name="flop" size="655360">
|
||||||
|
<rom name="filestore_initial_disc.adl" size="655360" crc="9e758dec" sha1="4750e6cf1d4d948b3a88d0c96e17fef684dbb41a" offset="0" />
|
||||||
|
</dataarea>
|
||||||
|
</part>
|
||||||
|
</software>
|
||||||
|
|
||||||
|
<software name="fsutil">
|
||||||
|
<description>FileStore Utility Disc</description>
|
||||||
|
<year>198?</year>
|
||||||
|
<publisher>Acorn</publisher>
|
||||||
|
<part name="flop1" interface="floppy_3_5">
|
||||||
|
<dataarea name="flop" size="655360">
|
||||||
|
<rom name="filestore_utility_disc.adl" size="655360" crc="1e41ad3a" sha1="509b353bc9956917a854df9af868aac874869a23" offset="0" />
|
||||||
|
</dataarea>
|
||||||
|
</part>
|
||||||
|
</software>
|
||||||
|
|
||||||
|
</softwarelist>
|
@ -145,6 +145,8 @@ project "formats"
|
|||||||
MAME_DIR .. "src/lib/formats/adam_cas.h",
|
MAME_DIR .. "src/lib/formats/adam_cas.h",
|
||||||
MAME_DIR .. "src/lib/formats/adam_dsk.cpp",
|
MAME_DIR .. "src/lib/formats/adam_dsk.cpp",
|
||||||
MAME_DIR .. "src/lib/formats/adam_dsk.h",
|
MAME_DIR .. "src/lib/formats/adam_dsk.h",
|
||||||
|
MAME_DIR .. "src/lib/formats/afs_dsk.cpp",
|
||||||
|
MAME_DIR .. "src/lib/formats/afs_dsk.h",
|
||||||
MAME_DIR .. "src/lib/formats/ami_dsk.cpp",
|
MAME_DIR .. "src/lib/formats/ami_dsk.cpp",
|
||||||
MAME_DIR .. "src/lib/formats/ami_dsk.h",
|
MAME_DIR .. "src/lib/formats/ami_dsk.h",
|
||||||
MAME_DIR .. "src/lib/formats/ap2_dsk.cpp",
|
MAME_DIR .. "src/lib/formats/ap2_dsk.cpp",
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
#include "e01.h"
|
#include "e01.h"
|
||||||
#include "bus/scsi/scsihd.h"
|
#include "bus/scsi/scsihd.h"
|
||||||
|
#include "softlist.h"
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
@ -166,6 +166,10 @@ WRITE_LINE_MEMBER( e01_device::clk_en_w )
|
|||||||
m_clk_en = state;
|
m_clk_en = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FLOPPY_FORMATS_MEMBER( floppy_formats_afs )
|
||||||
|
FLOPPY_AFS_FORMAT
|
||||||
|
FLOPPY_FORMATS_END0
|
||||||
|
|
||||||
static SLOT_INTERFACE_START( e01_floppies )
|
static SLOT_INTERFACE_START( e01_floppies )
|
||||||
SLOT_INTERFACE( "35dd", FLOPPY_35_DD ) // NEC FD1036 A
|
SLOT_INTERFACE( "35dd", FLOPPY_35_DD ) // NEC FD1036 A
|
||||||
SLOT_INTERFACE_END
|
SLOT_INTERFACE_END
|
||||||
@ -253,8 +257,9 @@ static MACHINE_CONFIG_FRAGMENT( e01 )
|
|||||||
MCFG_WD2793_ADD(WD2793_TAG, XTAL_8MHz/4)
|
MCFG_WD2793_ADD(WD2793_TAG, XTAL_8MHz/4)
|
||||||
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(e01_device, fdc_irq_w))
|
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(e01_device, fdc_irq_w))
|
||||||
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(e01_device, fdc_drq_w))
|
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(e01_device, fdc_drq_w))
|
||||||
MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":0", e01_floppies, "35dd", floppy_image_device::default_floppy_formats)
|
MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":0", e01_floppies, "35dd", floppy_formats_afs)
|
||||||
MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":1", e01_floppies, "35dd", floppy_image_device::default_floppy_formats)
|
MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":1", e01_floppies, "35dd", floppy_formats_afs)
|
||||||
|
MCFG_SOFTWARE_LIST_ADD("flop_ls_e01", "e01_flop")
|
||||||
|
|
||||||
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
|
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
|
||||||
MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE(R6522_TAG, via6522_device, write_ca1))
|
MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE(R6522_TAG, via6522_device, write_ca1))
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "machine/mc6854.h"
|
#include "machine/mc6854.h"
|
||||||
#include "machine/ram.h"
|
#include "machine/ram.h"
|
||||||
#include "machine/wd_fdc.h"
|
#include "machine/wd_fdc.h"
|
||||||
|
#include "formats/afs_dsk.h"
|
||||||
|
|
||||||
class e01_device : public device_t,
|
class e01_device : public device_t,
|
||||||
public device_econet_interface
|
public device_econet_interface
|
||||||
@ -37,6 +38,8 @@ public:
|
|||||||
TYPE_E01S
|
TYPE_E01S
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DECLARE_FLOPPY_FORMATS(floppy_formats_afs);
|
||||||
|
|
||||||
DECLARE_READ8_MEMBER( read );
|
DECLARE_READ8_MEMBER( read );
|
||||||
DECLARE_WRITE8_MEMBER( write );
|
DECLARE_WRITE8_MEMBER( write );
|
||||||
DECLARE_READ8_MEMBER( ram_select_r );
|
DECLARE_READ8_MEMBER( ram_select_r );
|
||||||
|
60
src/lib/formats/afs_dsk.cpp
Normal file
60
src/lib/formats/afs_dsk.cpp
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// license:GPL-2.0+
|
||||||
|
// copyright-holders:Nigel Barnes
|
||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
Acorn FileStore
|
||||||
|
|
||||||
|
Disk image formats
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "afs_dsk.h"
|
||||||
|
|
||||||
|
|
||||||
|
afs_format::afs_format() : wd177x_format(formats)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *afs_format::name() const
|
||||||
|
{
|
||||||
|
return "afs";
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *afs_format::description() const
|
||||||
|
{
|
||||||
|
return "Acorn FileStore disk image";
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *afs_format::extensions() const
|
||||||
|
{
|
||||||
|
return "adl,img";
|
||||||
|
}
|
||||||
|
|
||||||
|
int afs_format::identify(io_generic *io, UINT32 form_factor)
|
||||||
|
{
|
||||||
|
int type = find_size(io, form_factor);
|
||||||
|
|
||||||
|
if (type != -1)
|
||||||
|
return 50;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int afs_format::get_image_offset(const format &f, int head, int track)
|
||||||
|
{
|
||||||
|
if (f.sector_base_id == -1)
|
||||||
|
return (track * f.head_count + head) * compute_track_size(f);
|
||||||
|
else
|
||||||
|
return (f.track_count * head + track) * compute_track_size(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
const afs_format::format afs_format::formats[] =
|
||||||
|
{
|
||||||
|
{ // 640K 3 1/2 inch 80 track double sided double density (interleaved) - gaps unverified
|
||||||
|
floppy_image::FF_35, floppy_image::DSQD, floppy_image::MFM,
|
||||||
|
2000, 16, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, 60, 22, 43
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const floppy_format_type FLOPPY_AFS_FORMAT = &floppy_image_format_creator<afs_format>;
|
37
src/lib/formats/afs_dsk.h
Normal file
37
src/lib/formats/afs_dsk.h
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// license:GPL-2.0+
|
||||||
|
// copyright-holders:Nigel Barnes
|
||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
Acorn FileStore
|
||||||
|
|
||||||
|
Disk image formats
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef __AFS_DSK_H__
|
||||||
|
#define __AFS_DSK_H__
|
||||||
|
|
||||||
|
#include "wd177x_dsk.h"
|
||||||
|
|
||||||
|
|
||||||
|
class afs_format : public wd177x_format
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
afs_format();
|
||||||
|
|
||||||
|
virtual int identify(io_generic *io, UINT32 form_factor) override;
|
||||||
|
virtual int get_image_offset(const format &f, int head, int track) override;
|
||||||
|
virtual const char *name() const override;
|
||||||
|
virtual const char *description() const override;
|
||||||
|
virtual const char *extensions() const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const format formats[];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extern const floppy_format_type FLOPPY_AFS_FORMAT;
|
||||||
|
|
||||||
|
#endif // __AFS_DSK_H__
|
Loading…
Reference in New Issue
Block a user