mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
(MESS) fd2000: Added ROM dumps. (nw)
This commit is contained in:
parent
c19b8a4e9c
commit
2986022ca0
@ -1,12 +1,22 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|
||||||
CMD FD2000 disk drive emulation
|
CMD FD-2000/FD-4000 disk drive emulation
|
||||||
|
|
||||||
Copyright MESS Team.
|
Copyright MESS Team.
|
||||||
Visit http://mamedev.org for licensing and usage restrictions.
|
Visit http://mamedev.org for licensing and usage restrictions.
|
||||||
|
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
|
||||||
|
- IEC
|
||||||
|
- VIA
|
||||||
|
- D1M/D2M/D4M image format (http://ist.uwaterloo.ca/~schepers/formats/D2M-DNP.TXT)
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#include "fd2000.h"
|
#include "fd2000.h"
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +37,7 @@
|
|||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
|
|
||||||
const device_type FD2000 = &device_creator<fd2000_device>;
|
const device_type FD2000 = &device_creator<fd2000_device>;
|
||||||
|
const device_type FD4000 = &device_creator<fd4000_device>;
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -35,7 +46,25 @@ const device_type FD2000 = &device_creator<fd2000_device>;
|
|||||||
|
|
||||||
ROM_START( fd2000 )
|
ROM_START( fd2000 )
|
||||||
ROM_REGION( 0x8000, M6502_TAG, 0 )
|
ROM_REGION( 0x8000, M6502_TAG, 0 )
|
||||||
ROM_LOAD( "cmd_fd-2000_dos_v1.40_cs_33cc6f.bin", 0x0000, 0x8000, CRC(4e6ca15c) SHA1(0c61ba58269baf2b8aadf3bbc4648c7a5a6d2128) )
|
ROM_DEFAULT_BIOS( "v140" )
|
||||||
|
ROM_SYSTEM_BIOS( 0, "v134", "Version 1.34" )
|
||||||
|
ROMX_LOAD( "cmd fd-2000 dos v1.34 fd-350026.bin", 0x0000, 0x8000, CRC(859a5edc) SHA1(487fa82a7977e5208d5088f3580f34e8c89560d1), ROM_BIOS(1) )
|
||||||
|
ROM_SYSTEM_BIOS( 1, "v140", "Version 1.40" )
|
||||||
|
ROMX_LOAD( "cmd fd-2000 dos v1.40 cs 33cc6f.bin", 0x0000, 0x8000, CRC(4e6ca15c) SHA1(0c61ba58269baf2b8aadf3bbc4648c7a5a6d2128), ROM_BIOS(2) )
|
||||||
|
ROM_END
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// ROM( fd4000 )
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
ROM_START( fd4000 )
|
||||||
|
ROM_REGION( 0x8000, M6502_TAG, 0 )
|
||||||
|
ROM_DEFAULT_BIOS( "v140" )
|
||||||
|
ROM_SYSTEM_BIOS( 0, "v134", "Version 1.34" )
|
||||||
|
ROMX_LOAD( "cmd fd-4000 dos v1.34 fd-350022.bin", 0x0000, 0x8000, CRC(1f4820c1) SHA1(7a2966662e7840fd9377549727ccba62e4349c6f), ROM_BIOS(1) )
|
||||||
|
ROM_SYSTEM_BIOS( 1, "v140", "Version 1.40" )
|
||||||
|
ROMX_LOAD( "cmd fd-4000 dos v1.40 fd-350022.bin", 0x0000, 0x8000, CRC(b563ef10) SHA1(d936d76fd8b50ce4c65f885703653d7c1bd7d3c9), ROM_BIOS(2) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
|
||||||
@ -45,7 +74,14 @@ ROM_END
|
|||||||
|
|
||||||
const rom_entry *fd2000_device::device_rom_region() const
|
const rom_entry *fd2000_device::device_rom_region() const
|
||||||
{
|
{
|
||||||
|
switch (m_variant)
|
||||||
|
{
|
||||||
|
default:
|
||||||
return ROM_NAME( fd2000 );
|
return ROM_NAME( fd2000 );
|
||||||
|
|
||||||
|
case TYPE_FD4000:
|
||||||
|
return ROM_NAME( fd4000 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -54,11 +90,11 @@ const rom_entry *fd2000_device::device_rom_region() const
|
|||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
static ADDRESS_MAP_START( fd2000_mem, AS_PROGRAM, 8, fd2000_device )
|
static ADDRESS_MAP_START( fd2000_mem, AS_PROGRAM, 8, fd2000_device )
|
||||||
AM_RANGE(0x0000, 0x7fff) AM_RAM
|
AM_RANGE(0x0000, 0x3fff) AM_RAM
|
||||||
|
AM_RANGE(0x4000, 0x400f) AM_MIRROR(0xbf0) AM_DEVREADWRITE(M6522_TAG, via6522_device, read, write)
|
||||||
|
AM_RANGE(0x4e00, 0x4e07) AM_MIRROR(0x1f8) AM_DEVICE(DP8473_TAG, upd765a_device, map)
|
||||||
|
AM_RANGE(0x5000, 0x7fff) AM_RAM
|
||||||
AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION(M6502_TAG, 0)
|
AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION(M6502_TAG, 0)
|
||||||
//AM_RANGE() AM_DEVREADWRITE(M6522_TAG, via6522_device, read, write)
|
|
||||||
//AM_RANGE() AM_DEVREAD_LEGACY(DP8473_TAG, upd765_status_r)
|
|
||||||
//AM_RANGE() AM_DEVREADWRITE_LEGACY(DP8473_TAG, upd765_data_r, upd765_data_w)
|
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
|
|
||||||
@ -86,9 +122,18 @@ static const via6522_interface via_intf =
|
|||||||
};
|
};
|
||||||
|
|
||||||
static SLOT_INTERFACE_START( fd2000_floppies )
|
static SLOT_INTERFACE_START( fd2000_floppies )
|
||||||
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
|
SLOT_INTERFACE( "35hd", FLOPPY_35_HD )
|
||||||
SLOT_INTERFACE_END
|
SLOT_INTERFACE_END
|
||||||
|
|
||||||
|
static SLOT_INTERFACE_START( fd4000_floppies )
|
||||||
|
SLOT_INTERFACE( "35ed", FLOPPY_35_ED )
|
||||||
|
SLOT_INTERFACE_END
|
||||||
|
/*
|
||||||
|
FLOPPY_FORMATS_MEMBER( fd2000_device::floppy_formats )
|
||||||
|
FLOPPY_D81_FORMAT
|
||||||
|
FLOPPY_D2M_FORMAT
|
||||||
|
FLOPPY_FORMATS_END
|
||||||
|
*/
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// MACHINE_DRIVER( fd2000 )
|
// MACHINE_DRIVER( fd2000 )
|
||||||
@ -101,7 +146,22 @@ static MACHINE_CONFIG_FRAGMENT( fd2000 )
|
|||||||
MCFG_VIA6522_ADD(M6522_TAG, 2000000, via_intf)
|
MCFG_VIA6522_ADD(M6522_TAG, 2000000, via_intf)
|
||||||
MCFG_UPD765A_ADD(DP8473_TAG, true, true)
|
MCFG_UPD765A_ADD(DP8473_TAG, true, true)
|
||||||
|
|
||||||
MCFG_FLOPPY_DRIVE_ADD(DP8473_TAG ":0", fd2000_floppies, "525dd", 0, floppy_image_device::default_floppy_formats)
|
MCFG_FLOPPY_DRIVE_ADD(DP8473_TAG":0", fd2000_floppies, "35hd", 0, floppy_image_device::default_floppy_formats)//fd2000_device::floppy_formats)
|
||||||
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// MACHINE_DRIVER( fd4000 )
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
static MACHINE_CONFIG_FRAGMENT( fd4000 )
|
||||||
|
MCFG_CPU_ADD(M6502_TAG, M65C02, 2000000)
|
||||||
|
MCFG_CPU_PROGRAM_MAP(fd2000_mem)
|
||||||
|
|
||||||
|
MCFG_VIA6522_ADD(M6522_TAG, 2000000, via_intf)
|
||||||
|
MCFG_UPD765A_ADD(DP8473_TAG, true, true)
|
||||||
|
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD(DP8473_TAG":0", fd4000_floppies, "35ed", 0, floppy_image_device::default_floppy_formats)//fd2000_device::floppy_formats)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
@ -112,7 +172,35 @@ MACHINE_CONFIG_END
|
|||||||
|
|
||||||
machine_config_constructor fd2000_device::device_mconfig_additions() const
|
machine_config_constructor fd2000_device::device_mconfig_additions() const
|
||||||
{
|
{
|
||||||
|
switch (m_variant)
|
||||||
|
{
|
||||||
|
default:
|
||||||
return MACHINE_CONFIG_NAME( fd2000 );
|
return MACHINE_CONFIG_NAME( fd2000 );
|
||||||
|
|
||||||
|
case TYPE_FD4000:
|
||||||
|
return MACHINE_CONFIG_NAME( fd4000 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_config_complete - perform any
|
||||||
|
// operations now that the configuration is
|
||||||
|
// complete
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void fd2000_device::device_config_complete()
|
||||||
|
{
|
||||||
|
switch (m_variant)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
m_shortname = "fd2000";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TYPE_FD4000:
|
||||||
|
m_shortname = "fd4000";
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -128,10 +216,28 @@ machine_config_constructor fd2000_device::device_mconfig_additions() const
|
|||||||
fd2000_device::fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
fd2000_device::fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
: device_t(mconfig, FD2000, "FD-2000", tag, owner, clock),
|
: device_t(mconfig, FD2000, "FD-2000", tag, owner, clock),
|
||||||
device_cbm_iec_interface(mconfig, *this),
|
device_cbm_iec_interface(mconfig, *this),
|
||||||
m_maincpu(*this, M6502_TAG)
|
m_maincpu(*this, M6502_TAG),
|
||||||
|
m_floppy0(*this, DP8473_TAG":0"),
|
||||||
|
m_variant(TYPE_FD2000)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fd2000_device::fd2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant)
|
||||||
|
: device_t(mconfig, type, name, tag, owner, clock),
|
||||||
|
device_cbm_iec_interface(mconfig, *this),
|
||||||
|
m_maincpu(*this, M6502_TAG),
|
||||||
|
m_floppy0(*this, DP8473_TAG":0")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// fd4000_device - constructor
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
fd4000_device::fd4000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
|
: fd2000_device(mconfig, FD4000, "FD-4000", tag, owner, clock, TYPE_FD4000) { }
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|
||||||
CMD FD2000 disk drive emulation
|
CMD FD-2000/FD-4000 disk drive emulation
|
||||||
|
|
||||||
Copyright MESS Team.
|
Copyright MESS Team.
|
||||||
Visit http://mamedev.org for licensing and usage restrictions.
|
Visit http://mamedev.org for licensing and usage restrictions.
|
||||||
@ -12,12 +12,9 @@
|
|||||||
#ifndef __FD2000__
|
#ifndef __FD2000__
|
||||||
#define __FD2000__
|
#define __FD2000__
|
||||||
|
|
||||||
#define ADDRESS_MAP_MODERN
|
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/m6502/m65c02.h"
|
#include "cpu/m6502/m65c02.h"
|
||||||
#include "imagedev/flopdrv.h"
|
#include "formats/d81_dsk.h"
|
||||||
#include "formats/mfi_dsk.h"
|
|
||||||
#include "machine/6522via.h"
|
#include "machine/6522via.h"
|
||||||
#include "machine/cbmiec.h"
|
#include "machine/cbmiec.h"
|
||||||
#include "machine/upd765.h"
|
#include "machine/upd765.h"
|
||||||
@ -41,20 +38,28 @@
|
|||||||
class fd2000_device : public device_t,
|
class fd2000_device : public device_t,
|
||||||
public device_cbm_iec_interface
|
public device_cbm_iec_interface
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
|
fd2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant);
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TYPE_FD2000,
|
||||||
|
TYPE_FD4000
|
||||||
|
};
|
||||||
|
|
||||||
// optional information overrides
|
// optional information overrides
|
||||||
virtual const rom_entry *device_rom_region() const;
|
virtual const rom_entry *device_rom_region() const;
|
||||||
virtual machine_config_constructor device_mconfig_additions() const;
|
virtual machine_config_constructor device_mconfig_additions() const;
|
||||||
|
|
||||||
|
//DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
|
virtual void device_config_complete();
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_reset();
|
virtual void device_reset();
|
||||||
virtual void device_config_complete() { m_shortname = "fd2000"; }
|
|
||||||
|
|
||||||
// device_cbm_iec_interface overrides
|
// device_cbm_iec_interface overrides
|
||||||
void cbm_iec_srq(int state);
|
void cbm_iec_srq(int state);
|
||||||
@ -63,11 +68,25 @@ protected:
|
|||||||
void cbm_iec_reset(int state);
|
void cbm_iec_reset(int state);
|
||||||
|
|
||||||
required_device<m65c02_device> m_maincpu;
|
required_device<m65c02_device> m_maincpu;
|
||||||
|
required_device<floppy_connector> m_floppy0;
|
||||||
|
|
||||||
|
int m_variant;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ======================> fd4000_device
|
||||||
|
|
||||||
|
class fd4000_device : public fd2000_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
fd4000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// device type definition
|
// device type definition
|
||||||
extern const device_type FD2000;
|
extern const device_type FD2000;
|
||||||
|
extern const device_type FD4000;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user