-
Notifications
You must be signed in to change notification settings - Fork 1
/
hxcfeda.h
63 lines (58 loc) · 2.13 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
/*
//
// Copyright (C) 2009-2016 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
//
*/
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;
}__attribute__((__packed__)) direct_access_status_sector ;
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;
}__attribute__((__packed__)) direct_access_cmd_sector ;
#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
}__attribute__((__packed__)) DirectoryEntry;