00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef FDCCONST_H
00021 #define FDCCONST_H
00022
00023
00024 #define DSK_BPTMAX 8192
00025 #define DSK_TRACKMAX 102 // max amount that fits in a DSK header
00026 #define DSK_SIDEMAX 2
00027 #define DSK_SECTORMAX 29 // max amount that fits in a track header
00028
00029 #define FDC_TO_CPU 0
00030 #define CPU_TO_FDC 1
00031
00032 #define CMD_PHASE 0
00033 #define EXEC_PHASE 1
00034 #define RESULT_PHASE 2
00035
00036 #define SKIP_flag 1 // skip sectors with DDAM/DAM
00037 #define SEEKDRVA_flag 2 // seek operation has finished for drive A
00038 #define SEEKDRVB_flag 4 // seek operation has finished for drive B
00039 #define RNDDE_flag 8 // simulate random DE sectors
00040 #define OVERRUN_flag 16 // data transfer timed out
00041 #define SCAN_flag 32 // one of the three scan commands is active
00042 #define SCANFAILED_flag 64 // memory and sector data does not match
00043 #define STATUSDRVA_flag 128 // status change of drive A
00044 #define STATUSDRVB_flag 256 // status change of drive B
00045
00046
00047
00048 #define CMD_CODE 0
00049 #define CMD_UNIT 1
00050 #define CMD_C 2
00051 #define CMD_H 3
00052 #define CMD_R 4
00053 #define CMD_N 5
00054 #define CMD_EOT 6
00055 #define CMD_GPL 7
00056 #define CMD_DTL 8
00057 #define CMD_STP 8
00058
00059 #define RES_ST0 0
00060 #define RES_ST1 1
00061 #define RES_ST2 2
00062 #define RES_C 3
00063 #define RES_H 4
00064 #define RES_R 5
00065 #define RES_N 6
00066
00067 #define OVERRUN_TIMEOUT 128*4
00068 #define INITIAL_TIMEOUT OVERRUN_TIMEOUT*4
00069 #define MAX_CMD_COUNT 15
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 #define ERR_OUT_OF_MEMORY 9
00081
00082
00083
00084 #define ERR_FILE_NOT_FOUND 13
00085 #define ERR_FILE_BAD_ZIP 14
00086 #define ERR_FILE_EMPTY_ZIP 15
00087 #define ERR_FILE_UNZIP_FAILED 16
00088
00089
00090
00091
00092 #define ERR_DSK_INVALID 21
00093 #define ERR_DSK_SIDES 22
00094 #define ERR_DSK_SECTORS 23
00095 #define ERR_DSK_WRITE 24
00096 #define MSG_DSK_ALTERED 25
00097
00098
00099
00100
00101
00102
00103
00104
00105 #endif