(MESS) Applix: Added floppy disk drives

This commit is contained in:
Robbbert 2013-05-29 09:34:06 +00:00
parent 8f7c19fe24
commit 97e4fd9c6d
5 changed files with 135 additions and 13 deletions

2
.gitattributes vendored
View File

@ -1940,6 +1940,8 @@ src/lib/formats/apf_apt.c svneol=native#text/plain
src/lib/formats/apf_apt.h svneol=native#text/plain
src/lib/formats/apollo_dsk.c svneol=native#text/plain
src/lib/formats/apollo_dsk.h svneol=native#text/plain
src/lib/formats/applix_dsk.c svneol=native#text/plain
src/lib/formats/applix_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

View File

@ -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/applix_dsk.c
Applix disk image format
*********************************************************************/
#include "emu.h"
#include "formats/applix_dsk.h"
applix_format::applix_format() : wd177x_format(formats)
{
}
const char *applix_format::name() const
{
return "applix";
}
const char *applix_format::description() const
{
return "Applix disk image";
}
const char *applix_format::extensions() const
{
return "dsk";
}
// Unverified gap sizes
const applix_format::format applix_format::formats[] = {
{ /* 800K 3 1/2 inch double density */
floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM,
2000, 5, 80, 2, 1024, {}, 1, {}, 100, 22, 84
},
{}
};
const floppy_format_type FLOPPY_APPLIX_FORMAT = &floppy_image_format_creator<applix_format>;

View File

@ -0,0 +1,28 @@
/*********************************************************************
formats/applix_dsk.h
Applix disk image format
*********************************************************************/
#ifndef APPLIX_DSK_H_
#define APPLIX_DSK_H_
#include "wd177x_dsk.h"
class applix_format : public wd177x_format {
public:
applix_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_APPLIX_FORMAT;
#endif

View File

@ -104,6 +104,7 @@ FORMATSOBJS = \
$(LIBOBJ)/formats/apridisk.o \
$(LIBOBJ)/formats/apollo_dsk.o \
$(LIBOBJ)/formats/ap_dsk35.o \
$(LIBOBJ)/formats/applix_dsk.o \
$(LIBOBJ)/formats/asst128_dsk.o \
$(LIBOBJ)/formats/atari_dsk.o \
$(LIBOBJ)/formats/atarist_dsk.o \

View File

@ -31,13 +31,14 @@
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "cpu/mcs51/mcs51.h"
#include "video/mc6845.h"
#include "machine/6522via.h"
#include "machine/wd_fdc.h"
#include "cpu/mcs51/mcs51.h"
#include "sound/dac.h"
#include "imagedev/cassette.h"
#include "sound/wave.h"
#include "machine/wd_fdc.h"
#include "formats/applix_dsk.h"
#include "imagedev/cassette.h"
@ -50,6 +51,8 @@ public:
m_crtc(*this, "crtc"),
m_via(*this, "via6522"),
m_fdc(*this, "wd1772"),
m_floppy0(*this, "wd1772:0"),
m_floppy1(*this, "wd1772:1"),
m_dacl(*this, "dacl"),
m_dacr(*this, "dacr"),
m_cass(*this, "cassette"),
@ -130,6 +133,8 @@ public:
required_device<mc6845_device> m_crtc;
required_device<via6522_device> m_via;
required_device<wd1772_t> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_device<dac_device> m_dacl;
required_device<dac_device> m_dacr;
required_device<cassette_image_device> m_cass;
@ -348,6 +353,18 @@ WRITE8_MEMBER( applix_state::port08_w )
{
m_port08 = data;
membank("bank1")->set_entry(BIT(data, 6));
floppy_image_device *floppy = NULL;
if (BIT(data, 2)) floppy = m_floppy0->get_device();
if (BIT(data, 3)) floppy = m_floppy1->get_device();
m_fdc->set_floppy(floppy);
if (floppy)
{
floppy->mon_w(0);
floppy->ss_w(BIT(data, 5));
}
}
READ8_MEMBER( applix_state::port10_r )
@ -715,13 +732,13 @@ void applix_state::machine_reset()
m_maincpu->reset();
}
//FLOPPY_FORMATS_MEMBER( applix_state::floppy_formats )
// FLOPPY_APPLIX_FORMAT
//FLOPPY_FORMATS_END
FLOPPY_FORMATS_MEMBER( applix_state::floppy_formats )
FLOPPY_APPLIX_FORMAT
FLOPPY_FORMATS_END
//static SLOT_INTERFACE_START( applix_floppies )
// SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
//SLOT_INTERFACE_END
static SLOT_INTERFACE_START( applix_floppies )
SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
SLOT_INTERFACE_END
void applix_state::palette_init()
@ -800,7 +817,7 @@ static MC6845_UPDATE_ROW( applix_update_row )
static MC6845_INTERFACE( applix_crtc )
{
"screen", /* name of screen */
false,
false, // should show a border
8, /* number of dots per character */
NULL,
applix_update_row, /* handler to display a scanline */
@ -894,7 +911,8 @@ static MACHINE_CONFIG_START( applix, applix_state )
MCFG_VIA6522_ADD("via6522", 0, applix_via)
MCFG_CASSETTE_ADD("cassette", applix_cassette_interface)
MCFG_WD1772x_ADD("wd1772", XTAL_16MHz / 2) //connected to Z80H clock pin
//MCFG_FLOPPY_DRIVE_ADD("wd1772:0", applix_floppies, "35dd", 0, applix_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd1772:0", applix_floppies, "35dd", 0, applix_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd1772:1", applix_floppies, "35dd", 0, applix_state::floppy_formats)
MCFG_TIMER_DRIVER_ADD_PERIODIC("applix_c", applix_state, cass_timer, attotime::from_hz(100000))
MACHINE_CONFIG_END