SOSFNCT.H 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /****************************************************************************
  15. File : sosfnct.h
  16. Programmer(s) : Don Fowler, Nick Skrepetos
  17. Date :
  18. Purpose : Include Files For Zortech C++ Compiler
  19. Last Updated :
  20. ****************************************************************************
  21. Copyright(c) 1993,1994 Human Machine Interfaces
  22. All Rights Reserved
  23. ****************************************************************************/
  24. #ifndef _SOS_FUNCTIONS
  25. #define _SOS_FUNCTIONS
  26. #pragma pack(4)
  27. WORD sosDIGILockMemory ( VOID );
  28. WORD sosDIGIUnLockMemory ( VOID );
  29. WORD sosDIGIInitSystem ( LPSTR, WORD );
  30. WORD sosDIGIUnInitSystem ( VOID );
  31. WORD sosDIGIInitDriver ( WORD, _SOS_HARDWARE far *,
  32. _SOS_INIT_DRIVER far *, WORD far * );
  33. WORD sosDIGIUnInitDriver ( WORD, BOOL, BOOL );
  34. WORD sosDIGILoadDriver ( WORD, WORD, LPSTR far *, LPSTR far *, PSTR, PSTR, WORD * );
  35. WORD sosDIGIUnLoadDriver ( WORD );
  36. WORD sosDIGIGetDeviceCaps ( WORD, LPSOSDEVICECAPS );
  37. #ifdef PHARLAP
  38. LPSTR sosDIGIAllocateBuffer ( WORD , WORD *, WORD * );
  39. #else
  40. LPSTR sosDIGIAllocateBuffer ( WORD , WORD *, WORD * );
  41. #endif
  42. WORD sosDIGIStopSample ( WORD, WORD );
  43. WORD sosDIGISamplesPlaying ( WORD );
  44. BOOL sosDIGISampleDone ( WORD, WORD );
  45. BOOL sosDIGISampleFilling ( WORD, WORD );
  46. WORD sosDIGIStartSample ( WORD, _SOS_START_SAMPLE far * );
  47. WORD sosDIGIContinueSample ( WORD, WORD, _SOS_START_SAMPLE far * );
  48. WORD sosDIGIDetectInit ( LPSTR );
  49. WORD sosDIGIDetectUnInit ( VOID );
  50. WORD sosDIGIDetectFindHardware ( WORD, _SOS_CAPABILITIES far *, WORD far * );
  51. WORD sosDIGIDetectFindFirst ( _SOS_CAPABILITIES far *, WORD far * );
  52. WORD sosDIGIDetectFindNext ( _SOS_CAPABILITIES far *, WORD far * );
  53. WORD sosDIGIDetectGetSettings ( _SOS_HARDWARE far * );
  54. WORD sosDIGIDetectGetCaps ( WORD, _SOS_CAPABILITIES far * );
  55. WORD sosDIGIDetectVerifySettings( _SOS_HARDWARE far * );
  56. PSTR sosGetErrorString ( WORD );
  57. WORD sosDIGILoadTimer ( WORD , LPSTR far *, LPSTR far *, PSTR, PSTR, WORD * );
  58. WORD sosDIGIUnLoadTimer ( WORD );
  59. WORD sosTIMERRegisterEvent ( WORD wCallRate, VOID ( far * lpTimerEvent )( VOID ), WORD far *lpTimerHandle );
  60. WORD sosTIMERInitSystem ( WORD, WORD );
  61. WORD sosTIMERUnInitSystem ( WORD );
  62. WORD sosTIMERSetRate ( WORD );
  63. WORD sosTIMERRemoveEvent ( WORD );
  64. WORD sosTIMERAlterEventRate ( WORD, WORD );
  65. WORD sosTIMERGetEventRate ( WORD );
  66. VOID far sosTIMEROldHandler ( VOID );
  67. VOID far sosTIMERHandler ( VOID );
  68. // functions in soscntl.c
  69. WORD sosDIGISetSampleVolume ( WORD, WORD, WORD );
  70. WORD sosDIGIGetSampleVolume ( WORD, WORD );
  71. WORD sosDIGISetChannel ( WORD, WORD, WORD );
  72. WORD sosDIGIGetChannel ( WORD, WORD );
  73. WORD sosDIGIGetBytesProcessed ( WORD, WORD );
  74. WORD sosDIGIGetLoopCount ( WORD, WORD );
  75. WORD sosDIGISetPanLocation ( WORD, WORD, WORD );
  76. WORD sosDIGIGetPanLocation ( WORD, WORD );
  77. DWORD sosDIGISetPitch ( WORD, WORD, DWORD );
  78. DWORD sosDIGIGetPitch ( WORD, WORD );
  79. WORD sosDIGIGetDMAPosition ( WORD );
  80. WORD sosDIGISetPanSpeed ( WORD, WORD, WORD );
  81. WORD sosDIGIGetPanSpeed ( WORD, WORD );
  82. WORD sosDIGIGetSampleID ( WORD, WORD );
  83. WORD sosDIGIGetSampleHandle ( WORD, WORD );
  84. WORD sosDIGISetMasterVolume ( WORD, WORD );
  85. #ifdef PHARLAP
  86. VOID sosFreeVDSPage ( unsigned short, unsigned short, DWORD );
  87. WORD sosAllocVDSPage ( unsigned short *, unsigned short *, DWORD * );
  88. #else
  89. WORD sosAllocVDSPage ( LPSTR *, WORD *, WORD * );
  90. VOID sosFreeVDSPage ( WORD, WORD, LONG );
  91. #endif
  92. #ifdef __cplusplus
  93. extern "C" {
  94. #endif
  95. #ifdef PHARLAP
  96. extern int __cdecl sosRealFree ( int );
  97. extern BOOL __cdecl _sos_read( WORD, LPSTR, WORD, WORD * );
  98. extern int __cdecl sosRealAlloc( int, int *, int * );
  99. extern void __cdecl sosDRVFarMemCopy( LPSTR, LPSTR, WORD );
  100. extern int __cdecl sosGetCS( VOID );
  101. extern int __cdecl sosGetES( VOID );
  102. #else
  103. extern int __cdecl sosRealAlloc ( int, int *, int * );
  104. extern int __cdecl sosRealFree ( int );
  105. #endif
  106. // sos driver functions
  107. extern WORD __cdecl sosDRVLockMemory ( DWORD, DWORD );
  108. extern WORD __cdecl sosDRVUnLockMemory ( DWORD, DWORD );
  109. extern void __cdecl sosDRVGetCapsInfo ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
  110. extern void __cdecl sosDetDRVGetCapsInfo ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
  111. extern void __cdecl sosDRVGetCapsPtr ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
  112. extern void __cdecl sosDRVInit ( LPSTR, LPSTR, int, int, int, int, int, int );
  113. extern void __cdecl sosDRVStart ( LPSTR, LPSTR, int, int );
  114. extern void __cdecl sosDRVSetRate ( LPSTR, LPSTR, int );
  115. extern void __cdecl sosDRVSetAction ( LPSTR, LPSTR );
  116. extern void __cdecl sosDRVStop ( LPSTR, LPSTR );
  117. extern void __cdecl sosDRVUnInit ( LPSTR, LPSTR );
  118. extern void __cdecl sosDRVGetFillInfo ( LPSTR, LPSTR, LPSTR, int, int, int, _SOS_FILL_INFO * );
  119. extern void __cdecl sosFillSampleStructs ( PSTR, LPSTR );
  120. extern WORD __cdecl sosDetDRVExist ( LPSTR, LPSTR );
  121. extern WORD __cdecl sosDetDRVGetSettings ( LPSTR, LPSTR );
  122. extern WORD __cdecl sosDetDRVVerifySettings( LPSTR, WORD, WORD, WORD, LPSTR );
  123. extern WORD __cdecl sosDIGIInitForWindows( WORD );
  124. extern WORD __cdecl sosDIGIUnInitForWindows( WORD );
  125. extern LPSTR __cdecl sosAllocateFarMem ( WORD, PSTR, WORD * );
  126. extern LPSTR __cdecl sosCreateAliasCS ( LPSTR );
  127. extern VOID __cdecl sosFreeSelector ( LPSTR, DWORD );
  128. extern LPSTR __cdecl sosMAKEDOSPtr ( PSTR );
  129. extern VOID __cdecl sosDetDRVSetEnvString ( DWORD, PSTR );
  130. extern PSTR __cdecl sosDetDRVGetEnvString ( DWORD );
  131. extern VOID __cdecl sosDetDRVEnvStringInit ( LPSTR, LPSTR );
  132. extern VOID __cdecl sosDRVSetupCallFunctions( LPSTR, LPSTR, LPSTR, LPSTR );
  133. extern WORD __cdecl sosDRVGetFreeMemory ( VOID );
  134. extern WORD __cdecl sosDRVAllocVDSStruct ( WORD, WORD *, WORD * );
  135. extern WORD __cdecl sosDRVFreeVDSStruct ( WORD, WORD );
  136. extern WORD __cdecl sosDRVIsWindowsActive ( VOID );
  137. extern WORD __cdecl sosDRVVDSGetBuffer ( WORD );
  138. extern WORD __cdecl sosDRVVDSFreeBuffer ( WORD );
  139. extern WORD __cdecl getDS( VOID );
  140. extern WORD __cdecl sosDRVMakeDMASelector ( WORD );
  141. extern WORD __cdecl sosDRVFreeDMASelector ( WORD );
  142. extern void __cdecl sosTIMERDRVInit( int wRate, void ( far * )( void ) );
  143. extern void __cdecl sosTIMERDRVUnInit( void );
  144. extern void __cdecl sosTIMERDRVHandler( void );
  145. extern void __cdecl sosTIMERDRVFHandler( void );
  146. extern void __cdecl sosTIMERDRVEnable( void );
  147. extern void __cdecl sosTIMERDRVDisable( void );
  148. extern void __cdecl sosTIMERDRVCallOld( void );
  149. extern void __cdecl sosTIMERDRVSetRate( WORD );
  150. extern void __cdecl sosDIGITimer_Start( void );
  151. extern void __cdecl sosDIGITimer_End( void );
  152. extern void __cdecl sosDIGIDrv_Start( void );
  153. extern void __cdecl sosDIGIDrv_End( void );
  154. #ifdef __cplusplus
  155. }
  156. #endif
  157. // external functions for handling system initialization and
  158. // uninitialization
  159. WORD sosEXDIGInitDriver ( WORD, WORD, WORD, LPSTR,
  160. _SOS_HARDWARE far *, WORD * );
  161. WORD sosEXDIGIUnInitDriver ( VOID );
  162. WORD sosEXDETFindDriver ( WORD, LPSTR, _SOS_HARDWARE far *,
  163. _SOS_CAPABILITIES far * );
  164. // memory locking prototypes
  165. VOID sosDIGICaps_Start( VOID );
  166. VOID sosDIGICaps_End( VOID );
  167. VOID sosDIGIErr_Start( VOID );
  168. VOID sosDIGIErr_End( VOID );
  169. VOID sosDIGITmr_Start( VOID );
  170. VOID sosDIGITmr_End( VOID );
  171. VOID sosDIGIStart_Start( VOID );
  172. VOID sosDIGIStart_End( VOID );
  173. VOID sosDIGIPlyng_Start( VOID );
  174. VOID sosDIGIPlyng_End( VOID );
  175. VOID sosDIGIRate_Start( VOID );
  176. VOID sosDIGIRate_End( VOID );
  177. VOID sosDIGIDone_Start( VOID );
  178. VOID sosDIGIDone_End( VOID );
  179. VOID sosDIGIDetec_Start( VOID );
  180. VOID sosDIGIDetec_End( VOID );
  181. VOID sosDIGIInit_Start( VOID );
  182. VOID sosDIGIInit_End( VOID );
  183. VOID sosDIGILoad_Start( VOID );
  184. VOID sosDIGILoad_End( VOID );
  185. VOID sosDIGICntl_Start( VOID );
  186. VOID sosDIGICntl_End( VOID );
  187. #pragma pack()
  188. #endif