mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +03:00
(MESS) victor9k: Floppy WIP. (nw)
This commit is contained in:
parent
487526c990
commit
9f107c0d7f
103
src/lib/formats/victor9k_dsk.c
Normal file
103
src/lib/formats/victor9k_dsk.c
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Curt Coder
|
||||||
|
/*********************************************************************
|
||||||
|
|
||||||
|
formats/victor9k_dsk.c
|
||||||
|
|
||||||
|
Victor 9000 sector disk image format
|
||||||
|
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Sector format
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Header sync
|
||||||
|
Sector header (header ID, track ID, sector ID, and checksum)
|
||||||
|
Gap 1
|
||||||
|
Data Sync
|
||||||
|
Data field (data sync, data ID, data bytes, and checksum)
|
||||||
|
Gap 2
|
||||||
|
|
||||||
|
Track format
|
||||||
|
------------
|
||||||
|
|
||||||
|
ZONE LOWER HEAD UPPER HEAD SECTORS ROTATIONAL
|
||||||
|
NUMBER TRACKS TRACKS PER TRACK PERIOD (MS)
|
||||||
|
|
||||||
|
0 0-3 unused 19 237.9
|
||||||
|
1 4-15 0-7 18 224.5
|
||||||
|
2 16-26 8-18 17 212.2
|
||||||
|
3 27-37 19-29 16 199.9
|
||||||
|
4 38-48 30-40 15 187.6
|
||||||
|
5 49-59 41-51 14 175.3
|
||||||
|
6 60-70 52-62 13 163.0
|
||||||
|
7 71-79 63-74 12 149.6
|
||||||
|
8 unused 75-79 11 144.0
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "formats/victor9k_dsk.h"
|
||||||
|
|
||||||
|
victor9k_format::victor9k_format()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *victor9k_format::name() const
|
||||||
|
{
|
||||||
|
return "victor9k";
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *victor9k_format::description() const
|
||||||
|
{
|
||||||
|
return "Victor 9000 disk image";
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *victor9k_format::extensions() const
|
||||||
|
{
|
||||||
|
return "img";
|
||||||
|
}
|
||||||
|
|
||||||
|
int victor9k_format::identify(io_generic *io, UINT32 form_factor)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool victor9k_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool victor9k_format::supports_save() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const victor9k_format::format victor9k_format::formats[] = {
|
||||||
|
{ //
|
||||||
|
floppy_image::FF_525, floppy_image::SSDD, 80, 1, 256
|
||||||
|
},
|
||||||
|
{ //
|
||||||
|
floppy_image::FF_525, floppy_image::DSDD, 80, 2, 256
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
const UINT32 victor9k_format::cell_size[] =
|
||||||
|
{
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
const int victor9k_format::sectors_per_track[] =
|
||||||
|
{
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
const int victor9k_format::speed_zone[] =
|
||||||
|
{
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
const floppy_format_type FLOPPY_VICTOR_9000_FORMAT = &floppy_image_format_creator<victor9k_format>;
|
52
src/lib/formats/victor9k_dsk.h
Normal file
52
src/lib/formats/victor9k_dsk.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Curt Coder
|
||||||
|
/*********************************************************************
|
||||||
|
|
||||||
|
formats/victor9k_dsk.h
|
||||||
|
|
||||||
|
Victor 9000 sector disk image format
|
||||||
|
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#ifndef VICTOR9K_DSK_H_
|
||||||
|
#define VICTOR9K_DSK_H_
|
||||||
|
|
||||||
|
#include "flopimg.h"
|
||||||
|
|
||||||
|
class victor9k_format : public floppy_image_format_t {
|
||||||
|
public:
|
||||||
|
struct format {
|
||||||
|
UINT32 form_factor; // See floppy_image for possible values
|
||||||
|
UINT32 variant; // See floppy_image for possible values
|
||||||
|
|
||||||
|
UINT8 track_count;
|
||||||
|
UINT8 head_count;
|
||||||
|
UINT16 sector_base_size;
|
||||||
|
};
|
||||||
|
|
||||||
|
victor9k_format();
|
||||||
|
|
||||||
|
virtual const char *name() const;
|
||||||
|
virtual const char *description() const;
|
||||||
|
virtual const char *extensions() const;
|
||||||
|
|
||||||
|
virtual int identify(io_generic *io, UINT32 form_factor);
|
||||||
|
virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
|
||||||
|
virtual bool supports_save() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static const format formats[];
|
||||||
|
|
||||||
|
static const UINT32 cell_size[];
|
||||||
|
static const int sectors_per_track[];
|
||||||
|
static const int speed_zone[];
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const floppy_format_type FLOPPY_VICTOR_9000_FORMAT;
|
||||||
|
|
||||||
|
|
||||||
|
FLOPPY_IDENTIFY( victor9k_dsk_identify );
|
||||||
|
|
||||||
|
FLOPPY_CONSTRUCT( victor9k_dsk_construct );
|
||||||
|
|
||||||
|
#endif
|
@ -215,6 +215,7 @@ FORMATSOBJS = \
|
|||||||
$(LIBOBJ)/formats/tzx_cas.o \
|
$(LIBOBJ)/formats/tzx_cas.o \
|
||||||
$(LIBOBJ)/formats/uef_cas.o \
|
$(LIBOBJ)/formats/uef_cas.o \
|
||||||
$(LIBOBJ)/formats/upd765_dsk.o \
|
$(LIBOBJ)/formats/upd765_dsk.o \
|
||||||
|
$(LIBOBJ)/formats/victor9k_dsk.o\
|
||||||
$(LIBOBJ)/formats/vg5k_cas.o \
|
$(LIBOBJ)/formats/vg5k_cas.o \
|
||||||
$(LIBOBJ)/formats/vt_cas.o \
|
$(LIBOBJ)/formats/vt_cas.o \
|
||||||
$(LIBOBJ)/formats/vt_dsk.o \
|
$(LIBOBJ)/formats/vt_dsk.o \
|
||||||
|
@ -9,36 +9,6 @@
|
|||||||
|
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Sector format
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Header sync
|
|
||||||
Sector header (header ID, track ID, sector ID, and checksum)
|
|
||||||
Gap 1
|
|
||||||
Data Sync
|
|
||||||
Data field (data sync, data ID, data bytes, and checksum)
|
|
||||||
Gap 2
|
|
||||||
|
|
||||||
Track format
|
|
||||||
------------
|
|
||||||
|
|
||||||
ZONE LOWER HEAD UPPER HEAD SECTORS ROTATIONAL
|
|
||||||
NUMBER TRACKS TRACKS PER TRACK PERIOD (MS)
|
|
||||||
|
|
||||||
0 0-3 unused 19 237.9
|
|
||||||
1 4-15 0-7 18 224.5
|
|
||||||
2 16-26 8-18 17 212.2
|
|
||||||
3 27-37 19-29 16 199.9
|
|
||||||
4 38-48 30-40 15 187.6
|
|
||||||
5 49-59 41-51 14 175.3
|
|
||||||
6 60-70 52-62 13 163.0
|
|
||||||
7 71-79 63-74 12 149.6
|
|
||||||
8 unused 75-79 11 144.0
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
@ -837,6 +807,10 @@ static SLOT_INTERFACE_START( victor9k_floppies )
|
|||||||
SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
|
SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
|
||||||
SLOT_INTERFACE_END
|
SLOT_INTERFACE_END
|
||||||
|
|
||||||
|
FLOPPY_FORMATS_MEMBER( victor9k_state::floppy_formats )
|
||||||
|
FLOPPY_VICTOR_9000_FORMAT
|
||||||
|
FLOPPY_FORMATS_END
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// MACHINE INITIALIZATION
|
// MACHINE INITIALIZATION
|
||||||
@ -972,8 +946,8 @@ static MACHINE_CONFIG_START( victor9k, victor9k_state )
|
|||||||
MCFG_VIA6522_CB2_HANDLER(WRITELINE(victor9k_state, erase_w))
|
MCFG_VIA6522_CB2_HANDLER(WRITELINE(victor9k_state, erase_w))
|
||||||
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(victor9k_state, via6_irq_w))
|
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(victor9k_state, via6_irq_w))
|
||||||
|
|
||||||
MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":0", victor9k_floppies, "525qd", floppy_image_device::default_floppy_formats)
|
MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":0", victor9k_floppies, "525qd", victor9k_state::floppy_formats)
|
||||||
MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":1", victor9k_floppies, "525qd", floppy_image_device::default_floppy_formats)
|
MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":1", victor9k_floppies, "525qd", victor9k_state::floppy_formats)
|
||||||
|
|
||||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, rxa_w))
|
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, rxa_w))
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "bus/rs232/rs232.h"
|
#include "bus/rs232/rs232.h"
|
||||||
#include "cpu/i86/i86.h"
|
#include "cpu/i86/i86.h"
|
||||||
#include "cpu/mcs48/mcs48.h"
|
#include "cpu/mcs48/mcs48.h"
|
||||||
|
#include "formats/victor9k_dsk.h"
|
||||||
#include "imagedev/floppy.h"
|
#include "imagedev/floppy.h"
|
||||||
#include "machine/ram.h"
|
#include "machine/ram.h"
|
||||||
#include "bus/centronics/ctronics.h"
|
#include "bus/centronics/ctronics.h"
|
||||||
@ -164,6 +165,8 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER( ssda_irq_w );
|
DECLARE_WRITE_LINE_MEMBER( ssda_irq_w );
|
||||||
MC6845_UPDATE_ROW( crtc_update_row );
|
MC6845_UPDATE_ROW( crtc_update_row );
|
||||||
|
|
||||||
|
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||||
|
|
||||||
void ready0_cb(floppy_image_device *, int device);
|
void ready0_cb(floppy_image_device *, int device);
|
||||||
int load0_cb(floppy_image_device *device);
|
int load0_cb(floppy_image_device *device);
|
||||||
void unload0_cb(floppy_image_device *device);
|
void unload0_cb(floppy_image_device *device);
|
||||||
|
Loading…
Reference in New Issue
Block a user