mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
vector06: updated to use the new wd fdc. system appears to be broken but
loads some sectors from disk.
This commit is contained in:
parent
3e7cb13148
commit
0ebc3e5033
@ -383,6 +383,8 @@ project "formats"
|
||||
MAME_DIR .. "src/lib/formats/upd765_dsk.h",
|
||||
MAME_DIR .. "src/lib/formats/vdk_dsk.c",
|
||||
MAME_DIR .. "src/lib/formats/vdk_dsk.h",
|
||||
MAME_DIR .. "src/lib/formats/vector06_dsk.c",
|
||||
MAME_DIR .. "src/lib/formats/vector06_dsk.h",
|
||||
MAME_DIR .. "src/lib/formats/victor9k_dsk.c",
|
||||
MAME_DIR .. "src/lib/formats/victor9k_dsk.h",
|
||||
MAME_DIR .. "src/lib/formats/vg5k_cas.c",
|
||||
|
44
src/lib/formats/vector06_dsk.c
Normal file
44
src/lib/formats/vector06_dsk.c
Normal file
@ -0,0 +1,44 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Vector 06
|
||||
|
||||
Disk image format
|
||||
|
||||
TODO:
|
||||
- Gap sizes
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "vector06_dsk.h"
|
||||
|
||||
vector06_format::vector06_format() : wd177x_format(formats)
|
||||
{
|
||||
}
|
||||
|
||||
const char *vector06_format::name() const
|
||||
{
|
||||
return "vector06";
|
||||
}
|
||||
|
||||
const char *vector06_format::description() const
|
||||
{
|
||||
return "Vector 06 disk image";
|
||||
}
|
||||
|
||||
const char *vector06_format::extensions() const
|
||||
{
|
||||
return "fdd";
|
||||
}
|
||||
|
||||
const vector06_format::format vector06_format::formats[] =
|
||||
{
|
||||
{
|
||||
floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM,
|
||||
2000, 5, 82, 2, 1024, {}, 1, {}, 80, 22, 24
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
const floppy_format_type FLOPPY_VECTOR06_FORMAT = &floppy_image_format_creator<vector06_format>;
|
33
src/lib/formats/vector06_dsk.h
Normal file
33
src/lib/formats/vector06_dsk.h
Normal file
@ -0,0 +1,33 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Vector 06
|
||||
|
||||
Disk image format
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VECTOR06_DSK_H__
|
||||
#define __VECTOR06_DSK_H__
|
||||
|
||||
#include "wd177x_dsk.h"
|
||||
|
||||
class vector06_format : public wd177x_format
|
||||
{
|
||||
public:
|
||||
vector06_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_VECTOR06_FORMAT;
|
||||
|
||||
#endif // __VECTOR06_DSK_H__
|
@ -9,6 +9,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "includes/vector06.h"
|
||||
#include "formats/vector06_dsk.h"
|
||||
|
||||
|
||||
/* Address maps */
|
||||
@ -23,10 +24,10 @@ static ADDRESS_MAP_START(vector06_io, AS_IO, 8, vector06_state)
|
||||
AM_RANGE( 0x00, 0x03) AM_READWRITE(vector06_8255_1_r, vector06_8255_1_w )
|
||||
AM_RANGE( 0x04, 0x07) AM_READWRITE(vector06_8255_2_r, vector06_8255_2_w )
|
||||
AM_RANGE( 0x0C, 0x0C) AM_WRITE(vector06_color_set)
|
||||
AM_RANGE( 0x18, 0x18) AM_DEVREADWRITE("wd1793", fd1793_device, data_r, data_w)
|
||||
AM_RANGE( 0x19, 0x19) AM_DEVREADWRITE("wd1793", fd1793_device, sector_r, sector_w)
|
||||
AM_RANGE( 0x1A, 0x1A) AM_DEVREADWRITE("wd1793", fd1793_device, track_r, track_w)
|
||||
AM_RANGE( 0x1B, 0x1B) AM_DEVREADWRITE("wd1793", fd1793_device, status_r, command_w)
|
||||
AM_RANGE( 0x18, 0x18) AM_DEVREADWRITE("wd1793", fd1793_t, data_r, data_w)
|
||||
AM_RANGE( 0x19, 0x19) AM_DEVREADWRITE("wd1793", fd1793_t, sector_r, sector_w)
|
||||
AM_RANGE( 0x1a, 0x1a) AM_DEVREADWRITE("wd1793", fd1793_t, track_r, track_w)
|
||||
AM_RANGE( 0x1b, 0x1b) AM_DEVREADWRITE("wd1793", fd1793_t, status_r, cmd_w)
|
||||
AM_RANGE( 0x1C, 0x1C) AM_WRITE(vector06_disc_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -119,21 +120,15 @@ static INPUT_PORTS_START( vector06 )
|
||||
|
||||
INPUT_PORTS_END
|
||||
|
||||
static LEGACY_FLOPPY_OPTIONS_START(vector)
|
||||
LEGACY_FLOPPY_OPTION(vector, "fdd", "Vector disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
|
||||
HEADS([2])
|
||||
TRACKS([82])
|
||||
SECTORS([5])
|
||||
SECTOR_LENGTH([1024])
|
||||
FIRST_SECTOR_ID([1]))
|
||||
LEGACY_FLOPPY_OPTIONS_END
|
||||
|
||||
static const floppy_interface vector_floppy_interface =
|
||||
{
|
||||
FLOPPY_STANDARD_5_25_DSHD,
|
||||
LEGACY_FLOPPY_OPTIONS_NAME(vector),
|
||||
NULL
|
||||
};
|
||||
FLOPPY_FORMATS_MEMBER( vector06_state::floppy_formats )
|
||||
FLOPPY_VECTOR06_FORMAT
|
||||
FLOPPY_FORMATS_END
|
||||
|
||||
static SLOT_INTERFACE_START( vector06_floppies )
|
||||
SLOT_INTERFACE("qd", FLOPPY_525_QD)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
||||
/* Machine driver */
|
||||
static MACHINE_CONFIG_START( vector06, vector06_state )
|
||||
@ -176,11 +171,10 @@ static MACHINE_CONFIG_START( vector06, vector06_state )
|
||||
MCFG_CASSETTE_ADD("cassette")
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_DEVICE_ADD("wd1793", FD1793, 0)
|
||||
MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
|
||||
MCFG_WD17XX_DDEN_CALLBACK(VCC)
|
||||
MCFG_FD1793x_ADD("wd1793", XTAL_1MHz)
|
||||
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(vector_floppy_interface)
|
||||
MCFG_FLOPPY_DRIVE_ADD("wd1793:0", vector06_floppies, "qd", vector06_state::floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("wd1793:1", vector06_floppies, "qd", vector06_state::floppy_formats)
|
||||
|
||||
/* cartridge */
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "vector06_cart")
|
||||
|
@ -15,10 +15,9 @@
|
||||
#include "sound/wave.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/wd17xx.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "imagedev/flopdrv.h"
|
||||
#include "formats/basicdsk.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
@ -32,16 +31,22 @@ public:
|
||||
m_cassette(*this, "cassette"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_fdc(*this, "wd1793"),
|
||||
m_floppy0(*this, "wd1793:0"),
|
||||
m_floppy1(*this, "wd1793:1"),
|
||||
m_ppi(*this, "ppi8255"),
|
||||
m_ppi2(*this, "ppi8255_2"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_palette(*this, "palette")
|
||||
{ }
|
||||
|
||||
DECLARE_FLOPPY_FORMATS(floppy_formats);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
required_device<fd1793_device> m_fdc;
|
||||
required_device<fd1793_t> m_fdc;
|
||||
required_device<floppy_connector> m_floppy0;
|
||||
required_device<floppy_connector> m_floppy1;
|
||||
required_device<i8255_device> m_ppi;
|
||||
required_device<i8255_device> m_ppi2;
|
||||
required_device<ram_device> m_ram;
|
||||
|
@ -138,10 +138,22 @@ TIMER_CALLBACK_MEMBER(vector06_state::reset_check_callback)
|
||||
|
||||
WRITE8_MEMBER( vector06_state::vector06_disc_w )
|
||||
{
|
||||
// something here needs to turn the motor on
|
||||
floppy_image_device *floppy = NULL;
|
||||
|
||||
m_fdc->set_side (BIT(data, 2) ^ 1);
|
||||
m_fdc->set_drive(BIT(data, 0));
|
||||
switch (data & 0x01)
|
||||
{
|
||||
case 0: floppy = m_floppy0->get_device(); break;
|
||||
case 1: floppy = m_floppy1->get_device(); break;
|
||||
}
|
||||
|
||||
m_fdc->set_floppy(floppy);
|
||||
|
||||
if (floppy)
|
||||
{
|
||||
// something here needs to turn the motor on
|
||||
floppy->mon_w(0);
|
||||
floppy->ss_w(!BIT(data, 2));
|
||||
}
|
||||
}
|
||||
|
||||
void vector06_state::machine_start()
|
||||
|
Loading…
Reference in New Issue
Block a user