r7277 Saturday 6th February, 2010 at 16:05:45 UTC by Curt Coder
[D81] Fixed sector offset calculation.
[src/mess/formats]d81_dsk.c

src/mess/formats/d81_dsk.c
r7276r7277
1313    PARAMETERS
1414***************************************************************************/
1515 
16#define LOG 0
17 
1816#define D81_SIZE   819200
1917 
2018/***************************************************************************
r7276r7277
7169 
7270UINT64 d81_translate_offset(floppy_image *floppy, const struct basicdsk_geometry *geom, int track, int head, int sector)
7371{
74   UINT64 offset = ((track * 20) + (!head * 10) + (sector - 1)) * 512;
72   UINT64 offset = (track * 20) + (!head * 10) + sector;
7573 
76   if (LOG) logerror("D81 offset %06x: track %u head %u sector %u\n", (UINT32)offset, track, head, sector);
77 
7874   return offset;
7975}
8076 
r7276r7277
9389    FLOPPY_CONSTRUCT( d81_dsk_construct )
9490-------------------------------------------------*/
9591 
92/*
93PER TRACK ORGANIZATION:
94 
95      Hex 4E written as a gap, with 10 sectors of data, with full gaps written for motor speed variation. 
96 
97PER SECTOR ORGANIZATION:
98 
99      MFM Encoding
100      12 Bytes of Hex 00
101      3 Bytes of Hex A1 (Data Hex A1, Clock Hex 0A)
102      1 Byte of Hex FE (ID Address Mark)
103      1 Byte (Track Number)
104      1 Byte (Side Number)
105      1 Byte (Sector Number)
106      1 Byte (Sector Length, 02 for 512 Byte Sectors)
107      2 Bytes CRC (Cyclic Redundancy Check)
108      22 Bytes of Hex 22
109      12 Bytes of Hex 00
110      3 Bytes of Hex A1 (Data Hex A1, Clock Hex 0A)
111      1 Byte of Hex FB (Data Address Mark)
112      512 Bytes of Data
113      2 Bytes of CRC (Cyclic Redundancy Check)
114      38 Bytes of Hex 4E
115*/
116 
96117FLOPPY_CONSTRUCT( d81_dsk_construct )
97118{
98119   struct basicdsk_geometry geometry;

Previous 509078 RevisionsNext 50


© 1998-2010 The MESS Team