Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

d64copy_int.h

00001 /*
00002  *      This program is free software; you can redistribute it and/or
00003  *      modify it under the terms of the GNU General Public License
00004  *      as published by the Free Software Foundation; either version
00005  *      2 of the License, or (at your option) any later version.
00006  *
00007  *  Copyright 1999-2001 Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>
00008 */
00009 
00010 /* $Id: d64copy_int.h,v 1.7 2006/03/10 15:20:24 trikalio Exp $ */
00011 
00012 #ifndef D64COPY_INT_H
00013 #define D64COPY_INT_H
00014 
00015 #include "opencbm.h"
00016 #include "d64copy.h"
00017 #include "gcr.h"
00018 
00019 #include "arch.h"
00020 
00021 /* standard .d64 track count */
00022 #define STD_TRACKS   35
00023 /* "standard" 40-track .d64 */
00024 #define EXT_TRACKS   40
00025 /* absolute limit. may not work with all drives */
00026 #define TOT_TRACKS   42
00027 
00028 /* .d71 track count */
00029 #define D71_TRACKS   70
00030 
00031 #define STD_BLOCKS  683
00032 #define D71_BLOCKS  (STD_BLOCKS*2)
00033 
00034 #define MAX_SECTORS  21
00035 
00036 #define NEED_SECTOR(b) ((((b)==bs_error)||((b)==bs_must_copy))?1:0)
00037 
00038 typedef int(*turbo_start)(CBM_FILE,unsigned char);
00039 
00040 typedef struct {
00041     int  (*open_disk)(CBM_FILE,d64copy_settings*,const void*,int,
00042                       turbo_start,d64copy_message_cb);
00043     int  (*read_block)(unsigned char,unsigned char,unsigned char*);
00044     int  (*write_block)(unsigned char,unsigned char,const unsigned char*,int,int);
00045     void (*close_disk)(void);
00046     int  is_cbm_drive;
00047     int  needs_turbo;
00048     int  (*send_track_map)(unsigned char,const char*,unsigned char);
00049     int  (*read_gcr_block)(unsigned char*,unsigned char*);
00050 } transfer_funcs;
00051 
00052 #define DECLARE_TRANSFER_FUNCS(x,c,t) \
00053     transfer_funcs d64copy_ ## x = {open_disk, \
00054                         read_block, \
00055                         write_block, \
00056                         close_disk, \
00057                         c, \
00058                         t, \
00059                         NULL, \
00060                         NULL}
00061 
00062 #define DECLARE_TRANSFER_FUNCS_EX(x,c,t) \
00063     transfer_funcs d64copy_ ## x = {open_disk, \
00064                         read_block, \
00065                         write_block, \
00066                         close_disk, \
00067                         c, \
00068                         t, \
00069                         send_track_map, \
00070                         read_gcr_block}
00071 
00072 #endif

Generated on Sun Apr 30 18:45:46 2006 for opencbm by  doxygen 1.4.2