diff --git a/.gitattributes b/.gitattributes index f188f03256e..f6990098091 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1930,6 +1930,8 @@ src/lib/formats/apollo_dsk.c svneol=native#text/plain src/lib/formats/apollo_dsk.h svneol=native#text/plain src/lib/formats/apridisk.c svneol=native#text/plain src/lib/formats/apridisk.h svneol=native#text/plain +src/lib/formats/asst128_dsk.c svneol=native#text/plain +src/lib/formats/asst128_dsk.h svneol=native#text/plain src/lib/formats/atari_dsk.c svneol=native#text/plain src/lib/formats/atari_dsk.h svneol=native#text/plain src/lib/formats/atarist_dsk.c svneol=native#text/plain diff --git a/src/lib/formats/asst128_dsk.c b/src/lib/formats/asst128_dsk.c new file mode 100644 index 00000000000..df0e03f0ba9 --- /dev/null +++ b/src/lib/formats/asst128_dsk.c @@ -0,0 +1,73 @@ +/*************************************************************************** + + Copyright Olivier Galibert + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +****************************************************************************/ + +/********************************************************************* + + formats/asst128_dsk.c + + asst128 format + +*********************************************************************/ + +#include "emu.h" +#include "formats/asst128_dsk.h" + +asst128_format::asst128_format() : upd765_format(formats) +{ +} + +const char *asst128_format::name() const +{ + return "asst128"; +} + +const char *asst128_format::description() const +{ + return "ASST128 disk image"; +} + +const char *asst128_format::extensions() const +{ + return "img"; +} + +// Unverified gap sizes +const asst128_format::format asst128_format::formats[] = { + { + floppy_image::FF_525, floppy_image::SSQD, floppy_image::MFM, + 2000, 9, 80, 1, 512, {}, 1, {}, 80, 50, 22, 80 + }, + {} +}; + +const floppy_format_type FLOPPY_ASST128_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/asst128_dsk.h b/src/lib/formats/asst128_dsk.h new file mode 100644 index 00000000000..4c030798c77 --- /dev/null +++ b/src/lib/formats/asst128_dsk.h @@ -0,0 +1,28 @@ +/********************************************************************* + + formats/asst128_dsk.h + + asst128 format + +*********************************************************************/ + +#ifndef ASST128_DSK_H_ +#define ASST128_DSK_H_ + +#include "upd765_dsk.h" + +class asst128_format : public upd765_format { +public: + asst128_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_ASST128_FORMAT; + +#endif diff --git a/src/lib/lib.mak b/src/lib/lib.mak index c59f03d72e9..d52a130b211 100644 --- a/src/lib/lib.mak +++ b/src/lib/lib.mak @@ -104,6 +104,7 @@ FORMATSOBJS = \ $(LIBOBJ)/formats/apridisk.o \ $(LIBOBJ)/formats/apollo_dsk.o \ $(LIBOBJ)/formats/ap_dsk35.o \ + $(LIBOBJ)/formats/asst128_dsk.o \ $(LIBOBJ)/formats/atari_dsk.o \ $(LIBOBJ)/formats/atarist_dsk.o \ $(LIBOBJ)/formats/atom_tap.o \ diff --git a/src/mess/drivers/pc.c b/src/mess/drivers/pc.c index e2f08daa498..4470c0eb0a0 100644 --- a/src/mess/drivers/pc.c +++ b/src/mess/drivers/pc.c @@ -92,6 +92,7 @@ video HW too. #include "imagedev/cartslot.h" #include "formats/mfi_dsk.h" #include "formats/pc_dsk.h" +#include "formats/asst128_dsk.h" #include "machine/am9517a.h" #include "sound/sn76496.h" @@ -882,11 +883,19 @@ FLOPPY_FORMATS_MEMBER( pc_state::floppy_formats ) FLOPPY_PC_FORMAT FLOPPY_FORMATS_END +FLOPPY_FORMATS_MEMBER( pc_state::asst128_formats ) + FLOPPY_ASST128_FORMAT +FLOPPY_FORMATS_END + static SLOT_INTERFACE_START( ibmpc_floppies ) SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) SLOT_INTERFACE( "35dd", FLOPPY_35_DD ) SLOT_INTERFACE_END +static SLOT_INTERFACE_START( asst128_floppies ) + SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD ) +SLOT_INTERFACE_END + SLOT_INTERFACE_START(ibm5150_com) SLOT_INTERFACE("microsoft_mouse", MSFT_SERIAL_MOUSE) SLOT_INTERFACE("mouse_systems_mouse", MSYSTEM_SERIAL_MOUSE) @@ -1522,6 +1531,18 @@ static MACHINE_CONFIG_DERIVED( asst128, iskr1031 ) MCFG_CPU_REPLACE("maincpu", I8086, 4772720) MCFG_CPU_PROGRAM_MAP(iskr1031_map) MCFG_CPU_IO_MAP(asst128_io) + + MCFG_DEVICE_REMOVE("fdc:0"); + MCFG_DEVICE_REMOVE("fdc:1"); + + MCFG_FLOPPY_DRIVE_ADD("fdc:0", asst128_floppies, "525ssqd", 0, pc_state::asst128_formats) + MCFG_FLOPPY_DRIVE_ADD("fdc:1", asst128_floppies, "525ssqd", 0, pc_state::asst128_formats) + + MCFG_DEVICE_REMOVE(CGA_SCREEN_NAME) + MCFG_DEVICE_REMOVE(CGA_MC6845_NAME) + + MCFG_FRAGMENT_ADD( pcvideo_mc1502 ) + MCFG_GFXDECODE(ibmpcjr) MACHINE_CONFIG_END static MACHINE_CONFIG_START( iskr3104, pc_state ) @@ -2151,7 +2172,8 @@ ROM_START( asst128 ) ROM_LOAD( "asf400-f600.bin", 0xf4000, 0x2000, CRC(e3bf22de) SHA1(d4319edc82c0015ca0adc6c8771e887659717e62)) ROM_LOAD( "asfc00-ff00.bin", 0xfc000, 0x4000, CRC(0cb6401c) SHA1(70c4da47700f9925fd04049f16d54610c743ed8b)) ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00) - // Here CGA rom with cyrillic support should be added + ROM_COPY( "maincpu", 0xffa6e, 0x0800, 0x0400 ) + ROM_COPY( "maincpu", 0xfc000, 0x0c00, 0x0400 ) ROM_END ROM_START( mk88 ) diff --git a/src/mess/includes/pc.h b/src/mess/includes/pc.h index 0ec37c4330e..b25b2ea4f37 100644 --- a/src/mess/includes/pc.h +++ b/src/mess/includes/pc.h @@ -150,6 +150,7 @@ public: void pc_eop_w(int channel, bool state); void mc1502_fdc_irq_drq(bool state); DECLARE_FLOPPY_FORMATS( floppy_formats ); + DECLARE_FLOPPY_FORMATS( asst128_formats ); IRQ_CALLBACK_MEMBER(pc_irq_callback); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( pcjr_cartridge );