-
Notifications
You must be signed in to change notification settings - Fork 1
/
EnsoniqFS.h
143 lines (128 loc) · 5.48 KB
/
EnsoniqFS.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//----------------------------------------------------------------------------
// EnsoniqFS plugin for TotalCommander
//
// MAIN MODULE header file
//----------------------------------------------------------------------------
//
// (c) 2006 Thoralt Franz
//
// This source code was written using Dev-Cpp 4.9.9.2
// If you want to compile it, get Dev-Cpp. Normally the code should compile
// with other IDEs/compilers too (with small modifications), but I did not
// test it.
//
//----------------------------------------------------------------------------
// License
//----------------------------------------------------------------------------
// This program 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.
//
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
// MA 02110-1301, USA.
//
// Alternatively, download a copy of the license here:
// http://www.gnu.org/licenses/gpl.txt
//----------------------------------------------------------------------------
#ifndef _ENSONIQFS_H_
#define _ENSONIQFS_H_
#define DLLEXPORT __declspec (dllexport)
#define FILE_TYPE_EMPTY 0x00
#define FILE_TYPE_DIRECTORY 0x02
#define FILE_TYPE_EPS_BANK 0x04
#define FILE_TYPE_PARENT_DIRECTORY 0x08
#define FILE_TYPE_EPS16_BANK 0x17
#define FILE_TYPE_ASR_SONG 0x1D
#define FILE_TYPE_ASR_BANK 0x1E
#define FILE_TYPE_ASR_AUDIOTRACK 0x1F
//----------------------------------------------------------------------------
// structs for Ensoniq directory
//----------------------------------------------------------------------------
typedef struct _ENSONIQDIRENTRY
{
char cName[13], cLegalName[13];
unsigned char ucType, ucMultiFileIndex;
DWORD dwContiguous, dwStart, dwLen;
} ENSONIQDIRENTRY;
typedef struct _VIRTUALWAVEFILE
{
char cName[13], cLegalName[13];
DWORD dwContiguous1, dwStart1, dwLen1;
DWORD dwContiguous2, dwStart2, dwLen2;
unsigned char ucIsStereo;
} VIRTUALWAVEFILE;
typedef struct _ENSONIQDIR
{
ENSONIQDIRENTRY Entry[39];
unsigned char ucDirectory[1024];
DWORD dwDirectoryBlock;
VIRTUALWAVEFILE VirtualWaveEntry[58]; // max. 39 waves + 19 stereo pairs
} ENSONIQDIR;
//----------------------------------------------------------------------------
// handle struct for find operations
//----------------------------------------------------------------------------
typedef struct _FIND_HANDLE
{
struct _FIND_HANDLE *pNext, *pPrevious;
char cPath[260];
int iNextDirIndex;
ENSONIQDIR EnsoniqDir;
DISK *pDisk;
} FIND_HANDLE;
//----------------------------------------------------------------------------
// file type constants
//----------------------------------------------------------------------------
#define FILETYPE_UNKNOWN 0
#define FILETYPE_GKH 1
#define FILETYPE_PLAIN 2
#define FILETYPE_MODE1CD 3
#define FILETYPE_GIEBLER 4
//----------------------------------------------------------------------------
// copy mode constants
//----------------------------------------------------------------------------
#define COPY_DOS 0
#define COPY_ENSONIQ 1
//----------------------------------------------------------------------------
// prototypes
//----------------------------------------------------------------------------
void AddToImageList(char *cName);
// prototypes for usage in bank.c
void upcase(char *c);
int ReadDirectoryFromPath(FIND_HANDLE *pHandle, unsigned char ucShowWarning);
DISK *GetDiskFromPath(char *cPath);
int ReadDirectory(DISK *pDisk, ENSONIQDIR *pDir, unsigned char ucShowWarning);
//----------------------------------------------------------------------------
// DLL exports
//----------------------------------------------------------------------------
DLLEXPORT void __stdcall FsSetDefaultParams(FsDefaultParamStruct* dps);
DLLEXPORT int __stdcall FsInit(int PluginNr, tProgressProc pProgressProc,
tLogProc pLogProc, tRequestProc pRequestProc);
DLLEXPORT HANDLE __stdcall FsFindFirst(char* cPath, WIN32_FIND_DATA *FindData);
DLLEXPORT BOOL __stdcall FsFindNext(HANDLE Handle, WIN32_FIND_DATA *FindData);
DLLEXPORT int __stdcall FsFindClose(HANDLE Handle);
DLLEXPORT void __stdcall FsGetDefRootName(char* cDefRootName, int iMaxLen);
DLLEXPORT int __stdcall FsGetFile(char* RemoteName, char* LocalName,
int CopyFlags, RemoteInfoStruct* ri);
DLLEXPORT BOOL __stdcall FsMkDir(char* Path);
DLLEXPORT BOOL __stdcall FsRemoveDir(char* RemoteName);
DLLEXPORT BOOL __stdcall FsDeleteFile(char* RemoteName);
DLLEXPORT int __stdcall FsPutFile(char* LocalName, char* RemoteName,
int CopyFlags);
DLLEXPORT void __stdcall FsStatusInfo(char* RemoteDir, int InfoStartEnd,
int InfoOperation);
DLLEXPORT int __stdcall FsRenMovFile(char* OldName, char* NewName, BOOL Move,
BOOL OverWrite, RemoteInfoStruct* ri);
DLLEXPORT int __stdcall FsExecuteFile(HWND MainWin, char* RemoteName,
char* Verb);
DLLEXPORT int __stdcall FsExtractCustomIcon(char* RemoteName,
int ExtractFlags,
HICON* TheIcon);
#endif