From 2e7bf618a53ab883d797a6ca22493b2f0d467689 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Tue, 18 Feb 2014 21:30:36 +0000 Subject: [PATCH] (MESS) pc: Added support for NASLite 1.72MB disk images. [Curt Coder] --- .gitattributes | 2 ++ hash/ibm5170.xml | 48 ++++++++++++++++++++++++++++++ hash/ibm5170_cdrom.xml | 12 ++++++++ src/lib/formats/naslite_dsk.c | 54 ++++++++++++++++++++++++++++++++++ src/lib/formats/naslite_dsk.h | 32 ++++++++++++++++++++ src/lib/formats/upd765_dsk.c | 8 +++-- src/lib/formats/upd765_dsk.h | 8 +++-- src/lib/lib.mak | 1 + src/mess/drivers/at.c | 5 ++++ src/mess/drivers/pc.c | 5 ++-- src/mess/machine/isa_fdc.c | 5 ++-- src/mess/machine/isa_mufdc.c | 4 ++- src/mess/tools/floptool/main.c | 1 + 13 files changed, 174 insertions(+), 11 deletions(-) create mode 100644 src/lib/formats/naslite_dsk.c create mode 100644 src/lib/formats/naslite_dsk.h diff --git a/.gitattributes b/.gitattributes index c56f9c19a43..79de8102638 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2897,6 +2897,8 @@ src/lib/formats/mz_cas.c svneol=native#text/plain src/lib/formats/mz_cas.h svneol=native#text/plain src/lib/formats/nanos_dsk.c svneol=native#text/plain src/lib/formats/nanos_dsk.h svneol=native#text/plain +src/lib/formats/naslite_dsk.c svneol=native#text/plain +src/lib/formats/naslite_dsk.h svneol=native#text/plain src/lib/formats/nes_dsk.c svneol=native#text/plain src/lib/formats/nes_dsk.h svneol=native#text/plain src/lib/formats/orao_cas.c svneol=native#text/plain diff --git a/hash/ibm5170.xml b/hash/ibm5170.xml index 46c62558e31..23177d1e02f 100644 --- a/hash/ibm5170.xml +++ b/hash/ibm5170.xml @@ -2937,6 +2937,54 @@ Missing files come here + + NASLite NAS Server Operating System (v1.x) + 2004 + Server Elements + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hash/ibm5170_cdrom.xml b/hash/ibm5170_cdrom.xml index e7fa555e6e2..2072b4537fe 100644 --- a/hash/ibm5170_cdrom.xml +++ b/hash/ibm5170_cdrom.xml @@ -62,4 +62,16 @@ + + NASLite NAS Server Operating System (v1.x) + 2004 + Server Elements + + + + + + + + diff --git a/src/lib/formats/naslite_dsk.c b/src/lib/formats/naslite_dsk.c new file mode 100644 index 00000000000..da043358b16 --- /dev/null +++ b/src/lib/formats/naslite_dsk.c @@ -0,0 +1,54 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/naslite_dsk.c + + NASLite 1.72MB with funky interleaving format + +*********************************************************************/ + +#include "emu.h" +#include "formats/naslite_dsk.h" + +naslite_format::naslite_format() : upd765_format(formats) +{ +} + +const char *naslite_format::name() const +{ + return "NASLite"; +} + +const char *naslite_format::description() const +{ + return "NASLite disk image"; +} + +const char *naslite_format::extensions() const +{ + return "img"; +} + +const naslite_format::format naslite_format::formats[] = { + { + floppy_image::FF_35, floppy_image::DSHD, floppy_image::MFM, + 1000, 21, 82, 2, 512, {}, -1, { 0x01, 0x0c, 0x02, 0x0d, 0x03, 0x0e, 0x04, 0x0f, 0x05, 0x10, 0x06, 0x11, 0x07, 0x12, 0x08, 0x13, 0x09, 0x14, 0x0a, 0x15, 0x0b }, 80, 50, 22, 0xc + }, + {} +}; + +void naslite_format::build_sector_description(const format &f, UINT8 *sectdata, desc_s *sectors, int track, int head) const +{ + for(int i=0; i; diff --git a/src/lib/formats/naslite_dsk.h b/src/lib/formats/naslite_dsk.h new file mode 100644 index 00000000000..e9ab87488f0 --- /dev/null +++ b/src/lib/formats/naslite_dsk.h @@ -0,0 +1,32 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/naslite_dsk.h + + NASLite 1.72MB with funky interleaving format + +*********************************************************************/ + +#ifndef NASLITE_DSK_H_ +#define NASLITE_DSK_H_ + +#include "upd765_dsk.h" + +class naslite_format : public upd765_format { +public: + naslite_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +protected: + static const format formats[]; + + virtual void build_sector_description(const format &d, UINT8 *sectdata, desc_s *sectors, int track, int head) const; +}; + +extern const floppy_format_type FLOPPY_NASLITE_FORMAT; + +#endif diff --git a/src/lib/formats/upd765_dsk.c b/src/lib/formats/upd765_dsk.c index eaf6b01a605..cec4dd4373e 100644 --- a/src/lib/formats/upd765_dsk.c +++ b/src/lib/formats/upd765_dsk.c @@ -52,7 +52,7 @@ int upd765_format::compute_track_size(const format &f) const return track_size; } -void upd765_format::build_sector_description(const format &f, UINT8 *sectdata, desc_s *sectors) const +void upd765_format::build_sector_description(const format &f, UINT8 *sectdata, desc_s *sectors, int track, int head) const { if(f.sector_base_id == -1) { for(int i=0; i; //------------------------------------------------- FLOPPY_FORMATS_MEMBER( mufdc_device::floppy_formats ) - FLOPPY_PC_FORMAT + FLOPPY_PC_FORMAT, + FLOPPY_NASLITE_FORMAT FLOPPY_FORMATS_END static SLOT_INTERFACE_START( drives ) diff --git a/src/mess/tools/floptool/main.c b/src/mess/tools/floptool/main.c index 4f129c4b99c..b80d0848998 100644 --- a/src/mess/tools/floptool/main.c +++ b/src/mess/tools/floptool/main.c @@ -54,6 +54,7 @@ static floppy_format_type floppy_formats[] = { FLOPPY_D88_FORMAT, FLOPPY_PC_FORMAT, + FLOPPY_NASLITE_FORMAT, FLOPPY_DC42_FORMAT, FLOPPY_A216S_FORMAT,