-
Notifications
You must be signed in to change notification settings - Fork 8
/
hxcfeda.h
89 lines (83 loc) · 2.56 KB
/
hxcfeda.h
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
/*
//
// Copyright (C) 2009-2023 Jean-François DEL NERO
//
// This file is part of the HxCFloppyEmulator file selector.
//
// HxCFloppyEmulator file selector may be used and distributed without restriction
// provided that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator file selector is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// HxCFloppyEmulator file selector is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with HxCFloppyEmulator file selector; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
#ifdef WIN32
#pragma pack(1)
#endif
typedef struct direct_access_status_sector_
{
char DAHEADERSIGNATURE[8];
char FIRMWAREVERSION[12];
unsigned long lba_base;
unsigned char cmd_cnt;
unsigned char read_cnt;
unsigned char write_cnt;
unsigned char last_cmd_status;
unsigned char write_locked;
unsigned char keys_status;
unsigned char sd_status;
unsigned char SD_WP;
unsigned char SD_CD;
unsigned char number_of_sector;
unsigned short current_index;
#ifndef WIN32
}__attribute__((__packed__)) direct_access_status_sector;
#else
}direct_access_status_sector;
#endif
typedef struct direct_access_cmd_sector_
{
char DAHEADERSIGNATURE[8];
unsigned char cmd_code;
unsigned char parameter_0;
unsigned char parameter_1;
unsigned char parameter_2;
unsigned char parameter_3;
unsigned char parameter_4;
unsigned char parameter_5;
unsigned char parameter_6;
unsigned char parameter_7;
unsigned char cmd_checksum;
#ifndef WIN32
}__attribute__((__packed__)) direct_access_cmd_sector;
#else
}direct_access_cmd_sector;
#endif
#define LFN_MAX_SIZE 128
typedef struct DirectoryEntry_ {
unsigned char name[12];
unsigned char attributes;
unsigned long firstCluster;
unsigned long size;
unsigned char longName[LFN_MAX_SIZE]; // boolean
#ifndef WIN32
}__attribute__((__packed__)) DirectoryEntry;
#else
}DirectoryEntry;
#endif
#ifdef WIN32
#pragma pack()
#endif