76f3807e8d0661ee53a70da3ab44f7de619b537f
3 * Copyright (C) 1999, 2000, 2001 Brian Palmer <brianp@sginet.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 typedef struct _GEOMETRY
31 } GEOMETRY
, *PGEOMETRY
;
33 ///////////////////////////////////////////////////////////////////////////////////////
35 // BIOS Disk Functions
37 ///////////////////////////////////////////////////////////////////////////////////////
38 int biosdisk(int cmd
, int drive
, int head
, int track
, int sector
, int nsects
, void *buffer
); // Implemented in asmcode.S
40 BOOL
BiosInt13Read(ULONG Drive
, ULONG Head
, ULONG Track
, ULONG Sector
, ULONG SectorCount
, PVOID Buffer
); // Implemented in asmcode.S
41 BOOL
BiosInt13ReadExtended(ULONG Drive
, ULONG Sector
, ULONG SectorCount
, PVOID Buffer
); // Implemented in asmcode.S
42 BOOL
BiosInt13ExtensionsSupported(ULONG Drive
);
44 void stop_floppy(void); // Implemented in asmcode.S
45 int get_heads(int drive
); // Implemented in asmcode.S
46 int get_cylinders(int drive
); // Implemented in asmcode.S
47 int get_sectors(int drive
); // Implemented in asmcode.S
49 ///////////////////////////////////////////////////////////////////////////////////////
51 // FreeLoader Disk Functions
53 ///////////////////////////////////////////////////////////////////////////////////////
54 VOID
DiskError(PUCHAR ErrorString
);
55 BOOL
DiskGetDriveGeometry(ULONG DriveNumber
, PGEOMETRY DriveGeometry
);
56 BOOL
DiskSetDriveGeometry(ULONG DriveNumber
, ULONG Cylinders
, ULONG Heads
, ULONG Sectors
, ULONG BytesPerSector
);
57 BOOL
DiskReadMultipleLogicalSectors(ULONG DriveNumber
, ULONG SectorNumber
, ULONG SectorCount
, PVOID Buffer
);
58 BOOL
DiskReadLogicalSector(ULONG DriveNumber
, ULONG SectorNumber
, PVOID Buffer
);
60 #endif // defined __DISK_H