00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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
00022 #define STD_TRACKS 35
00023
00024 #define EXT_TRACKS 40
00025
00026 #define TOT_TRACKS 42
00027
00028
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