fdcconst.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Fred Klaus                                      *
00003  *   frednet@web.de                                                        *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef FDCCONST_H
00021 #define FDCCONST_H
00022 
00023 // FDC constants
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 // more
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 // #define ERR_INPUT_INIT           1
00073 // #define ERR_VIDEO_INIT           2
00074 // #define ERR_VIDEO_SET_MODE       3
00075 // #define ERR_VIDEO_SURFACE        4
00076 // #define ERR_VIDEO_PALETTE        5
00077 // #define ERR_VIDEO_COLOUR_DEPTH   6
00078 // #define ERR_AUDIO_INIT           7
00079 // #define ERR_AUDIO_RATE           8
00080 #define ERR_OUT_OF_MEMORY        9
00081 // #define ERR_CPC_ROM_MISSING      10
00082 // #define ERR_NOT_A_CPC_ROM        11
00083 // #define ERR_ROM_NOT_FOUND        12
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 // #define ERR_SNA_INVALID          17
00089 // #define ERR_SNA_SIZE             18
00090 // #define ERR_SNA_CPC_TYPE         19
00091 // #define ERR_SNA_WRITE            20
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 // #define ERR_TAP_INVALID          26
00098 // #define ERR_TAP_UNSUPPORTED      27
00099 // #define ERR_TAP_BAD_VOC          28
00100 // #define ERR_PRINTER              29
00101 // #define ERR_BAD_MF2_ROM          30
00102 // #define ERR_SDUMP                31
00103 
00104 
00105 #endif

Generated on Fri Mar 16 21:30:28 2007 for roland.kdevelop by  doxygen 1.5.0