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