trunk/src/lib/formats/victor9k_dsk.c
r0 | r241650 | |
| 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 | |
| 44 | victor9k_format::victor9k_format() |
| 45 | { |
| 46 | } |
| 47 | |
| 48 | const char *victor9k_format::name() const |
| 49 | { |
| 50 | return "victor9k"; |
| 51 | } |
| 52 | |
| 53 | const char *victor9k_format::description() const |
| 54 | { |
| 55 | return "Victor 9000 disk image"; |
| 56 | } |
| 57 | |
| 58 | const char *victor9k_format::extensions() const |
| 59 | { |
| 60 | return "img"; |
| 61 | } |
| 62 | |
| 63 | int victor9k_format::identify(io_generic *io, UINT32 form_factor) |
| 64 | { |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | bool victor9k_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) |
| 69 | { |
| 70 | return false; |
| 71 | } |
| 72 | |
| 73 | bool victor9k_format::supports_save() const |
| 74 | { |
| 75 | return false; |
| 76 | } |
| 77 | |
| 78 | const 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 | |
| 88 | const UINT32 victor9k_format::cell_size[] = |
| 89 | { |
| 90 | 0 |
| 91 | }; |
| 92 | |
| 93 | const int victor9k_format::sectors_per_track[] = |
| 94 | { |
| 95 | 0 |
| 96 | }; |
| 97 | |
| 98 | const int victor9k_format::speed_zone[] = |
| 99 | { |
| 100 | 0 |
| 101 | }; |
| 102 | |
| 103 | const floppy_format_type FLOPPY_VICTOR_9000_FORMAT = &floppy_image_format_creator<victor9k_format>; |
trunk/src/lib/formats/victor9k_dsk.h
r0 | r241650 | |
| 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 | |
| 16 | class victor9k_format : public floppy_image_format_t { |
| 17 | public: |
| 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 | |
| 37 | protected: |
| 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 | |
| 45 | extern const floppy_format_type FLOPPY_VICTOR_9000_FORMAT; |
| 46 | |
| 47 | |
| 48 | FLOPPY_IDENTIFY( victor9k_dsk_identify ); |
| 49 | |
| 50 | FLOPPY_CONSTRUCT( victor9k_dsk_construct ); |
| 51 | |
| 52 | #endif |
trunk/src/mess/drivers/victor9k.c
r241649 | r241650 | |
11 | 11 | |
12 | 12 | /* |
13 | 13 | |
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 | | |
44 | 14 | TODO: |
45 | 15 | |
46 | 16 | - floppy 8048 |
r241649 | r241650 | |
837 | 807 | SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) |
838 | 808 | SLOT_INTERFACE_END |
839 | 809 | |
| 810 | FLOPPY_FORMATS_MEMBER( victor9k_state::floppy_formats ) |
| 811 | FLOPPY_VICTOR_9000_FORMAT |
| 812 | FLOPPY_FORMATS_END |
840 | 813 | |
| 814 | |
841 | 815 | //************************************************************************** |
842 | 816 | // MACHINE INITIALIZATION |
843 | 817 | //************************************************************************** |
r241649 | r241650 | |
972 | 946 | MCFG_VIA6522_CB2_HANDLER(WRITELINE(victor9k_state, erase_w)) |
973 | 947 | MCFG_VIA6522_IRQ_HANDLER(WRITELINE(victor9k_state, via6_irq_w)) |
974 | 948 | |
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) |
977 | 951 | |
978 | 952 | MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL) |
979 | 953 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, rxa_w)) |
trunk/src/mess/includes/victor9k.h
r241649 | r241650 | |
17 | 17 | #include "bus/rs232/rs232.h" |
18 | 18 | #include "cpu/i86/i86.h" |
19 | 19 | #include "cpu/mcs48/mcs48.h" |
| 20 | #include "formats/victor9k_dsk.h" |
20 | 21 | #include "imagedev/floppy.h" |
21 | 22 | #include "machine/ram.h" |
22 | 23 | #include "bus/centronics/ctronics.h" |
r241649 | r241650 | |
164 | 165 | DECLARE_WRITE_LINE_MEMBER( ssda_irq_w ); |
165 | 166 | MC6845_UPDATE_ROW( crtc_update_row ); |
166 | 167 | |
| 168 | DECLARE_FLOPPY_FORMATS( floppy_formats ); |
| 169 | |
167 | 170 | void ready0_cb(floppy_image_device *, int device); |
168 | 171 | int load0_cb(floppy_image_device *device); |
169 | 172 | void unload0_cb(floppy_image_device *device); |