Previous 199869 Revisions Next

r33138 Sunday 2nd November, 2014 at 11:06:25 UTC by Curt Coder
(MESS) victor9k: Floppy WIP. (nw)
[src/lib]lib.mak
[src/lib/formats]victor9k_dsk.c* victor9k_dsk.h*
[src/mess/drivers]victor9k.c
[src/mess/includes]victor9k.h

trunk/src/lib/formats/victor9k_dsk.c
r0r241650
1// license:BSD-3-Clause
2// copyright-holders:Curt Coder
3/*********************************************************************
4
5    formats/victor9k_dsk.c
6
7    Victor 9000 sector disk image format
8
9*********************************************************************/
10
11/*
12
13    Sector format
14    -------------
15
16    Header sync
17    Sector header (header ID, track ID, sector ID, and checksum)
18    Gap 1
19    Data Sync
20    Data field (data sync, data ID, data bytes, and checksum)
21    Gap 2
22
23    Track format
24    ------------
25
26    ZONE        LOWER HEAD  UPPER HEAD  SECTORS     ROTATIONAL
27    NUMBER      TRACKS      TRACKS      PER TRACK   PERIOD (MS)
28
29    0           0-3         unused      19          237.9
30    1           4-15        0-7         18          224.5
31    2           16-26       8-18        17          212.2
32    3           27-37       19-29       16          199.9
33    4           38-48       30-40       15          187.6
34    5           49-59       41-51       14          175.3
35    6           60-70       52-62       13          163.0
36    7           71-79       63-74       12          149.6
37    8           unused      75-79       11          144.0
38
39*/
40
41#include "emu.h"
42#include "formats/victor9k_dsk.h"
43
44victor9k_format::victor9k_format()
45{
46}
47
48const char *victor9k_format::name() const
49{
50    return "victor9k";
51}
52
53const char *victor9k_format::description() const
54{
55    return "Victor 9000 disk image";
56}
57
58const char *victor9k_format::extensions() const
59{
60    return "img";
61}
62
63int victor9k_format::identify(io_generic *io, UINT32 form_factor)
64{
65    return 0;
66}
67
68bool victor9k_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
69{
70    return false;
71}
72
73bool victor9k_format::supports_save() const
74{
75    return false;
76}
77
78const victor9k_format::format victor9k_format::formats[] = {
79    { //
80        floppy_image::FF_525, floppy_image::SSDD, 80, 1, 256
81    },
82    { //
83        floppy_image::FF_525, floppy_image::DSDD, 80, 2, 256
84    },
85    {}
86};
87
88const UINT32 victor9k_format::cell_size[] =
89{
90    0
91};
92
93const int victor9k_format::sectors_per_track[] =
94{
95    0
96};
97
98const int victor9k_format::speed_zone[] =
99{
100    0
101};
102
103const floppy_format_type FLOPPY_VICTOR_9000_FORMAT = &floppy_image_format_creator<victor9k_format>;
trunk/src/lib/formats/victor9k_dsk.h
r0r241650
1// license:BSD-3-Clause
2// copyright-holders:Curt Coder
3/*********************************************************************
4
5    formats/victor9k_dsk.h
6
7    Victor 9000 sector disk image format
8
9*********************************************************************/
10
11#ifndef VICTOR9K_DSK_H_
12#define VICTOR9K_DSK_H_
13
14#include "flopimg.h"
15
16class victor9k_format : public floppy_image_format_t {
17public:
18   struct format {
19      UINT32 form_factor;      // See floppy_image for possible values
20      UINT32 variant;          // See floppy_image for possible values
21
22      UINT8 track_count;
23      UINT8 head_count;
24      UINT16 sector_base_size;
25   };
26
27   victor9k_format();
28
29   virtual const char *name() const;
30   virtual const char *description() const;
31   virtual const char *extensions() const;
32
33   virtual int identify(io_generic *io, UINT32 form_factor);
34   virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
35   virtual bool supports_save() const;
36
37protected:
38   static const format formats[];
39
40   static const UINT32 cell_size[];
41   static const int sectors_per_track[];
42   static const int speed_zone[];
43};
44
45extern const floppy_format_type FLOPPY_VICTOR_9000_FORMAT;
46
47
48FLOPPY_IDENTIFY( victor9k_dsk_identify );
49
50FLOPPY_CONSTRUCT( victor9k_dsk_construct );
51
52#endif
trunk/src/lib/lib.mak
r241649r241650
215215   $(LIBOBJ)/formats/tzx_cas.o     \
216216   $(LIBOBJ)/formats/uef_cas.o     \
217217   $(LIBOBJ)/formats/upd765_dsk.o  \
218   $(LIBOBJ)/formats/victor9k_dsk.o\
218219   $(LIBOBJ)/formats/vg5k_cas.o    \
219220   $(LIBOBJ)/formats/vt_cas.o      \
220221   $(LIBOBJ)/formats/vt_dsk.o      \
trunk/src/mess/drivers/victor9k.c
r241649r241650
1111
1212/*
1313
14    Sector format
15    -------------
16
17    Header sync
18    Sector header (header ID, track ID, sector ID, and checksum)
19    Gap 1
20    Data Sync
21    Data field (data sync, data ID, data bytes, and checksum)
22    Gap 2
23
24    Track format
25    ------------
26
27    ZONE        LOWER HEAD  UPPER HEAD  SECTORS     ROTATIONAL
28    NUMBER      TRACKS      TRACKS      PER TRACK   PERIOD (MS)
29
30    0           0-3         unused      19          237.9
31    1           4-15        0-7         18          224.5
32    2           16-26       8-18        17          212.2
33    3           27-37       19-29       16          199.9
34    4           38-48       30-40       15          187.6
35    5           49-59       41-51       14          175.3
36    6           60-70       52-62       13          163.0
37    7           71-79       63-74       12          149.6
38    8           unused      75-79       11          144.0
39
40*/
41
42/*
43
4414    TODO:
4515
4616    - floppy 8048
r241649r241650
837807   SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
838808SLOT_INTERFACE_END
839809
810FLOPPY_FORMATS_MEMBER( victor9k_state::floppy_formats )
811   FLOPPY_VICTOR_9000_FORMAT
812FLOPPY_FORMATS_END
840813
814
841815//**************************************************************************
842816//  MACHINE INITIALIZATION
843817//**************************************************************************
r241649r241650
972946   MCFG_VIA6522_CB2_HANDLER(WRITELINE(victor9k_state, erase_w))
973947   MCFG_VIA6522_IRQ_HANDLER(WRITELINE(victor9k_state, via6_irq_w))
974948
975   MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":0", victor9k_floppies, "525qd", floppy_image_device::default_floppy_formats)
976   MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":1", victor9k_floppies, "525qd", floppy_image_device::default_floppy_formats)
949   MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":0", victor9k_floppies, "525qd", victor9k_state::floppy_formats)
950   MCFG_FLOPPY_DRIVE_ADD(I8048_TAG":1", victor9k_floppies, "525qd", victor9k_state::floppy_formats)
977951
978952   MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
979953   MCFG_RS232_RXD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, rxa_w))
trunk/src/mess/includes/victor9k.h
r241649r241650
1717#include "bus/rs232/rs232.h"
1818#include "cpu/i86/i86.h"
1919#include "cpu/mcs48/mcs48.h"
20#include "formats/victor9k_dsk.h"
2021#include "imagedev/floppy.h"
2122#include "machine/ram.h"
2223#include "bus/centronics/ctronics.h"
r241649r241650
164165   DECLARE_WRITE_LINE_MEMBER( ssda_irq_w );
165166   MC6845_UPDATE_ROW( crtc_update_row );
166167
168   DECLARE_FLOPPY_FORMATS( floppy_formats );
169
167170   void ready0_cb(floppy_image_device *, int device);
168171   int load0_cb(floppy_image_device *device);
169172   void unload0_cb(floppy_image_device *device);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team