mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
(MESS) kaypro : Added back the DSK format (still doesn't work!)
This commit is contained in:
parent
8483fb834e
commit
baaa4f2029
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -2060,6 +2060,8 @@ src/lib/formats/ipf_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/ipf_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/iq151_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/iq151_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/kaypro_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/kaypro_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/kc85_dsk.c svneol=native#text/plain
|
||||
src/lib/formats/kc85_dsk.h svneol=native#text/plain
|
||||
src/lib/formats/kc_cas.c svneol=native#text/plain
|
||||
|
106
src/lib/formats/kaypro_dsk.c
Normal file
106
src/lib/formats/kaypro_dsk.c
Normal file
@ -0,0 +1,106 @@
|
||||
/***************************************************************************
|
||||
|
||||
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/kaypro_dsk.c
|
||||
|
||||
Kaypro disk image format
|
||||
|
||||
There is no inter-sector info on these disks. It is simply a
|
||||
dump of the 512 bytes from each sector and track in order.
|
||||
It is just like a headerless quickload.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "formats/kaypro_dsk.h"
|
||||
|
||||
kayproii_format::kayproii_format() : wd177x_format(formats)
|
||||
{
|
||||
}
|
||||
|
||||
const char *kayproii_format::name() const
|
||||
{
|
||||
return "kaypro";
|
||||
}
|
||||
|
||||
const char *kayproii_format::description() const
|
||||
{
|
||||
return "Kaypro disk image";
|
||||
}
|
||||
|
||||
const char *kayproii_format::extensions() const
|
||||
{
|
||||
return "dsk";
|
||||
}
|
||||
|
||||
// gap info is a total guess
|
||||
const kayproii_format::format kayproii_format::formats[] = {
|
||||
{ /* 191K 13cm double density single sided */
|
||||
floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM,
|
||||
2000, 10, 40, 1, 512, {}, 1, {}, 32, 22, 31
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
kaypro2x_format::kaypro2x_format() : wd177x_format(formats)
|
||||
{
|
||||
}
|
||||
|
||||
const char *kaypro2x_format::name() const
|
||||
{
|
||||
return "kaypro";
|
||||
}
|
||||
|
||||
const char *kaypro2x_format::description() const
|
||||
{
|
||||
return "Kaypro disk image";
|
||||
}
|
||||
|
||||
const char *kaypro2x_format::extensions() const
|
||||
{
|
||||
return "dsk";
|
||||
}
|
||||
|
||||
// gap info is a total guess
|
||||
const kaypro2x_format::format kaypro2x_format::formats[] = {
|
||||
{ /* 382K 13cm double density double sided */
|
||||
floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM,
|
||||
2000, 10, 80, 2, 512, {}, 1, {}, 32, 22, 31
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
const floppy_format_type FLOPPY_KAYPROII_FORMAT = &floppy_image_format_creator<kayproii_format>;
|
||||
const floppy_format_type FLOPPY_KAYPRO2X_FORMAT = &floppy_image_format_creator<kaypro2x_format>;
|
40
src/lib/formats/kaypro_dsk.h
Normal file
40
src/lib/formats/kaypro_dsk.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*********************************************************************
|
||||
|
||||
formats/kaypro_dsk.h
|
||||
|
||||
Kaypro disk image format
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef KAYPRO_DSK_H_
|
||||
#define KAYPRO_DSK_H_
|
||||
|
||||
#include "wd177x_dsk.h"
|
||||
|
||||
class kayproii_format : public wd177x_format {
|
||||
public:
|
||||
kayproii_format();
|
||||
|
||||
virtual const char *name() const;
|
||||
virtual const char *description() const;
|
||||
virtual const char *extensions() const;
|
||||
|
||||
private:
|
||||
static const format formats[];
|
||||
};
|
||||
|
||||
class kaypro2x_format : public wd177x_format {
|
||||
public:
|
||||
kaypro2x_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_KAYPROII_FORMAT;
|
||||
extern const floppy_format_type FLOPPY_KAYPRO2X_FORMAT;
|
||||
|
||||
#endif
|
@ -141,6 +141,7 @@ FORMATSOBJS = \
|
||||
$(LIBOBJ)/formats/iq151_dsk.o \
|
||||
$(LIBOBJ)/formats/imd_dsk.o \
|
||||
$(LIBOBJ)/formats/ipf_dsk.o \
|
||||
$(LIBOBJ)/formats/kaypro_dsk.o \
|
||||
$(LIBOBJ)/formats/kc_cas.o \
|
||||
$(LIBOBJ)/formats/kc85_dsk.o \
|
||||
$(LIBOBJ)/formats/kim1_cas.o \
|
||||
|
@ -30,6 +30,7 @@
|
||||
**************************************************************************************************/
|
||||
|
||||
#include "includes/kaypro.h"
|
||||
#include "formats/kaypro_dsk.h"
|
||||
|
||||
|
||||
READ8_MEMBER( kaypro_state::kaypro2x_87_r ) { return 0x7f; } /* to bypass unemulated HD controller */
|
||||
@ -176,50 +177,6 @@ static MC6845_INTERFACE( kaypro2x_crtc )
|
||||
Machine Driver
|
||||
|
||||
************************************************************/
|
||||
#if 0
|
||||
static LEGACY_FLOPPY_OPTIONS_START(kayproii)
|
||||
LEGACY_FLOPPY_OPTION(kayproii, "dsk", "Kaypro II disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
|
||||
HEADS([1])
|
||||
TRACKS([40])
|
||||
SECTORS([10])
|
||||
SECTOR_LENGTH([512])
|
||||
FIRST_SECTOR_ID([0]))
|
||||
LEGACY_FLOPPY_OPTIONS_END
|
||||
|
||||
static LEGACY_FLOPPY_OPTIONS_START(kaypro2x)
|
||||
LEGACY_FLOPPY_OPTION(kaypro2x, "dsk", "Kaypro 2x disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
|
||||
HEADS([2])
|
||||
TRACKS([80])
|
||||
SECTORS([10])
|
||||
SECTOR_LENGTH([512])
|
||||
FIRST_SECTOR_ID([0]))
|
||||
LEGACY_FLOPPY_OPTIONS_END
|
||||
|
||||
static const floppy_interface kayproii_floppy_interface =
|
||||
{
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
FLOPPY_STANDARD_5_25_DSHD,
|
||||
LEGACY_FLOPPY_OPTIONS_NAME(kayproii),
|
||||
"floppy_5_25",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const floppy_interface kaypro2x_floppy_interface =
|
||||
{
|
||||
DEVCB_LINE(wd17xx_idx_w),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
FLOPPY_STANDARD_5_25_DSHD,
|
||||
LEGACY_FLOPPY_OPTIONS_NAME(kaypro2x),
|
||||
"floppy_5_25",
|
||||
NULL
|
||||
};
|
||||
|
||||
FLOPPY_FORMATS_MEMBER( kaypro_state::kayproii_floppy_formats )
|
||||
FLOPPY_KAYPROII_FORMAT
|
||||
@ -228,7 +185,6 @@ FLOPPY_FORMATS_END
|
||||
FLOPPY_FORMATS_MEMBER( kaypro_state::kaypro2x_floppy_formats )
|
||||
FLOPPY_KAYPRO2X_FORMAT
|
||||
FLOPPY_FORMATS_END
|
||||
#endif
|
||||
|
||||
static SLOT_INTERFACE_START( kaypro_floppies )
|
||||
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
|
||||
@ -272,8 +228,8 @@ static MACHINE_CONFIG_START( kayproii, kaypro_state )
|
||||
MCFG_Z80SIO_ADD( "z80sio", 4800, kaypro_sio_intf ) /* start at 300 baud */
|
||||
|
||||
MCFG_FD1793x_ADD("fdc", XTAL_20MHz / 20)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", kaypro_state::kayproii_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", kaypro_state::kayproii_floppy_formats)
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list","kayproii")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -317,8 +273,8 @@ static MACHINE_CONFIG_START( kaypro2x, kaypro_state )
|
||||
MCFG_Z80SIO_ADD( "z80sio", 4800, kaypro_sio_intf )
|
||||
MCFG_Z80SIO_ADD( "z80sio_2x", 4800, kaypro_sio_intf ) /* extra sio for modem and printer */
|
||||
MCFG_FD1793x_ADD("fdc", XTAL_16MHz / 16)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", kaypro_state::kaypro2x_floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", kaypro_state::kaypro2x_floppy_formats)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( omni2, kaypro4 )
|
||||
|
@ -59,7 +59,8 @@ public:
|
||||
DECLARE_PALETTE_INIT(kaypro);
|
||||
DECLARE_MACHINE_RESET(kay_kbd);
|
||||
DECLARE_DRIVER_INIT(kaypro);
|
||||
DECLARE_FLOPPY_FORMATS(floppy_formats);
|
||||
DECLARE_FLOPPY_FORMATS(kayproii_floppy_formats);
|
||||
DECLARE_FLOPPY_FORMATS(kaypro2x_floppy_formats);
|
||||
UINT32 screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_kaypro2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
Loading…
Reference in New Issue
Block a user