From f90a6ca9a45f2b6819f39d1d528560062b645cc7 Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Mon, 19 Jan 2004 19:47:23 +0000 Subject: [PATCH] merged sop skrutt's code --- Cxbx.opt | Bin 67072 -> 67072 bytes Include/Win32/CxbxKrnl/EmuD3D8Conv.h | 3 + Include/Win32/CxbxKrnl/EmuDSound.h | 121 ++ Include/Win32/CxbxKrnl/EmuXapi.h | 48 +- Include/Win32/CxbxKrnl/HLEDataBase.h | 29 +- Source/Win32/CxbxKrnl/Emu.cpp | 5 +- Source/Win32/CxbxKrnl/EmuDSound.cpp | 347 +++++ Source/Win32/CxbxKrnl/EmuXapi.cpp | 98 +- Source/Win32/CxbxKrnl/HLEDataBase.cpp | 25 + .../CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl | 1351 ++++++++++++++++- .../CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl | 163 ++ 11 files changed, 2185 insertions(+), 5 deletions(-) diff --git a/Cxbx.opt b/Cxbx.opt index 25eec171274602e11c1f8f3f6c1d38269f9d4f99..a30eaae3d2b61d2be39a9eebe133b9c277141c6a 100644 GIT binary patch delta 1026 zcmZqZVQJ`L*^tA+#&Go8zr*)77qRpS3jAkeWMUFvV5neZW)LunW7<5C?E~{9Db{*6 z237_JhI~c_hC@J{%*?>>j){Rm2q*>vIzVv{U;|>9x(h52bzli70aFK*f~$j>hpg@d zkTVU4fmSi(*P~gCO(DpBn8mmZ1nC31n<#Z4wNO7XY@WgPmk&qi=yBJhTT8cafdorE zJVHQjh5=Xr(lT5ic5R-=_8mv)Y;tSk%z z8#we&ig-?m_C+}YIAX1VOBm!RU4`(>JYyq;pwyhy#NyP+vJK+c#5cP)?BvI8l0ZFU sBW9jiG((6a<(qK0bI~ze61Q+jY#DD2keB9=Zufr%`POiTbmrW`4Gh{5TZqakCImvdQT=6F;kstACIkM^I{UerZv1>g4Gzs+%=jZ}3evVBy7K za>R2obS=sez+qeimvDqrgo3U@xTl}7kwTEGkE>&_>txvmactt7-5Yk|@Unm)OCvDE w7*IoO(F`H%7UNL935Pou9m6GY3x~v}cWf-ITiJmQnyi0Ie6!N6dpH~p0PP%p#sB~S diff --git a/Include/Win32/CxbxKrnl/EmuD3D8Conv.h b/Include/Win32/CxbxKrnl/EmuD3D8Conv.h index 2ff80eae6..b1370db2c 100644 --- a/Include/Win32/CxbxKrnl/EmuD3D8Conv.h +++ b/Include/Win32/CxbxKrnl/EmuD3D8Conv.h @@ -121,6 +121,9 @@ inline D3DFORMAT EmuXB2PC_D3DFormat(X_D3DFORMAT Format) case 0x30: // Linear (X_D3DFMT_LIN_D16) case 0x2C: // Swizzled (X_D3DFMT_D16) return D3DFMT_D16; + + case 0x28: // Swizzled (X_D3DFMT_V8U8) + return D3DFMT_V8U8; } EmuCleanup("EmuXB2PC_D3DFormat: Unknown Format (0x%.08X)", Format); diff --git a/Include/Win32/CxbxKrnl/EmuDSound.h b/Include/Win32/CxbxKrnl/EmuDSound.h index 5c1535e71..eb3ea20d3 100644 --- a/Include/Win32/CxbxKrnl/EmuDSound.h +++ b/Include/Win32/CxbxKrnl/EmuDSound.h @@ -703,4 +703,125 @@ HRESULT WINAPI EmuIDirectSoundStream_Unknown1 DWORD dwUnknown1 ); +// s+ +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetMaxDistance +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetMaxDistance +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flMaxDistance, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetMinDistance +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetMinDistance +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flMaxDistance, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetRolloffFactor +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetRolloffFactor +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flRolloffFactor, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetDistanceFactor +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetDistanceFactor +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flDistanceFactor, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetConeAngles +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetConeAngles +( + LPDIRECTSOUNDBUFFER8 pThis, + DWORD dwInsideConeAngle, + DWORD dwOutsideConeAngle, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetConeOrientation +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetConeOrientation +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT x, + FLOAT y, + FLOAT z, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetConeOutsideVolume +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetConeOutsideVolume +( + LPDIRECTSOUNDBUFFER8 pThis, + LONG lConeOutsideVolume, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetPosition +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetPosition +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT x, + FLOAT y, + FLOAT z, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetVelocity +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetVelocity +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT x, + FLOAT y, + FLOAT z, + DWORD dwApply +); + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetDopplerFactor +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetDopplerFactor +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flDopplerFactor, + DWORD dwApply +); + +typedef void* LPCDSI3DL2BUFFER; + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetI3DL2Source +// ****************************************************************** +HRESULT WINAPI EmuIDirectSoundBuffer8_SetI3DL2Source +( + LPDIRECTSOUNDBUFFER8 pThis, + LPCDSI3DL2BUFFER pds3db, + DWORD dwApply +); +// +s + #endif diff --git a/Include/Win32/CxbxKrnl/EmuXapi.h b/Include/Win32/CxbxKrnl/EmuXapi.h index 68b89ba1d..1b40ad116 100644 --- a/Include/Win32/CxbxKrnl/EmuXapi.h +++ b/Include/Win32/CxbxKrnl/EmuXapi.h @@ -267,6 +267,19 @@ typedef struct _XTHREAD_NOTIFICATION } XTHREAD_NOTIFICATION, *PXTHREAD_NOTIFICATION; +// ****************************************************************** +// * XCALCSIG_SIGNATURE +// ****************************************************************** +#define XCALCSIG_SIGNATURE_SIZE 20 + +typedef struct _XCALCSIG_SIGNATURE +{ + BYTE Signature[XCALCSIG_SIGNATURE_SIZE]; +} +XCALCSIG_SIGNATURE, *PXCALCSIG_SIGNATURE; + +#define XCALCSIG_FLAG_NON_ROAMABLE (0x00000001) + // ****************************************************************** // * func: EmuRtlCreateHeap // ****************************************************************** @@ -501,9 +514,42 @@ VOID WINAPI EmuXRegisterThreadNotifyRoutine BOOL fRegister ); +// s+ // ****************************************************************** // * func: EmuXCalculateSignatureBegin // ****************************************************************** -HANDLE WINAPI EmuXCalculateSignatureBegin(DWORD dwFlags); +HANDLE WINAPI EmuXCalculateSignatureBegin +( + DWORD dwFlags +); + +// ****************************************************************** +// * func: EmuXCalculateSignatureBegin +// ****************************************************************** +HANDLE WINAPI EmuXCalculateSignatureBeginEx +( + DWORD dwFlags, + DWORD dwAltTitleId +); + +// ****************************************************************** +// * func: EmuXCalculateSignatureUpdate +// ****************************************************************** +DWORD WINAPI EmuXCalculateSignatureUpdate +( + HANDLE hCalcSig, + const BYTE *pbData, + ULONG cbData +); + +// ****************************************************************** +// * func: EmuXCalculateSignatureEnd +// ****************************************************************** +DWORD WINAPI EmuXCalculateSignatureEnd +( + HANDLE hCalcSig, + PXCALCSIG_SIGNATURE pSignature +); +// +s #endif diff --git a/Include/Win32/CxbxKrnl/HLEDataBase.h b/Include/Win32/CxbxKrnl/HLEDataBase.h index 9d6f91dbb..465f0fc5e 100644 --- a/Include/Win32/CxbxKrnl/HLEDataBase.h +++ b/Include/Win32/CxbxKrnl/HLEDataBase.h @@ -179,7 +179,34 @@ enum XRefDataBaseOffset XREF_GET2DSURFACEDESCB, XREF_COMMONSETRENDERTARGET, XREF_COMMITDEFERREDSETTINGSA, - XREF_COMMITDEFERREDSETTINGSB + XREF_COMMITDEFERREDSETTINGSB, + // s+ + // DSOUND + XREF_DSVOICESETMAXDISTANCE, + XREF_DSVOICESETMINDISTANCE, + XREF_DSVOICESETROLLOFFFACTOR, + XREF_DSVOICESETDISTANCEFACTOR, + XREF_DSVOICESETCONEANGLES, + XREF_DSVOICESETCONEORIENTATION, + XREF_DSVOICESETCONEOUTSIDEVOLUME, + XREF_DSVOICESETPOSITION, + XREF_DSVOICESETVELOCITY, + XREF_DSVOICESETDOPPLERFACTOR, + XREF_DSVOICESETI3DL2SOURCE, + XREF_DSBUFFERSETMAXDISTANCE, + XREF_DSBUFFERSETMINDISTANCE, + XREF_DSBUFFERSETROLLOFFFACTOR, + XREF_DSBUFFERSETDISTANCEFACTOR, + XREF_DSBUFFERSETCONEANGLES, + XREF_DSBUFFERSETCONEORIENTATION, + XREF_DSBUFFERSETCONEOUTSIDEVOLUME, + XREF_DSBUFFERSETPOSITION, + XREF_DSBUFFERSETVELOCITY, + XREF_DSBUFFERSETDOPPLERFACTOR, + XREF_DSBUFFERSETI3DL2SOURCE, + // XAPI + XREF_XAPIXCALCULATESIGNATUREBEGINEX + // +s }; #endif diff --git a/Source/Win32/CxbxKrnl/Emu.cpp b/Source/Win32/CxbxKrnl/Emu.cpp index 8c908a5d2..930ba012b 100644 --- a/Source/Win32/CxbxKrnl/Emu.cpp +++ b/Source/Win32/CxbxKrnl/Emu.cpp @@ -239,7 +239,10 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit g_EmuShared->GetXbePath(szBuffer); - SetCurrentDirectory(szBuffer); + if(szBuffer && *szBuffer) + SetCurrentDirectory(szBuffer); + else + GetCurrentDirectory(260, szBuffer); g_hCurDir = CreateFile(szBuffer, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); diff --git a/Source/Win32/CxbxKrnl/EmuDSound.cpp b/Source/Win32/CxbxKrnl/EmuDSound.cpp index 214e7b41f..8b7e0d273 100644 --- a/Source/Win32/CxbxKrnl/EmuDSound.cpp +++ b/Source/Win32/CxbxKrnl/EmuDSound.cpp @@ -2249,3 +2249,350 @@ HRESULT WINAPI XTL::EmuIDirectSoundStream_Unknown1 return S_OK; } + +// s+ +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetMaxDistance +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMaxDistance +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flMaxDistance, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetMaxDistance\n" + "(\n" + " pThis : 0x%.08X\n" + " flMaxDistance : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, flMaxDistance, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetMinDistance +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMinDistance +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flMinDistance, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetMinDistance\n" + "(\n" + " pThis : 0x%.08X\n" + " flMinDistance : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, flMinDistance, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetRolloffFactor +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetRolloffFactor +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flRolloffFactor, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetRolloffFactor\n" + "(\n" + " pThis : 0x%.08X\n" + " flRolloffFactor : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, flRolloffFactor, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetDistanceFactor +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetDistanceFactor +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flDistanceFactor, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetDistanceFactor\n" + "(\n" + " pThis : 0x%.08X\n" + " flDistanceFactor : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, flDistanceFactor, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetConeAngles +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetConeAngles +( + LPDIRECTSOUNDBUFFER8 pThis, + DWORD dwInsideConeAngle, + DWORD dwOutsideConeAngle, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeAngles\n" + "(\n" + " pThis : 0x%.08X\n" + " dwInsideConeAngle : 0x%.08X\n" + " dwOutsideConeAngle : 0x%.08X\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, dwInsideConeAngle, + dwOutsideConeAngle, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetConeOrientation +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetConeOrientation +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT x, + FLOAT y, + FLOAT z, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeOrientation\n" + "(\n" + " pThis : 0x%.08X\n" + " x : %f\n" + " y : %f\n" + " z : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, x, y, z, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetConeOutsideVolume +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetConeOutsideVolume +( + LPDIRECTSOUNDBUFFER8 pThis, + LONG lConeOutsideVolume, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeOutsideVolume\n" + "(\n" + " pThis : 0x%.08X\n" + " lConeOutsideVolume : 0x%.08X\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, lConeOutsideVolume, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetPosition +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetPosition +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT x, + FLOAT y, + FLOAT z, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetPosition\n" + "(\n" + " pThis : 0x%.08X\n" + " x : %f\n" + " y : %f\n" + " z : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, x, y, z, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetVelocity +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetVelocity +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT x, + FLOAT y, + FLOAT z, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetVelocity\n" + "(\n" + " pThis : 0x%.08X\n" + " x : %f\n" + " y : %f\n" + " z : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, x, y, z, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetDopplerFactor +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetDopplerFactor +( + LPDIRECTSOUNDBUFFER8 pThis, + FLOAT flDopplerFactor, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetConeOutsideVolume\n" + "(\n" + " pThis : 0x%.08X\n" + " flDopplerFactor : %f\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, flDopplerFactor, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} + +// ****************************************************************** +// * func: EmuIDirectSoundBuffer8_SetI3DL2Source +// ****************************************************************** +HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetI3DL2Source +( + LPDIRECTSOUNDBUFFER8 pThis, + LPCDSI3DL2BUFFER pds3db, + DWORD dwApply +) +{ + // debug trace + #ifdef _DEBUG_TRACE + { + EmuSwapFS(); // Win2k/XP FS + printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetI3DL2Source\n" + "(\n" + " pThis : 0x%.08X\n" + " pds3db : 0x%.08X\n" + " dwApply : 0x%.08X\n" + ");\n", + GetCurrentThreadId(), pThis, pds3db, dwApply); + EmuSwapFS(); // XBox FS + } + #endif + + // TODO: Actually do something + + return DS_OK; +} +// +s diff --git a/Source/Win32/CxbxKrnl/EmuXapi.cpp b/Source/Win32/CxbxKrnl/EmuXapi.cpp index 1eb1d8375..0544edab6 100644 --- a/Source/Win32/CxbxKrnl/EmuXapi.cpp +++ b/Source/Win32/CxbxKrnl/EmuXapi.cpp @@ -963,7 +963,10 @@ VOID WINAPI XTL::EmuXRegisterThreadNotifyRoutine // ****************************************************************** // * func: EmuXCalculateSignatureBegin // ****************************************************************** -HANDLE WINAPI XTL::EmuXCalculateSignatureBegin(DWORD dwFlags) +HANDLE WINAPI XTL::EmuXCalculateSignatureBegin +( + DWORD dwFlags +) { EmuSwapFS(); // Win2k/XP FS @@ -985,3 +988,96 @@ HANDLE WINAPI XTL::EmuXCalculateSignatureBegin(DWORD dwFlags) // return a fake handle value for now return (PVOID)0xAAAAAAAA; } + +// ****************************************************************** +// * func: EmuXCalculateSignatureBeginEx +// ****************************************************************** +HANDLE WINAPI XTL::EmuXCalculateSignatureBeginEx +( + DWORD dwFlags, + DWORD dwAltTitleId +) +{ + EmuSwapFS(); // Win2k/XP FS + + // ****************************************************************** + // * debug trace + // ****************************************************************** + #ifdef _DEBUG_TRACE + { + printf("EmuXapi (0x%X): XCalculateSignatureBeginEx\n" + "(\n" + " dwFlags : 0x%.08X\n", + " dwAltTitleId : 0x%.08X\n", + ");\n", + GetCurrentThreadId(), dwFlags, dwAltTitleId); + } + #endif + + EmuSwapFS(); // XBox FS + + // return a fake handle value for now + return (PVOID)0xAAAAAAAA; +} + +// ****************************************************************** +// * func: EmuXCalculateSignatureUpdate +// ****************************************************************** +DWORD WINAPI XTL::EmuXCalculateSignatureUpdate +( + HANDLE hCalcSig, + const BYTE *pbData, + ULONG cbData +) +{ + EmuSwapFS(); // Win2k/XP FS + + // ****************************************************************** + // * debug trace + // ****************************************************************** + #ifdef _DEBUG_TRACE + { + printf("EmuXapi (0x%X): XCalculateSignatureUpdate\n" + "(\n" + " hCalcSig : 0x%.08X\n", + " pbData : 0x%.08X\n", + " cbData : 0x%.08X\n", + ");\n", + GetCurrentThreadId(), hCalcSig, pbData, cbData); + } + #endif + + EmuSwapFS(); // XBox FS + + return ERROR_SUCCESS; +} + +// ****************************************************************** +// * func: EmuXCalculateSignatureEnd +// ****************************************************************** +DWORD WINAPI XTL::EmuXCalculateSignatureEnd +( + HANDLE hCalcSig, + PXCALCSIG_SIGNATURE pSignature +) +{ + EmuSwapFS(); // Win2k/XP FS + + // ****************************************************************** + // * debug trace + // ****************************************************************** + #ifdef _DEBUG_TRACE + { + printf("EmuXapi (0x%X): XCalculateSignatureEnd\n" + "(\n" + " hCalcSig : 0x%.08X\n", + " pSignature : 0x%.08X\n", + ");\n", + GetCurrentThreadId(), hCalcSig, pSignature); + } + #endif + + EmuSwapFS(); // XBox FS + + return ERROR_SUCCESS; +} diff --git a/Source/Win32/CxbxKrnl/HLEDataBase.cpp b/Source/Win32/CxbxKrnl/HLEDataBase.cpp index 534df0b02..744dae293 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase.cpp +++ b/Source/Win32/CxbxKrnl/HLEDataBase.cpp @@ -291,6 +291,31 @@ extern uint32 XRefDataBase[] = -1, // XREF_COMMONSETRENDERTARGET -1, // XREF_COMMITDEFERREDSETTINGSA -1, // XREF_COMMITDEFERREDSETTINGSB + // s+ + -1, // XREF_DSVOICESETMAXDISTANCE + -1, // XREF_DSVOICESETMINDISTANCE + -1, // XREF_DSVOICESETROLLOFFFACTOR + -1, // XREF_DSVOICESETDISTANCEFACTOR + -1, // XREF_DSVOICESETCONEANGLES + -1, // XREF_DSVOICESETCONEORIENTATION + -1, // XREF_DSVOICESETCONEOUTSIDEVOLUME + -1, // XREF_DSVOICESETPOSITION + -1, // XREF_DSVOICESETVELOCITY + -1, // XREF_DSVOICESETDOPPLERFACTOR + -1, // XREF_DSVOICESETI3DL2SOURCE + -1, // XREF_DSBUFFERSETMAXDISTANCE + -1, // XREF_DSBUFFERSETMINDISTANCE + -1, // XREF_DSBUFFERSETROLLOFFFACTOR + -1, // XREF_DSBUFFERSETDISTANCEFACTOR + -1, // XREF_DSBUFFERSETCONEANGLES + -1, // XREF_DSBUFFERSETCONEORIENTATION + -1, // XREF_DSBUFFERSETCONEOUTSIDEVOLUME + -1, // XREF_DSBUFFERSETPOSITION + -1, // XREF_DSBUFFERSETVELOCITY + -1, // XREF_DSBUFFERSETDOPPLERFACTOR + -1, // XREF_DSBUFFERSETI3DL2SOURCE + -1, //XREF_XAPIXCALCULATESIGNATUREBEGINEX + // +s }; // ****************************************************************** diff --git a/Source/Win32/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl b/Source/Win32/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl index 7bf78e753..cf9875cba 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl +++ b/Source/Win32/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl @@ -1097,8 +1097,1061 @@ SOOVPA<11> CDirectSound_CommitDeferredSettings_1_0_4627 = } }; +// s+ // ****************************************************************** -// * DirectSoundCreate_1_0_4627 +// * CDirectSoundVoice::SetMaxDistance +// ****************************************************************** +SOOVPA<9> CDirectSoundVoice_SetMaxDistance_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSVOICESETMAXDISTANCE, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetMaxDistance+0x0D : mov edx, [esp+arg_4] + { 0x0D, 0x8B }, + { 0x0E, 0x54 }, + { 0x0F, 0x24 }, + { 0x10, 0x08 }, + + // CDirectSoundVoice_SetMaxDistance+0x11 : mov [eax+38h], edx + { 0x11, 0x89 }, + { 0x12, 0x50 }, + { 0x13, 0x38 }, + + // CDirectSoundVoice_SetMaxDistance+0x30 : retn 0Ch + { 0x31, 0x0C }, + { 0x32, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetMaxDistance +// ****************************************************************** +SOOVPA<10> CDirectSoundBuffer_SetMaxDistance_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + XREF_DSBUFFERSETMAXDISTANCE, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetMaxDistance+0x39 : call [CDirectSoundVoice::SetMaxDistance] + { 0x3A, XREF_DSVOICESETMAXDISTANCE }, + + // CDirectSoundBuffer_SetMaxDistance+0x21 : mov eax, 80004005h + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundBuffer_SetMaxDistance+0x32 : fstp [esp+0Ch+var_C] + { 0x32, 0xD9 }, + { 0x33, 0x1C }, + { 0x34, 0x24 }, + + // CDirectSoundBuffer_SetMaxDistance+0x53 : retn 0Ch + { 0x54, 0x0C }, + { 0x55, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetMaxDistance +// ****************************************************************** +SOOVPA<10> IDirectSoundBuffer_SetMaxDistance_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetMaxDistance+0x1C : call [CDirectSoundBuffer::SetMaxDistance] + { 0x1D, XREF_DSBUFFERSETMAXDISTANCE }, + + // IDirectSoundBuffer_SetMaxDistance+0x04 : fld [esp+4+arg_4] + { 0x04, 0xD9 }, + { 0x05, 0x44 }, + { 0x06, 0x24 }, + { 0x07, 0x0C }, + + // IDirectSoundBuffer_SetMaxDistance+0x12 : add eax, 0FFFFFFE4 + { 0x12, 0x83 }, + { 0x13, 0xC0 }, + { 0x14, 0xE4 }, + + // IDirectSoundBuffer_SetMaxDistance+0x21 : retn 0Ch + { 0x22, 0x0C }, + { 0x23, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetMinDistance +// ****************************************************************** +SOOVPA<9> CDirectSoundVoice_SetMinDistance_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSVOICESETMINDISTANCE, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetMinDistance+0x0D : mov edx, [esp+arg_4] + { 0x0D, 0x8B }, + { 0x0E, 0x54 }, + { 0x0F, 0x24 }, + { 0x10, 0x08 }, + + // CDirectSoundVoice_SetMinDistance+0x11 : mov [eax+34h], edx + { 0x11, 0x89 }, + { 0x12, 0x50 }, + { 0x13, 0x34 }, + + // CDirectSoundVoice_SetMinDistance+0x30 : retn 0Ch + { 0x31, 0x0C }, + { 0x32, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetMinDistance +// ****************************************************************** +SOOVPA<10> CDirectSoundBuffer_SetMinDistance_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + XREF_DSBUFFERSETMINDISTANCE, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetMinDistance+0x39 : call [CDirectSoundVoice::SetMinDistance] + { 0x3A, XREF_DSVOICESETMINDISTANCE }, + + // CDirectSoundBuffer_SetMinDistance+0x21 : mov eax, 80004005h + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundBuffer_SetMinDistance+0x32 : fstp [esp+0Ch+var_C] + { 0x32, 0xD9 }, + { 0x33, 0x1C }, + { 0x34, 0x24 }, + + // CDirectSoundBuffer_SetMinDistance+0x53 : retn 0Ch + { 0x54, 0x0C }, + { 0x55, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetMinDistance +// ****************************************************************** +SOOVPA<10> IDirectSoundBuffer_SetMinDistance_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetMinDistance+0x1C : call [CDirectSoundBuffer::SetMinDistance] + { 0x1D, XREF_DSBUFFERSETMINDISTANCE }, + + // IDirectSoundBuffer_SetMinDistance+0x04 : fld [esp+4+arg_4] + { 0x04, 0xD9 }, + { 0x05, 0x44 }, + { 0x06, 0x24 }, + { 0x07, 0x0C }, + + // IDirectSoundBuffer_SetMinDistance+0x12 : add eax, 0FFFFFFE4 + { 0x12, 0x83 }, + { 0x13, 0xC0 }, + { 0x14, 0xE4 }, + + // IDirectSoundBuffer_SetMinDistance+0x21 : retn 0Ch + { 0x22, 0x0C }, + { 0x23, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetRolloffFactor +// ****************************************************************** +SOOVPA<9> CDirectSoundVoice_SetRolloffFactor_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSVOICESETROLLOFFFACTOR, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetRolloffFactor+0x0D : mov edx, [esp+arg_4] + { 0x0D, 0x8B }, + { 0x0E, 0x54 }, + { 0x0F, 0x24 }, + { 0x10, 0x08 }, + + // CDirectSoundVoice_SetRolloffFactor+0x11 : mov [eax+44h], edx + { 0x11, 0x89 }, + { 0x12, 0x50 }, + { 0x13, 0x44 }, + + // CDirectSoundVoice_SetRolloffFactor+0x30 : retn 0Ch + { 0x31, 0x0C }, + { 0x32, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetRolloffFactor +// ****************************************************************** +SOOVPA<10> CDirectSoundBuffer_SetRolloffFactor_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + XREF_DSBUFFERSETROLLOFFFACTOR, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetRolloffFactor+0x39 : call [CDirectSoundVoice::SetRolloffFactor] + { 0x3A, XREF_DSVOICESETROLLOFFFACTOR }, + + // CDirectSoundBuffer_SetRolloffFactor+0x21 : mov eax, 80004005h + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundBuffer_SetRolloffFactor+0x32 : fstp [esp+0Ch+var_C] + { 0x32, 0xD9 }, + { 0x33, 0x1C }, + { 0x34, 0x24 }, + + // CDirectSoundBuffer_SetRolloffFactor+0x53 : retn 0Ch + { 0x54, 0x0C }, + { 0x55, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetRolloffFactor +// ****************************************************************** +SOOVPA<10> IDirectSoundBuffer_SetRolloffFactor_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetRolloffFactor+0x1C : call [CDirectSoundBuffer::SetRolloffFactor] + { 0x1D, XREF_DSBUFFERSETROLLOFFFACTOR }, + + // IDirectSoundBuffer_SetRolloffFactor+0x04 : fld [esp+4+arg_4] + { 0x04, 0xD9 }, + { 0x05, 0x44 }, + { 0x06, 0x24 }, + { 0x07, 0x0C }, + + // IDirectSoundBuffer_SetRolloffFactor+0x12 : add eax, 0FFFFFFE4 + { 0x12, 0x83 }, + { 0x13, 0xC0 }, + { 0x14, 0xE4 }, + + // IDirectSoundBuffer_SetRolloffFactor+0x21 : retn 0Ch + { 0x22, 0x0C }, + { 0x23, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetDistanceFactor +// ****************************************************************** +SOOVPA<9> CDirectSoundVoice_SetDistanceFactor_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSVOICESETDISTANCEFACTOR, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetDistanceFactor+0x0D : mov edx, [esp+arg_4] + { 0x0D, 0x8B }, + { 0x0E, 0x54 }, + { 0x0F, 0x24 }, + { 0x10, 0x08 }, + + // CDirectSoundVoice_SetDistanceFactor+0x11 : mov [eax+40h], edx + { 0x11, 0x89 }, + { 0x12, 0x50 }, + { 0x13, 0x40 }, + + // CDirectSoundVoice_SetDistanceFactor+0x30 : retn 0Ch + { 0x31, 0x0C }, + { 0x32, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetDistanceFactor +// ****************************************************************** +SOOVPA<10> CDirectSoundBuffer_SetDistanceFactor_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + XREF_DSBUFFERSETDISTANCEFACTOR, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetDistanceFactor+0x39 : call [CDirectSoundVoice::SetDistanceFactor] + { 0x3A, XREF_DSVOICESETDISTANCEFACTOR }, + + // CDirectSoundBuffer_SetDistanceFactor+0x21 : mov eax, 80004005h + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundBuffer_SetDistanceFactor+0x32 : fstp [esp+0Ch+var_C] + { 0x32, 0xD9 }, + { 0x33, 0x1C }, + { 0x34, 0x24 }, + + // CDirectSoundBuffer_SetDistanceFactor+0x53 : retn 0Ch + { 0x54, 0x0C }, + { 0x55, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetDistanceFactor +// ****************************************************************** +SOOVPA<10> IDirectSoundBuffer_SetDistanceFactor_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetDistanceFactor+0x1C : call [CDirectSoundBuffer::SetDistanceFactor] + { 0x1D, XREF_DSBUFFERSETDISTANCEFACTOR }, + + // IDirectSoundBuffer_SetDistanceFactor+0x04 : fld [esp+4+arg_4] + { 0x04, 0xD9 }, + { 0x05, 0x44 }, + { 0x06, 0x24 }, + { 0x07, 0x0C }, + + // IDirectSoundBuffer_SetDistanceFactor+0x12 : add eax, 0FFFFFFE4 + { 0x12, 0x83 }, + { 0x13, 0xC0 }, + { 0x14, 0xE4 }, + + // IDirectSoundBuffer_SetSetDistanceFactor+0x21 : retn 0Ch + { 0x22, 0x0C }, + { 0x23, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetConeAngles +// ****************************************************************** +SOOVPA<9> CDirectSoundVoice_SetConeAngles_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSVOICESETCONEANGLES, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetConeAngles+0x0D : mov edx, [esp+arg_4] + { 0x0D, 0x8B }, + { 0x0E, 0x54 }, + { 0x0F, 0x24 }, + { 0x10, 0x08 }, + + // CDirectSoundVoice_SetConeAngles+0x11 : mov [ecx+1Ch], edx + { 0x11, 0x89 }, + { 0x12, 0x51 }, + { 0x13, 0x1C }, + + // CDirectSoundVoice_SetConeAngles+0x40 : retn 10h + { 0x41, 0x10 }, + { 0x42, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetConeAngles +// ****************************************************************** +SOOVPA<11> CDirectSoundBuffer_SetConeAngles_1_0_4627 = +{ + 0, // Large == 0 + 11, // Count == 11 + + XREF_DSBUFFERSETCONEANGLES, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetConeAngles+0x39 : call [CDirectSoundVoice::SetConeAngles] + { 0x3A, XREF_DSVOICESETCONEANGLES }, + + // CDirectSoundBuffer_SetConeAngles+0x21 : mov eax, 80004005h + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundBuffer_SetConeAngles+0x31 : push [esp+0Ch+arg_4] + { 0x31, 0xFF }, + { 0x32, 0x74 }, + { 0x33, 0x24 }, + { 0x34, 0x18 }, + + // CDirectSoundBuffer_SetConeAngles+0x53 : retn 10h + { 0x54, 0x10 }, + { 0x55, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetConeAngles +// ****************************************************************** +SOOVPA<10> IDirectSoundBuffer_SetConeAngles_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetConeAngles+0x1C : call [CDirectSoundBuffer::SetConeAngles] + { 0x1D, XREF_DSBUFFERSETCONEANGLES }, + + // IDirectSoundBuffer_SetConeAngles+0x04 : mov eax, [esp+4+arg_0] + { 0x04, 0x8B }, + { 0x05, 0x44 }, + { 0x06, 0x24 }, + { 0x07, 0x08 }, + + // IDirectSoundBuffer_SetConeAngles+0x12 : add eax, 0FFFFFFE4 + { 0x12, 0x83 }, + { 0x13, 0xC0 }, + { 0x14, 0xE4 }, + + // IDirectSoundBuffer_SetConeAngles+0x21 : retn 10h + { 0x22, 0x10 }, + { 0x23, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetConeOrientation +// ****************************************************************** +SOOVPA<8> CDirectSoundVoice_SetConeOrientation_1_0_4627 = +{ + 0, // Large == 0 + 8, // Count == 8 + + XREF_DSVOICESETCONEORIENTATION, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetConeOrientation+0x0F : mov edx, [ebp+arg_4] + { 0x0F, 0x8B }, + { 0x10, 0x55 }, + { 0x11, 0x0C }, + + // CDirectSoundVoice_SetConeOrientation+0x12 : mov [ecx+24h], edx + { 0x12, 0x89 }, + { 0x13, 0x51 }, + { 0x14, 0x24 }, + + // CDirectSoundVoice_SetConeOrientation+0x4F : retn 14h + { 0x50, 0x14 }, + { 0x51, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetConeOrientation +// ****************************************************************** +SOOVPA<9> CDirectSoundBuffer_SetConeOrientation_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSBUFFERSETCONEORIENTATION, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetConeOrientation+0x49 : call [CDirectSoundVoice::SetConeOrientation] + { 0x4A, XREF_DSVOICESETCONEORIENTATION }, + + // CDirectSoundBuffer_SetConeOrientation+0x2B : fld [ebp+arg_C] + { 0x2B, 0xD9 }, + { 0x2C, 0x45 }, + { 0x2D, 0x14 }, + + // CDirectSoundBuffer_SetConeOrientation+0x43 : fstp [esp+18h+var_18] + { 0x43, 0xD9 }, + { 0x44, 0x1C }, + { 0x45, 0x24 }, + + // CDirectSoundBuffer_SetConeOrientation+0x64 : retn 14h + { 0x65, 0x14 }, + { 0x66, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetConeOrientation +// ****************************************************************** +SOOVPA<9> IDirectSoundBuffer_SetConeOrientation_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetConeOrientation+0x2C : call [CDirectSoundBuffer::SetConeOrientation] + { 0x2D, XREF_DSBUFFERSETCONEORIENTATION }, + + // IDirectSoundBuffer_SetConeOrientation+0x06 : fld [ebp+arg_C] + { 0x06, 0xD9 }, + { 0x07, 0x45 }, + { 0x08, 0x14 }, + + // IDirectSoundBuffer_SetConeOrientation+0x28 : fstp [esp+10h+var_10] + { 0x28, 0xD9 }, + { 0x29, 0x1C }, + { 0x2A, 0x24 }, + + // IDirectSoundBuffer_SetConeOrientation+0x32 : retn 14h + { 0x33, 0x14 }, + { 0x34, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetConeOutsideVolume +// ****************************************************************** +SOOVPA<9> CDirectSoundVoice_SetConeOutsideVolume_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSVOICESETCONEOUTSIDEVOLUME, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetConeOutsideVolume+0x0D : mov edx, [esp+arg_4] + { 0x0D, 0x8B }, + { 0x0E, 0x54 }, + { 0x0F, 0x24 }, + { 0x10, 0x08 }, + + // CDirectSoundVoice_SetConeOutsideVolume+0x11 : mov [eax+30h], edx + { 0x11, 0x89 }, + { 0x12, 0x50 }, + { 0x13, 0x30 }, + + // CDirectSoundVoice_SetConeOutsideVolume+0x30 : retn 0Ch + { 0x31, 0x0C }, + { 0x32, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetConeOutsideVolume +// ****************************************************************** +SOOVPA<11> CDirectSoundBuffer_SetConeOutsideVolume_1_0_4627 = +{ + 0, // Large == 0 + 11, // Count == 11 + + XREF_DSBUFFERSETCONEOUTSIDEVOLUME, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetConeOutsideVolume+0x35 : call [CDirectSoundVoice::SetConeOutsideVolume] + { 0x36, XREF_DSVOICESETCONEOUTSIDEVOLUME }, + + // CDirectSoundBuffer_SetConeOutsideVolume+0x21 : mov eax, 80004005h + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundBuffer_SetConeOutsideVolume+0x31 : push [esp+0Ch+arg_0] + { 0x31, 0xFF }, + { 0x32, 0x74 }, + { 0x33, 0x24 }, + { 0x34, 0x14 }, + + // CDirectSoundBuffer_SetConeOutsideVolume+0x4F : retn 0Ch + { 0x50, 0x0C }, + { 0x51, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetConeOutsideVolume +// ****************************************************************** +SOOVPA<9> IDirectSoundBuffer_SetConeOutsideVolume_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetConeOutsideVolume+0x18 : call [CDirectSoundBuffer::SetConeOutsideVolume] + { 0x19, XREF_DSBUFFERSETCONEOUTSIDEVOLUME }, + + // IDirectSoundBuffer_SetConeOutsideVolume+0x0A : push [esp+4+arg_4] + { 0x0A, 0xFF }, + { 0x0B, 0x74 }, + { 0x0C, 0x24 }, + { 0x0D, 0x0C }, + + // IDirectSoundBuffer_SetConeOutsideVolume+0x15 : and ecx, eax + { 0x15, 0x23 }, + { 0x16, 0xC8 }, + + // IDirectSoundBuffer_SetConeOutsideVolume+0x1D : retn 0Ch + { 0x1E, 0x0C }, + { 0x1F, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetPosition +// ****************************************************************** +SOOVPA<8> CDirectSoundVoice_SetPosition_1_0_4627 = +{ + 0, // Large == 0 + 8, // Count == 8 + + XREF_DSVOICESETPOSITION, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetPosition+0x0F : mov edx, [ebp+arg_4] + { 0x0F, 0x8B }, + { 0x10, 0x55 }, + { 0x11, 0x0C }, + + // CDirectSoundVoice_SetPosition+0x12 : mov [ecx+04h], edx + { 0x12, 0x89 }, + { 0x13, 0x51 }, + { 0x14, 0x04 }, + + // CDirectSoundVoice_SetPosition+0x51 : retn 14h + { 0x52, 0x14 }, + { 0x53, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetPosition +// ****************************************************************** +SOOVPA<9> CDirectSoundBuffer_SetPosition_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSBUFFERSETPOSITION, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetPosition+0x49 : call [CDirectSoundVoice::SetPosition] + { 0x4A, XREF_DSVOICESETPOSITION }, + + // CDirectSoundBuffer_SetPosition+0x2B : fld [ebp+arg_C] + { 0x2B, 0xD9 }, + { 0x2C, 0x45 }, + { 0x2D, 0x14 }, + + // CDirectSoundBuffer_SetPosition+0x43 : fstp [esp+18h+var_18] + { 0x43, 0xD9 }, + { 0x44, 0x1C }, + { 0x45, 0x24 }, + + // CDirectSoundBuffer_SetPosition+0x64 : retn 14h + { 0x65, 0x14 }, + { 0x66, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetPosition +// ****************************************************************** +SOOVPA<9> IDirectSoundBuffer_SetPosition_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetPosition+0x2C : call [CDirectSoundBuffer::SetPosition] + { 0x2D, XREF_DSBUFFERSETPOSITION }, + + // IDirectSoundBuffer_SetPosition+0x09 : mov eax, [ebp+arg_0] + { 0x09, 0x8B }, + { 0x0A, 0x45 }, + { 0x0B, 0x08 }, + + // IDirectSoundBuffer_SetPosition+0x28 : fstp [esp+10h+var_10] + { 0x28, 0xD9 }, + { 0x29, 0x1C }, + { 0x2A, 0x24 }, + + // IDirectSoundBuffer_SetPosition+0x32 : retn 14h + { 0x33, 0x14 }, + { 0x34, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetVelocity +// ****************************************************************** +SOOVPA<8> CDirectSoundVoice_SetVelocity_1_0_4627 = +{ + 0, // Large == 0 + 8, // Count == 8 + + XREF_DSVOICESETVELOCITY, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetVelocity+0x0F : mov edx, [ebp+arg_4] + { 0x0F, 0x8B }, + { 0x10, 0x55 }, + { 0x11, 0x0C }, + + // CDirectSoundVoice_SetVelocity+0x12 : mov [ecx+10h], edx + { 0x12, 0x89 }, + { 0x13, 0x51 }, + { 0x14, 0x10 }, + + // CDirectSoundVoice_SetVelocity+0x4F : retn 14h + { 0x50, 0x14 }, + { 0x51, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetVelocity +// ****************************************************************** +SOOVPA<9> CDirectSoundBuffer_SetVelocity_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSBUFFERSETVELOCITY, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetVelocity+0x49 : call [CDirectSoundVoice::SetVelocity] + { 0x4A, XREF_DSVOICESETVELOCITY }, + + // CDirectSoundBuffer_SetVelocity+0x2B : fld [ebp+arg_C] + { 0x2B, 0xD9 }, + { 0x2C, 0x45 }, + { 0x2D, 0x14 }, + + // CDirectSoundBuffer_SetVelocity+0x43 : fstp [esp+18h+var_18] + { 0x43, 0xD9 }, + { 0x44, 0x1C }, + { 0x45, 0x24 }, + + // CDirectSoundBuffer_SetVelocity+0x64 : retn 14h + { 0x65, 0x14 }, + { 0x66, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetVelocity +// ****************************************************************** +SOOVPA<9> IDirectSoundBuffer_SetVelocity_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetVelocity+0x2C : call [CDirectSoundBuffer::SetVelocity] + { 0x2D, XREF_DSBUFFERSETVELOCITY }, + + // IDirectSoundBuffer_SetVelocity+0x09 : mov eax, [ebp+arg_0] + { 0x09, 0x8B }, + { 0x0A, 0x45 }, + { 0x0B, 0x08 }, + + // IDirectSoundBuffer_SetVelocity+0x28 : fstp [esp+10h+var_10] + { 0x28, 0xD9 }, + { 0x29, 0x1C }, + { 0x2A, 0x24 }, + + // IDirectSoundBuffer_SetVelocity+0x32 : retn 14h + { 0x33, 0x14 }, + { 0x34, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetDopplerFactor +// ****************************************************************** +SOOVPA<9> CDirectSoundVoice_SetDopplerFactor_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + XREF_DSVOICESETDOPPLERFACTOR, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetDopplerFactor+0x0D : mov edx, [esp+arg_4] + { 0x0D, 0x8B }, + { 0x0E, 0x54 }, + { 0x0F, 0x24 }, + { 0x10, 0x08 }, + + // CDirectSoundVoice_SetDopplerFactor+0x12 : mov [eax+48h], edx + { 0x11, 0x89 }, + { 0x12, 0x50 }, + { 0x13, 0x48 }, + + // CDirectSoundVoice_SetDopplerFactor+0x31 : retn 0Ch + { 0x31, 0x0C }, + { 0x32, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetDopplerFactor +// ****************************************************************** +SOOVPA<10> CDirectSoundBuffer_SetDopplerFactor_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + XREF_DSBUFFERSETDOPPLERFACTOR, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetDopplerFactor+0x39 : call [CDirectSoundVoice::SetDopplerFactor] + { 0x3A, XREF_DSVOICESETDOPPLERFACTOR }, + + // CDirectSoundBuffer_SetDopplerFactor+0x2D : push [esp+4+arg_8] + { 0x2D, 0xFF }, + { 0x2E, 0x74 }, + { 0x2F, 0x24 }, + { 0x30, 0x14 }, + + // CDirectSoundBuffer_SetDopplerFactor+0x32 : fstp [esp+0Ch+var_C] + { 0x32, 0xD9 }, + { 0x33, 0x1C }, + { 0x34, 0x24 }, + + // CDirectSoundBuffer_SetDopplerFactor+0x53 : retn 0Ch + { 0x54, 0x0C }, + { 0x55, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetDopplerFactor +// ****************************************************************** +SOOVPA<9> IDirectSoundBuffer_SetDopplerFactor_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetDopplerFactor+0x1C : call [CDirectSoundBuffer::SetDopplerFactor] + { 0x1D, XREF_DSBUFFERSETDOPPLERFACTOR }, + + // IDirectSoundBuffer_SetDopplerFactor+0x08 : mov eax, [esp+4+arg_0] + { 0x08, 0x8B }, + { 0x09, 0x44 }, + { 0x0A, 0x24 }, + { 0x0B, 0x08 }, + + // IDirectSoundBuffer_SetDopplerFactor+0x19 : and ecx, eax + { 0x19, 0x23 }, + { 0x1A, 0xC8 }, + + // IDirectSoundBuffer_SetDopplerFactor+0x21 : retn 0Ch + { 0x22, 0x0C }, + { 0x23, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundVoice::SetI3DL2Source +// ****************************************************************** +SOOVPA<10> CDirectSoundVoice_SetI3DL2Source_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + XREF_DSVOICESETI3DL2SOURCE, // XRef Is Saved + 0, // XRef Not Used + + { + // CDirectSoundVoice_SetI3DL2Source+0x12 : mov esi, [ecx] + { 0x12, 0x8B }, + { 0x13, 0x31 }, + + // CDirectSoundVoice_SetI3DL2Source+0x14 : mov [edx+4Ch], esi + { 0x14, 0x89 }, + { 0x15, 0x72 }, + { 0x16, 0x4C }, + + // CDirectSoundVoice_SetI3DL2Source+0x44 : fld dword ptr [ecx+10h] + { 0x44, 0xD9 }, + { 0x45, 0x41 }, + { 0x46, 0x10 }, + + // CDirectSoundVoice_SetI3DL2Source+0xAC : retn 0Ch + { 0xAD, 0x0C }, + { 0xAE, 0x00 } + } +}; + +// ****************************************************************** +// * CDirectSoundBuffer::SetI3DL2Source +// ****************************************************************** +SOOVPA<11> CDirectSoundBuffer_SetI3DL2Source_1_0_4627 = +{ + 0, // Large == 0 + 11, // Count == 11 + + XREF_DSBUFFERSETI3DL2SOURCE, // XRef Is Saved + 1, // XRef Is Used + + { + // CDirectSoundBuffer_SetI3DL2Source+0x35 : call [CDirectSoundVoice::SetI3DL2Source] + { 0x36, XREF_DSVOICESETI3DL2SOURCE }, + + // CDirectSoundBuffer_SetI3DL2Source+0x21 : mov eax, 80004005h + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundBuffer_SetI3DL2Source+0x31 : push [esp+0Ch+arg_0] + { 0x31, 0xFF }, + { 0x32, 0x74 }, + { 0x33, 0x24 }, + { 0x34, 0x14 }, + + // CDirectSoundBuffer_SetI3DL2Source+0x4F : retn 0Ch + { 0x50, 0x0C }, + { 0x51, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_SetI3DL2Source +// ****************************************************************** +SOOVPA<10> IDirectSoundBuffer_SetI3DL2Source_1_0_4627 = +{ + 0, // Large == 0 + 10, // Count == 10 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // IDirectSoundBuffer_SetI3DL2Source+0x18 : call [CDirectSoundBuffer::SetI3DL2Source] + { 0x19, XREF_DSBUFFERSETI3DL2SOURCE }, + + // IDirectSoundBuffer_SetI3DL2Source+0x04 : push [esp+arg_8] + { 0x04, 0xFF }, + { 0x05, 0x74 }, + { 0x06, 0x24 }, + { 0x07, 0x0C }, + + // IDirectSoundBuffer_SetI3DL2Source+0x0E : add eax, 0FFFFFFE4h + { 0x0E, 0x83 }, + { 0x0F, 0xC0 }, + { 0x10, 0xE4 }, + + // IDirectSoundBuffer_SetI3DL2Source+0x1D : retn 0Ch + { 0x1E, 0x0C }, + { 0x1F, 0x00 } + } +}; + +// ****************************************************************** +// * IDirectSoundBuffer_Stop +// ****************************************************************** +SOOVPA<11> IDirectSoundBuffer_Stop_1_0_4627 = +{ + 0, // Large == 0 + 11, // Count == 11 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // IDirectSoundBuffer_Stop+0x00 : mov eax, [esp+arg_0] + { 0x00, 0x8B }, + { 0x01, 0x44 }, + { 0x02, 0x24 }, + { 0x03, 0x04 }, + + // IDirectSoundBuffer_Stop+0x04 : mov ecx, eax + { 0x04, 0x8B }, + { 0x05, 0xC8 }, + + // IDirectSoundBuffer_Stop+0x06 : add eax, 0FFFFFFE4h + { 0x06, 0x83 }, + { 0x07, 0xC0 }, + { 0x08, 0xE4 }, + + // IDirectSoundBuffer_Stop+0x15 : retn 4 + { 0x16, 0x04 }, + { 0x17, 0x00 } + } +}; +// +s + +// ****************************************************************** +// * Direct_1_0_4627 // ****************************************************************** OOVPATable DSound_1_0_4627[] = { @@ -1498,6 +2551,302 @@ OOVPATable DSound_1_0_4627[] = "EmuCDirectSound_CommitDeferredSettings" #endif }, + // s+ + // CDirectSoundVoice::SetMaxDistance (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetMaxDistance_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetMaxDistance (XRef)" + #endif + }, + // CDirectSoundBuffer::SetMaxDistance (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetMaxDistance_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetMaxDistance (XRef)" + #endif + }, + // IDirectSoundBuffer_SetMaxDistance + { + (OOVPA*)&IDirectSoundBuffer_SetMaxDistance_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetMaxDistance, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetMaxDistance" + #endif + }, + // CDirectSoundVoice::SetMinDistance (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetMinDistance_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetMinDistance (XRef)" + #endif + }, + // CDirectSoundBuffer::SetMinDistance (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetMinDistance_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetMinDistance (XRef)" + #endif + }, + // IDirectSoundBuffer_SetMinDistance + { + (OOVPA*)&IDirectSoundBuffer_SetMinDistance_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetMinDistance, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetMinDistance" + #endif + }, + // CDirectSoundVoice::SetRolloffFactor (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetRolloffFactor_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetRolloffFactor (XRef)" + #endif + }, + // CDirectSoundBuffer::SetRolloffFactor (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetRolloffFactor_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetRolloffFactor (XRef)" + #endif + }, + // IDirectSoundBuffer_SetRolloffFactor + { + (OOVPA*)&IDirectSoundBuffer_SetRolloffFactor_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetRolloffFactor, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetRolloffFactor" + #endif + }, + // CDirectSoundVoice::SetDistanceFactor (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetDistanceFactor_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetDistanceFactor (XRef)" + #endif + }, + // CDirectSoundBuffer::SetDistanceFactor (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetDistanceFactor_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetDistanceFactor (XRef)" + #endif + }, + // IDirectSoundBuffer_SetDistanceFactor + { + (OOVPA*)&IDirectSoundBuffer_SetDistanceFactor_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetDistanceFactor, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetDistanceFactor" + #endif + }, + // CDirectSoundVoice::SetConeAngles (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetConeAngles_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetConeAngles (XRef)" + #endif + }, + // CDirectSoundBuffer::SetConeAngles (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetConeAngles_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetConeAngles (XRef)" + #endif + }, + // IDirectSoundBuffer_SetConeAngles + { + (OOVPA*)&IDirectSoundBuffer_SetConeAngles_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetConeAngles, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetConeAngles" + #endif + }, + // CDirectSoundVoice::SetConeOrientation (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetConeOrientation_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetConeOrientation (XRef)" + #endif + }, + // CDirectSoundBuffer::SetConeOrientation (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetConeOrientation_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetConeOrientation (XRef)" + #endif + }, + // IDirectSoundBuffer_SetConeOrientation + { + (OOVPA*)&IDirectSoundBuffer_SetConeOrientation_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetConeOrientation, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetConeOrientation" + #endif + }, + // CDirectSoundVoice::SetConeOutsideVolume (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetConeOutsideVolume_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetConeOutsideVolume (XRef)" + #endif + }, + // CDirectSoundBuffer::SetConeOutsideVolume (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetConeOutsideVolume_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetConeOutsideVolume (XRef)" + #endif + }, + // IDirectSoundBuffer_SetConeOutsideVolume + { + (OOVPA*)&IDirectSoundBuffer_SetConeOutsideVolume_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetConeOutsideVolume, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetConeOutsideVolume" + #endif + }, + // CDirectSoundVoice::SetPosition (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetPosition_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetPosition (XRef)" + #endif + }, + // CDirectSoundBuffer::SetPosition (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetPosition_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetPosition (XRef)" + #endif + }, + // IDirectSoundBuffer_SetPosition + { + (OOVPA*)&IDirectSoundBuffer_SetPosition_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetPosition, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetPosition" + #endif + }, + // CDirectSoundVoice::SetVelocity (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetVelocity_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetVelocity (XRef)" + #endif + }, + // CDirectSoundBuffer::SetVelocity (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetVelocity_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetVelocity (XRef)" + #endif + }, + // IDirectSoundBuffer_SetVelocity + { + (OOVPA*)&IDirectSoundBuffer_SetVelocity_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetVelocity, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetVelocity" + #endif + }, + // CDirectSoundVoice::SetDopplerFactor (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetDopplerFactor_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetDopplerFactor (XRef)" + #endif + }, + // CDirectSoundBuffer::SetDopplerFactor (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetDopplerFactor_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetDopplerFactor (XRef)" + #endif + }, + // IDirectSoundBuffer_SetDopplerFactor + { + (OOVPA*)&IDirectSoundBuffer_SetDopplerFactor_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetDopplerFactor, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetDopplerFactor" + #endif + }, + // CDirectSoundVoice::SetI3DL2Source (XREF) + { + (OOVPA*)&CDirectSoundVoice_SetI3DL2Source_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundVoice::SetI3DL2Source (XRef)" + #endif + }, + // CDirectSoundBuffer::SetI3DL2Source (XREF) + { + (OOVPA*)&CDirectSoundBuffer_SetI3DL2Source_1_0_4627, 0, + + #ifdef _DEBUG_TRACE + "CDirectSoundBuffer::SetI3DL2Source (XRef)" + #endif + }, + // IDirectSoundBuffer_SetI3DL2Source + { + (OOVPA*)&IDirectSoundBuffer_SetI3DL2Source_1_0_4627, + XTL::EmuIDirectSoundBuffer8_SetI3DL2Source, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_SetI3DL2Source" + #endif + }, + // IDirectSoundBuffer_Stop (Possibly weak, but quite OK for 4627 DSOUND) + { + (OOVPA*)&IDirectSoundBuffer_Stop_1_0_4627, + XTL::EmuIDirectSoundBuffer8_Stop, + + #ifdef _DEBUG_TRACE + "IDirectSoundBuffer8_Stop" + #endif + }, + // IDirectSoundBuffer8::Release (* unchanged since 3936 *) + { + (OOVPA*)&IDirectSoundBuffer8_Release_1_0_3936, + + XTL::EmuIDirectSoundBuffer8_Release, + + #ifdef _DEBUG_TRACE + "EmuIDirectSoundBuffer8_Release" + #endif + }, + // +s }; // ****************************************************************** diff --git a/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl b/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl index 85ec9ab33..750149f3d 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl +++ b/Source/Win32/CxbxKrnl/HLEDataBase/Xapi.1.0.4627.inl @@ -126,6 +126,127 @@ SOOVPA<8> XMountUtilityDrive_1_0_4627 = } }; +// s+ +// ****************************************************************** +// * XCalculateSignatureBeginEx +// ****************************************************************** +SOOVPA<8> XCalculateSignatureBeginEx_1_0_4627 = +{ + 0, // Large == 0 + 8, // Count == 8 + + XREF_XAPIXCALCULATESIGNATUREBEGINEX, // XRef Is Saved + 0, // XRef Not Used + + { + // XCalculateSignatureBeginEx+0x09 : push 7Ch + { 0x09, 0x6A }, + { 0x0A, 0x7C }, + + // XCalculateSignatureBeginEx+0x2D : lea eax, [esi+5Ch] + { 0x2D, 0x8D }, + { 0x2E, 0x46 }, + { 0x2F, 0x5C }, + + // XCalculateSignatureBeginEx+0xE8 : cmp edx, 40h ; '@' + { 0x43, 0x83 }, + { 0x44, 0xFA }, + { 0x45, 0x40 }, + } +}; + +// ****************************************************************** +// * XCalculateSignatureBegin +// ****************************************************************** +SOOVPA<12> XCalculateSignatureBegin_1_0_4627 = +{ + 0, // Large == 0 + 12, // Count == 12 + + -1, // XRef Not Saved + 1, // XRef Is Used + + { + // XCalculateSignatureBegin+0x0C : call [XCalculateSignatureBeginEx] + { 0x0D, XREF_XAPIXCALCULATESIGNATUREBEGINEX }, + + // XCalculateSignatureBegin+0x00 : mov eax, ds:10118h + { 0x00, 0xA1 }, + { 0x01, 0x18 }, + { 0x02, 0x01 }, + { 0x03, 0x01 }, + { 0x04, 0x00 }, + + // XCalculateSignatureBegin+0x08 : push [esp+4+arg_0] + { 0x08, 0xFF }, + { 0x09, 0x74 }, + { 0x0A, 0x24 }, + { 0x0B, 0x08 }, + + // XCalculateSignatureBegin+0x11 : retn 4 + { 0x12, 0x04 }, + { 0x13, 0x00 }, + } +}; + +// ****************************************************************** +// * XCalculateSignatureUpdate +// ****************************************************************** +SOOVPA<9> XCalculateSignatureUpdate_1_0_4627 = +{ + 0, // Large == 0 + 9, // Count == 9 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // XCalculateSignatureUpdate+0x04 : mov eax, [esp+4+arg_0] + { 0x04, 0x8B }, + { 0x05, 0x44 }, + { 0x06, 0x24 }, + { 0x07, 0x08 }, + + // XCalculateSignatureUpdate+0x0C : add eax, 8 + { 0x0C, 0x83 }, + { 0x0D, 0xC0 }, + { 0x0E, 0x08 }, + + // XCalculateSignatureUpdate+0x11 : xor eax, eax + { 0x15, 0x33 }, + { 0x16, 0xC0 }, + } +}; + +// ****************************************************************** +// * XCalculateSignatureEnd +// ****************************************************************** +SOOVPA<8> XCalculateSignatureEnd_1_0_4627 = +{ + 0, // Large == 0 + 8, // Count == 8 + + -1, // XRef Not Saved + 0, // XRef Not Used + + { + // XCalculateSignatureEnd+0x03 : sub esp, 14h + { 0x03, 0x83 }, + { 0x04, 0xEC }, + { 0x05, 0x14 }, + + // XCalculateSignatureEnd+0x22 : push 10h + { 0x22, 0x6A }, + { 0x23, 0x10 }, + + // XCalculateSignatureEnd+0x37 : lea eax, [ebp+var_14] + { 0x37, 0x8D }, + { 0x38, 0x45 }, + { 0x39, 0xEC }, + } +}; +// +s + // ****************************************************************** // * XAPI_1_0_4627 // ****************************************************************** @@ -273,6 +394,48 @@ OOVPATable XAPI_1_0_4627[] = "EmuXapiBootDash" #endif }, + // +s + // XCalculateSignatureBeginEx + { + (OOVPA*)&XCalculateSignatureBeginEx_1_0_4627, + + XTL::EmuXCalculateSignatureBeginEx, + + #ifdef _DEBUG_TRACE + "EmuXCalculateSignatureBeginEx (XREF&FUNC)" + #endif + }, + // XCalculateSignatureBegin + { + (OOVPA*)&XCalculateSignatureBegin_1_0_4627, + + XTL::EmuXCalculateSignatureBegin, + + #ifdef _DEBUG_TRACE + "EmuXCalculateSignatureBegin" + #endif + }, + // XCalculateSignatureUpdate + { + (OOVPA*)&XCalculateSignatureUpdate_1_0_4627, + + XTL::EmuXCalculateSignatureUpdate, + + #ifdef _DEBUG_TRACE + "EmuXCalculateSignatureUpdate" + #endif + }, + // XCalculateSignatureEnd + { + (OOVPA*)&XCalculateSignatureEnd_1_0_4627, + + XTL::EmuXCalculateSignatureEnd, + + #ifdef _DEBUG_TRACE + "EmuXCalculateSignatureEnd" + #endif + }, + // s+ }; // ******************************************************************