ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
fdcconst.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Fred Klaus *
3  * frednet@web.de *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef CPC_FDCCONST_H
21 #define CPC_FDCCONST_H
22 
23 // FDC constants
24 #define DSK_BPTMAX 8192
25 #define DSK_TRACKMAX 102 // max amount that fits in a DSK header
26 #define DSK_SIDEMAX 2
27 #define DSK_SECTORMAX 29 // max amount that fits in a track header
28 
29 #define FDC_TO_CPU 0
30 #define CPU_TO_FDC 1
31 
32 #define CMD_PHASE 0
33 #define EXEC_PHASE 1
34 #define RESULT_PHASE 2
35 
36 #define SKIP_flag 1 // skip sectors with DDAM/DAM
37 #define SEEKDRVA_flag 2 // seek operation has finished for drive A
38 #define SEEKDRVB_flag 4 // seek operation has finished for drive B
39 #define RNDDE_flag 8 // simulate random DE sectors
40 #define OVERRUN_flag 16 // data transfer timed out
41 #define SCAN_flag 32 // one of the three scan commands is active
42 #define SCANFAILED_flag 64 // memory and sector data does not match
43 #define STATUSDRVA_flag 128 // status change of drive A
44 #define STATUSDRVB_flag 256 // status change of drive B
45 
46 // more
47 
48 #define CMD_CODE 0
49 #define CMD_UNIT 1
50 #define CMD_C 2
51 #define CMD_H 3
52 #define CMD_R 4
53 #define CMD_N 5
54 #define CMD_EOT 6
55 #define CMD_GPL 7
56 #define CMD_DTL 8
57 #define CMD_STP 8
58 
59 #define RES_ST0 0
60 #define RES_ST1 1
61 #define RES_ST2 2
62 #define RES_C 3
63 #define RES_H 4
64 #define RES_R 5
65 #define RES_N 6
66 
67 #define OVERRUN_TIMEOUT 128*4
68 #define INITIAL_TIMEOUT OVERRUN_TIMEOUT*4
69 #define MAX_CMD_COUNT 15
70 
71 
72 // #define ERR_INPUT_INIT 1
73 // #define ERR_VIDEO_INIT 2
74 // #define ERR_VIDEO_SET_MODE 3
75 // #define ERR_VIDEO_SURFACE 4
76 // #define ERR_VIDEO_PALETTE 5
77 // #define ERR_VIDEO_COLOUR_DEPTH 6
78 // #define ERR_AUDIO_INIT 7
79 // #define ERR_AUDIO_RATE 8
80 #define ERR_OUT_OF_MEMORY 9
81 // #define ERR_CPC_ROM_MISSING 10
82 // #define ERR_NOT_A_CPC_ROM 11
83 // #define ERR_ROM_NOT_FOUND 12
84 #define ERR_FILE_NOT_FOUND 13
85 #define ERR_FILE_BAD_ZIP 14
86 #define ERR_FILE_EMPTY_ZIP 15
87 #define ERR_FILE_UNZIP_FAILED 16
88 // #define ERR_SNA_INVALID 17
89 // #define ERR_SNA_SIZE 18
90 // #define ERR_SNA_CPC_TYPE 19
91 // #define ERR_SNA_WRITE 20
92 #define ERR_DSK_INVALID 21
93 #define ERR_DSK_SIDES 22
94 #define ERR_DSK_SECTORS 23
95 #define ERR_DSK_WRITE 24
96 #define MSG_DSK_ALTERED 25
97 // #define ERR_TAP_INVALID 26
98 // #define ERR_TAP_UNSUPPORTED 27
99 // #define ERR_TAP_BAD_VOC 28
100 // #define ERR_PRINTER 29
101 // #define ERR_BAD_MF2_ROM 30
102 // #define ERR_SDUMP 31
103 
104 
105 #endif