-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathdisk.h
More file actions
133 lines (119 loc) · 4.06 KB
/
disk.h
File metadata and controls
133 lines (119 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
* UAE - The Un*x Amiga Emulator
*
* disk support
*
* (c) 1995 Bernd Schmidt
*/
#ifndef UAE_DISK_H
#define UAE_DISK_H
#include "uae/types.h"
typedef enum {
DRV_NONE = -1, DRV_35_DD = 0, DRV_35_HD, DRV_525_SD, DRV_35_DD_ESCOM, DRV_PC_525_ONLY_40, DRV_PC_35_ONLY_80, DRV_PC_525_40_80, DRV_525_DD, DRV_FB
} drive_type;
#define HISTORY_FLOPPY 0
#define HISTORY_CD 1
#define HISTORY_DIR 2
#define HISTORY_HDF 3
#define HISTORY_FS 4
#define HISTORY_TAPE 5
#define HISTORY_GENLOCK_IMAGE 6
#define HISTORY_GENLOCK_VIDEO 7
#define HISTORY_GEO 8
#define HISTORY_STATEFILE 9
#define HISTORY_CONFIGFILE 10
#define HISTORY_MAX 11
struct diskinfo
{
uae_u8 bootblock[1024];
bool bb_crc_valid;
bool image_crc_value;
uae_u32 imagecrc32;
uae_u32 bootblockcrc32;
bool hd;
bool unreadable;
int bootblocktype;
TCHAR diskname[110];
TCHAR bootblockinfo[256];
TCHAR bootblockclass[256];
};
#define FLOPPY_RATE_500K 0
#define FLOPPY_RATE_300K 1
#define FLOPPY_RATE_250K 2
#define FLOPPY_RATE_1M 3
struct floppy_reserved
{
int num;
struct zfile *img;
bool wrprot;
int cyl;
int cyls;
int heads;
int secs;
int drive_cyls;
bool disk_changed;
int rate;
};
void disk_reserved_setinfo(int num, int cyl, int head, int motor);
bool disk_reserved_getinfo(int num, struct floppy_reserved *fr);
void disk_reserved_reset_disk_change(int num);
extern void DISK_init (void);
extern void DISK_free (void);
extern void DISK_select (uae_u8 data);
extern void DISK_select_set (uae_u8 data);
extern uae_u8 DISK_status_ciaa (void);
extern uae_u8 DISK_status_ciab (uae_u8);
extern void disk_eject (int num);
extern int disk_empty (int num);
extern void disk_insert (int num, const TCHAR *name);
extern void disk_insert (int num, const TCHAR *name, bool forcedwriteprotect);
extern void disk_insert_force (int num, const TCHAR *name, bool forcedwriteprotect);
extern void DISK_vsync (void);
extern int DISK_validate_filename (struct uae_prefs *p, const TCHAR *fname, int num, TCHAR *outfname, int leave_open, bool *wrprot, uae_u32 *crc32, struct zfile **zf);
extern void DISK_handler (uae_u32);
extern void DISK_update(int hpos);
extern void DISK_update_predict(void);
extern void DISK_update_adkcon (int hpos, uae_u16 v);
extern void DISK_hsync (void);
extern void DISK_reset (void);
extern int disk_getwriteprotect (struct uae_prefs *p, const TCHAR *name, int num);
extern int disk_setwriteprotect (struct uae_prefs *p, int num, const TCHAR *name, bool writeprotected);
extern bool disk_creatediskfile (struct uae_prefs *p, const TCHAR *name, int type, drive_type adftype, int hd, const TCHAR *disk_name, bool ffs, bool bootable, struct zfile *copyfrom);
extern void dumpdisk (const TCHAR*);
extern int DISK_history_add (const TCHAR *name, int idx, int type, int donotcheck);
extern TCHAR *DISK_history_get (int idx, int type);
int DISK_examine_image (struct uae_prefs *p, int num, struct diskinfo *di, bool deepcheck, TCHAR *info);
extern TCHAR *DISK_get_saveimagepath(const TCHAR *name, int type);
extern void DISK_reinsert (int num);
extern int disk_prevnext (int drive, int dir);
extern int disk_prevnext_name (TCHAR *img, int dir);
extern void DISK_get_path_text(struct uae_prefs *p, int n, TCHAR *text);
extern bool gui_ask_disk(int drv, TCHAR*);
extern void DSKLEN (uae_u16 v, int hpos);
extern uae_u16 DSKBYTR (int hpos);
extern void DSKSYNC (int, uae_u16);
extern void DSKPTL (uae_u16);
extern void DSKPTH (uae_u16);
extern void DSKDAT (uae_u16);
extern uae_u16 DSKDATR (int);
extern uae_u16 disk_dmal (void);
extern uaecptr *disk_getpt (void);
extern int disk_fifostatus (void);
extern uae_u16 DSKBYTR_fake(int);
extern int disk_debug_logging;
extern int disk_debug_mode;
extern int disk_debug_track;
#define DISK_DEBUG_DMA_READ 1
#define DISK_DEBUG_DMA_WRITE 2
#define DISK_DEBUG_PIO 4
#define MAX_PREVIOUS_IMAGES 50
#ifdef FLOPPYBRIDGE
bool floppybridge_has(void);
bool DISK_isfloppybridge(struct uae_prefs*, int);
void floppybridge_init(struct uae_prefs *p);
void floppybridge_modified(int);
void floppybridge_reload_profiles(void);
void floppybridge_set_config(const char*);
extern bool floppybridge_available;
#endif
#endif /* UAE_DISK_H */