diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index bdcc0e412..ca0814b14 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -255,6 +255,12 @@ $(SOLUTIONDIR)Export.bat + + + + + + @@ -342,6 +348,13 @@ $(SOLUTIONDIR)Export.bat + + + + + + + diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index c5e7898aa..bfcde9784 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -246,9 +246,6 @@ HLEDatabase - - HLEDatabase - HLEDatabase @@ -477,6 +474,27 @@ HLEDatabase\DSound + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + HLEDatabase\Xapi @@ -578,9 +596,6 @@ GUI - - HLEDatabase - HLEDatabase @@ -674,6 +689,30 @@ HLEDatabase\DSound + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + + + HLEDatabase\XactEng + HLEDatabase\Xapi @@ -787,6 +826,9 @@ {a942f43a-b405-4c5d-85cd-ffc84b66ad3f} + + {d63c05a9-f8e1-4ad1-88fb-3f5b97a21063} + {736110f8-9b79-47db-86f5-250d1d4d8b9a} diff --git a/src/CxbxKrnl/HLEDataBase.cpp b/src/CxbxKrnl/HLEDataBase.cpp index 23d7b0485..83ab42508 100644 --- a/src/CxbxKrnl/HLEDataBase.cpp +++ b/src/CxbxKrnl/HLEDataBase.cpp @@ -52,6 +52,7 @@ const char *Sec_D3DX = "D3DX"; const char *Lib_DSOUND = "DSOUND"; const char *Sec_DSOUND = Lib_DSOUND; const char *Lib_XACTENG = "XACTENG"; +const char *Sec_XACTENG = Lib_XACTENG; const char *Lib_XAPILIB = "XAPILIB"; const char *Sec_XPP = "XPP"; const char *Lib_XGRAPHC = "XGRAPHC"; @@ -112,8 +113,7 @@ const char *Sec_XNET = "XNET"; #include "HLEDataBase/XOnline.1.0.5558.inl" #include "HLEDataBase/XOnline.1.0.5788.inl" #include "HLEDataBase/XOnline.1.0.5849.inl" -#include "HLEDataBase/XactEng.1.0.4627.inl" -#include "HLEDataBase/XactEng.1.0.5849.inl" +#include "HLEDataBase/XactEng.OOVPA.inl" // ****************************************************************** @@ -164,6 +164,15 @@ const HLEData HLEDataBase[] = HLE_ENTRY(Lib_DSOUND, DSound, 5558), HLE_ENTRY(Lib_DSOUND, DSound, 5788), HLE_ENTRY(Lib_DSOUND, DSound, 5849), +#endif +#if ENABLE_LEGACY_XACTENG_DB + HLE_ENTRY(Lib_XACTENG, XactEng, 4627), + HLE_ENTRY(Lib_XACTENG, XactEng, 4928), + HLE_ENTRY(Lib_XACTENG, XactEng, 5233), + HLE_ENTRY(Lib_XACTENG, XactEng, 5344), + HLE_ENTRY(Lib_XACTENG, XactEng, 5558), + HLE_ENTRY(Lib_XACTENG, XactEng, 5788), + HLE_ENTRY(Lib_XACTENG, XactEng, 5849), #endif HLE_ENTRY(Lib_XGRAPHC, XG, 3911), HLE_ENTRY(Lib_XGRAPHC, XG, 4034), @@ -190,9 +199,6 @@ const HLEData HLEDataBase[] = HLE_ENTRY(Lib_XONLINES, XOnline, 5558), HLE_ENTRY(Lib_XONLINES, XOnline, 5788), HLE_ENTRY(Lib_XONLINES, XOnline, 5849), - - HLE_ENTRY(Lib_XACTENG, XactEng, 4627), - HLE_ENTRY(Lib_XACTENG, XactEng, 5849), }; const HLEDataV2 HLEDataBaseV2[] = { @@ -214,7 +220,7 @@ const HLEDataV2 HLEDataBaseV2[] = { // //{ Lib_XACTENG, { Sec_XACTENG }, XACTENG_OOVPAV2, XACTENG_OOVPA_SIZEV2 }, - // + // test case: Power Drome (Unluckily, use LTCG.) //{ Lib_XACTENLT,{ Sec_XACTENG }, XACTENG_OOVPAV2, XACTENG_OOVPA_SIZEV2 }, // diff --git a/src/CxbxKrnl/HLEDataBase.h b/src/CxbxKrnl/HLEDataBase.h index c3d9756c7..80791db2d 100644 --- a/src/CxbxKrnl/HLEDataBase.h +++ b/src/CxbxKrnl/HLEDataBase.h @@ -90,6 +90,11 @@ #include "HLEDataBase/XOnline.1.0.5788.h" #include "HLEDataBase/XOnline.1.0.5849.h" #include "HLEDataBase/XactEng.1.0.4627.h" +#include "HLEDataBase/XactEng.1.0.4928.h" +#include "HLEDataBase/XactEng.1.0.5233.h" +#include "HLEDataBase/XactEng.1.0.5344.h" +#include "HLEDataBase/XactEng.1.0.5558.h" +#include "HLEDataBase/XactEng.1.0.5788.h" #include "HLEDataBase/XactEng.1.0.5849.h" // ****************************************************************** @@ -349,6 +354,7 @@ enum XRefDataBaseOffset XREF_XACT_CEngine_DownloadEffectsImage, XREF_XACT_CEngine_CreateSoundSource, XREF_XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, + XREF_XACT_CSoundBank_Play, XREF_XACT_CEngine_RegisterNotification, XREF_XACT_CEngine_GetNotification, XREF_XACT_CEngine_UnRegisterWaveBank, diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4627.inl b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4627.inl index 66cc9e291..ad858123e 100644 --- a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4627.inl +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4627.inl @@ -57,31 +57,6 @@ OOVPA_NO_XREF(XACTEngineCreate, 4627, 11) { 0x9B, 0x08 }, OOVPA_END; -// ****************************************************************** -// * XACTEngineCreate -// ****************************************************************** -OOVPA_NO_XREF(XACTEngineCreate, 4928, 11) - - // XACTEngineCreate+0x09 : movzx ebx, al - { 0x09, 0x0F }, - { 0x0A, 0xB6 }, - { 0x0B, 0xD8 }, - - // XACTEngineCreate+0x2B : push edi - { 0x2B, 0x57 }, - - // XACTEngineCreate+0x2C : push 0x120 - { 0x2C, 0x68 }, - { 0x2D, 0x20 }, - { 0x2E, 0x01 }, - { 0x2F, 0x00 }, - { 0x30, 0x00 }, - - // XACTEngineCreate+0x9E : retn 0x8 - { 0x9E, 0xC2 }, - { 0x9F, 0x08 }, -OOVPA_END; - // ****************************************************************** // * XACT::CEngine::RegisterWaveBank // ****************************************************************** @@ -150,33 +125,6 @@ OOVPA_XREF(XACT_CEngine_RegisterStreamedWaveBank, 4627, 8, { 0x8E, 0x0C }, OOVPA_END; -// ****************************************************************** -// * XACT::CEngine::RegisterStreamedWaveBank -// ****************************************************************** -OOVPA_XREF(XACT_CEngine_RegisterStreamedWaveBank, 4928, 13, - - XREF_XACT_CEngine_RegisterStreamedWaveBank, - XRefZero) - - // XACT_CEngine_RegisterStreamedWaveBank+0x07 : push 0x7C - { 0x07, 0x6A }, - { 0x08, 0x7C }, - // XACT_CEngine_RegisterStreamedWaveBank+0x30 : add esi, 0x8007000E - { 0x30, 0x81 }, - { 0x31, 0xC7 }, - { 0x32, 0x0E }, - { 0x33, 0x00 }, - { 0x34, 0x07 }, - { 0x35, 0x80 }, - // XACT_CEngine_RegisterStreamedWaveBank+0x50 : add ecx, 0x44 - { 0x50, 0x83 }, - { 0x51, 0xC1 }, - { 0x52, 0x44 }, - // XACT_CEngine_RegisterStreamedWaveBank+0x71 : retn 0x0C - { 0x71, 0xC2 }, - { 0x72, 0x0C }, -OOVPA_END; - // ****************************************************************** // * IXACTEngine_RegisterStreamedWaveBank // ****************************************************************** @@ -197,31 +145,6 @@ OOVPA_XREF(IXACTEngine_RegisterStreamedWaveBank, 4627, 9, { 0x1E, 0x0C }, OOVPA_END; -// ****************************************************************** -// * IXACTEngine_RegisterStreamedWaveBank -// ****************************************************************** -OOVPA_XREF(IXACTEngine_RegisterStreamedWaveBank, 4928, 10, - - XRefNoSaveIndex, - XRefOne) - - // IXACTEngine_RegisterStreamedWaveBank+0x22 : call XACT::CEngine::RegisterStreamedWaveBank - XREF_ENTRY( 0x23, XREF_XACT_CEngine_RegisterStreamedWaveBank ), - - // IXACTEngine_RegisterStreamedWaveBank+0x0B : movzx esi, al - { 0x0B, 0x0F }, - { 0x0C, 0xB6 }, - { 0x0D, 0xF0 }, - // IXACTEngine_RegisterStreamedWaveBank+0x0E : mov eax, [esp+0x0C+4] - { 0x0E, 0x8B }, - { 0x0F, 0x44 }, - { 0x10, 0x24 }, - { 0x11, 0x10 }, - // IXACTEngine_RegisterStreamedWaveBank+0x3C : retn 0x0C - { 0x3C, 0xC2 }, - { 0x3D, 0x0C }, -OOVPA_END; - // ****************************************************************** // * XACT::CEngine::CreateSoundBank // ****************************************************************** @@ -240,32 +163,6 @@ OOVPA_XREF(XACT_CEngine_CreateSoundBank, 4627, 8, { 0x7E, 0x10 }, OOVPA_END; -// ****************************************************************** -// * XACT::CEngine::CreateSoundBank -// ****************************************************************** -OOVPA_XREF(XACT_CEngine_CreateSoundBank, 4928, 13, - - XREF_XACT_CEngine_CreateSoundBank, - XRefZero) - // XACT::CEngine::CreateSoundBank+0x02 : push 0x34 - { 0x02, 0x6A }, - { 0x03, 0x34 }, - // XACT::CEngine::CreateSoundBank+0x2B : add edi, 0x8007000E - { 0x2B, 0x81 }, - { 0x2C, 0xC7 }, - { 0x2D, 0x0E }, - { 0x2E, 0x00 }, - { 0x2F, 0x07 }, - { 0x30, 0x80 }, - // XACT::CEngine::CreateSoundBank+0x4F : add ecx, 0x4C - { 0x4F, 0x83 }, - { 0x50, 0xC1 }, - { 0x51, 0x4C }, - // XACT::CEngine::CreateSoundBank+0x73 : retn 0x10 - { 0x73, 0xC2 }, - { 0x74, 0x10 }, -OOVPA_END; - // ****************************************************************** // * IXACTEngine_CreateSoundBank // ****************************************************************** @@ -285,30 +182,6 @@ OOVPA_XREF(IXACTEngine_CreateSoundBank, 4627, 8, { 0x21, 0xC2 }, OOVPA_END; -// ****************************************************************** -// * IXACTEngine_CreateSoundBank -// ****************************************************************** -OOVPA_XREF(IXACTEngine_CreateSoundBank, 4928, 10, - - XRefNoSaveIndex, - XRefOne) - - XREF_ENTRY( 0x27, XREF_XACT_CEngine_CreateSoundBank ), - - // IXACTEngine_CreateSoundBank+0x07 : push [ebp+8+0x10] - { 0x07, 0xFF }, - { 0x08, 0x74 }, - { 0x09, 0x24 }, - { 0x0A, 0x18 }, - // IXACTEngine_CreateSoundBank+0x0B : movzx esi, al - { 0x0B, 0x0F }, - { 0x0C, 0xB6 }, - { 0x0D, 0xF0 }, - // IXACTEngine_CreateSoundBank+0x40 : retn 0x10 - { 0x40, 0xC2 }, - { 0x41, 0x10 }, -OOVPA_END; - // ****************************************************************** // * XACT::CEngine::DownloadEffectsImage // ****************************************************************** @@ -524,28 +397,6 @@ OOVPA_XREF(XACT_CEngine_UnRegisterWaveBank, 4627, 8, { 0x46, 0x08 }, OOVPA_END; -// ****************************************************************** -// * XACT::CEngine::UnRegisterWaveBank -// ****************************************************************** -OOVPA_XREF(XACT_CEngine_UnRegisterWaveBank, 4928, 8, - - XREF_XACT_CEngine_UnRegisterWaveBank, - XRefZero) - - // XACT_CEngine_UnRegisterWaveBank+0x06 : lea eax, [ecx+0x58] - { 0x06, 0x8D }, - { 0x07, 0x41 }, - { 0x08, 0x58 }, - // XACT_CEngine_UnRegisterWaveBank+0x28 : lea edi, [ebx+0x4C] - { 0x28, 0x8D }, - { 0x29, 0x7B }, - { 0x2A, 0x4C }, - // XACT_CEngine_UnRegisterWaveBank+0xBF : retn 0x8 - { 0xBF, 0xC2 }, - { 0xC0, 0x08 }, -OOVPA_END; - - // ****************************************************************** // * IXACTEngine_UnRegisterWaveBank // ****************************************************************** @@ -565,44 +416,19 @@ OOVPA_XREF(IXACTEngine_UnRegisterWaveBank, 4627, 8, { 0x1A, 0x08 }, OOVPA_END; -// ****************************************************************** -// * IXACTEngine_UnRegisterWaveBank -// ****************************************************************** -OOVPA_XREF(IXACTEngine_UnRegisterWaveBank, 4928, 8, - - XRefNoSaveIndex, - XRefOne) - - // IXACTEngine_UnRegisterWaveBank+0x1E : call XACT::CEngine::UnRegisterWaveBank - XREF_ENTRY( 0x1F, XREF_XACT_CEngine_UnRegisterWaveBank ), - - { 0x07, 0xFF }, - { 0x0E, 0x8B }, - { 0x16, 0xF8 }, - { 0x1E, 0xE8 }, - { 0x26, 0xF8 }, - { 0x2E, 0xFF }, - { 0x36, 0x5F }, -OOVPA_END; - // ****************************************************************** // * XactEng_4627 // ****************************************************************** OOVPATable XactEng_4627[] = { REGISTER_OOVPA(XACTEngineCreate, 4627, PATCH), - REGISTER_OOVPA(XACTEngineCreate, 4928, PATCH), REGISTER_OOVPA(XACTEngineDoWork, 4627, PATCH), REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 4627, XREF), REGISTER_OOVPA(IXACTEngine_RegisterWaveBank, 4627, PATCH), REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 4627, XREF), - REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 4928, XREF), REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4627, PATCH), - REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4928, PATCH), REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4627, XREF), - REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4928, XREF), REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4627, PATCH), - REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4928, PATCH), REGISTER_OOVPA(XACT_CEngine_DownloadEffectsImage, 4627, XREF), REGISTER_OOVPA(IXACTEngine_DownloadEffectsImage, 4627, PATCH), REGISTER_OOVPA(XACT_CEngine_CreateSoundSource, 4627, XREF), @@ -615,9 +441,7 @@ OOVPATable XactEng_4627[] = { REGISTER_OOVPA(XACT_CEngine_GetNotification, 4627, XREF), REGISTER_OOVPA(IXACTEngine_GetNotification, 4627, PATCH), REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 4627, XREF), - REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 4928, XREF), REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4627, PATCH), - REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4928, PATCH), }; // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4928.h b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4928.h new file mode 100644 index 000000000..53ccca85f --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4928.h @@ -0,0 +1,42 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.4928.h +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef XACTENG_4928_H +#define XACTENG_4928_H + +#include "OOVPA.h" + +extern OOVPATable XactEng_4928[]; +extern uint32 XactEng_4928_SIZE; + +#endif diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4928.inl b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4928.inl new file mode 100644 index 000000000..5e71cac16 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.4928.inl @@ -0,0 +1,415 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.4928.inl +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** + +// ****************************************************************** +// * XACTEngineCreate +// ****************************************************************** +OOVPA_NO_XREF(XACTEngineCreate, 4928, 11) + + // XACTEngineCreate+0x09 : movzx ebx, al + { 0x09, 0x0F }, + { 0x0A, 0xB6 }, + { 0x0B, 0xD8 }, + + // XACTEngineCreate+0x2B : push edi + { 0x2B, 0x57 }, + + // XACTEngineCreate+0x2C : push 0x120 + { 0x2C, 0x68 }, + { 0x2D, 0x20 }, + { 0x2E, 0x01 }, + { 0x2F, 0x00 }, + { 0x30, 0x00 }, + + // XACTEngineCreate+0x9E : retn 0x8 + { 0x9E, 0xC2 }, + { 0x9F, 0x08 }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::RegisterStreamedWaveBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_RegisterStreamedWaveBank, 4928, 11, + + XREF_XACT_CEngine_RegisterStreamedWaveBank, + XRefZero) + + { 0x04, 0x10 }, //RegisterStreamedWaveBank 0x10 vs RegisterWaveBank 0x14 + { 0x22, 0x8B }, + + { 0x37, 0x2E }, //RegisterStreamedWaveBank 0x2E vs RegisterWaveBank 0x32 + { 0x38, 0xFF }, + { 0x39, 0x74 }, + { 0x3A, 0x24 }, + { 0x3B, 0x14 }, + { 0x3C, 0x8B }, + { 0x3D, 0xCE }, + { 0x3E, 0xE8 }, + + { 0x64, 0xEB }, +OOVPA_END; + +#if 0 // No longer used, replaced by another 4928 version +// ****************************************************************** +// * XACT::CEngine::RegisterStreamedWaveBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_RegisterStreamedWaveBank, 4928, 13, + + XREF_XACT_CEngine_RegisterStreamedWaveBank, + XRefZero) + + // XACT_CEngine_RegisterStreamedWaveBank+0x07 : push 0x7C + { 0x07, 0x6A }, + { 0x08, 0x7C }, + // XACT_CEngine_RegisterStreamedWaveBank+0x30 : add esi, 0x8007000E + { 0x30, 0x81 }, + { 0x31, 0xC7 }, + { 0x32, 0x0E }, + { 0x33, 0x00 }, + { 0x34, 0x07 }, + { 0x35, 0x80 }, + // XACT_CEngine_RegisterStreamedWaveBank+0x50 : add ecx, 0x44 + { 0x50, 0x83 }, + { 0x51, 0xC1 }, + { 0x52, 0x44 }, + // XACT_CEngine_RegisterStreamedWaveBank+0x71 : retn 0x0C + { 0x71, 0xC2 }, + { 0x72, 0x0C }, +OOVPA_END; +#endif + +// ****************************************************************** +// * IXACTEngine_RegisterStreamedWaveBank +// ****************************************************************** +OOVPA_XREF(IXACTEngine_RegisterStreamedWaveBank, 4928, 10, + + XRefNoSaveIndex, + XRefOne) + + // IXACTEngine_RegisterStreamedWaveBank+0x22 : call XACT::CEngine::RegisterStreamedWaveBank + XREF_ENTRY( 0x23, XREF_XACT_CEngine_RegisterStreamedWaveBank ), + + // IXACTEngine_RegisterStreamedWaveBank+0x0B : movzx esi, al + { 0x0B, 0x0F }, + { 0x0C, 0xB6 }, + { 0x0D, 0xF0 }, + // IXACTEngine_RegisterStreamedWaveBank+0x0E : mov eax, [esp+0x0C+4] + { 0x0E, 0x8B }, + { 0x0F, 0x44 }, + { 0x10, 0x24 }, + { 0x11, 0x10 }, + // IXACTEngine_RegisterStreamedWaveBank+0x3C : retn 0x0C + { 0x3C, 0xC2 }, + { 0x3D, 0x0C }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::CreateSoundBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_CreateSoundBank, 4928, 11, + + XREF_XACT_CEngine_CreateSoundBank, + XRefZero) + + { 0x0E, 0x85 }, + { 0x1F, 0x8B }, + { 0x42, 0x8B }, + + { 0x50, 0xC1 }, + { 0x51, 0x4C }, + { 0x52, 0x89 }, + { 0x53, 0x08 }, + { 0x54, 0x8B }, + { 0x55, 0x49 }, + { 0x56, 0x04 }, + { 0x57, 0x89 }, +OOVPA_END; + +#if 0 // No longer used, replaced by another 4928 version +// ****************************************************************** +// * XACT::CEngine::CreateSoundBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_CreateSoundBank, 4928, 13, + + XREF_XACT_CEngine_CreateSoundBank, + XRefZero) + // XACT::CEngine::CreateSoundBank+0x02 : push 0x34 + { 0x02, 0x6A }, + { 0x03, 0x34 }, + // XACT::CEngine::CreateSoundBank+0x2B : add edi, 0x8007000E + { 0x2B, 0x81 }, + { 0x2C, 0xC7 }, + { 0x2D, 0x0E }, + { 0x2E, 0x00 }, + { 0x2F, 0x07 }, + { 0x30, 0x80 }, + // XACT::CEngine::CreateSoundBank+0x4F : add ecx, 0x4C + { 0x4F, 0x83 }, + { 0x50, 0xC1 }, + { 0x51, 0x4C }, + // XACT::CEngine::CreateSoundBank+0x73 : retn 0x10 + { 0x73, 0xC2 }, + { 0x74, 0x10 }, +OOVPA_END; +#endif + +// ****************************************************************** +// * IXACTEngine_CreateSoundBank +// ****************************************************************** +OOVPA_XREF(IXACTEngine_CreateSoundBank, 4928, 10, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x27, XREF_XACT_CEngine_CreateSoundBank ), + + // IXACTEngine_CreateSoundBank+0x07 : push [ebp+8+0x10] + { 0x07, 0xFF }, + { 0x08, 0x74 }, + { 0x09, 0x24 }, + { 0x0A, 0x18 }, + // IXACTEngine_CreateSoundBank+0x0B : movzx esi, al + { 0x0B, 0x0F }, + { 0x0C, 0xB6 }, + { 0x0D, 0xF0 }, + // IXACTEngine_CreateSoundBank+0x40 : retn 0x10 + { 0x40, 0xC2 }, + { 0x41, 0x10 }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::UnRegisterWaveBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_UnRegisterWaveBank, 4928, 8, + + XREF_XACT_CEngine_UnRegisterWaveBank, + XRefZero) + + // XACT_CEngine_UnRegisterWaveBank+0x06 : lea eax, [ecx+0x58] + { 0x06, 0x8D }, + { 0x07, 0x41 }, + { 0x08, 0x58 }, + // XACT_CEngine_UnRegisterWaveBank+0x28 : lea edi, [ebx+0x4C] + { 0x28, 0x8D }, + { 0x29, 0x7B }, + { 0x2A, 0x4C }, + // XACT_CEngine_UnRegisterWaveBank+0xBF : retn 0x8 + { 0xBF, 0xC2 }, + { 0xC0, 0x08 }, +OOVPA_END; + +// ****************************************************************** +// * IXACTEngine_UnRegisterWaveBank +// ****************************************************************** +OOVPA_XREF(IXACTEngine_UnRegisterWaveBank, 4928, 8, + + XRefNoSaveIndex, + XRefOne) + + // IXACTEngine_UnRegisterWaveBank+0x1E : call XACT::CEngine::UnRegisterWaveBank + XREF_ENTRY( 0x1F, XREF_XACT_CEngine_UnRegisterWaveBank ), + + { 0x07, 0xFF }, + { 0x0E, 0x8B }, + { 0x16, 0xF8 }, + { 0x1E, 0xE8 }, + { 0x26, 0xF8 }, + { 0x2E, 0xFF }, + { 0x36, 0x5F }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::CreateSoundSource +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_CreateSoundSource, 4928, 11, + + XREF_XACT_CEngine_CreateSoundSource, + XRefZero) + + { 0x0A, 0x8B }, + { 0x15, 0xE8 }, + + { 0x2C, 0x05 }, + { 0x2D, 0x8B }, + { 0x2E, 0x4D }, + { 0x2F, 0x10 }, + { 0x30, 0x89 }, + { 0x31, 0x31 }, + { 0x32, 0x5E }, + { 0x33, 0x5D }, + { 0x34, 0xC2 }, +OOVPA_END; + +// ****************************************************************** +// * IXACTEngine_CreateSoundSource +// ****************************************************************** +OOVPA_XREF(IXACTEngine_CreateSoundSource, 4928, 9, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x23, XREF_XACT_CEngine_CreateSoundSource ), + + { 0x02, 0xE8 }, + { 0x09, 0x24 }, + { 0x12, 0xFF }, + { 0x18, 0x83 }, + { 0x1C, 0xD9 }, + { 0x20, 0xC8 }, + { 0x3C, 0xC2 }, + { 0x3D, 0x0C }, +OOVPA_END; + +// ****************************************************************** +// * IXACTEngine_GetNotification +// ****************************************************************** +OOVPA_XREF(IXACTEngine_GetNotification, 4928, 9, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x23, XREF_XACT_CEngine_GetNotification ), + + { 0x02, 0xE8 }, + { 0x09, 0x24 }, + { 0x12, 0xFF }, + { 0x18, 0x83 }, + { 0x1C, 0xD9 }, + { 0x20, 0xC8 }, + { 0x3C, 0xC2 }, + { 0x3D, 0x0C }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CSoundBank::GetSoundCueIndexFromFriendlyName +// ****************************************************************** +OOVPA_XREF(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, 4928, 13, + + XREF_XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, + XRefZero) + + { 0x03, 0x51 }, + { 0x1F, 0x80 }, + + { 0x30, 0x8D }, + { 0x31, 0x3C }, + { 0x32, 0xC1 }, + { 0x33, 0x85 }, + { 0x34, 0xFF }, + { 0x35, 0x74 }, + { 0x36, 0x4D }, + { 0x37, 0x53 }, + { 0x38, 0x8B }, + + { 0x4A, 0x03 }, + { 0x5F, 0xE8 }, +OOVPA_END; + +// ****************************************************************** +// * IXACTSoundBank_GetSoundCueIndexFromFriendlyName +// ****************************************************************** +OOVPA_XREF(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, 4928, 9, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x17, XREF_XACT_CSoundBank_GetSoundCueIndexFromFriendlyName ), + + { 0x02, 0xE8 }, + { 0x09, 0x24 }, + { 0x12, 0xFF }, + { 0x16, 0xE8 }, + { 0x1B, 0x85 }, + { 0x2C, 0x8B }, + { 0x30, 0xC2 }, + { 0x31, 0x0C }, +OOVPA_END; + +// ****************************************************************** +// * IXACTEngine_RegisterNotification +// ****************************************************************** +OOVPA_XREF(IXACTEngine_RegisterNotification, 4928, 8, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x1F, XREF_XACT_CEngine_RegisterNotification ), + + { 0x02, 0xE8 }, + { 0x09, 0x24 }, + { 0x14, 0x83 }, + { 0x18, 0xD9 }, + { 0x1C, 0xC8 }, + { 0x38, 0xC2 }, + { 0x39, 0x08 }, +OOVPA_END; + +// ****************************************************************** +// * XactEng_4928 +// ****************************************************************** +OOVPATable XactEng_4928[] = { + + REGISTER_OOVPA(XACTEngineCreate, 4928, PATCH), + REGISTER_OOVPA(XACTEngineDoWork, 4627, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_GetNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_GetNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, 4928, XREF), + REGISTER_OOVPA(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundSource, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundSource, 4928, PATCH), + + // ****************************************************************** + // Provisional registration functions in XDK 4928 + // TODO: Need test cases + // ****************************************************************** + REGISTER_OOVPA(XACT_CEngine_DownloadEffectsImage, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_DownloadEffectsImage, 4627, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterWaveBank, 4627, PATCH), + REGISTER_OOVPAS(IXACTSoundBank_Play, PATCH, 4627), + // ****************************************************************** +}; + +// ****************************************************************** +// * XACTENG_4928_SIZE +// ****************************************************************** +uint32 XactEng_4928_SIZE = sizeof(XactEng_4928); diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5233.h b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5233.h new file mode 100644 index 000000000..79c23d1ea --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5233.h @@ -0,0 +1,42 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5233.h +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef XACTENG_5233_H +#define XACTENG_5233_H + +#include "OOVPA.h" + +extern OOVPATable XactEng_5233[]; +extern uint32 XactEng_5233_SIZE; + +#endif diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5233.inl b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5233.inl new file mode 100644 index 000000000..be067b7f1 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5233.inl @@ -0,0 +1,218 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5233.inl +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2017 jarupxx +// * +// * All rights reserved +// * +// ****************************************************************** + +// ***************************************************************** +// * XACTEngineCreate +// ****************************************************************** +OOVPA_NO_XREF(XACTEngineCreate, 5120, 12) + + { 0x11, 0x85 }, + { 0x29, 0xEB }, + + { 0x5F, 0x24 }, + { 0x60, 0xFF }, + { 0x61, 0x74 }, + { 0x62, 0x24 }, + { 0x63, 0x10 }, + { 0x64, 0x8B }, + { 0x65, 0xCF }, + { 0x66, 0xE8 }, + + { 0xA2, 0xC2 }, + { 0xA3, 0x08 }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::RegisterStreamedWaveBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_RegisterStreamedWaveBank, 5233, 11, + + XREF_XACT_CEngine_RegisterStreamedWaveBank, + XRefZero) + + { 0x04, 0x10 }, //RegisterStreamedWaveBank 0x10 vs RegisterWaveBank 0x14 + { 0x25, 0x8B }, + + { 0x3A, 0x2E }, //RegisterStreamedWaveBank 0x2E vs RegisterWaveBank 0x32 + { 0x3B, 0xFF }, + { 0x3C, 0x74 }, + { 0x3D, 0x24 }, + { 0x3E, 0x14 }, + { 0x3F, 0x8B }, + { 0x40, 0xCE }, + { 0x41, 0xE8 }, + + { 0x67, 0xEB }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::UnRegisterWaveBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_UnRegisterWaveBank, 5120, 13, + + XREF_XACT_CEngine_UnRegisterWaveBank, + XRefZero) + + + { 0x0E, 0x51 }, + { 0x1F, 0x00 }, + + { 0x25, 0x8B }, + { 0x26, 0x7C }, + { 0x27, 0x24 }, + { 0x28, 0x10 }, + { 0x29, 0x83 }, + { 0x2A, 0xC7 }, + { 0x2B, 0x4C }, + { 0x2C, 0x8B }, + { 0x2D, 0x37 }, + + { 0x45, 0xF6 }, + { 0x62, 0xC2 }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::RegisterWaveBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_RegisterWaveBank, 5120, 12, + + XREF_XACT_CEngine_RegisterWaveBank, + XRefZero) + + { 0x04, 0x14 }, //RegisterStreamedWaveBank 0x10 vs RegisterWaveBank 0x14 + { 0x17, 0x3B }, + + { 0x37, 0x32 }, + { 0x38, 0xFF }, + { 0x39, 0x74 }, + { 0x3A, 0x24 }, + { 0x3B, 0x18 }, + { 0x3C, 0x8B }, + { 0x3D, 0xCE }, + { 0x3E, 0xFF }, + + { 0x79, 0xC2 }, + { 0x7A, 0x10 }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CEngine::RegisterWaveBank +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_RegisterWaveBank, 5233, 12, + + XREF_XACT_CEngine_RegisterWaveBank, + XRefZero) + + { 0x04, 0x14 }, //RegisterStreamedWaveBank 0x10 vs RegisterWaveBank 0x14 + { 0x1A, 0x3B }, + + { 0x3A, 0x32 }, + { 0x3B, 0xFF }, + { 0x3C, 0x74 }, + { 0x3D, 0x24 }, + { 0x3E, 0x18 }, + { 0x3F, 0x8B }, + { 0x40, 0xCE }, + { 0x41, 0xFF }, + + { 0x7C, 0xC2 }, + { 0x7D, 0x10 }, +OOVPA_END; + +// ****************************************************************** +// * IXACTEngine_RegisterWaveBank +// ****************************************************************** +OOVPA_XREF(IXACTEngine_RegisterWaveBank, 5120, 10, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x27, XREF_XACT_CEngine_RegisterWaveBank ), + + // IXACTEngine_RegisterWaveBank+0x07 : push [ebp+8+0x10] + { 0x07, 0xFF }, + { 0x08, 0x74 }, + { 0x09, 0x24 }, + { 0x0A, 0x18 }, + + // IXACTEngine_RegisterWaveBank+0x0B : movzx esi, al + { 0x0B, 0x0F }, + { 0x0C, 0xB6 }, + { 0x0D, 0xF0 }, + + // IXACTEngine_RegisterWaveBank+0x40 : retn 0x10 + { 0x40, 0xC2 }, + { 0x41, 0x10 }, +OOVPA_END; + +// ****************************************************************** +// * XactEng_5233 +// ****************************************************************** +OOVPATable XactEng_5233[] = { + + REGISTER_OOVPA(XACTEngineCreate, 5120, PATCH), + REGISTER_OOVPA(XACTEngineDoWork, 4627, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 4928, XREF), // For 5120 + REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 5120, XREF), + REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_GetNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_GetNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 5120, XREF), + REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterWaveBank, 5120, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundSource, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundSource, 4928, PATCH), + + // ****************************************************************** + // Provisional registration functions in XDK 5233 + // TODO: Need test cases + // ****************************************************************** + REGISTER_OOVPA(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, 4928, XREF), + REGISTER_OOVPA(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_DownloadEffectsImage, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_DownloadEffectsImage, 4627, PATCH), + REGISTER_OOVPAS(IXACTSoundBank_Play, PATCH, 4627), + // ****************************************************************** +}; + +// ****************************************************************** +// * XACTENG_5233_SIZE +// ****************************************************************** +uint32 XactEng_5233_SIZE = sizeof(XactEng_5233); diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5344.h b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5344.h new file mode 100644 index 000000000..ab1a3c121 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5344.h @@ -0,0 +1,42 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5344.h +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef XACTENG_5344_H +#define XACTENG_5344_H + +#include "OOVPA.h" + +extern OOVPATable XactEng_5344[]; +extern uint32 XactEng_5344_SIZE; + +#endif diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5344.inl b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5344.inl new file mode 100644 index 000000000..74f5c1877 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5344.inl @@ -0,0 +1,168 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5344.inl +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2017 jarupxx +// * +// * All rights reserved +// * +// ****************************************************************** + +// ****************************************************************** +// * XACT::CEngine::DownloadEffectsImage +// ****************************************************************** +OOVPA_XREF(XACT_CEngine_DownloadEffectsImage, 5344, 12, + + XREF_XACT_CEngine_DownloadEffectsImage, + XRefZero) + + { 0x02, 0xEC }, + + { 0x08, 0x46 }, + { 0x09, 0x10 }, + { 0x0A, 0x57 }, + { 0x0B, 0x8B }, + { 0x0C, 0x7D }, + { 0x0D, 0x18 }, + { 0x0E, 0x57 }, + { 0x0F, 0xFF }, + + { 0x1E, 0x85 }, + { 0x2A, 0xC2 }, + { 0x2B, 0x14 }, +OOVPA_END; + +// ****************************************************************** +// * IXACTEngine_DownloadEffectsImage +// ****************************************************************** +OOVPA_XREF(IXACTEngine_DownloadEffectsImage, 5344, 11, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x29, XREF_XACT_CEngine_DownloadEffectsImage ), + + { 0x05, 0xE8 }, + + { 0x19, 0x8B }, + { 0x1A, 0xC8 }, + { 0x1B, 0xFF }, + { 0x1C, 0x75 }, + { 0x1D, 0x0C }, + { 0x1E, 0x83 }, + { 0x1F, 0xC0 }, + + { 0x43, 0xC2 }, + { 0x44, 0x14 }, +OOVPA_END; + +// ****************************************************************** +// * XACT::CSoundBank::Play +// ****************************************************************** +OOVPA_XREF(XACT_CSoundBank_Play, 5344, 12, + + XREF_XACT_CSoundBank_Play, + XRefZero) + + { 0x08, 0x57 }, + { 0x1F, 0x89 }, + + { 0x7B, 0x89 }, + { 0x7C, 0x45 }, + { 0x7D, 0xFC }, + { 0x7E, 0xEB }, + { 0x7F, 0x53 }, + { 0x80, 0x3B }, + { 0x81, 0xC7 }, + { 0x82, 0x74 }, + + { 0x9B, 0x68 }, + { 0xA5, 0x83 }, +OOVPA_END; + +// ****************************************************************** +// * IXACTSoundBank_PlayEx +// ****************************************************************** +OOVPA_XREF(IXACTSoundBank_PlayEx, 5344, 11, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x17, XREF_XACT_CSoundBank_Play ), + + { 0x01, 0x57 }, + { 0x0E, 0xFF }, + { 0x0F, 0x74 }, + { 0x10, 0x24 }, + { 0x11, 0x14 }, + { 0x1B, 0x85 }, + { 0x1C, 0xF6 }, + { 0x1D, 0x8B }, + { 0x30, 0xC2 }, + { 0x31, 0x0C }, +OOVPA_END; + +// ****************************************************************** +// * XactEng_5344 +// ****************************************************************** +OOVPATable XactEng_5344[] = { + + REGISTER_OOVPA(XACTEngineCreate, 5120, PATCH), + REGISTER_OOVPA(XACTEngineDoWork, 4627, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 5120, XREF), + REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_GetNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_GetNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, 4928, XREF), + REGISTER_OOVPA(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterWaveBank, 5120, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundSource, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundSource, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_DownloadEffectsImage, 5344, XREF), + REGISTER_OOVPA(IXACTEngine_DownloadEffectsImage, 5344, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_Play, 5344, XREF), + REGISTER_OOVPA(IXACTSoundBank_PlayEx, 5344, XREF), // Not Implemented yet. + + // ****************************************************************** + // Provisional registration functions in XDK 5344 + // TODO: Need test cases + // ****************************************************************** + REGISTER_OOVPAS(IXACTSoundBank_Play, PATCH, 4627), + // ****************************************************************** +}; + +// ****************************************************************** +// * XACTENG_5344_SIZE +// ****************************************************************** +uint32 XactEng_5344_SIZE = sizeof(XactEng_5344); diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5558.h b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5558.h new file mode 100644 index 000000000..3dfdd636f --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5558.h @@ -0,0 +1,42 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5558.h +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef XACTENG_5558_H +#define XACTENG_5558_H + +#include "OOVPA.h" + +extern OOVPATable XactEng_5558[]; +extern uint32 XactEng_5558_SIZE; + +#endif diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5558.inl b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5558.inl new file mode 100644 index 000000000..65bf65df9 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5558.inl @@ -0,0 +1,98 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5558.inl +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2017 jarupxx +// * +// * All rights reserved +// * +// ****************************************************************** + +// ****************************************************************** +// * XACT::CSoundBank::Play +// ****************************************************************** +OOVPA_XREF(XACT_CSoundBank_Play, 5558, 12, + + XREF_XACT_CSoundBank_Play, + XRefZero) + + { 0x06, 0x8B }, + + { 0x10, 0x75 }, + { 0x11, 0x0C }, + { 0x12, 0x8B }, + { 0x13, 0x5E }, + { 0x14, 0x04 }, + { 0x15, 0x8B }, + { 0x16, 0x46 }, + { 0x17, 0x08 }, + + { 0x27, 0x85 }, + { 0x3B, 0xE9 }, + { 0x55, 0x35 }, +OOVPA_END; + +// ****************************************************************** +// * XactEng_5558 +// ****************************************************************** +OOVPATable XactEng_5558[] = { + + REGISTER_OOVPA(XACTEngineCreate, 5120, PATCH), + REGISTER_OOVPA(XACTEngineDoWork, 4627, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 5120, XREF), + REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_GetNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_GetNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, 4928, XREF), + REGISTER_OOVPA(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterWaveBank, 5120, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundSource, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundSource, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_DownloadEffectsImage, 5344, XREF), + REGISTER_OOVPA(IXACTEngine_DownloadEffectsImage, 5344, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_Play, 5558, XREF), + REGISTER_OOVPA(IXACTSoundBank_PlayEx, 5344, XREF), // Not Implemented yet. + + // ****************************************************************** + // Provisional registration functions in XDK 5558 + // TODO: Need test cases + // ****************************************************************** + REGISTER_OOVPAS(IXACTSoundBank_Play, PATCH, 4627), + // ****************************************************************** +}; + +// ****************************************************************** +// * XACTENG_5558_SIZE +// ****************************************************************** +uint32 XactEng_5558_SIZE = sizeof(XactEng_5558); diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5788.h b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5788.h new file mode 100644 index 000000000..8097dc116 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5788.h @@ -0,0 +1,42 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5788.h +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef XACTENG_5788_H +#define XACTENG_5788_H + +#include "OOVPA.h" + +extern OOVPATable XactEng_5788[]; +extern uint32 XactEng_5788_SIZE; + +#endif diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5788.inl b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5788.inl new file mode 100644 index 000000000..5d2c58b84 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5788.inl @@ -0,0 +1,74 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->XactEng.1.0.5788.inl +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2017 jarupxx +// * +// * All rights reserved +// * +// ****************************************************************** + +// ****************************************************************** +// * XactEng_5788 +// ****************************************************************** +OOVPATable XactEng_5788[] = { + + REGISTER_OOVPA(XACTEngineCreate, 5120, PATCH), + REGISTER_OOVPA(XACTEngineDoWork, 4627, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 5120, XREF), + REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_GetNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_GetNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, 4928, XREF), + REGISTER_OOVPA(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterWaveBank, 5120, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundSource, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundSource, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_DownloadEffectsImage, 5344, XREF), + REGISTER_OOVPA(IXACTEngine_DownloadEffectsImage, 5344, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_Play, 5558, XREF), + REGISTER_OOVPA(IXACTSoundBank_PlayEx, 5344, XREF), // Not Implemented yet. + + // ****************************************************************** + // Provisional registration functions in XDK 5788 + // TODO: Need test cases + // ****************************************************************** + REGISTER_OOVPAS(IXACTSoundBank_Play, PATCH, 4627), + // ****************************************************************** +}; + +// ****************************************************************** +// * XACTENG_5788_SIZE +// ****************************************************************** +uint32 XactEng_5788_SIZE = sizeof(XactEng_5788); diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5849.inl b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5849.inl index 5288bdc09..e48ecc571 100644 --- a/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5849.inl +++ b/src/CxbxKrnl/HLEDataBase/XactEng.1.0.5849.inl @@ -60,8 +60,36 @@ OOVPA_END; // * XactEng_5849 // ****************************************************************** OOVPATable XactEng_5849[] = { + REGISTER_OOVPA(XACTEngineCreate, 5849, PATCH), REGISTER_OOVPA(XACTEngineDoWork, 4627, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterStreamedWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterStreamedWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundBank, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_UnRegisterWaveBank, 5120, XREF), + REGISTER_OOVPA(IXACTEngine_UnRegisterWaveBank, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_GetNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_GetNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, 4928, XREF), + REGISTER_OOVPA(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterWaveBank, 5233, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterWaveBank, 5120, PATCH), + REGISTER_OOVPA(XACT_CEngine_RegisterNotification, 4627, XREF), + REGISTER_OOVPA(IXACTEngine_RegisterNotification, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_CreateSoundSource, 4928, XREF), + REGISTER_OOVPA(IXACTEngine_CreateSoundSource, 4928, PATCH), + REGISTER_OOVPA(XACT_CEngine_DownloadEffectsImage, 5344, XREF), + REGISTER_OOVPA(IXACTEngine_DownloadEffectsImage, 5344, PATCH), + REGISTER_OOVPA(XACT_CSoundBank_Play, 5558, XREF), + REGISTER_OOVPA(IXACTSoundBank_PlayEx, 5344, XREF), // Not Implemented yet. + + // ****************************************************************** + // Provisional registration functions in XDK 5849 + // TODO: Need test cases + // ****************************************************************** + REGISTER_OOVPAS(IXACTSoundBank_Play, PATCH, 4627), + // ****************************************************************** }; // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/XactEng.OOVPA.inl b/src/CxbxKrnl/HLEDataBase/XactEng.OOVPA.inl new file mode 100644 index 000000000..a10251143 --- /dev/null +++ b/src/CxbxKrnl/HLEDataBase/XactEng.OOVPA.inl @@ -0,0 +1,83 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->HLEDatabase->XactEng.OOVPA.inl +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2017 jarupxx +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef XACTENG_OOVPA_INL +#define XACTENG_OOVPA_INL + +#include "../OOVPA.h" + +#include "HLEDataBase/XactEng.1.0.4627.inl" +#include "HLEDataBase/XactEng.1.0.4928.inl" +#include "HLEDataBase/XactEng.1.0.5233.inl" +#include "HLEDataBase/XactEng.1.0.5344.inl" +#include "HLEDataBase/XactEng.1.0.5558.inl" +#include "HLEDataBase/XactEng.1.0.5788.inl" +#include "HLEDataBase/XactEng.1.0.5849.inl" + + +// ****************************************************************** +// * XACTENG_OOVPA +// ****************************************************************** +OOVPATable XACTENG_OOVPAV2[] = { + + REGISTER_OOVPAS(XACTEngineCreate, PATCH, 4627, 4928, 5120, 5849), + REGISTER_OOVPAS(XACTEngineDoWork, PATCH, 4627), + REGISTER_OOVPAS(XACT_CEngine_CreateSoundBank, XREF, 4627, 4928), + REGISTER_OOVPAS(XACT_CEngine_CreateSoundSource, XREF, 4627, 4928), + REGISTER_OOVPAS(XACT_CEngine_DownloadEffectsImage, XREF, 4627, 5344), + REGISTER_OOVPAS(XACT_CEngine_GetNotification, XREF, 4627), + REGISTER_OOVPAS(XACT_CEngine_RegisterNotification, XREF, 4627), + REGISTER_OOVPAS(XACT_CEngine_RegisterStreamedWaveBank, XREF, 4627, 4928, 5233), + REGISTER_OOVPAS(XACT_CEngine_RegisterWaveBank, XREF, 4627, 5120, 5233), + REGISTER_OOVPAS(XACT_CEngine_UnRegisterWaveBank, XREF, 4627, 4928, 5120), + REGISTER_OOVPAS(XACT_CSoundBank_GetSoundCueIndexFromFriendlyName, XREF, 4627, 4928), + REGISTER_OOVPAS(XACT_CSoundBank_Play, XREF, 5344, 5558), + REGISTER_OOVPAS(IXACTEngine_CreateSoundBank, PATCH, 4627, 4928), + REGISTER_OOVPAS(IXACTEngine_CreateSoundSource, PATCH, 4627, 4928), + REGISTER_OOVPAS(IXACTEngine_DownloadEffectsImage, PATCH, 4627, 5344), + REGISTER_OOVPAS(IXACTEngine_GetNotification, PATCH, 4627, 4928), + REGISTER_OOVPAS(IXACTEngine_RegisterNotification, PATCH, 4627, 4928), + REGISTER_OOVPAS(IXACTEngine_RegisterStreamedWaveBank, PATCH, 4627, 4928), + REGISTER_OOVPAS(IXACTEngine_RegisterWaveBank, PATCH, 4627, 5120), + REGISTER_OOVPAS(IXACTEngine_UnRegisterWaveBank, PATCH, 4627, 4928), + REGISTER_OOVPAS(IXACTSoundBank_GetSoundCueIndexFromFriendlyName, PATCH, 4627, 4928), + REGISTER_OOVPAS(IXACTSoundBank_Play, PATCH, 4627), + REGISTER_OOVPAS(IXACTSoundBank_PlayEx, XREF, 5344), // Not Implemented yet. +}; + +// ****************************************************************** +// * XACTENG_OOVPA_SIZE +// ****************************************************************** +uint32 XACTENG_OOVPA_SIZEV2 = sizeof(XACTENG_OOVPAV2); + +#endif diff --git a/src/CxbxKrnl/HLEIntercept.cpp b/src/CxbxKrnl/HLEIntercept.cpp index 8fdc0a4c6..51c270dc5 100644 --- a/src/CxbxKrnl/HLEIntercept.cpp +++ b/src/CxbxKrnl/HLEIntercept.cpp @@ -385,6 +385,18 @@ void EmuHLEIntercept(Xbe::Header *pXbeHeader) if (OrigBuildVersion == 4531) BuildVersion = 4361; } + if (strcmp(LibraryName.c_str(), Lib_XACTENG) == 0) + { + // Skip scanning for XACTENG symbols when LLE APU is selected + if (bLLE_APU) + continue; + +#if ENABLE_LEGACY_XACTENG_DB + // Change a few XACTENG versions to similar counterparts + if (OrigBuildVersion == 4928 || BuildVersion == 5028) + BuildVersion = 4928; +#endif + } if(bXRefFirstPass) {