diff --git a/src/CxbxKrnl/HLEDataBase.h b/src/CxbxKrnl/HLEDataBase.h index 347276304..a2cd77bee 100644 --- a/src/CxbxKrnl/HLEDataBase.h +++ b/src/CxbxKrnl/HLEDataBase.h @@ -200,8 +200,8 @@ enum XRefDataBaseOffset XREF_IDirectSound_CreateSoundStream, // s+ // DSOUND - XREF_DS_CRefCount_AddRef, - XREF_DS_CRefCount_Release, + XREF_DSound_CRefCount_AddRef, + XREF_DSound_CRefCount_Release, XREF_CDirectSoundVoice_SetRolloffCurve, XREF_CDirectSoundVoice_SetRolloffFactor, XREF_CDirectSoundVoice_SetDistanceFactor, diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.3911.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.3911.inl index a0d54f496..f8b825b61 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.3911.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.3911.inl @@ -3830,23 +3830,23 @@ OOVPA_XREF(IDirectSoundBuffer_SetCurrentPosition, 3911, 1+9, OOVPA_END; // ****************************************************************** -// * DS_CRefCount_AddRef +// * DSound_CRefCount_AddRef // ****************************************************************** -OOVPA_XREF(DS_CRefCount_AddRef, 3911, 11, +OOVPA_XREF(DSound_CRefCount_AddRef, 3911, 11, - XREF_DS_CRefCount_AddRef, + XREF_DSound_CRefCount_AddRef, XRefZero) - // DS_CRefCount_AddRef+0x04 : add eax, 4 + // DSound_CRefCount_AddRef+0x04 : add eax, 4 { 0x00, 0x56 }, - // DS_CRefCount_AddRef+0x0A : inc dword ptr [ecx+4] + // DSound_CRefCount_AddRef+0x0A : inc dword ptr [ecx+4] { 0x0A, 0xFF }, { 0x0B, 0x41 }, { 0x0C, 0x04 }, - // DS_CRefCount_AddRef+0x0A : mov, dword ptr [ecx+4] + // DSound_CRefCount_AddRef+0x0A : mov, dword ptr [ecx+4] { 0x0F, 0x8B }, { 0x10, 0x71 }, { 0x11, 0x04 }, @@ -3854,7 +3854,7 @@ OOVPA_XREF(DS_CRefCount_AddRef, 3911, 11, { 0x19, 0xFF }, { 0x1A, 0x15 }, - // DS_CRefCount_AddRef+0x22 : retn 0x04 + // DSound_CRefCount_AddRef+0x22 : retn 0x04 { 0x22, 0xC2 }, { 0x23, 0x04 }, OOVPA_END; @@ -3868,7 +3868,7 @@ OOVPA_XREF(CDirectSoundStream_AddRef, 3911, 1+7, XRefOne) // CDirectSoundStream_AddRef+0x08 : call [CRefCount_AddRef] - XREF_ENTRY( 0x09, XREF_DS_CRefCount_AddRef ), + XREF_ENTRY( 0x09, XREF_DSound_CRefCount_AddRef ), // CDirectSoundStream_AddRef+0x04 : add eax, 4 { 0x04, 0x83 }, @@ -3887,23 +3887,23 @@ OOVPA_XREF(CDirectSoundStream_AddRef, 3911, 1+7, OOVPA_END; // ****************************************************************** -// * DS_CRefCount_Release +// * DSound_CRefCount_Release // ****************************************************************** -OOVPA_XREF(DS_CRefCount_Release, 3911, 11, +OOVPA_XREF(DSound_CRefCount_Release, 3911, 11, - XREF_DS_CRefCount_Release, + XREF_DSound_CRefCount_Release, XRefZero) - // DS_CRefCount_Release+0x04 : add eax, 4 + // DSound_CRefCount_Release+0x04 : add eax, 4 { 0x00, 0x56 }, - // DS_CRefCount_Release+0x0A : dec dword ptr [ecx+4] + // DSound_CRefCount_Release+0x0A : dec dword ptr [ecx+4] { 0x0B, 0xFF }, { 0x0C, 0x49 }, { 0x0D, 0x04 }, - // DS_CRefCount_Release+0x0A : mov, dword ptr [ecx+4] + // DSound_CRefCount_Release+0x0A : mov, dword ptr [ecx+4] { 0x0E, 0x8B }, { 0x0F, 0x71 }, { 0x10, 0x04 }, @@ -3911,7 +3911,7 @@ OOVPA_XREF(DS_CRefCount_Release, 3911, 11, { 0x26, 0xFF }, { 0x27, 0x15 }, - // DS_CRefCount_Release+0x30 : retn 0x04 + // DSound_CRefCount_Release+0x30 : retn 0x04 { 0x30, 0xC2 }, { 0x31, 0x04 }, OOVPA_END; @@ -3925,7 +3925,7 @@ OOVPA_XREF(CDirectSoundStream_Release, 3911, 1+7, XRefOne) // CDirectSoundStream_Release+0x08 : call [CRefCount_Release] - XREF_ENTRY( 0x09, XREF_DS_CRefCount_Release ), + XREF_ENTRY( 0x09, XREF_DSound_CRefCount_Release ), // CDirectSoundStream_Release+0x04 : add eax, 4 { 0x04, 0x83 }, diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl index d6b8ecc30..61509cdcd 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl @@ -3120,60 +3120,60 @@ OOVPA_XREF(CDirectSoundStream_Pause, 4039, 1+11, OOVPA_END; // ****************************************************************** -// * DS_CRefCount_AddRef +// * DSound_CRefCount_AddRef // ****************************************************************** // Generic OOVPA as of 4039 and newer -OOVPA_XREF(DS_CRefCount_AddRef, 4039, 12, +OOVPA_XREF(DSound_CRefCount_AddRef, 4039, 12, - XREF_DS_CRefCount_AddRef, + XREF_DSound_CRefCount_AddRef, XRefZero) - // DS_CRefCount_AddRef+0x00 : mov eax,dword ptr [esp+4] + // DSound_CRefCount_AddRef+0x00 : mov eax,dword ptr [esp+4] { 0x00, 0x8B }, { 0x01, 0x44 }, { 0x02, 0x24 }, { 0x03, 0x04 }, - // DS_CRefCount_AddRef+0x04 : inc dword ptr [eax+4] + // DSound_CRefCount_AddRef+0x04 : inc dword ptr [eax+4] { 0x04, 0xFF }, { 0x05, 0x40 }, { 0x06, 0x04 }, - // DS_CRefCount_AddRef+0x07 : mov eax, dword ptr [eax+4] + // DSound_CRefCount_AddRef+0x07 : mov eax, dword ptr [eax+4] { 0x07, 0x8B }, { 0x08, 0x40 }, { 0x09, 0x04 }, - // DS_CRefCount_AddRef+0x0A : retn 0x04 + // DSound_CRefCount_AddRef+0x0A : retn 0x04 { 0x0A, 0xC2 }, { 0x0B, 0x04 }, OOVPA_END; // ****************************************************************** -// * DS_CRefCount_Release +// * DSound_CRefCount_Release // ****************************************************************** -OOVPA_XREF(DS_CRefCount_Release, 4039, 10, +OOVPA_XREF(DSound_CRefCount_Release, 4039, 10, - XREF_DS_CRefCount_Release, + XREF_DSound_CRefCount_Release, XRefZero) { 0x00, 0x8B }, - // DS_CRefCount_Release+0x0B : dec eax + // DSound_CRefCount_Release+0x0B : dec eax { 0x0B, 0x48 }, - // DS_CRefCount_Release+0x0E : mov dword ptr [ecx+4], eax + // DSound_CRefCount_Release+0x0E : mov dword ptr [ecx+4], eax { 0x0E, 0x89 }, { 0x0F, 0x41 }, { 0x10, 0x04 }, - // DS_CRefCount_Release+0x1D : mov, dword ptr [ecx+4] + // DSound_CRefCount_Release+0x1D : mov, dword ptr [ecx+4] { 0x1D, 0x8B }, { 0x1E, 0x41 }, { 0x1F, 0x04 }, - // DS_CRefCount_Release+0x20 : retn 0x04 + // DSound_CRefCount_Release+0x20 : retn 0x04 { 0x20, 0xC2 }, { 0x21, 0x04 }, OOVPA_END; @@ -3187,7 +3187,7 @@ OOVPA_XREF(CDirectSoundStream_Release, 4039, 1+11, XRefNoSaveIndex, XRefOne) - XREF_ENTRY( 0x31, XREF_DS_CRefCount_Release ), + XREF_ENTRY( 0x31, XREF_DSound_CRefCount_Release ), { 0x00, 0x56 }, { 0x0C, 0x00 }, diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl index ce818e8e5..78c1d0b2b 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl @@ -3157,7 +3157,7 @@ OOVPA_XREF(CDirectSoundStream_Release, 4134, 1+11, XRefNoSaveIndex, XRefOne) - XREF_ENTRY( 0x32, XREF_DS_CRefCount_Release ), + XREF_ENTRY( 0x32, XREF_DSound_CRefCount_Release ), { 0x00, 0x56 }, { 0x0C, 0x00 }, @@ -3589,7 +3589,7 @@ OOVPA_END; // ****************************************************************** // * DirectSound::CMemoryManager::PoolAlloc // ****************************************************************** -OOVPA_NO_XREF(DS_CMemoryManager_PoolAlloc, 4134, 11) +OOVPA_NO_XREF(DSound_CMemoryManager_PoolAlloc, 4134, 11) { 0x00, 0x56 }, diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5455.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5455.inl index 5fc6d17a8..78f2b5084 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5455.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5455.inl @@ -161,30 +161,30 @@ OOVPA_XREF(CDirectSound_EnableHeadphones, 5455, 17, OOVPA_END; // ****************************************************************** -// * DS_CRefCount_Release +// * DSound_CRefCount_Release // ****************************************************************** // Generic OOVPA as of 5455 and newer -OOVPA_XREF(DS_CRefCount_Release, 5455, 10, +OOVPA_XREF(DSound_CRefCount_Release, 5455, 10, - XREF_DS_CRefCount_Release, + XREF_DSound_CRefCount_Release, XRefZero) { 0x00, 0x8B }, - // DS_CRefCount_Release+0x0B : dec eax + // DSound_CRefCount_Release+0x0B : dec eax { 0x0B, 0x48 }, - // DS_CRefCount_Release+0x0E : mov dword ptr [ecx+4], eax + // DSound_CRefCount_Release+0x0E : mov dword ptr [ecx+4], eax { 0x0C, 0x89 }, { 0x0D, 0x41 }, { 0x0E, 0x04 }, - // DS_CRefCount_Release+0x1D : mov, dword ptr [ecx+4] + // DSound_CRefCount_Release+0x1D : mov, dword ptr [ecx+4] { 0x1B, 0x8B }, { 0x1C, 0x41 }, { 0x1D, 0x04 }, - // DS_CRefCount_Release+0x20 : retn 0x04 + // DSound_CRefCount_Release+0x20 : retn 0x04 { 0x1E, 0xC2 }, { 0x1F, 0x04 }, OOVPA_END; @@ -287,3 +287,79 @@ OOVPA_XREF(CDirectSound_SetI3DL2Listener, 5455, 20, { 0x105, 0xC2 }, { 0x106, 0x0C }, OOVPA_END; + +// ****************************************************************** +// * CDirectSoundVoiceSettings::SetMixBins +// ****************************************************************** +OOVPA_XREF(CDirectSoundVoiceSettings_SetMixBins, 5455, 7, + + XREF_CDirectSoundVoiceSettings_SetMixBins, + XRefZero) + + { 0x1B, 0xEB }, + { 0x32, 0x8B }, + { 0x4C, 0x7C }, + { 0x66, 0x00 }, + { 0x84, 0xF6 }, + { 0x9A, 0xB4 }, + { 0xB4, 0x00 }, +OOVPA_END; +// ****************************************************************** +// * CDirectSoundVoice::CommitDeferredSettings +// ****************************************************************** +OOVPA_XREF(CDirectSoundVoice_CommitDeferredSettings, 5455, 6, + + XREF_CDirectSoundVoice_CommitDeferredSettings, + XRefZero) + + { 0x01, 0x44 }, + { 0x04, 0x8B }, + { 0x07, 0xE8 }, + { 0x0C, 0x33 }, + { 0x0D, 0xC0 }, + { 0x10, 0x00 }, +OOVPA_END; + +// ****************************************************************** +// * CMcpxBuffer_SetBufferData +// ****************************************************************** +OOVPA_XREF(CMcpxBuffer_SetBufferData, 5455, 9, + + XREF_CMcpxBuffer_SetBufferData, + XRefZero) + + // CMcpxBuffer_SetBufferData+0x1E : cmp eax, ebx + { 0x1E, 0x3B }, + { 0x1F, 0xC3 }, + + // CMcpxBuffer_SetBufferData+0x20 : jz +0x0C + { 0x20, 0x74 }, + { 0x21, 0x0C }, + + // CMcpxBuffer_SetBufferData+0x45 : mov [esi+0xBC], ecx + { 0x45, 0x89 }, + { 0x46, 0x8E }, + { 0x47, 0xBC }, + + // CMcpxBuffer_SetBufferData+0x89 : retn 0x08 + { 0x89, 0xC2 }, + { 0x8A, 0x08 }, +OOVPA_END; + +// ****************************************************************** +// * DirectSound::CMemoryManager::PoolAlloc +// ****************************************************************** +OOVPA_NO_XREF(DSound_CMemoryManager_PoolAlloc, 5455, 11) + + { 0x00, 0x56 }, + { 0x24, 0x83 }, + { 0x25, 0x7C }, + { 0x26, 0x24 }, + { 0x27, 0x10 }, + { 0x28, 0x00 }, + { 0x37, 0xF3 }, + { 0x38, 0xAB }, + { 0x44, 0xC2 }, + { 0x45, 0x0C }, + { 0x46, 0x00 }, +OOVPA_END; diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl index 006061c8a..74a62a280 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl @@ -316,23 +316,6 @@ OOVPA_XREF(IDirectSoundBuffer_SetCurrentPosition, 5558, 1+7, OOVPA_END; #endif -// ****************************************************************** -// * CDirectSoundVoiceSettings::SetMixBins -// ****************************************************************** -OOVPA_XREF(CDirectSoundVoiceSettings_SetMixBins, 5558, 7, - - XREF_CDirectSoundVoiceSettings_SetMixBins, - XRefZero) - - { 0x1B, 0xEB }, - { 0x32, 0x8B }, - { 0x4C, 0x7C }, - { 0x66, 0x00 }, - { 0x84, 0xF6 }, - { 0x9A, 0xB4 }, - { 0xB4, 0x00 }, -OOVPA_END; - #if 0 // Replaced with generic OOVPA 4039 // ****************************************************************** // * IDirectSoundBuffer_SetMixBins @@ -527,21 +510,6 @@ OOVPA_XREF(IDirectSoundBuffer_SetMinDistance, 5558, 1+10, { 0x23, 0x00 } OOVPA_END; #endif -// ****************************************************************** -// * CDirectSoundVoice::CommitDeferredSettings -// ****************************************************************** -OOVPA_XREF(CDirectSoundVoice_CommitDeferredSettings, 5558, 6, - - XREF_CDirectSoundVoice_CommitDeferredSettings, - XRefZero) - - { 0x01, 0x44 }, - { 0x04, 0x8B }, - { 0x07, 0xE8 }, - { 0x0C, 0x33 }, - { 0x0D, 0xC0 }, - { 0x10, 0x00 }, -OOVPA_END; // ****************************************************************** // * CDirectSoundVoice::SetDopplerFactor diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl index f21f994f5..bef057276 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl @@ -32,31 +32,6 @@ // * // ****************************************************************** -// ****************************************************************** -// * CMcpxBuffer_SetBufferData -// ****************************************************************** -OOVPA_XREF(CMcpxBuffer_SetBufferData, 5788, 9, - - XREF_CMcpxBuffer_SetBufferData, - XRefZero) - - // CMcpxBuffer_SetBufferData+0x1E : cmp eax, ebx - { 0x1E, 0x3B }, - { 0x1F, 0xC3 }, - - // CMcpxBuffer_SetBufferData+0x20 : jz +0x0C - { 0x20, 0x74 }, - { 0x21, 0x0C }, - - // CMcpxBuffer_SetBufferData+0x45 : mov [esi+0xBC], ecx - { 0x45, 0x89 }, - { 0x46, 0x8E }, - { 0x47, 0xBC }, - - // CMcpxBuffer_SetBufferData+0x89 : retn 0x08 - { 0x89, 0xC2 }, - { 0x8A, 0x08 }, -OOVPA_END; #if 0 // Used CMcpxBuffer_Play 4831 // ****************************************************************** // * DirectSound::CMcpxBuffer::Play @@ -349,24 +324,6 @@ OOVPA_XREF(CMcpxStream_Pause, 5788, 7, OOVPA_END; #endif -// ****************************************************************** -// * DirectSound::CMemoryManager::PoolAlloc -// ****************************************************************** -OOVPA_NO_XREF(DS_CMemoryManager_PoolAlloc, 5788, 11) - - { 0x00, 0x56 }, - { 0x24, 0x83 }, - { 0x25, 0x7C }, - { 0x26, 0x24 }, - { 0x27, 0x10 }, - { 0x28, 0x00 }, - { 0x37, 0xF3 }, - { 0x38, 0xAB }, - { 0x44, 0xC2 }, - { 0x45, 0x0C }, - { 0x46, 0x00 }, -OOVPA_END; - // ****************************************************************** // * XFileCreateMediaObjectAsync // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl b/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl index ed0813760..adc7c2f26 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl @@ -104,9 +104,9 @@ // * IDirectSoundBuffer_QueryInterfaceC // * List of internal functions are not register: // * CDirectSoundBuffer_Release (Is unique, however need multiple OOVPAs to register all revisions) -// * Using XREF_DS_CRefCount_Release +// * Using XREF_DSound_CRefCount_Release // * CDirectSound_Release (Is unique, however need multiple OOVPAs to register all revisions) -// * Using XREF_DS_CRefCount_Release +// * Using XREF_DSound_CRefCount_Release // * 4039 verification needed: // * DirectSoundUseLightHRTF // * IDirectSound_CommitEffectData @@ -221,7 +221,7 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(CMcpxBuffer_Pause, XREF, 4831), REGISTER_OOVPAS(CMcpxBuffer_Play, XREF, 3911, 4134, 4721, 4831), // NOTE: ?Play@CMcpxBuffer@DirectSound@@QAEJK@Z REGISTER_OOVPAS(CMcpxBuffer_Play2, XREF, 4361, 5558), // NOTE: ?Play@CMcpxBuffer@DirectSound@@QAEJ_JK@Z - REGISTER_OOVPAS(CMcpxBuffer_SetBufferData, XREF, 4134, 5788), + REGISTER_OOVPAS(CMcpxBuffer_SetBufferData, XREF, 4134, 5455), REGISTER_OOVPAS(CMcpxBuffer_SetCurrentPosition, XREF, 3911, 4039, 4134, 5558, 5788), REGISTER_OOVPAS(CMcpxBuffer_Stop, XREF, 3911, 4134, 4242), // NOTE: ?Stop@CMcpxBuffer@DirectSound@@QAEJK@Z REGISTER_OOVPAS(CMcpxBuffer_Stop2, XREF, 4361), // NOTE: ?Stop@CMcpxBuffer@DirectSound@@QAEJ_JK@Z @@ -247,11 +247,11 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(CMcpxVoiceClient_SetMixBins, XREF, 3911, 5344), REGISTER_OOVPAS(CMcpxVoiceClient_SetPitch, XREF, 3911), REGISTER_OOVPAS(CMcpxVoiceClient_SetVolume, XREF, 3911, 4039, 4134), - REGISTER_OOVPAS(DS_CRefCount_AddRef, XREF, 3911, 4039), - REGISTER_OOVPAS(DS_CRefCount_Release, XREF, 3911, 4039, 5455), - REGISTER_OOVPAS(CDirectSoundVoiceSettings_SetMixBins, XREF, 4039, 4134, 5344, 5558), + REGISTER_OOVPAS(DSound_CRefCount_AddRef, XREF, 3911, 4039), + REGISTER_OOVPAS(DSound_CRefCount_Release, XREF, 3911, 4039, 5455), + REGISTER_OOVPAS(CDirectSoundVoiceSettings_SetMixBins, XREF, 4039, 4134, 5344, 5455), REGISTER_OOVPAS(CDirectSoundVoiceSettings_SetMixBinVolumes, XREF, 4039, 4134), - REGISTER_OOVPAS(CDirectSoundVoice_CommitDeferredSettings, XREF, 5558), + REGISTER_OOVPAS(CDirectSoundVoice_CommitDeferredSettings, XREF, 5455), REGISTER_OOVPAS(CDirectSoundVoice_SetAllParameters, XREF, 3911, 4039, 4134, 5344, 5558), REGISTER_OOVPAS(CDirectSoundVoice_SetConeAngles, XREF, 3911, 4039, 4134, 5344, 5558), REGISTER_OOVPAS(CDirectSoundVoice_SetConeOrientation, XREF, 3911, 4039, 4134, 5344), @@ -492,7 +492,7 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(XFileCreateMediaObjectEx, PATCH, 4627, 5028), REGISTER_OOVPAS(XWaveFileCreateMediaObject, PATCH, 4627), - REGISTER_OOVPAS(DS_CMemoryManager_PoolAlloc, XREF, 4134, 5788), // For reference purpose only, does not have XREF value. + REGISTER_OOVPAS(DSound_CMemoryManager_PoolAlloc, XREF, 4134, 5455), // For reference purpose only, does not have XREF value. }; // ******************************************************************