From 27619f4b93d914f800b337fa56a90d5433e78ed8 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Fri, 13 Oct 2017 17:13:10 -0500 Subject: [PATCH] Add DirectSoundCreateStream to DSound 4039 Database RalliSport Challenge's [4039] XDemos.xbe now progress a bit further. However, it is only playing a distortion audio loop for now and still has no video output. --- src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl | 30 ++++++++++++++++++++ src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl index 2038c48d8..467444bae 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4039.inl @@ -3669,3 +3669,33 @@ OOVPA_XREF(CDirectSound_GetCaps, 4039, 12, { 0x6C, 0xC2 }, { 0x6D, 0x08 }, OOVPA_END; + +// ****************************************************************** +// * DirectSoundCreateStream +// ****************************************************************** +OOVPA_XREF(DirectSoundCreateStream, 4039, 11, + + XRefNoSaveIndex, + XRefOne) + + // DirectSoundCreateStream+0x2B : call [CDirectSound::CreateSoundStream] + XREF_ENTRY( 0x2C, XREF_CDirectSound_CreateSoundStream ), + + // DirectSoundCreateStream+0x04 : and [ebp-0x04], 0 + { 0x04, 0x83 }, + { 0x05, 0x65 }, + { 0x06, 0xFC }, + + // DirectSoundCreateStream+0x08 : push esi; push edi + { 0x08, 0x56 }, + { 0x09, 0x57 }, + + // DirectSoundCreateStream+0x32 : lea eax,[ebp-04] + { 0x32, 0x8D }, + { 0x33, 0x45 }, + { 0x34, 0xFC }, + + // DirectSoundCreateStream+0x4F : retn 0x08 + { 0x4F, 0xC2 }, + { 0x50, 0x08 }, +OOVPA_END; diff --git a/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl b/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl index a2ef0c599..b905778cc 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.OOVPA.inl @@ -470,7 +470,7 @@ OOVPATable DSound_OOVPAV2[] = { REGISTER_OOVPAS(DirectSoundCreate, PATCH, 3911, 4039, 4134), REGISTER_OOVPAS(DirectSoundCreateBuffer, PATCH, 3911, 4039, 4242), - REGISTER_OOVPAS(DirectSoundCreateStream, PATCH, 3911, 4134, 5788), + REGISTER_OOVPAS(DirectSoundCreateStream, PATCH, 3911, 4039, 4134, 5788), REGISTER_OOVPAS(DirectSoundDoWork, PATCH, 3911, 4134), REGISTER_OOVPAS(DirectSoundGetSampleTime, PATCH, 3911, 4361), REGISTER_OOVPAS(DirectSoundUseFullHRTF, PATCH, 3911, 4039, 4134),