Skip to content

Commit

Permalink
Merge pull request #405 from jarupxx/sig
Browse files Browse the repository at this point in the history
Improved signatures
  • Loading branch information
PatrickvL committed Apr 29, 2017
2 parents 886229b + 1224a16 commit e250b1f
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 86 deletions.
8 changes: 4 additions & 4 deletions src/CxbxKrnl/HLEDataBase/D3D8.1.0.4627.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1355,10 +1355,10 @@ OOVPA_NO_XREF(D3DDevice_DrawVerticesUP, 4627, 10)
{ 0x31, 0x04 }, // (Offset,Value)-Pair #6
{ 0x32, 0x08 }, // (Offset,Value)-Pair #7

// D3DDevice_DrawVerticesUP+0xC2 : cmp esi, 0x80
{ 0xC2, 0x81 }, // (Offset,Value)-Pair #8
{ 0xC3, 0xFE }, // (Offset,Value)-Pair #9
{ 0xC4, 0x80 }, // (Offset,Value)-Pair #10
// D3DDevice_DrawVerticesUP+0x8A : mov [ebp+arg_C], eax
{ 0x8A, 0x89 }, // (Offset,Value)-Pair #8
{ 0x8B, 0x45 }, // (Offset,Value)-Pair #9
{ 0x8C, 0x14 }, // (Offset,Value)-Pair #10
OOVPA_END;

// ******************************************************************
Expand Down
17 changes: 16 additions & 1 deletion src/CxbxKrnl/HLEDataBase/D3D8.1.0.5028.inl
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,21 @@ OOVPA_NO_XREF(D3DDevice_GetOverlayUpdateStatus, 5028, 12)
{ 0x1C, 0xC3 }, // (Offset,Value)-Pair #12
OOVPA_END;

// ******************************************************************
// * D3D::CDevice::KickOff
// ******************************************************************
OOVPA_NO_XREF(D3DDevice_KickOff, 5028, 8)

{ 0x07, 0x08 },
{ 0x17, 0xC4 },
{ 0x18, 0x20 },
{ 0x19, 0x75 },
{ 0x1A, 0x63 },
{ 0x1B, 0xA1 },
{ 0x6D, 0x85 },
{ 0x7E, 0xBA },
OOVPA_END;

// ******************************************************************
// * D3D8_5028
// ******************************************************************
Expand Down Expand Up @@ -905,7 +920,7 @@ OOVPATable D3D8_5028[] = {
REGISTER_OOVPA(D3D_SetFence, 5028, XREF),
REGISTER_OOVPA(D3DDevice_InsertFence, 3925, PATCH),
REGISTER_OOVPA(D3DDevice_IsFencePending, 5028, PATCH),
REGISTER_OOVPA(D3DDevice_KickOff, 4627, PATCH),
REGISTER_OOVPA(D3DDevice_KickOff, 5028, PATCH),
REGISTER_OOVPA(D3DDevice_SetPixelShaderConstant, 4928, PATCH),
REGISTER_OOVPA(D3DDevice_SetRenderState_TwoSidedLighting, 4134, PATCH), // Beware of the typo...
REGISTER_OOVPA(D3DDevice_GetTexture2, 4627, PATCH),
Expand Down
19 changes: 19 additions & 0 deletions src/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,24 @@ OOVPA_END;
// ******************************************************************
#define DirectSound_CDirectSoundVoice_SetFormat_4627 DirectSound_CDirectSoundVoice_SetFormat_4361

// ******************************************************************
// * DirectSound::CDirectSoundVoice::SetFormat
// ******************************************************************
OOVPA_XREF(DirectSound_CDirectSoundVoice_SetFormat, 4721, 8,

XREF_DirectSound_CDirectSoundVoice_SetFormat,
XRefZero)

{ 0x06, 0x4E },
{ 0x0E, 0xE8 },
{ 0x18, 0x4E },
{ 0x25, 0xFF },
{ 0x2E, 0x0C },
{ 0x34, 0x85 },
{ 0x38, 0x8B },
{ 0x43, 0x00 },
OOVPA_END;

// ******************************************************************
// * DirectSound::CDirectSoundBuffer::SetFormat
// ******************************************************************
Expand Down Expand Up @@ -1563,6 +1581,7 @@ OOVPATable DSound_4627[] = {
REGISTER_OOVPA(IDirectSoundBuffer_Stop, 4134, PATCH),
REGISTER_OOVPA(IDirectSoundBuffer_Release, 3936, PATCH), // +s
REGISTER_OOVPA(DirectSound_CDirectSoundVoice_SetFormat, 4627, XREF),
REGISTER_OOVPA(DirectSound_CDirectSoundVoice_SetFormat, 4721, XREF),
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetFormat, 4627, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_SetFormat, 4627, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSoundStream_SetFormat, 4361, PATCH),
Expand Down
29 changes: 13 additions & 16 deletions src/CxbxKrnl/HLEDataBase/DSound.1.0.5028.inl
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,22 @@
// ******************************************************************

// ******************************************************************
// * DirectSound::CDirectSoundVoice::SetFormat
// * XFileCreateMediaObjectEx
// ******************************************************************
OOVPA_XREF(DirectSound_CDirectSoundVoice_SetFormat, 5028, 8,
OOVPA_NO_XREF(XFileCreateMediaObjectEx, 5028, 8)

XREF_DirectSound_CDirectSoundVoice_SetFormat,
XRefZero)

{ 0x06, 0x4E },
{ 0x0E, 0xE8 },
{ 0x18, 0x4E },
{ 0x25, 0xFF },
{ 0x2E, 0x0C },
{ 0x34, 0x85 },
{ 0x38, 0x8B },
{ 0x43, 0x00 },
{ 0x03, 0x56 },
{ 0x22, 0x1B },
{ 0x89, 0x1B },
{ 0xA9, 0x85 },
{ 0xAA, 0xF6 },
{ 0xAB, 0x7C },
{ 0xAC, 0x0C },
{ 0xAD, 0x57 },
OOVPA_END;

// ******************************************************************
// * Direct, 5028
// * DSound_5028
// ******************************************************************
OOVPATable DSound_5028[] = {

Expand Down Expand Up @@ -183,7 +180,7 @@ OOVPATable DSound_5028[] = {
REGISTER_OOVPA(DirectSound_CDirectSoundStream_SetI3DL2Source, 4134, PATCH),
REGISTER_OOVPA(IDirectSoundBuffer_Stop, 4134, PATCH),
REGISTER_OOVPA(IDirectSoundBuffer_Release, 3936, PATCH), // +s
REGISTER_OOVPA(DirectSound_CDirectSoundVoice_SetFormat, 5028, XREF),
REGISTER_OOVPA(DirectSound_CDirectSoundVoice_SetFormat, 4721, XREF),
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetFormat, 4627, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_SetFormat, 4627, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSound_EnableHeadphones, 4627, XREF),
Expand Down Expand Up @@ -241,7 +238,7 @@ OOVPATable DSound_5028[] = {
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetRolloffCurve, 4627, XREF),
REGISTER_OOVPA(DirectSound_CDirectSoundStream_SetRolloffCurve, 4627, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_SetRolloffCurve, 4627, PATCH),
REGISTER_OOVPA(XFileCreateMediaObjectEx, 4627, PATCH),
REGISTER_OOVPA(XFileCreateMediaObjectEx, 5028, PATCH),
REGISTER_OOVPA(XWaveFileCreateMediaObject, 4627, PATCH),
// REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetNotificationPositions, 4627, XREF),
// REGISTER_OOVPA(IDirectSoundBuffer_SetNotificationPositions, 4627, XREF),
Expand Down
2 changes: 1 addition & 1 deletion src/CxbxKrnl/HLEDataBase/DSound.1.0.5233.inl
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ OOVPA_END;
// ******************************************************************
// * DirectSound::CDirectSoundVoice::SetFormat
// ******************************************************************
#define DirectSound_CDirectSoundVoice_SetFormat_5233 DirectSound_CDirectSoundVoice_SetFormat_5028
#define DirectSound_CDirectSoundVoice_SetFormat_5233 DirectSound_CDirectSoundVoice_SetFormat_4721

// ******************************************************************
// DirectSound_CDirectSoundVoice::SetMode
Expand Down
65 changes: 5 additions & 60 deletions src/CxbxKrnl/HLEDataBase/DSound.1.0.5788.inl
Original file line number Diff line number Diff line change
Expand Up @@ -194,62 +194,6 @@ OOVPA_XREF(IDirectSoundBuffer_SetCurrentPosition, 5788, 8,
{ 0x1A, 0x08 },
OOVPA_END;

// ******************************************************************
// * DirectSound::CMcpxBuffer::Stop
// ******************************************************************
OOVPA_XREF(DirectSound_CMcpxBuffer_Stop, 5788, 8,

XREF_DSOUNDSTOP,
XRefZero)

{ 0x06, 0x56 },
{ 0x0E, 0xF1 },
{ 0x16, 0xFF },
{ 0x1D, 0x04 },
{ 0x1E, 0xFF },
{ 0x26, 0x75 },
{ 0x2F, 0x8B },
{ 0x36, 0xC2 },
OOVPA_END;

// ******************************************************************
// * DirectSound::CDirectSoundBuffer::StopEx
// ******************************************************************
OOVPA_XREF(DirectSound_CDirectSoundBuffer_StopEx, 5788, 8,

XREF_DSOUNDSTOP2,
XRefOne)

XREF_ENTRY( 0x3D, XREF_DSOUNDSTOP ),

{ 0x0C, 0x00 },
{ 0x16, 0x68 },
{ 0x22, 0x05 },
{ 0x2E, 0x20 },
{ 0x3A, 0x24 },
{ 0x46, 0x0B },
{ 0x52, 0x8B },
OOVPA_END;

// ******************************************************************
// * IDirectSoundBuffer_StopEx
// ******************************************************************
OOVPA_XREF(IDirectSoundBuffer_StopEx, 5788, 8,

XRefNoSaveIndex,
XRefOne)

XREF_ENTRY( 0x1D, XREF_DSOUNDSTOP2 ),

{ 0x03, 0x10 },
{ 0x08, 0xFF },
{ 0x0D, 0xC8 },
{ 0x12, 0x83 },
{ 0x17, 0x1B },
{ 0x1C, 0xE8 },
{ 0x21, 0xC2 },
OOVPA_END;

// ******************************************************************
// * DirectSound::CDirectSound::SetRolloffFactor
// ******************************************************************
Expand Down Expand Up @@ -660,7 +604,7 @@ OOVPA_END;
#define IDirectSoundBuffer_SetMode_5788 IDirectSoundBuffer_SetMode_5233

// ******************************************************************
// * Direct, 5788
// * DSound_5788
// ******************************************************************
OOVPATable DSound_5788[] = {

Expand Down Expand Up @@ -706,6 +650,10 @@ OOVPATable DSound_5788[] = {
REGISTER_OOVPA(IDirectSoundBuffer_SetMinDistance, 5788, PATCH),
REGISTER_OOVPA(DirectSound_CMcpxBuffer_Play, 3925, XREF),
// REGISTER_OOVPA(CMcpxBuffer_Play, 5788, XREF),
REGISTER_OOVPA(CMcpxBuffer_Stop, 4361, XREF),
REGISTER_OOVPA(CMcpxBuffer_Stop2, 4361, XREF),
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_StopEx, 4361, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_StopEx, 4361, PATCH),
REGISTER_OOVPA(IDirectSoundBuffer_Stop, 4134, PATCH), // (Possibly weak, but quite OK for 4627 DSOUND)
REGISTER_OOVPA(IDirectSoundBuffer_Release, 3936, PATCH),
REGISTER_OOVPA(DirectSound_CFullHRTFSource_GetCenterVolume, 5558, XREF),
Expand Down Expand Up @@ -750,9 +698,6 @@ OOVPATable DSound_5788[] = {
REGISTER_OOVPA(IDirectSoundBuffer_SetPlayRegion, 4361, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetLoopRegion, 5558, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_SetLoopRegion, 4134, PATCH),
REGISTER_OOVPA(DirectSound_CMcpxBuffer_Stop, 5788, XREF), // TODO: Use XREF ?Stop@CMcpxBuffer@DirectSound@@QAEJK@Z?
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_StopEx, 5788, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_StopEx, 5788, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSound_SetDistanceFactorA, 5558, XREF),
REGISTER_OOVPA(IDirectSound_SetDistanceFactor, 4134, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSound_SetRolloffFactor, 5788, XREF),
Expand Down
9 changes: 5 additions & 4 deletions src/CxbxKrnl/HLEDataBase/DSound.1.0.5849.inl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ OOVPA_END;
#define DirectSound_CDirectSoundVoice_SetAllParameters_5849 DirectSound_CDirectSoundVoice_SetAllParameters_5558

// ******************************************************************
// * Direct, 5849
// * DSound_5849
// ******************************************************************
OOVPATable DSound_5849[] = {

Expand Down Expand Up @@ -202,6 +202,10 @@ OOVPATable DSound_5849[] = {
REGISTER_OOVPA(IDirectSoundBuffer_SetMinDistance, 5788, PATCH),
REGISTER_OOVPA(DirectSound_CMcpxBuffer_Play, 3925, XREF),
// REGISTER_OOVPA(CMcpxBuffer_Play, 5849, XREF),
REGISTER_OOVPA(CMcpxBuffer_Stop, 4361, XREF),
REGISTER_OOVPA(CMcpxBuffer_Stop2, 4361, XREF),
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_StopEx, 4361, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_StopEx, 4361, PATCH),
REGISTER_OOVPA(IDirectSoundBuffer_Stop, 4134, PATCH), // (Possibly weak, but quite OK for 4627 DSOUND)
REGISTER_OOVPA(IDirectSoundBuffer_Release, 3936, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSoundVoice_SetHeadroom, 5558, XREF),
Expand All @@ -228,9 +232,6 @@ OOVPATable DSound_5849[] = {
REGISTER_OOVPA(IDirectSoundBuffer_GetCurrentPosition, 5558, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetLoopRegion, 5558, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_SetLoopRegion, 4134, PATCH),
REGISTER_OOVPA(DirectSound_CMcpxBuffer_Stop, 5788, XREF), // TODO: Use XREF ?Stop@CMcpxBuffer@DirectSound@@QAEJK@Z?
REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_StopEx, 5788, XREF),
REGISTER_OOVPA(IDirectSoundBuffer_StopEx, 5788, PATCH),
REGISTER_OOVPA(DirectSound_CDirectSound_SetRolloffFactor, 5849, XREF),
REGISTER_OOVPA(IDirectSound_SetRolloffFactor, 4134, PATCH), // TODO : Use 5344?
REGISTER_OOVPA(DirectSound_CDirectSound_SetDopplerFactor, 5788, XREF),
Expand Down

0 comments on commit e250b1f

Please sign in to comment.