Skip to content

Commit

Permalink
Added NIXDORF 8870 format
Browse files Browse the repository at this point in the history
  • Loading branch information
dgesswein committed Dec 17, 2018
1 parent e9fe563 commit 3a88be4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
17 changes: 15 additions & 2 deletions mfm/inc/mfm_decoder.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef MFM_DECODER_H_
#define MFM_DECODER_H_
//
// 12/16/18 DJG Added NIXDORF_8870
// 11/03/18 DJG Renamed variable
// 10/12/18 DJG Added CONTROLLER_IBM_3174
// 09/10/18 DJG Added CONTROLLER_DILOG_DQ604
Expand Down Expand Up @@ -127,6 +128,7 @@ typedef struct {
CONTROLLER_NEWBURYDATA,
CONTROLLER_ALTOS,
CONTROLLER_WD_1006,
CONTROLLER_NIXDORF_8870,
CONTROLLER_TANDY_8MEG,
CONTROLLER_WD_3B1,
CONTROLLER_MOTOROLA_VME10,
Expand Down Expand Up @@ -274,15 +276,17 @@ DEF_EXTERN struct {
{0x1021, 16, 0},
{0x8005, 16, 0},
{0x140a0445, 32, 5},
{0x140a0445000101ll, 56, 16}, // From WD42C22C datasheet, not tested
{0x140a0445000101ll, 56, 22}, // From WD42C22C datasheet, not tested
{0x0104c981, 32, 5},
{0x24409, 24, 0},
{0x3e4012, 24, 0}, // WANG 2275
{0x88211, 24, 0}, // ROHM_PBX
// Adaptec bad block on Maxtor XT-2190
{0x41044185, 32, 5},
// MVME320 controller
{0x10210191, 32, 5}
{0x10210191, 32, 5},
// Nixdorf
{0x8222f0804bda23ll, 56, 22}
// DQ604 Not added to search since more likely to cause false
// positives that find real matches
//{0x1, 8, 0}
Expand Down Expand Up @@ -1069,6 +1073,15 @@ DEF_EXTERN CONTROLLER mfm_controller_info[]
{0,0,0,0},{0,0,0,0}, CONT_ANALIZE,
0, 0, 0
},
{"NIXDORF_8870", 256, 10000000, 0,
4, ARRAYSIZE(mfm_all_poly), 4, ARRAYSIZE(mfm_all_poly),
0, ARRAYSIZE(mfm_all_init), CINFO_CHS,
5, 2, 0, 2, CHECK_CRC, CHECK_CRC,
0, 1, NULL, 512, 16, 0, 5209,
0, 0,
{0xffff,0x1021,16,0},{0,0x8222f0804bda23,56,22}, CONT_MODEL,
0, 0, 0
},
{"TANDY_8MEG", 512, 8680000, 0,
4, ARRAYSIZE(mfm_all_poly), 4, ARRAYSIZE(mfm_all_poly),
0, ARRAYSIZE(mfm_all_init), CINFO_CHS,
Expand Down
2 changes: 1 addition & 1 deletion mfm/inc/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define VERSION "1.35"
#define VERSION "1.36"
3 changes: 3 additions & 0 deletions mfm/mfm_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// for sectors with bad headers. See if resyncing PLL at write boundaries improves performance when
// data bits are shifted at write boundaries.
//
// 12/16/18 DJG Added NIXDORF_8870
// 10/12/18 DJG Added IBM_3174
// 09/10/18 DJG Added CONTROLLER_DILOG_DQ604
// 08/26/18 DJG Best sector wasn't always written out. Ignore bad headers at
Expand Down Expand Up @@ -498,6 +499,7 @@ SECTOR_DECODE_STATUS mfm_decode_track(DRIVE_PARAMS * drive_params, int cyl,
}
// Change in mfm_process_bytes if this if is changed
if (drive_params->controller == CONTROLLER_WD_1006 ||
drive_params->controller == CONTROLLER_NIXDORF_8870 ||
drive_params->controller == CONTROLLER_TANDY_8MEG ||
drive_params->controller == CONTROLLER_WD_3B1 ||
drive_params->controller == CONTROLLER_MOTOROLA_VME10 ||
Expand Down Expand Up @@ -1221,6 +1223,7 @@ SECTOR_DECODE_STATUS mfm_process_bytes(DRIVE_PARAMS *drive_params,

// If this is changed change in mfm_decode_track also
if (drive_params->controller == CONTROLLER_WD_1006 ||
drive_params->controller == CONTROLLER_NIXDORF_8870 ||
drive_params->controller == CONTROLLER_TANDY_8MEG ||
drive_params->controller == CONTROLLER_WD_3B1 ||
drive_params->controller == CONTROLLER_MOTOROLA_VME10 ||
Expand Down
10 changes: 10 additions & 0 deletions mfm/wd_mfm_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// Code has somewhat messy implementation that should use the new data
// on format to drive processing. Also needs to be added to other decoders.
//
// 12/16/18 DJG Added NIXDORF_8870
// 12/15/18 DJG Changed MACBOTTOM to not hard code sector size. Format also
// used by Philips P3800 with 512 byte sectors.
// 09/10/18 DJG Added CONTROLLER_IBM_3174
Expand Down Expand Up @@ -157,6 +158,14 @@ static int IsOutermostCylinder(DRIVE_PARAMS *drive_params, int cyl)
//
// CONTROLLER_TANDY_8MEG, Tandy 8 meg 8" drive. Same as WD_1006
//
// CONTROLLER_NIXDORF_8870
// Reference image nixdorf-1-raw_data from 8870 Quattro/7
// Same as WD_1006 except ECC and which bytes used in ECC differ so
// needs to be separate format
//
// Cyl 0, head 0 has 17 sectors. Rest of disk has 16 sectors
// TODO: Support mixed formats.
//
// CONTROLLER_MOTOROLA_VME10
// 5 byte header + 4 byte CRC
// byte 0 0xa1
Expand Down Expand Up @@ -885,6 +894,7 @@ SECTOR_DECODE_STATUS wd_process_data(STATE_TYPE *state, uint8_t bytes[],
sector_status.status |= SECT_BAD_HEADER;
}
} else if (drive_params->controller == CONTROLLER_WD_1006 ||
drive_params->controller == CONTROLLER_NIXDORF_8870 ||
drive_params->controller == CONTROLLER_TANDY_8MEG ||
(drive_params->controller == CONTROLLER_DEC_RQDX3 &&
IsOutermostCylinder(drive_params, exp_cyl)) ||
Expand Down

0 comments on commit 3a88be4

Please sign in to comment.