File: driveio.h

package info (click to toggle)
dosemu-freedos 1%3A0.0.b9r5a%2Betch.1-0etch1
  • links: PTS
  • area: contrib
  • in suites: etch
  • size: 19,744 kB
  • ctags: 23,279
  • sloc: ansic: 143,864; asm: 20,397; makefile: 3,868; perl: 1,106; yacc: 690; sh: 553; pascal: 297; xml: 150; cpp: 67
file content (52 lines) | stat: -rw-r--r-- 1,771 bytes parent folder | download | duplicates (2)
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
/*
// Program:  Format
// Version:  0.90c
// (0.90b/c - DMA boundary avoidance by Eric Auer - May 2003)
// Written By:  Brian E. Reifsnyder
// Copyright:  2002 under the terms of the GNU GPL, Version 2
*/

#ifndef DRIVEIO_H
#define DRIVEIO_H

#ifdef DIO
  #define DIOEXTERN   /* */
#else
  #define DIOEXTERN   extern
#endif


typedef unsigned long ULONG;
typedef unsigned long  __uint32;
typedef unsigned short __uint16;

/* Buffers */
DIOEXTERN unsigned char sector_buffer_0[512];
DIOEXTERN unsigned char sector_buffer_1[512];
DIOEXTERN unsigned char huge_sector_buffer_0[(512*21)]; /* old: 512*32 */
DIOEXTERN unsigned char huge_sector_buffer_1[(512*21)]; /* old: 512*32 */
/* only uformat.c uses huge_sector_buffer at all (for fill with 0xf6), */
/* so huge_sector_buffer does NOT have to be one track big!            */

#ifdef DIO
DIOEXTERN unsigned char far * sector_buffer = &sector_buffer_0[0];
DIOEXTERN unsigned char far * huge_sector_buffer = &huge_sector_buffer_0[0];
#else
DIOEXTERN unsigned char far * sector_buffer;
DIOEXTERN unsigned char far * huge_sector_buffer;
#endif

/* The following lines were taken from partsize.c, written by Tom Ehlert. */

DIOEXTERN void Clear_Huge_Sector_Buffer(void);
DIOEXTERN void Clear_Sector_Buffer(void);

DIOEXTERN void Lock_Unlock_Drive(int lock); /* written by Eric Auer for 0.91l */

DIOEXTERN int Drive_IO(int command,unsigned long sector_number,int number_of_sectors);
DIOEXTERN void Enable_Disk_Access(void);

DIOEXTERN unsigned int FAT32_AbsReadWrite(char DosDrive, int count, ULONG sector, void far *buffer, unsigned ReadOrWrite);
DIOEXTERN unsigned int TE_AbsReadWrite(char DosDrive, int count, ULONG sector, void far *buffer, unsigned ReadOrWrite);

#endif