diff --git a/src/CxbxKrnl/HLEDataBase.h b/src/CxbxKrnl/HLEDataBase.h index 281c4845e..a355f52db 100644 --- a/src/CxbxKrnl/HLEDataBase.h +++ b/src/CxbxKrnl/HLEDataBase.h @@ -282,7 +282,6 @@ enum XRefDataBaseOffset XREF_DSVOICESETDISTANCEFACTOR, XREF_CDirectSoundVoice_SetConeAngles, XREF_CDirectSoundVoice_SetDopplerFactor, - XREF_DSVOICESETI3DL2SOURCE, XREF_CMcpxVoiceClient_Set3dMode, XREF_CDirectSoundVoice_SetMode, XREF_CDirectSoundBuffer_SetMode, @@ -297,7 +296,7 @@ enum XRefDataBaseOffset XREF_CDirectSoundBuffer_SetPosition, XREF_CDirectSoundBuffer_SetVelocity, XREF_DSBUFFERSETDOPPLERFACTOR, - XREF_DSBUFFERSETI3DL2SOURCE, + XREF_CDirectSoundBuffer_SetI3DL2Source, XREF_CDirectSoundVoice_SetFormat, XREF_CDirectSoundBuffer_SetFormat, XREF_CFullHRTFSource_GetCenterVolume, @@ -320,6 +319,7 @@ enum XRefDataBaseOffset XREF_CDirectSoundBuffer_Pause, XREF_CMcpxBuffer_GetStatus, XREF_CDirectSoundBuffer_GetStatus, + XREF_CMcpxStream_GetStatus, XREF_CDirectSoundStream_SetEG, XREF_CDirectSoundVoice_SetEG, XREF_CMcpxVoiceClient_SetEG, diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl index 1bcc8ae5e..2038c48d8 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl @@ -3375,7 +3375,6 @@ OOVPA_XREF(CMcpxStream_Flush, 4039, 10, { 0x58, 0xE8 }, - { 0x98, 0xC9 }, { 0x99, 0xC3 }, OOVPA_END; @@ -3559,7 +3558,7 @@ OOVPA_END; // ****************************************************************** OOVPA_XREF(CDirectSoundVoice_SetI3DL2Source, 4039, 18, - XREF_DSVOICESETI3DL2SOURCE, + XREF_CDirectSoundVoice_SetI3DL2Source, XRefZero) // CDirectSoundVoice_SetI3DL2Source+0x00 : mov edx, [esp+arg_0] @@ -3594,11 +3593,11 @@ OOVPA_END; // ****************************************************************** OOVPA_XREF(CDirectSoundBuffer_SetI3DL2Source, 4039, 12, - XREF_DSBUFFERSETI3DL2SOURCE, + XREF_CDirectSoundBuffer_SetI3DL2Source, XRefOne) // CDirectSoundBuffer_SetI3DL2Source+0x35 : call [CDirectSoundVoice::SetI3DL2Source] - XREF_ENTRY( 0x35, XREF_DSVOICESETI3DL2SOURCE ), + XREF_ENTRY( 0x35, XREF_CDirectSoundVoice_SetI3DL2Source ), // CDirectSoundBuffer_SetI3DL2Source+0x00 : push esi { 0x00, 0x56 }, @@ -3629,7 +3628,7 @@ OOVPA_XREF(IDirectSoundBuffer_SetI3DL2Source, 4039, 10, XRefOne) // IDirectSoundBuffer_SetI3DL2Source+0x18 : call [CDirectSoundBuffer::SetI3DL2Source] - XREF_ENTRY( 0x19, XREF_DSBUFFERSETI3DL2SOURCE ), + XREF_ENTRY( 0x19, XREF_CDirectSoundBuffer_SetI3DL2Source ), // IDirectSoundBuffer_SetI3DL2Source+0x04 : push [esp+arg_8] { 0x04, 0xFF }, diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl index 9e0c661d1..6a7bb5790 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4134.inl @@ -59,14 +59,17 @@ OOVPA_END; // ****************************************************************** // * DirectSoundDoWork // ****************************************************************** +// Generic OOVPA as of 4134 and newer +// TODO: DirectSoundDoWork 4134 has weak OV list, need to add more or at least use XREF support to be strengthen. OOVPA_NO_XREF(DirectSoundDoWork, 4134, 7) - { 0x06, 0x0F }, - { 0x0E, 0x85 }, - { 0x10, 0x74 }, - { 0x18, 0x85 }, - { 0x1C, 0x0B }, - { 0x22, 0xFF }, - { 0x28, 0xC3 }, + + { 0x06, 0x0F }, + { 0x0E, 0x85 }, + { 0x10, 0x74 }, + { 0x18, 0x85 }, + { 0x1C, 0x0B }, + { 0x22, 0xFF }, + { 0x28, 0xC3 }, OOVPA_END; // ****************************************************************** @@ -2034,7 +2037,7 @@ OOVPA_END; // ****************************************************************** OOVPA_XREF(CDirectSoundVoice_SetI3DL2Source, 4134, 10, - XREF_DSVOICESETI3DL2SOURCE, + XREF_CDirectSoundVoice_SetI3DL2Source, XRefZero) // CDirectSoundVoice_SetI3DL2Source+0x12 : mov esi, [ecx] @@ -2061,11 +2064,11 @@ OOVPA_END; // ****************************************************************** OOVPA_XREF(CDirectSoundBuffer_SetI3DL2Source, 4134, 12, - XREF_DSBUFFERSETI3DL2SOURCE, + XREF_CDirectSoundBuffer_SetI3DL2Source, XRefOne) // CDirectSoundBuffer_SetI3DL2Source+0x35 : call [CDirectSoundVoice::SetI3DL2Source] - XREF_ENTRY( 0x36, XREF_DSVOICESETI3DL2SOURCE ), + XREF_ENTRY( 0x36, XREF_CDirectSoundVoice_SetI3DL2Source ), // CDirectSoundBuffer_SetI3DL2Source+0x00 : push esi { 0x00, 0x56 }, @@ -2097,7 +2100,7 @@ OOVPA_XREF(IDirectSoundBuffer_SetI3DL2Source, 4134, 10, XRefOne) // IDirectSoundBuffer_SetI3DL2Source+0x18 : call [CDirectSoundBuffer::SetI3DL2Source] - XREF_ENTRY( 0x19, XREF_DSBUFFERSETI3DL2SOURCE ), + XREF_ENTRY( 0x19, XREF_CDirectSoundBuffer_SetI3DL2Source ), // IDirectSoundBuffer_SetI3DL2Source+0x04 : push [esp+arg_8] { 0x04, 0xFF }, @@ -2124,7 +2127,7 @@ OOVPA_XREF(CDirectSoundStream_SetI3DL2Source, 4134, 9, XREF_CDirectSoundStream_SetI3DL2Source, XRefOne) - XREF_ENTRY( 0x3A, XREF_DSVOICESETI3DL2SOURCE ), + XREF_ENTRY( 0x3A, XREF_CDirectSoundVoice_SetI3DL2Source ), { 0x00, 0x56 }, { 0x0C, 0x00 }, @@ -3226,19 +3229,19 @@ OOVPA_XREF(CDirectSoundStream_Pause, 4134, 12, // CDirectSoundStream_Pause+0x00 : push esi { 0x00, 0x56 }, - // CDirectSoundStream_Pause+0x20 : mov eax, 0x80004005 + // CDirectSoundStream_Pause+0x21 : mov eax, 0x80004005 { 0x21, 0xB8 }, { 0x22, 0x05 }, { 0x23, 0x40 }, { 0x24, 0x00 }, { 0x25, 0x80 }, - // CDirectSoundStream_Pause+0x2B : mov ecx, [eax+0x24] + // CDirectSoundStream_Pause+0x2C : mov ecx, [eax+0x24] { 0x2C, 0x8B }, { 0x2D, 0x48 }, { 0x2E, 0x24 }, - // CDirectSoundStream_Pause+0x4D : retn 0x08 + // CDirectSoundStream_Pause+0x4E : retn 0x08 { 0x4E, 0xC2 }, { 0x4F, 0x08 }, OOVPA_END; @@ -3269,6 +3272,275 @@ OOVPA_XREF(CMcpxVoiceClient_SetEG, 4134, 12, { 0xC2, 0x04 }, OOVPA_END; +// ****************************************************************** +// * CDirectSound::SetAllParameters +// ****************************************************************** +OOVPA_XREF(CDirectSound_SetAllParameters, 4134, 13, + + XREF_CDirectSound_SetAllParameters, + XRefZero) + + { 0x00, 0x56 }, + { 0x0D, 0x0F }, + + { 0x42, 0xD9 }, + { 0x43, 0x5A }, + { 0x44, 0x3C }, + + { 0x4B, 0xD9 }, + { 0x4C, 0x5A }, + { 0x4D, 0x40 }, + + { 0x54, 0xD9 }, + { 0x55, 0x5A }, + { 0x56, 0x44 }, + + { 0xE3, 0xC2 }, + { 0xE4, 0x0C }, +OOVPA_END; + +// ****************************************************************** +// * CDirectSoundStream_GetInfo +// ****************************************************************** +// Generic OOVPA as of 4134 and newer +OOVPA_NO_XREF(CDirectSoundStream_GetInfo, 4134, 17) + + //CDirectSoundStream_GetInfo+0x00 : push ebx + { 0x00, 0x53 }, + + //CDirectSoundStream_GetInfo+0x2E : mov edi, dword ptr [esp + 10h] + { 0x2E, 0x8B }, + { 0x2F, 0x7C }, + { 0x30, 0x24 }, + { 0x31, 0x10 }, + + //CDirectSoundStream_GetInfo+0x38 : mov, dword ptr [edi + 24h] + { 0x38, 0x8B }, + { 0x39, 0x4F }, + { 0x3A, 0x24 }, + + //CDirectSoundStream_GetInfo+0x43 : mov eax, dword ptr [edi + 20h] + { 0x43, 0x8B }, + { 0x44, 0x47 }, + { 0x45, 0x20 }, + + //CDirectSoundStream_GetInfo+0x49 : and dword ptr [esi + 8], 0 + { 0x49, 0x83 }, + { 0x4A, 0x66 }, + { 0x4B, 0x08 }, + { 0x4C, 0x00 }, + + //CDirectSoundStream_GetInfo+0x64 : ret 8 + { 0x64, 0xC2 }, + { 0x65, 0x08 }, +OOVPA_END; + +// ****************************************************************** +// * CMcpxStream_Flush +// ****************************************************************** +OOVPA_XREF(CMcpxStream_Flush, 4134, 10, + XREF_CMcpxStream_Flush, + XRefZero) + + { 0x00, 0x55 }, + { 0x01, 0x8B }, + + { 0x12, 0x33 }, + + { 0x3D, 0x83 }, + { 0x3E, 0xFE }, + { 0x3F, 0x04 }, + + { 0x56, 0xE8 }, + + { 0x67, 0xE8 }, + + { 0xD0, 0xC9 }, + { 0xD1, 0xC3 }, +OOVPA_END; + +// ****************************************************************** +// * CDirectSoundStream_Flush +// ****************************************************************** +OOVPA_XREF(CDirectSoundStream_Flush, 4134, 9, + XRefNoSaveIndex, + XRefOne) + + //CDirectSoundStream_Flush+0x30 : call [CMcpxStream_Flush] + XREF_ENTRY( 0x31, XREF_CMcpxStream_Flush ), + + { 0x00, 0x56 }, + + { 0x28, 0x8B }, + { 0x2B, 0x08 }, + + { 0x2C, 0x8B }, + { 0x2E, 0x24 }, + + { 0x30, 0xE8 }, + + //CDirectSoundStream_Flush+0x4A : ret 4 + { 0x4A, 0xC2 }, + { 0x4B, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * CMcpxStream_Flush +// ****************************************************************** +OOVPA_XREF(CMcpxStream_GetStatus, 4134, 14, + XREF_CMcpxStream_GetStatus, + XRefZero) + + { 0x00, 0x55 }, + { 0x01, 0x8B }, + + { 0x3D, 0x80 }, + { 0x3E, 0x48 }, + { 0x3F, 0x02 }, + { 0x40, 0x02 }, + + { 0x4B, 0x81 }, + { 0x4C, 0xC9 }, + { 0x4D, 0x00 }, + { 0x4E, 0x00 }, + { 0x4F, 0x04 }, + { 0x50, 0x00 }, + + { 0x65, 0xC2 }, + { 0x66, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * CDirectSoundStream_GetStatus +// ****************************************************************** +// Generic OOVPA as of 4134 and newer +OOVPA_XREF(CDirectSoundStream_GetStatus, 4134, 12, + + XRefNoSaveIndex, + XRefOne) + + // CDirectSoundStream_GetStatus+0x34 : call [CMcpxStream::GetStatus] + XREF_ENTRY( 0x35, XREF_CMcpxStream_GetStatus ), + + // CDirectSoundStream_GetStatus+0x00 : push esi + { 0x00, 0x56 }, + + // CDirectSoundStream_GetStatus+0x21 : mov eax, 0x80004005 + { 0x21, 0xB8 }, + { 0x22, 0x05 }, + { 0x23, 0x40 }, + { 0x24, 0x00 }, + { 0x25, 0x80 }, + + // CDirectSoundStream_GetStatus+0x2C : mov ecx, [eax+0x24] + { 0x2C, 0x8B }, + { 0x2D, 0x48 }, + { 0x2E, 0x24 }, + + // CDirectSoundStream_GetStatus+0x4E : retn 0x08 + { 0x4E, 0xC2 }, + { 0x4F, 0x08 }, +OOVPA_END; + +// ****************************************************************** +// * CDirectSoundStream_Process +// ****************************************************************** +// Generic OOVPA as of 4134 and newer +OOVPA_NO_XREF(CDirectSoundStream_Process, 4134, 15) + + { 0x00, 0x55 }, + + { 0x2D, 0x8B }, + { 0x2F, 0x08 }, + + { 0x30, 0x8B }, + { 0x32, 0x24 }, + + //CDirectSoundStream_Process+0x49 : mov eax, 88780032h + { 0x4A, 0x32 }, + { 0x4B, 0x00 }, + { 0x4C, 0x78 }, + { 0x4D, 0x88 }, + + { 0x52, 0xFF }, + { 0x54, 0x0C }, + + { 0x55, 0x8B }, + { 0x57, 0x24 }, + + { 0x74, 0xC2 }, + { 0x75, 0x0C }, +OOVPA_END; + +// ****************************************************************** +// * CMcpxStream_Discontinuity +// ****************************************************************** +OOVPA_XREF(CMcpxStream_Discontinuity, 4134, 7, + XREF_CMcpxStream_Discontinuity, + XRefOne) + + //CMcpxStream_Discontinuity+0x1C : call [CMcpxStream_Flush] + XREF_ENTRY ( 0x1D, XREF_CMcpxStream_Flush ), + + { 0x00, 0x56 }, + + { 0x01, 0x8B }, + + { 0x1A, 0x8B }, + + { 0x1C, 0xE8 }, + + { 0x23, 0x5E }, + + { 0x24, 0xC3 }, +OOVPA_END; + +// ****************************************************************** +// * CDirectSoundStream_Discontinuity +// ****************************************************************** +OOVPA_XREF(CDirectSoundStream_Discontinuity, 4134, 9, + XRefNoSaveIndex, + XRefOne) + + //CDirectSoundStream_Discontinuity+0x30 : call [CMcpxStream_Discontinuity] + XREF_ENTRY( 0x31, XREF_CMcpxStream_Discontinuity ), + + { 0x00, 0x56 }, + + { 0x28, 0x8B }, + { 0x2B, 0x08 }, + + { 0x2C, 0x8B }, + { 0x2E, 0x24 }, + + { 0x30, 0xE8 }, + + //CDirectSoundStream_Discontinuity+0x4A : ret 4 + { 0x4A, 0xC2 }, + { 0x4B, 0x04 }, +OOVPA_END; + +// ****************************************************************** +// * DirectSound::CMemoryManager::PoolAlloc +// ****************************************************************** +OOVPA_NO_XREF(DS_CMemoryManager_PoolAlloc, 4134, 11) + + { 0x00, 0x56 }, + + { 0x22, 0x83 }, + { 0x23, 0x7C }, + { 0x24, 0x24 }, + { 0x25, 0x10 }, + { 0x26, 0x00 }, + + { 0x35, 0xF3 }, + { 0x36, 0xAB }, + + { 0x42, 0xC2 }, + { 0x43, 0x0C }, + { 0x44, 0x00 }, +OOVPA_END; + // ****************************************************************** // * DSound_4134 // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5344.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5344.inl index 32a706545..12a179926 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5344.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5344.inl @@ -544,7 +544,7 @@ OOVPA_END; // ****************************************************************** OOVPA_XREF(CDirectSoundVoice_SetI3DL2Source, 5344, 10, - XREF_DSVOICESETI3DL2SOURCE, + XREF_CDirectSoundVoice_SetI3DL2Source, XRefZero) // CDirectSoundVoice_SetI3DL2Source+0x12 : mov esi, [ecx] diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl index 19bd4edb0..7dc24260e 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5558.inl @@ -275,6 +275,7 @@ OOVPA_XREF(DirectSoundUseFullHRTF, 5558, 8, OOVPA_END; #endif +#if 0 // Duplicate OOVPA found in 4134 // ****************************************************************** // * DirectSoundDoWork // ****************************************************************** @@ -288,6 +289,7 @@ OOVPA_NO_XREF(DirectSoundDoWork, 5558, 7) { 0x22, 0xFF }, { 0x28, 0xC3 }, OOVPA_END; +#endif // ****************************************************************** // * DirectSound::CDirectSoundBuffer::SetBufferData @@ -1077,7 +1079,7 @@ OOVPA_END; // ****************************************************************** OOVPA_XREF(CDirectSoundVoice_SetI3DL2Source, 5558, 7, - XREF_DSVOICESETI3DL2SOURCE, + XREF_CDirectSoundVoice_SetI3DL2Source, XRefZero) { 0x18, 0x00 }, @@ -1094,10 +1096,10 @@ OOVPA_END; // ****************************************************************** OOVPA_XREF(CDirectSoundBuffer_SetI3DL2Source, 5558, 8, - XREF_DSBUFFERSETI3DL2SOURCE, + XREF_CDirectSoundBuffer_SetI3DL2Source, XRefOne) - XREF_ENTRY( 0x36, XREF_DSVOICESETI3DL2SOURCE ), + XREF_ENTRY( 0x36, XREF_CDirectSoundVoice_SetI3DL2Source ), { 0x0C, 0x00 }, { 0x14, 0x74 }, @@ -1116,7 +1118,7 @@ OOVPA_XREF(IDirectSoundBuffer_SetI3DL2Source, 5558, 9, XRefNoSaveIndex, XRefOne) - XREF_ENTRY( 0x19, XREF_DSBUFFERSETI3DL2SOURCE ), + XREF_ENTRY( 0x19, XREF_CDirectSoundBuffer_SetI3DL2Source ), { 0x02, 0x24 }, { 0x06, 0x24 }, @@ -1701,7 +1703,7 @@ OOVPATable DSound_5558[] = { REGISTER_OOVPA(CFullHRTFSource_GetCenterVolume, 5558, XREF), REGISTER_OOVPA(CHRTFSource_SetFullHRTF5Channel, 5558, XREF), REGISTER_OOVPA(DirectSoundUseFullHRTF, 4134, PATCH), - REGISTER_OOVPA(DirectSoundDoWork, 5558, PATCH), + REGISTER_OOVPA(DirectSoundDoWork, 4134, PATCH), REGISTER_OOVPA(CDirectSoundBuffer_SetBufferData, 5558, XREF), REGISTER_OOVPA(IDirectSoundBuffer_SetBufferData, 5558, PATCH), REGISTER_OOVPA(CMcpxBuffer_SetCurrentPosition, 5558, XREF), diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl index bf0e1eaad..cc52fe0e7 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl @@ -512,8 +512,9 @@ OOVPA_END; // ****************************************************************** // * DirectSound::CMemoryManager::PoolAlloc // ****************************************************************** -OOVPA_NO_XREF(CMemoryManager_PoolAlloc, 5788, 10) +OOVPA_NO_XREF(DS_CMemoryManager_PoolAlloc, 5788, 11) + { 0x00, 0x56 }, { 0x24, 0x83 }, { 0x25, 0x7C }, { 0x26, 0x24 }, @@ -685,7 +686,7 @@ OOVPATable DSound_5788[] = { REGISTER_OOVPA(CDirectSoundStream_Pause, 4134, PATCH), REGISTER_OOVPA(CDirectSoundStream_FlushEx, 5788, XREF), REGISTER_OOVPA(IDirectSoundStream_FlushEx, 4627, PATCH), - REGISTER_OOVPA(DirectSoundDoWork, 5558, PATCH), + REGISTER_OOVPA(DirectSoundDoWork, 4134, PATCH), REGISTER_OOVPA(CDirectSound_SynchPlayback, 5558, PATCH), REGISTER_OOVPA(CDirectSound_EnableHeadphones, 5558, XREF), REGISTER_OOVPA(IDirectSound_EnableHeadphones, 3911, PATCH), @@ -694,7 +695,7 @@ OOVPATable DSound_5788[] = { REGISTER_OOVPA(CDirectSound_GetOutputLevels, 5558, XREF), REGISTER_OOVPA(IDirectSound_GetOutputLevels, 5558, PATCH), REGISTER_OOVPA(IDirectSound_SetEffectData, 3911, PATCH), - REGISTER_OOVPA(CMemoryManager_PoolAlloc, 5788, XREF), + REGISTER_OOVPA(DS_CMemoryManager_PoolAlloc, 5788, XREF), REGISTER_OOVPA(XFileCreateMediaObjectAsync, 5788, PATCH), REGISTER_OOVPA(WaveFormat_CreateXboxAdpcmFormat, 5344, XREF), REGISTER_OOVPA(XAudioCreateAdpcmFormat, 5344, PATCH), diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5849.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5849.inl index a935d6ea1..1634d0777 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.5849.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.5849.inl @@ -197,12 +197,12 @@ OOVPATable DSound_5849[] = { REGISTER_OOVPA(CDirectSoundStream_Pause, 4134, PATCH), REGISTER_OOVPA(CDirectSoundStream_FlushEx, 5788, XREF), REGISTER_OOVPA(IDirectSoundStream_FlushEx, 4627, PATCH), - REGISTER_OOVPA(DirectSoundDoWork, 5558, PATCH), + REGISTER_OOVPA(DirectSoundDoWork, 4134, PATCH), REGISTER_OOVPA(CDirectSound_SynchPlayback, 5558, PATCH), REGISTER_OOVPA(XAudioDownloadEffectsImage, 4627, PATCH), REGISTER_OOVPA(CDirectSound_SetEffectData, 4134, XREF), REGISTER_OOVPA(IDirectSound_SetEffectData, 3911, PATCH), - REGISTER_OOVPA(CMemoryManager_PoolAlloc, 5788, XREF), + REGISTER_OOVPA(DS_CMemoryManager_PoolAlloc, 5788, XREF), REGISTER_OOVPA(XFileCreateMediaObjectAsync, 5788, PATCH), REGISTER_OOVPA(CDirectSoundStream_SetFormat, 4242, PATCH), REGISTER_OOVPA(CDirectSoundStream_SetHeadroom, 5558, PATCH), diff --git a/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl b/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl index de06c9fe9..14c64f05d 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl @@ -40,7 +40,7 @@ // * [3936] Silent Hill 2 | 100% | Contain full library. // * [4039] Nightcaster | 100% | Only has 90% of the library compiled with xbe build. // * [4134] RaceX (Demo) | 1% | Does not have full library? Need to create bunch of OOVPAs... -// * [4134] Blood Omen 2 | 1% | Does not have full library? Need to create bunch of OOVPAs... +// * [4134] Blood Omen 2 | 80% | Does not have full library. // TODO: Known DSound OOVPA issue list // * 3911 to 5933: Cannot make OOVPAs @@ -109,7 +109,6 @@ // * DirectSoundCreateStream // * DirectSoundUseLightHRTF // * IDirectSound_CommitEffectData -// * IDirectSound_GetCaps // * IDirectSound_GetEffectData // * IDirectSound_GetSpeakerConfig // * IDirectSound_GetTime (It is generic) @@ -117,7 +116,6 @@ // * IDirectSound_SetEffectData // * IDirectSound_SetMixBinHeadroom // * IDirectSoundBuffer_PlayEx -// * IDirectSoundBuffer_SetI3DL2Source // * IDirectSoundBuffer_SetNotificationPositions // * CDirectSoundStream_SetFormat // * CDirectSoundStream_SetHeadroom @@ -125,9 +123,57 @@ // * CDirectSoundStream_SetRolloffCurve // * CDirectSoundStream_SetRolloffFactor // * IDirectSoundStream_SetHeadroom -// * 4134 verification needed: (it will grow over time until verifying with Blood Omen 2 title is done) +// * 4134 verification needed: (Verifying with Blood Omen 2 title is done, need different title to find the remaining...) // * CDirectSoundBuffer_SetEG // * IDirectSoundBuffer_SetEG +// * CMcpxVoiceClient_SetLFO +// * CDirectSoundStream_SetAllParameters +// * CDirectSoundStream_SetConeAngles +// * CDirectSoundStream_SetConeOrientation +// * CDirectSoundStream_SetConeOutsideVolume +// * CDirectSoundStream_SetFilter +// * CDirectSoundStream_SetFrequency +// * CDirectSoundStream_SetHeadroom +// * CDirectSoundStream_SetLFO +// * CDirectSoundStream_SetMaxDistance +// * CDirectSoundStream_SetMinDistance +// * CDirectSoundStream_SetMixBinVolumes_8 +// * CDirectSoundStream_SetMixBins +// * CDirectSoundStream_SetMode +// * CDirectSoundStream_SetOutputBuffer +// * CDirectSoundStream_SetPitch +// * CDirectSoundStream_SetVelocity +// * CDirectSoundBuffer_PlayEx +// * CDirectSoundBuffer_SetConeOutsideVolume +// * CDirectSoundBuffer_SetCurrentPosition +// * CDirectSoundBuffer_SetMaxDistance +// * CDirectSoundBuffer_SetMinDistance +// * CDirectSoundBuffer_SetNotificationPositions +// * CDirectSoundBuffer_SetVelocity +// * CDirectSoundBuffer_StopEx +// * CDirectSound_CommitEffectData +// * CDirectSound_EnableHeadphones +// * CDirectSound_GetCaps +// * CDirectSound_GetEffectData +// * CDirectSound_GetSpeakerConfig +// * CDirectSound_SetDistanceFactor +// * CDirectSound_SetDopplerFactor +// * CDirectSound_SetEffectData +// * CDirectSound_SetMixBinHeadroom +// * CDirectSound_SetOrientation +// * CDirectSound_SetPosition +// * CDirectSound_SetRolloffFactor +// * CDirectSound_SetVelocity +// * DirectSoundCreateBuffer +// * DirectSoundUseLightHRTF +// * DirectSoundGetSampleTime +// * IsValidFormat +// * XAudioCreateAdpcmFormat +// * XAudioCreatePcmFormat +// * IDirectSound_CreateSoundStream (CDirectSound_CreateSoundStream is found btw) +// * CDirectSound_SetAllParameters and CDirectSound_SetAllParametersA currently separated +// * Need to review what's the difference and why is it necessary to be separated. +// * It also have various revisions, we should be able to narrow it down to remove duplicates. #ifndef DSOUND_OOVPA_INL @@ -177,8 +223,9 @@ OOVPATable DSound_OOVPAV2[] = { 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 - REGISTER_OOVPAS(CMcpxStream_Discontinuity, XREF, 3911, 4039), - REGISTER_OOVPAS(CMcpxStream_Flush, XREF, 3911, 3936, 4039), + REGISTER_OOVPAS(CMcpxStream_Discontinuity, XREF, 3911, 4039, 4134), + REGISTER_OOVPAS(CMcpxStream_Flush, XREF, 3911, 3936, 4039, 4134), + REGISTER_OOVPAS(CMcpxStream_GetStatus, XREF, 4134), REGISTER_OOVPAS(CMcpxStream_Pause, XREF, 3911, 4039, 4134, /*4361,*/ 4831, 5788), REGISTER_OOVPAS(CSensaura3d_GetFullHRTFFilterPair, XREF, 3911, 3936), REGISTER_OOVPAS(CSensaura3d_GetLiteHRTFFilterPair, XREF, 3911, 3936), @@ -269,13 +316,13 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(CDirectSoundBuffer_StopEx, XREF, 3911, 4039, 4361), REGISTER_OOVPAS(CDirectSoundBuffer_Use3DVoiceData, XREF, 5558), REGISTER_OOVPAS(CDirectSoundStream_AddRef, PATCH, 3911, 4039), - REGISTER_OOVPAS(CDirectSoundStream_Discontinuity, PATCH, 3911, 4039), - REGISTER_OOVPAS(CDirectSoundStream_Flush, PATCH, 3911, 4039), + REGISTER_OOVPAS(CDirectSoundStream_Discontinuity, PATCH, 3911, 4039, 4134), + REGISTER_OOVPAS(CDirectSoundStream_Flush, PATCH, 3911, 4039, 4134), REGISTER_OOVPAS(CDirectSoundStream_FlushEx, XREF, 4627, 5233, 5788), - REGISTER_OOVPAS(CDirectSoundStream_GetInfo, PATCH, 3911, 4039), - REGISTER_OOVPAS(CDirectSoundStream_GetStatus, PATCH, 3911, 4039), + REGISTER_OOVPAS(CDirectSoundStream_GetInfo, PATCH, 3911, 4039, 4134), + REGISTER_OOVPAS(CDirectSoundStream_GetStatus, PATCH, 3911, 4039, 4134), REGISTER_OOVPAS(CDirectSoundStream_Pause, PATCH, 3911, 4039, 4134 /*, 4361, 5558*/), - REGISTER_OOVPAS(CDirectSoundStream_Process, PATCH, 3911, 4039), + REGISTER_OOVPAS(CDirectSoundStream_Process, PATCH, 3911, 4039, 4134), REGISTER_OOVPAS(CDirectSoundStream_Release, PATCH, 3911, 4039, 4134), REGISTER_OOVPAS(CDirectSoundStream_SetAllParameters, PATCH, 3911, 4039, 4134), REGISTER_OOVPAS(CDirectSoundStream_SetConeAngles, PATCH, 3911, 4039), @@ -314,7 +361,7 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(CDirectSound_GetOutputLevels, XREF, 4627, 5558), REGISTER_OOVPAS(CDirectSound_GetSpeakerConfig, PATCH, 3911, 4627), REGISTER_OOVPAS(CDirectSound_GetTime, XREF, 3911), - REGISTER_OOVPAS(CDirectSound_SetAllParameters, XREF, 3911, 4831, 5558), + REGISTER_OOVPAS(CDirectSound_SetAllParameters, XREF, 3911, 4134, 4831, 5558), REGISTER_OOVPAS(CDirectSound_SetAllParametersA, XREF, 4627, 4721, 4831), REGISTER_OOVPAS(CDirectSound_SetDistanceFactor, XREF, 3911, 4039, 4134, 4627, 5344, 5558), REGISTER_OOVPAS(CDirectSound_SetDopplerFactor, XREF, 3911, 4039, 4134, 4627, 5344, 5558, 5788), @@ -416,19 +463,17 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(IDirectSound_SetRolloffFactor, PATCH, 3911, 4134/*, 5344*/), REGISTER_OOVPAS(IDirectSound_SetVelocity, PATCH, 3911 /*, 5558*/), REGISTER_OOVPAS(IDirectSound_SynchPlayback, PATCH, 5233), - REGISTER_OOVPAS(DirectSoundCreate, PATCH, 3911, 4039, 4134), - REGISTER_OOVPAS(DirectSoundCreateBuffer, PATCH, 3911, 4039, 4242), - REGISTER_OOVPAS(DirectSoundCreateStream, PATCH, 3911, 4134, 5788), - REGISTER_OOVPAS(DirectSoundDoWork, PATCH, 3911, 4134, 5558), - REGISTER_OOVPAS(DirectSoundGetSampleTime, PATCH, 3911, 4361), - REGISTER_OOVPAS(DirectSoundUseFullHRTF, PATCH, 3911, 4039, 4134), - REGISTER_OOVPAS(DirectSoundUseLightHRTF, PATCH, 3911), - - REGISTER_OOVPAS(CFullHRTFSource_GetCenterVolume, XREF, 4039, 4134, 5558), REGISTER_OOVPAS(CHRTFSource_SetFullHRTF5Channel, XREF, 4039, 5558), + REGISTER_OOVPAS(DirectSoundCreate, PATCH, 3911, 4039, 4134), + REGISTER_OOVPAS(DirectSoundCreateBuffer, PATCH, 3911, 4039, 4242), + REGISTER_OOVPAS(DirectSoundCreateStream, PATCH, 3911, 4134, 5788), + REGISTER_OOVPAS(DirectSoundDoWork, PATCH, 3911, 4134), + REGISTER_OOVPAS(DirectSoundGetSampleTime, PATCH, 3911, 4361), + REGISTER_OOVPAS(DirectSoundUseFullHRTF, PATCH, 3911, 4039, 4134), + REGISTER_OOVPAS(DirectSoundUseLightHRTF, PATCH, 3911), REGISTER_OOVPAS(WaveFormat_CreateXboxAdpcmFormat, XREF, 5344), REGISTER_OOVPAS(XAudioDownloadEffectsImage, PATCH, 4627, 5558, 5788), @@ -439,8 +484,7 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(XFileCreateMediaObjectEx, PATCH, 4627, 5028), REGISTER_OOVPAS(XWaveFileCreateMediaObject, PATCH, 4627), - - REGISTER_OOVPAS(CMemoryManager_PoolAlloc, XREF, 5788), //TODO: Why is this in here? + REGISTER_OOVPAS(DS_CMemoryManager_PoolAlloc, XREF, 4134, 5788), // For reference purpose only, does not have XREF value. }; // ******************************************************************