2 GEOS functions from disk driver
4 by Maciej 'YTM/Elysium' Witkowiak
10 #include <geos/gstruct.h>
12 char __fastcall__ ReadBuff(struct tr_se *myTrSe);
13 char __fastcall__ WriteBuff(struct tr_se *myTrSe);
15 char __fastcall__ GetBlock(struct tr_se *myTrSe, char *buffer);
16 char __fastcall__ PutBlock(struct tr_se *myTrSe, const char *buffer);
17 char __fastcall__ ReadBlock(struct tr_se *myTrSe, char *buffer);
18 char __fastcall__ WriteBlock(struct tr_se *myTrSe, const char *buffer);
19 char __fastcall__ VerWriteBlock(struct tr_se *myTrSe, const char *buffer);
21 unsigned CalcBlksFree(void);
23 char SetGEOSDisk(void);
27 char __fastcall__ FindBAMBit(struct tr_se *myTrSe);
28 char __fastcall__ BlkAlloc(struct tr_se output[], unsigned length);
29 char __fastcall__ NxtBlkAlloc(struct tr_se *startTrSe,
30 struct tr_se output[], unsigned length);
31 char __fastcall__ FreeBlock(struct tr_se *myTrSe);
32 struct tr_se __fastcall__ SetNextFree(struct tr_se *myTrSe);
33 // above needs (unsigned) casts on both sides of '='
35 char GetDirHead(void);
36 char PutDirHead(void);
37 void __fastcall__ GetPtrCurDkNm(char *name);
39 void EnterTurbo(void);
41 void PurgeTurbo(void);
43 char __fastcall__ ChangeDiskDevice(char newdev);
45 /* disk header offsets i.e. index curDirHead with these */
47 #define OFF_DISK_NAME 144
48 #define OFF_GS_DTYPE 189
49 #define OFF_OP_TR_SC 171
51 /* disk errors reported in _oserror */
52 #define ANY_FAULT 0xf0
56 #define INSUFF_SPACE 3
57 #define FULL_DIRECTORY 4
58 #define FILE_NOT_FOUND 5
60 #define UNOPENED_VLIR 7
62 #define OUT_OF_RECORDS 9
63 #define STRUCT_MISMAT 10
64 #define BFR_OVERFLOW 11
66 #define DEV_NOT_FOUND 13
67 #define INCOMPATIBLE 14
68 #define HDR_NOT_THERE 0x20
70 #define DBLK_NOT_THERE 0x22
71 #define DAT_CHKSUM_ERR 0x23
72 #define WR_VER_ERR 0x25
74 #define HDR_CHKSUM_ERR 0x27
75 #define DSK_ID_MISMAT 0x29
76 #define BYTE_DEC_ERR 0x2e
77 #define DOS_MISMATCH 0x73