| .. | .. |
|---|
| 172 | 172 | * used in succession to try to read the disk. If the FDC cannot lock onto |
|---|
| 173 | 173 | * the disk, the next format is tried. This uses the variable 'probing'. |
|---|
| 174 | 174 | */ |
|---|
| 175 | | - short autodetect[8]; /* autodetected formats */ |
|---|
| 175 | + |
|---|
| 176 | +#define FD_AUTODETECT_SIZE 8 |
|---|
| 177 | + |
|---|
| 178 | + short autodetect[FD_AUTODETECT_SIZE]; /* autodetected formats */ |
|---|
| 176 | 179 | |
|---|
| 177 | 180 | int checkfreq; /* how often should the drive be checked for disk |
|---|
| 178 | 181 | * changes */ |
|---|
| .. | .. |
|---|
| 357 | 360 | int buffer_length; /* length of allocated buffer */ |
|---|
| 358 | 361 | |
|---|
| 359 | 362 | unsigned char rate; |
|---|
| 363 | + |
|---|
| 364 | +#define FD_RAW_CMD_SIZE 16 |
|---|
| 365 | +#define FD_RAW_REPLY_SIZE 16 |
|---|
| 366 | +#define FD_RAW_CMD_FULLSIZE (FD_RAW_CMD_SIZE + 1 + FD_RAW_REPLY_SIZE) |
|---|
| 367 | + |
|---|
| 368 | + /* The command may take up the space initially intended for the reply |
|---|
| 369 | + * and the reply count. Needed for long 82078 commands such as RESTORE, |
|---|
| 370 | + * which takes 17 command bytes. |
|---|
| 371 | + */ |
|---|
| 372 | + |
|---|
| 360 | 373 | unsigned char cmd_count; |
|---|
| 361 | | - unsigned char cmd[16]; |
|---|
| 362 | | - unsigned char reply_count; |
|---|
| 363 | | - unsigned char reply[16]; |
|---|
| 374 | + union { |
|---|
| 375 | + struct { |
|---|
| 376 | + unsigned char cmd[FD_RAW_CMD_SIZE]; |
|---|
| 377 | + unsigned char reply_count; |
|---|
| 378 | + unsigned char reply[FD_RAW_REPLY_SIZE]; |
|---|
| 379 | + }; |
|---|
| 380 | + unsigned char fullcmd[FD_RAW_CMD_FULLSIZE]; |
|---|
| 381 | + }; |
|---|
| 364 | 382 | int track; |
|---|
| 365 | 383 | int resultcode; |
|---|
| 366 | 384 | |
|---|