Updating (the hard way) because I can't get TSVN to do it automatically!

Happy now?

Happy now?

Happy now?

Happy now?

Cleanup time.
This commit is contained in:
blueshogun96 2010-04-17 03:21:41 +00:00
parent 0dfaf44aba
commit 2f9b24859f
77 changed files with 21654 additions and 1831 deletions

BIN
build/win32/Cxbx.suo Normal file

Binary file not shown.

View File

@ -179,6 +179,7 @@
ProgramDatabaseFile=".\..\..\bin\debug/CxbxKrnl.pdb"
GenerateMapFile="true"
MapFileName=".\..\..\bin\debug/CxbxKrnl.map"
StackReserveSize="8000000"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\..\..\bin\debug/CxbxKrnl.lib"
@ -378,6 +379,10 @@
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\D3D8.1.0.5849.h"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\D3D8LTCG.1.0.5849.h"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\DSound.1.0.3936.h"
>
@ -442,6 +447,10 @@
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\Xapi.1.0.5849.h"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.3911.h"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.4361.h"
>
@ -470,6 +479,10 @@
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XOnline.1.0.4627.h"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XOnline.1.0.5233.h"
>
</File>
</Filter>
<Filter
Name="EmuD3D8 (h)"
@ -478,6 +491,10 @@
RelativePath="..\..\src\CxbxKrnl\EmuD3D8\Convert.h"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\EmuD3D8\PixelShader.h"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\EmuD3D8\PushBuffer.h"
>
@ -1304,6 +1321,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\D3D8LTCG.1.0.5849.inl"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\DSound.1.0.3936.inl"
>
@ -1628,6 +1649,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.3911.inl"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.4361.inl"
>
@ -1752,6 +1777,10 @@
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XOnline.1.0.4627.inl"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\HLEDataBase\XOnline.1.0.5233.inl"
>
</File>
</Filter>
<Filter
Name="EmuD3D8 (cpp)"
@ -1778,6 +1807,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\EmuD3D8\PixelShader.cpp"
>
</File>
<File
RelativePath="..\..\src\CxbxKrnl\EmuD3D8\PushBuffer.cpp"
>

View File

@ -1,5 +1,25 @@
Cxbx Home Page: http://www.caustik.com/cxbx/
version: 0.8.1 (2/3/10)
--------------------------------
- Cxbx's compatibility has vastly increased (see compatibility list).
- Added video option to enable/disable hardware YUV surfaces for video playback.
(This should fix problems with videos not showing up or robotic sounds).
- Fixed bug in vertex patching code for Vista (thanks defiance)!
- Most XDKs have at least basic support.
- Fixed pipeline bumpmapping is now supported.
- Multiple thread notification routines now supported.
- Lots of bug fixes.
- And many more I can't remember (it's been a long time)!
version: 0.8.0 (??/??/??)
--------------------------------

View File

@ -192,4 +192,563 @@ TODO: Investigate 0x2AE7F2 and 0x2C8877 for Panzer.
- Added the following texture formats
D3DFMT_A8B8G8R8 (Swizzled)
D3DFMT_UYVY (Swizzled, afaik)
D3DFMT_UYVY (Swizzled, afaik)
11/11/09
- Added the following texture format(s)
D3DFMT_UNKNOWN (Undefined) (For MetalSlug 3)
- Added the following functions
IDirect3DDevice8_SetShaderConstantMode (5849)
IDirect3DDevice8_SetViewport (5849)
QueueUserAPC (5849) (Possibly too high level)
CDirectSound_SetAllParameters (4721)
11/18/09
- Added the following function(s)
IDirect3D8_CreateDevice (5028)
11/20/09
- Added the following function(s)
RtlReallocateHeap (4361)
RtlSizeHeap (4361)
CDirectSoundVoiceSettings::SetMixBinVolumes (4361)
CDirectSoundVoice::SetMixBinVolumes (4361)
CDirectSoundBuffer::SetMixBinVolumes (4361)
- Removed DSOUND 4361 alias to 4627 (This will break Smashing Drive!)
11/22/09
- Temporarily set DSOUND 4361 alias to 4627 again.
- Added the following function(s)
CDirectSoundStream_SetMixBins (4627)
CMcpxVoiceClient_SetEG (4627)
CDirectSoundVoice_SetEG (4627)
CDirectSoundStream_SetEG (4627)
CDirectSoundStream_FlushEx (4627)
IDirectSoundStream_FlushEx (4627)
11/23/09
- Added the following function(s)
RtlCreateHeap (4134)
RtlAllocateHeap (4134)
RtlFreeHeap (4134)
RtlReAllocateHeap (4134)
RtlSizeHeap (4134)
XapiBootDash (4134)
XRegisterThreadNotifyRoutine (4134)
XGetDeviceChanges (4134)
XID_fCloseDevice (XREF) (4134)
XInputClose (4134)
XInputGetCapabilities (4134)
SetThreadPriorityBoost (4134)
GetThreadPriority (4134)
XGetDevices (4134)
QueryPerformanceCounter (4134)
QueryPerformanceFrequency (4134)
XInputPoll (4134 - 4928)
XGetSectionHandleA (4134 - 4928)
XLoadSectionByHandle (4134 - 4928)
XFreeSectionByHandle (4134 - 4928)
RtlDestroyHeap (4134 - 4928)
D3DDevice_CreatePixelShader (4134)
IDirect3DSurface8_LockRect (4134)
Lock2DSurface (4134)
D3DDevice_SetGammaRamp (4134)
IDirect3D8_CheckDeviceFormat (4134)
IDirect3D8_GetAdapterModeCount (4134)
IDirect3D8_EnumAdapterModes (4134)
IDirect3DDevice8_LoadVertexShader (4134)
IDirect3DDevice8_SelectVertexShader (4134)
IDirect3DDevice8_CopyRects (4134)
IDirect3DDevice8_CreateImageSurface (4134)
IDirect3DDevice8_SetVertexShaderConstant (4134)
IDirect3DDevice8_SetPixelShader (4134)
IDirect3DDevice8_SetTextureState_BumpEnv (4134)
IDirect3DDevice8_SetIndices (4134)
IDirect3DDevice8_SetTexture (4134)
IDirect3DDevice8_SetRenderState_VertexBlend (4134)
IDirect3DDevice8_SetRenderState_TextureFactor (4134)
IDirect3DDevice8_SetRenderState_EdgeAntiAlias (4134)
IDirect3DDevice8_SetRenderState_Simple (4134)
IDirect3DDevice8_SetRenderState_ZEnable (4134)
IDirect3DDevice8_SetRenderState_StencilEnable (4134)
IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias (4134)
IDirect3DDevice8_GetTransform (4134)
IDirect3DDevice8_SetStreamSource (4134)
IDirect3DDevice8_SetVertexShader (4134)
IDirect3DDevice8_DrawVertices (4134)
IDirect3DDevice8_DrawVerticesUP (4134)
IDirect3DDevice8_DrawIndexedVertices (4134)
IDirect3DDevice8_SetLight (4134)
IDirect3DDevice8_SetMaterial (4134)
IDirect3DDevice8_LightEnable (4134)
IDirect3DVertexBuffer8_Lock (4134)
Get2DSurfaceDesc (4134)
IDirect3DSurface8_GetDesc (4134)
IDirect3DDevice8_SetRenderState_StencilFail (4134)
IDirect3DDevice8_SetRenderState_NormalizeNormals (4134)
IDirect3DDevice8_Reset (4134 - 4361)
IDirect3D8_KickOffAndWaitForIdle (4134 - 4361)
IDirect3DDevice8_SetTextureState_TwoSidedLighting (4134 - 4361)
IDirect3DDevice8_SetRenderState_BackFillMode (4134 - 4361)
IDirect3DDevice8_SetTextureState_ColorKeyColor (4134 - 4361)
IDirect3DDevice8_SetRenderState_FrontFace (4134 - 4361)
IDirect3DDevice8_SetRenderState_LogicOp (4134 - 4361)
IDirect3DDevice8_SetRenderState_StencilFail (4134 - 4361)
IDirect3DDevice8_SetRenderState_OcclusionCullEnable (4134 - 4361)
IDirect3DDevice8_SetRenderState_StencilCullEnable (4134 - 4361)
- Move the following functions
XInputPoll (4928 -> 4134)
XGetSectionHandleA (4627 -> 4134)
XLoadSectionByHandle (4627 -> 4134)
XFreeSectionByHandle (4627 -> 4134)
RtlDestroyHeap (4627 -> 4134)
IDirect3DDevice8_Reset (4134)
IDirect3D8_KickOffAndWaitForIdle (4432 -> 4134)
IDirect3DDevice8_SetTextureState_TwoSidedLighting (4432 -> 4134)
IDirect3DDevice8_SetRenderState_BackFillMode (4432 -> 4134)
IDirect3DDevice8_SetTextureState_ColorKeyColor (4432 -> 4134)
IDirect3DDevice8_SetRenderState_FrontFace (4432 -> 4134)
IDirect3DDevice8_SetRenderState_LogicOp (4432 -> 4134)
IDirect3DDevice8_SetRenderState_StencilFail (4432 -> 4134)
IDirect3DDevice8_SetRenderState_OcclusionCullEnable (4432 -> 4134)
IDirect3DDevice8_SetRenderState_StencilCullEnable (4432 -> 4134)
- Added a bit of code to print out more details about the Direct3D device
each Xbox game is trying to create.
- Added a hack to disable Tripple Buffering. JSRF needs this for cards that
don't support it with the parameters it's using.
11/24/09
- Added the following functions(s)
IDirect3DDevice8_FillMode (4134)
IDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead (4134 - 4627)
IDirect3DDevice8_SetRenderState_RopZRead (4134 - 4627)
IDirect3DDevice8_SetRenderState_DoNotCullUncompressed (4134 - 4627)
IDirect3DDevice8_SetRenderState_Dxt1NoiseEnable (4134 - 4361)
IDirect3DDevice8_SetRenderState_MultiSampleMask (4134 - 4361)
IDirect3DDevice8_SetRenderState_MultiSampleMode (4134 - 4361)
IDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode (4134 - 4361)
IDirect3DDevice8_SetRenderState_ShadowFunc (4134 - 4361)
IDirect3DDevice8_SetRenderState_YuvEnable (4134 - 4361)
IDirect3DDevice8_DrawIndexedVerticesUP (4134 - 4361)
IDirect3DDevice8_SetPixelShaderConstant (4134 - 4627)
IDirect3DDevice8_DeletePixelShader (4134 - 4627)
IDirect3DDevice8_SetRenderState_CullModeB (4134 - 4627)
IDirect3DDevice8_DeleteVertexShader (4134 - 4627)
IDirect3DDevice8_SetScreenSpaceOffset (4134 - 4627)
D3D::SetFence (XREF) (4134 - 4627)
IDirect3DDevice8_SetRenderState_LineWidth (4134 - 4361)
IDirect3DDevice8_GetGammaRamp (4134)
SetThreadPriorityBoost (4134 - 4361)
IDirect3DDevice8_BlockUntilVerticalBlank (4134)
IDirect3DDevice8_SetSwapCallback (4134 - 4361)
IDirect3DDevice8_GetTile (4134 - 4361)
IDirect3DDevice8_SetTile (4134 - 4361)
IDirect3DDevice8_IsBusy (4134 - 4361)
- Fix a bug in D3D8 4134. IDirect3DDevice8_SetRenderState_Fillmode_1_0_3925 was giving
us a false positive. The problem exists in 4034 as well because whoever started
trying to add 4034 and 4134 support just threw in a bunch of signatures from D3D8 3925
must have been looking for similarities in that XDK. Good idea when you don't have
a certain XDK, but it's not 100% safe to do (or leave in unattended).
- Attempting to impliment IDirect3DDevice8_SetSwapCallback. Some of the steps necessary
will revolve around IDirect3DDevice8_SetVerticalBlankCallback's inner workings. Adding
the callback function to execute each time D3DDevice_Present/Swap is called is easy, but
Some of the parameters require a bit of leg work. Right now, some of my implementation
is guess work. Hopefully Caustik will have a good idea of what to do.
- Even worse, the signatures for D3DDevice_SetSwapCallback and D3DDevice_SetVerticalBlankCallback
are almost completely identical and are different by an extremely small margin. For 4134,
it looks the same as 4361's. I might be over reacting, but I just don't want to screw this
up because working on JSRF is proving to be a delicate operation!
11/26/09
- Added the following function(s)
XnInit (5233)
bind (5233)
ioctlsocket (5233)
WSAStartup (5233)
XNetStartup (5233 - 5344)
CDirectSoundStream_SetMode (3936)
12/1/09
- Added the following function(s)
XACT::CEngine::RegisterNotification (4627)
IXACTEngine_RegisterNotification (4627)
XACT::CEngine::GetNotification (4627)
IXACTEngine_GetNotification (4627)
XACT::CEngine::CreateSoundBank (4928)
IXACTEngine::CreateSoundBank (4928)
XACT::CEngine::RegisterWaveBank (4928)
IXACTEngine::RegisterWaveBank (4928)
XAudioDownloadEffectsImage (4627 - 4928)
12/2/09
- Added the following function(s)
XACT::CEngine::UnRegisterWaveBank (4928)(*)
IXACTEngine_UnRegisterWaveBank (4928)(*)
IDirect3DDevice8_PersistDisplay (4627 & 4928)
XNetGetEthernetLinkStatus (4627 - 4928, 5233 & 5344)
XGWriteSurfaceOrTextureToXPR (4627 - 4928)
- Other things
Added D3DTOP_BLENDCURRENTALPHA (13)
- Unreal Championship gets passed the loading screen and the menus appear to be interactive
as well. It took F-O-R-E-V-E-R, but I'm finally beginning to make some significant progress
since my last updates for this game.
(*) Could be wrong. Look into IXACTEngine_SetNotification as well...
12/3/09
- Added the following function(s)
XLaunchNewImageA (4627 & 4928)
XGetLaunchInfo (4627 - 4928)
- Unreal Championship appears to be "almost" ingame. The LaunchData parameter from XLaunchNewImageA
is saved in a .bin file (CxbxLaunchData.bin) and is loaded once XGetLaunchInfo is called. After it
is loaded, the file is deleted so that Unreal Championship is started normally. When CxbxLaunchData.bin
is loaded by XGetLaunchInfo, Unreal Championship will use this data to load the desired level and
data that goes with it. The biggest problem is that the controller is no longer recognized after
Cxbx is restarted. It may take yet another hack to get around this. If we can, we'll find out whether
this game can be played or not.
12/26/09
- Added the following function(s)
XSetProcessQuantumLength (4627 & 4721)
XGetFileCacheSize (5233 & 5344)
IDirect3DDevice8_Unknown1 (5233) (*)
IDirect3DDevice8_SetRenderState_TwoSidedLighting (5120 & 5233)
IDirect3DDevice8_SetRenderState_FrontFace (4531 - 5233)
IDirect3DDevice8_SetRenderState_LogicOp (4721 - 5344)
IDirect3DDevice8_BeginPush (5233 & 5344)
IDirect3DDevice8_EndPush (5233 & 5344)
(*) This is not the actual function name. Since I was unable to find any functions even somewhat similar
to it (I don't have 5233, but not even 5344 helped this time), I just created a dummy function to the game
from crashing. There were 4 functions that had access to it, and I had no idea which one was calling it,
nor could I find out what those functions were either. The only lead I had was that it called the kernel
function AvSendTVEncoderOption, which led me to the assumption that we can get away with ignoring this function
for now. So far, this only occurs in games known as "Run Like Hell" and "Oddworld Munch's Oddyssee".
12/27/09
- Added the following function(s)
IDirect3DDevice8_AddRef (3925) [3911]
CDirectSoundStream_GetInfo (All) (*)
IDirect3DDevice8_Unknown1 (3925) (**)
IDirect3DDevice8_GetViewport (3925)
IDirect3DDevice8_GetGammaRamp (3925)
SignalObjectAndWait (3911 - 4627)
PulseEvent (3911)
IDirect3DDevice8_GetDisplayFieldStatus (3925)
- Stopped Cxbx from trying to assemble "empty" shaders in Azurik: Rize of Perathia.
(*) Since this function is part of the DirectSoundStream VTable (CDirectSoundStream::vtbl), the XDK doesn't
matter.
(**) See update for 12/26/09
12/28/09
- Added the following function(s)
IDirect3DDevice8_SetSwapCallback (4928)
IDirect3DDevice8_SetRenderState_MultiSampleAntiAlias (3925) [3911]
12/29/09
- Added the following function(s)
CDirectSoundVoice_SetMode (4627 - 4831)
CDirectSoundBuffer_SetMode (4627 - 4831)
IDirectSoundBuffer_SetMode (4627 - 4831)
IDirect3DDevice8_SetRenderState_FrontFace (4531 - 5120)
IDirect3DDevice8_SetRenderState_MultiSampleMode (4531 - 4831)
IDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode (4531 - 4831)
IDirect3DDevice8_SetRenderState_StencilCullEnable (4531 - 4831)
1/1/2010
- Added the following function(s)
IDirect3DDevice8_SetGammaRamp (4242 - 4531)
IDirect3DDevice8_CreateVertexBuffer (4432)
IDirect3DDevice8_SetShaderConstantMode (4361 - 4432)
IDirect3DDevice8_SetVertexShaderConstant (4432 & 4531?)
IDirect3DDevice8_CreatePixelShader (4432 & 4531)
IDirect3DDevice8_GetViewport (4400 - 4531?)
IDirect3DDevice8_DrawVertices (4400 - 4531?)
IDirect3DDevice8_SetFlickerFilter (4361 & 4432)
IDirect3DDevice8_SetSoftDisplayFilter (4361 & 4432)
IDirect3DDevice8_SetGammaRamp (4432)
IDirect3DDevice8_DrawIndexedVertices (4400 - 4531?)
IDirect3DDevice8_PrimeVertexCache (4361)
IDirect3DDevice8_BeginPush/EndPush (4361)
IDirect3DDevice8_Begin/End (4361 - 4531?)
IDirect3DDevice8_SetVertexData2f (4361 - 4531?)
IDirect3DDevice8_SetVertexData4f (4361 - 4531?)
IDirect3DDevice8_SetVertexData4ub (4361 - 4531?)
CDirectSoundBuffer_PlayEx (4361 - 4627)(*)
IDirectSoundBuffer8_PlayEx (4361 - 4627)(*)
CMxpxBuffer_Stop2 (4361 - 4432)(**)
CDirectSoundBuffer_StopEx (4361 - 4627)
IDirectSoundBuffer8_StopEx (4361 - 4627)
CDirectSound_SetPosition (4361 - 4432)
- Added support for D3DVSDE_BLENDWEIGHT
(*) Not yet confirmed
(**) There are two versions of CMcpxBuffer_Stop. One has one parameter (ulong), and the other has two and calls
the first one (__int64, ulong). My signature is for the one with 2 params.
1/2/10
- Added the following function(s)
CDirectSound_SetVelocity (4432)
CDirectSoundVOice_SetPosition (4432)
IDirect3DDevice8_SetIndices (4400 - 4531)
- Added all known blending operations (a bit surprised Caustik only added D3DBLENDOP_ADD)
1/3/10
- Added the following function(s)
IDirect3DDevice8_SetRenderState_VertexBlend (3925) [3911]
IDirect3DDevice8_SetRenderState_BackFillMode (3925) [3911]
IDirect3DDevice8_SetRenderState_TwoSidedLighting (3925) [3911]
IDirect3DDevice8_SetRenderState_NormalizeNormals (3925) [3911]
IDirect3DDevice8_SetRenderState_FrontFace (3925) [3911]
IDirect3DDevice8_SetRenderState_TextureFactor (3925) [3911]
IDirect3DDevice8_SetRenderState_LogicOp (3925) [3911]
IDirect3DDevice8_SetRenderState_EdgeAntiAlias (3925) [3911]
IDirect3DDevice8_SetRenderState_MultiSampleMask (3925) [3911]
IDirect3DDevice8_SetRenderState_MultiSampleMode (3925) [3911]
CreateFiber (4432)
DeleteFiber (4432)
- Added the following kernel function(s)
KeBugCheck (*)
- Fixed up EmuIDirect3DDevice8_UpdateOverlay a bit. Updating the overlay
in software lets me see video playback again and let's me take screen
shots because it's a YUV -> RGB conversion. Videos also play at more
"correct" speeds in software anyway. Unreal Championship requires
this to be done in software to avoid crashing. Also, since the YUV
overlay is done in software, it's not updated automatically like a hard-
ware accelerated overlay, so I added a hack to update the screen if
Present or Swap was not called since the last update of the overlay.
this fixes most problems I've had with video playback.
(*) TODO: Find out what is calling this (possibly XapiFiberStartup)
1/4/10
- Added the following function(s)
IDirect3DDevice8_SetRenderState_ShadowFunc (3925) [3911]
IDirect3DDevice8_SetRenderState_LineWidth (3925) [3911]
IDirect3DDevice8_SetRenderState_YuvEnable (3925) [3911]
IDirect3DDevice8_PersistDisplay (3925) [3911]
1/5/10
- Added the following function(s)
CDirectSoundVoice_SetPitch (4627)
CDirectSoundBuffer_SetPitch (4627)
IDirectSoundBuffer8_SetPitch (4627)
CMcpxBuffer_GetStatus (4721)
IDirect3DDevice8_CreateIndexBuffer (5558)
IDirect3DDevice8_CreateIndexBuffer2 (5558)
IDirect3DDevice8_SetVerticalBlankCallback (5233)
- The TechCertGame works again, but freezes ingame.
1/6/10
- Added the following function(s)
IDirect3DDevice8_SampleAlpha (5233 - 5344)
IDirect3DDevice8_GetVertexShaderSize (4134 - 4531)
1/8/10
- Added the following function(s)
CMcpxBuffer_Pause (4928 - 5344)
CDirectSoundBuffer_Pause (4928 - 5344)
IDirectSoundBuffer8_Pause (4928 - 5344)
CreateSemaphore (5558) (*)
ReleaseSemaphore (5558) (*)
IDirect3D8_GetAdapterModeCount (4721 - 5558)
IDirect3D8_EnumAdapterModes (4721 - 5558)
IDirect3DDevice8_SetverticalBlankCallback (5558)
IDirect3DDevice8_SetSwapCallback (5558)
IDirect3DDevice8_GetGammaRamp (5558 - 5659?)
IDirect3DDevice8_SetRenderState_TextureFactor (5558)
IDirect3DDevice8_SetRenderState_VertexBlend (5558)
- Created new function EmuXB2PC_D3DMultisampleFormat(DWORD Type) in convert.cpp
- Fixed a bug in IDirect3D8_CheckMultiSampleDeviceType, actually use PCSurfaceFormat
flag instead of actual parameter!
(*) Yes they are high level, but it fixes some problems with Metal Arms (5558)
1/15/10
- Added the following function(s)
IDirect3DDevice8_DrawVertices (3925) [3911]
IDirect3DDevice8_DrawVerticesUP (3925) [3911]
IDirect3DDevice8_DrawIndexedVerticesUP (3925) [3911]
CMcpxAPU::Set3dDopplerFactor (3936) [3911]
CDirectSound::SetDopplerFactor (3936) [3911]
IDirectSound8_SetDopplerFactor (3936) [3911]
IDirect3DDevice8_GetDisplayMode (3925) [3911]
XGIsSwizzledFormat (3911)
XGSizzleRect (3911)
XGUnswizzleRect (3911)
XGSwizzleBox (3911)
XGWriteSurfaceOrTextureToXPR (3911)
- Added the following kernel function(s)
IoDismountVolumeByName
HalReadSMCTrayState
- Added XG.1.0.3911.h/inl (it's about damn time!)
1/16/09
- Added the folliwing function(s)
IDirect3DDevice8_SetTextureState_BumpEnv (3925) [3911]
IDirect3DDevice8_SetTextureState_ColorKeyColor (3925) [3911]
IDirect3DDevice8_SetVertexData4s (3925) [3911]
IDirect3D8_SetPushBufferSize (3925) [3911]
CSensaura3d::GetFullHRTFFilterPair (3936) [3911]
DirectSoundUseFullHRTF (3936) [3911]
CDirectSound::GetCaps (3936) [3911]
IDirectSound8_GetCaps (3936) [3911]
1/22/09
- Added the following function(s)
timeSetEvent (4627 & 4721)
timeKillEvent (4627 & 4721)
CDirectSoundVoice::SetConeAngles (3936) [3911]
DirectSoundEnterCriticalSection (3936) [3911]
CDirectSoundBuffer::PlayEx (3936) [3911]
IDirectSoundBuffer8_PlayEx (3936) [3911]
DirectSoundUseFullHRTF (3936) [3911]
RaiseException (4627 - 4928)
1/23/10
- Added the following function(s)
D3D_AllocContiguousMemory (3925) [3911] (*)
IDirect3DResource8_GetType (3925) [3911] (*)
(*) Cxbx doesn't crash without this signature...
(**) Just for testing purposes. You can remove it if you want/need.
1/24/10
- Added the following function(s)
IDirect3DDevice8_SetRenderState_Deferred (3925) [3911] (*)
IDirect3DDevice8_SetLight (3925) [3911]
IDirect3DDevice8_LightEnable (3925) [3911]
IDirect3DDevice8_CreateVertexShader (3925) [3911]
IDirect3DDevice8_SetRenderTarget (3948) [3911]
(*) This can/should be removed once the detection of 3911's D3DDeferredRenderState
is properly located.
- Fixed the ordering problem with Deferred Texture States in 3911.
- TODO: Compensate the difference in modified vertex shader constants.
1/25/10
- Added the following function(s)
IDirect3DSurface8_GetDesc (3925) [3911]
IDirectSound8_AddRef (3936) / [3911] - 4242
DirectSoundGetSampleTime (3936) [3911]
IDirectSoundBuffer8_AddRef (3936) [3911] - 4627
- Moved the following function(s)
IDirectSound8_AddRef (4361 -> 3936)
IDirectSoundBuffer8_AddRef (4627 -> 3936)
- Fix some bugs in EmuDirectSoundBufferCreate. DSBCAPS_MIXIN,_FXIN AND _FXIN2
were getting by the "AcceptableMask" undetected.
1/27/10
- Added the following function(s)
IDirect3DDevice8_SetTile (3925) [3911]
CDirectSoundBuffer::SetMinDistance (3936) [3911]
IDirectSoundBuffer8_SetMinDistance (3936) [3911]
CDirectSoundBuffer::SetMaxDistance (3936) [3911]
IDirectSoundBuffer8_SetMaxDistance (3936) [3911]
IDirect3DDevice8_ApplyStateBlock (3925) [3911]
IDirect3DDevice8_CaptureStateBlock (3925) [3911]
IDirect3DDevice8_CreateStateBlock (3925) [3911]
IDirect3DDevice8_DeleteStateBlock (3925) [3911]
IDirect3DDevice8_DeletePixelShader (3925) [3911]
IDirectSoundBuffer8_SetMixBinVolumes (3925) [3911]
_ Added the following kernel function(s)
KeRaiseIrqlToDpcLevel
1/28/10
- Added the following function(s)
QueueUserAPC (3911 - 5788)
GetThreadPriority (5849)
SetThreadPriorityBoost (5849)
IDirect3DDevice8_BlockUntilVerticalBlank (5849)
XGetSectionHandleA (5849)
XLoadSectionByHandle (5949)
XFreeSectionByHandle (5849)
XGetSectionSize (5849)
- Moved the following function(s)
QueueUserAPC (5849 -> 3911)
- Fixed the problem with QueueUserAPC, it works now. Had to set the
right permisions for it to work on windows.
- Made another signature for CMcpxBuffer::GetCurrentPosition (3911). The original
was off by one byte.
2/4/10
- Added the following function(s)
D3D::KickOffAndWaitForIdle (5344 - 5558)
IDirect3DDevice8_Reset (5558)
IDirect3DDevice8_SetGammaRamp (5455 - 5558)
IDirect3DDevice8_GetViewport (5558)
GetFileAttributesA (5558)
VirtualProtect (4627 - 5558) (*)
(*) Probably too high level...
4/9/10
- Added new Simple Renderstates
D3DRS_STENCILZFAIL
D3DRS_STENCILPASS
D3DRS_STENCILFUNC
D3DRS_STENCILREF
D3DRS_STENCILMASK
D3DRS_STENCILWRITEMASK
- Added the following function(s)
D3DDevice_SetModelView (3925) [3911]
D3DDevice_FlushVertexCache (3925) [3911]
D3DDevice_SetScissors (3925) [3911]
D3DDevice_SetVertexShaderInput (3925) [3911]
D3DDevice_PrimeVertexCache (3925) [3911]
D3DDevice_SetVertexData4ub (3925) [3911]
D3DDevice_SetVertexShaderConstant (3925) [3911]
D3DDevice_BeginPushBuffer (3925) [3911]
D3DDevice_EndPushBuffer (3925) [3911]
D3DDevice_SetRenderState_RopZCmpAlwaysRead (3925) [3911]
D3DDevice_SetRenderState_RopZRead (3925) [3911] (*)
D3DDevice_SetRenderState_DoNotCullUncompressed (3925) [3911] (*)
(*) Not yet verified. Signatures are right, but XRefs probably aren't.
4/10/10
- Added a new fix for Halo in EmuFlushIVB(). Use g_IVBFVF when the current FVF is 0.
- Added the following function(s)
D3D::SetFence (XRef) (3925) [3911]
D3DDevice_InsertFence (3925) [3911]
D3DDevice_LoadVertexShaderProgram (3925) [3911]
D3DDevice_RunPushBuffer (3925) [3911]
IDirectSoundBuffer8_Play (3936) [3911] (Fixed)
- Azurik: Rize of Perathia now goes ingame!
4/11/10
- Fixed a minor bug with the deferred texture state (D3DTSS_MAGFILTER) for XDK 3911.
- Fixed a major bug in the push buffer execution code. The stride was not incremented
for the D3DFVF_XYZ flag. Using the position mask to find position related FVFs.
- Robotech: Battlecry is now playable!
4/13/10
- Added the following function(s)
Direct3D_EnumAdapterModes (5233-5344)
D3DDevice_SetVerticalBlankCallback (5455)
D3DDevice_GetProjection

View File

@ -11,8 +11,12 @@ Emulation:
- Ensure the Cxbx has some basic support for every XDK. We're close, but 5028, 5120, 5455
and 5788 need further investigation.
- The Xbox's version of the .xsb format needs to be reversed for XACT.
- Verify that section loading APIs can really be ignored.
- Cache xbe section addresses and names for XLoad/FreeSection[ByHandle]
- Basic network capabilities?
- Some vertex shaders have their constant register usage modified by Cxbx (to balance out
the fact that Xbox vertex shaders can use constant values -96 to 96. Adding 96 in
SetVertexShaderConstant fixes some samples and Petit Copter, but breaks Turok.
- Indexed geometry rendered with D3DPT_QUADLIST is badly broken (Panzer and Robotech: Battlecry).
More:
- For completion's sake, we're going to have to use Direct3D 9 or OpenGL (OpenGL is better for
@ -21,10 +25,9 @@ More:
- An option to disable sound processing. Quantum Redshift may need this...
Game Specific:
- Add I/CDirectSoundBuffer_Pause and I/CDirectSoundBuffer_GetStatus for 4721 (Robotech Battlecry)
- The engine used by Taz: Wanted (4432) and Zapper (4831) are almost completely the same. There's
a missing XAPI function causing the crash, so fixing one will essentially fix the other.
- Unreal Championship requires XACT emulation.
- Azurik: Rize of Perathia (possibly the hardest Xbox game to emulate) has some unusual situations
going on (heap corruption, empty shaders, etc.). We need better solutions for such scenarios.
- DOA3 is getting close...
- Fusion Frenzy: There are some bugs in the D3DFMT_P8 -> D3DFMT_A8R8G8B8 conversion code.
- Keep working on Run Like Hell, you might be surprised!
- Find out what's causing the stack corruption with Petit Copter.

BIN
resource/Cxbx.aps Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
//Microsoft Developer Studio generated resource script.
// Microsoft Visual C++ generated resource script.
//
#include "..\src\Cxbx\ResCxbx.h"
@ -32,7 +32,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_CXBX ICON DISCARDABLE "Cxbx.ico"
IDI_CXBX ICON "Cxbx.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@ -40,18 +40,18 @@ IDI_CXBX ICON DISCARDABLE "Cxbx.ico"
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
1 TEXTINCLUDE
BEGIN
"..\\src\\Cxbx\\ResCxbx.h\0"
END
2 TEXTINCLUDE DISCARDABLE
2 TEXTINCLUDE
BEGIN
"#include ""WinResrc.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@ -65,14 +65,14 @@ END
// Bitmap
//
IDB_LOGO BITMAP DISCARDABLE "Logo.bmp"
IDB_LOGO BITMAP "Logo.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_MAINMENU MENU DISCARDABLE
IDR_MAINMENU MENU
BEGIN
POPUP "&File"
BEGIN
@ -83,8 +83,7 @@ BEGIN
MENUITEM "&Export Exe...", ID_FILE_EXPORTTOEXE, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Save Xbe", ID_FILE_SAVEXBEFILE, GRAYED
MENUITEM "Save Xbe &As...", ID_FILE_SAVEXBEFILEAS
, GRAYED
MENUITEM "Save Xbe &As...", ID_FILE_SAVEXBEFILEAS, GRAYED
MENUITEM SEPARATOR
POPUP "&Recent Xbe Files"
BEGIN
@ -120,9 +119,7 @@ BEGIN
POPUP "Logo &Bitmap", GRAYED
BEGIN
MENUITEM "&Import...", ID_EDIT_LOGOBITMAP_IMPORT
MENUITEM "&Export...", ID_EDIT_LOGOBITMAP_EXPORT
END
POPUP "&Patch", GRAYED
BEGIN
@ -133,9 +130,7 @@ BEGIN
POPUP "Dump &Xbe Info To..."
BEGIN
MENUITEM "&File...", ID_EDIT_DUMPXBEINFOTO_FILE
MENUITEM "&Debug Console", ID_EDIT_DUMPXBEINFOTO_DEBUGCONSOLE
END
END
POPUP "&View"
@ -143,24 +138,18 @@ BEGIN
POPUP "&Debug Output (GUI)"
BEGIN
MENUITEM "&Console", ID_EMULATION_DEBUGOUTPUTGUI_CONSOLE
MENUITEM "&File...", ID_EMULATION_DEBUGOUTPUTGUI_FILE
END
POPUP "Debug Output (&Kernel)"
BEGIN
MENUITEM "&Console", ID_EMULATION_DEBUGOUTPUTKERNEL_CONSOLE
MENUITEM "&File...", ID_EMULATION_DEBUGOUTPUTKERNEL_FILE
END
END
POPUP "&Settings"
BEGIN
MENUITEM "Config &Controller...", ID_SETTINGS_CONFIG_CONTROLLER
MENUITEM "Config &Audio...", ID_SETTINGS_CONFIGURESOUND
, GRAYED
MENUITEM "Config &Audio...", ID_SETTINGS_CONFIGURESOUND, GRAYED
MENUITEM "Config &Video...", ID_SETTINGS_CONFIG_VIDEO
MENUITEM SEPARATOR
POPUP "Executable &Generation"
@ -190,7 +179,7 @@ END
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
GUIDELINES DESIGNINFO
BEGIN
IDD_CONTROLLER_CFG, DIALOG
BEGIN
@ -203,9 +192,10 @@ BEGIN
IDD_VIDEO_CFG, DIALOG
BEGIN
LEFTMARGIN, 4
RIGHTMARGIN, 255
RIGHTMARGIN, 256
TOPMARGIN, 6
BOTTOMMARGIN, 108
BOTTOMMARGIN, 119
HORZGUIDE, 116
END
END
#endif // APSTUDIO_INVOKED
@ -217,9 +207,9 @@ END
//
IDD_CONTROLLER_CFG DIALOGEX 0, 0, 343, 137
STYLE DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Cxbx : Controller Configuration"
FONT 8, "Verdana"
FONT 8, "Verdana", 0, 0, 0x1
BEGIN
PUSHBUTTON "X",IDC_SET_X,7,11,50,14,BS_FLAT
PUSHBUTTON "Y",IDC_SET_Y,60,11,50,14,BS_FLAT
@ -251,35 +241,28 @@ BEGIN
GROUPBOX "Digital Buttons",IDC_STATIC,2,51,220,46
GROUPBOX "Analog Thumbstick (Left)",IDC_STATIC,226,1,113,47
GROUPBOX "Analog Thumbstick (Right)",IDC_STATIC,227,51,112,46
CTEXT "Please choose one of the controller components from above...",
IDC_CONFIG_STATUS,2,121,336,12,SS_CENTERIMAGE,
WS_EX_STATICEDGE
PUSHBUTTON "Click to configure all input...",IDC_CONFIGURE_ALL,6,
102,210,14,BS_FLAT
CTEXT "Please choose one of the controller components from above...",IDC_CONFIG_STATUS,2,121,336,12,SS_CENTERIMAGE,WS_EX_STATICEDGE
PUSHBUTTON "Click to configure all input...",IDC_CONFIGURE_ALL,6,102,210,14,BS_FLAT
END
IDD_VIDEO_CFG DIALOGEX 0, 0, 258, 110
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_VIDEO_CFG DIALOGEX 0, 0, 259, 121
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Cxbx : Video Configuration"
FONT 8, "Verdana", 0, 0, 0x1
BEGIN
COMBOBOX IDC_VC_DISPLAY_ADAPTER,76,12,173,100,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_VC_D3D_DEVICE,76,31,173,100,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_VC_VIDEO_RESOLUTION,76,49,173,100,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Use Hardware Video Mode",IDC_CV_FULLSCREEN,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,76,71,98,10
CONTROL "Force VSync",IDC_CV_VSYNC,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,182,71,65,10
PUSHBUTTON "Cancel",IDC_VC_CANCEL,146,92,50,14,BS_FLAT
PUSHBUTTON "Accept",IDC_VC_ACCEPT,203,92,50,14,BS_FLAT
GROUPBOX "Direct3D Configuration",IDC_STATIC,4,1,250,87,BS_CENTER
COMBOBOX IDC_VC_DISPLAY_ADAPTER,76,12,173,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_VC_D3D_DEVICE,76,31,173,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_VC_VIDEO_RESOLUTION,76,49,173,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Use Hardware Video Mode",IDC_CV_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,76,71,98,10
CONTROL "Force VSync",IDC_CV_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,182,71,65,10
PUSHBUTTON "Cancel",IDC_VC_CANCEL,146,102,50,14,BS_FLAT
PUSHBUTTON "Accept",IDC_VC_ACCEPT,206,102,50,14,BS_FLAT
GROUPBOX "Direct3D Configuration",IDC_STATIC,4,1,250,98,BS_CENTER
LTEXT "Display Adapter:",IDC_STATIC,13,14,57,8,0,WS_EX_RIGHT
LTEXT "Direct3D Device:",IDC_STATIC,13,33,57,8,0,WS_EX_RIGHT
LTEXT "Video Resolution:",IDC_STATIC,12,52,58,8,0,WS_EX_RIGHT
LTEXT "Other Options:",IDC_STATIC,21,71,49,8,0,WS_EX_RIGHT
CONTROL "Enable Hardware YUV Overlays",IDC_CV_HARDWAREYUV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,76,84,123,11
END
@ -288,8 +271,8 @@ END
// JPEG
//
IDR_JPEG_ABOUT JPEG DISCARDABLE "About.jpg"
IDR_JPEG_SPLASH JPEG DISCARDABLE "Splash.jpg"
IDR_JPEG_ABOUT JPEG "About.jpg"
IDR_JPEG_SPLASH JPEG "Splash.jpg"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////

Binary file not shown.

View File

@ -38,7 +38,7 @@
// ******************************************************************
// * func: XBVideo::XBVideo
// ******************************************************************
XBVideo::XBVideo() : m_bVSync(false), m_bFullscreen(false)
XBVideo::XBVideo() : m_bVSync(false), m_bFullscreen(false), m_bHardwareYUV(false)
{
strcpy(m_szVideoResolution, "Automatic (Default)");
}
@ -81,6 +81,9 @@ void XBVideo::Load(const char *szRegistryKey)
dwType = REG_DWORD; dwSize = sizeof(DWORD);
RegQueryValueEx(hKey, "VSync", NULL, &dwType, (PBYTE)&m_bVSync, &dwSize);
dwType = REG_DWORD; dwSize = sizeof(DWORD);
RegQueryValueEx(hKey, "HardwareYUV", NULL, &dwType, (PBYTE)&m_bHardwareYUV, &dwSize);
RegCloseKey(hKey);
}
}
@ -117,6 +120,9 @@ void XBVideo::Save(const char *szRegistryKey)
dwType = REG_DWORD; dwSize = sizeof(DWORD);
RegSetValueEx(hKey, "VSync", 0, dwType, (PBYTE)&m_bVSync, dwSize);
dwType = REG_DWORD; dwSize = sizeof(DWORD);
RegSetValueEx(hKey, "HardwareYUV", 0, dwType, (PBYTE)&m_bHardwareYUV, dwSize);
RegCloseKey(hKey);
}
}

View File

@ -86,6 +86,12 @@ class XBVideo : public Error
void SetVSync(BOOL bVSync) { m_bVSync = bVSync; }
BOOL GetVSync() { return m_bVSync; }
// ******************************************************************
// * Hardware YUV Toggling
// ******************************************************************
void SetHardwareYUV(BOOL bHardwareYUV) { m_bHardwareYUV = bHardwareYUV; }
BOOL GetHardwareYUV() { return m_bHardwareYUV; }
private:
// ******************************************************************
// * Configuration
@ -95,6 +101,7 @@ class XBVideo : public Error
DWORD m_dwDirect3DDevice;
BOOL m_bFullscreen;
BOOL m_bVSync;
BOOL m_bHardwareYUV;
};
#endif

View File

@ -60,6 +60,8 @@ typedef signed long sint32;
#define _DEBUG_TRACK_VB
/*! define this to track vertex shaders */
#define _DEBUG_TRACK_VS
/*! define this to track pixel shaders */
#define _DEBUG_TRACK_PS
/*! define this to track push buffers */
#define _DEBUG_TRACK_PB
/*! define this to track memory allocations */
@ -72,6 +74,8 @@ typedef signed long sint32;
#endif
/*! define this to trace warnings */
#define _DEBUG_WARNINGS
/*! define this to trace vertex shader constants */
#define _DEBUG_TRACK_VS_CONST
/*! define this to dump textures that have been set */
//#define _DEBUG_DUMP_TEXTURE_SETTEXTURE "C:\\xbox\\_textures\\"
@ -80,9 +84,9 @@ typedef signed long sint32;
/*! version string dependent on trace flag */
#ifndef _DEBUG_TRACE
#define _CXBX_VERSION "0.8.1-Beta"
#define _CXBX_VERSION "0.8.1-Pre2"
#else
#define _CXBX_VERSION "0.8.1-Beta-Trace"
#define _CXBX_VERSION "0.8.1-Pre2-Trace"
#endif
/*! debug mode choices */

View File

@ -138,6 +138,8 @@ INT_PTR CALLBACK DlgVideoConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
SendMessage(GetDlgItem(hWndDlg, IDC_CV_FULLSCREEN), BM_SETCHECK, (WPARAM)g_XBVideo.GetFullscreen(), 0);
SendMessage(GetDlgItem(hWndDlg, IDC_CV_VSYNC), BM_SETCHECK, (WPARAM)g_XBVideo.GetVSync(), 0);
SendMessage(GetDlgItem(hWndDlg, IDC_CV_HARDWAREYUV), BM_SETCHECK, (WPARAM)g_XBVideo.GetHardwareYUV(), 0);
}
}
break;
@ -190,7 +192,7 @@ INT_PTR CALLBACK DlgVideoConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
g_XBVideo.SetVideoResolution(szBuffer);
}
/*! save fullscreen/vsync options */
/*! save fullscreen/vsync/YUV options */
{
LRESULT lRet = SendMessage(GetDlgItem(hWndDlg, IDC_CV_FULLSCREEN), BM_GETCHECK, 0, 0);
@ -199,6 +201,10 @@ INT_PTR CALLBACK DlgVideoConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
lRet = SendMessage(GetDlgItem(hWndDlg, IDC_CV_VSYNC), BM_GETCHECK, 0, 0);
g_XBVideo.SetVSync(lRet == BST_CHECKED);
lRet = SendMessage(GetDlgItem(hWndDlg, IDC_CV_HARDWAREYUV), BM_GETCHECK, 0, 0);
g_XBVideo.SetHardwareYUV(lRet == BST_CHECKED);
}
/*! save video configuration */

View File

@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by C:\Aaron\Projects\Cxbx\Resource\Cxbx.rc
// Microsoft Visual C++ generated include file.
// Used by C:\Users\Brandon\Desktop\Cxbx\dstien\wip\resource\Cxbx.rc
//
#define IDI_CXBX 101
#define IDB_SPLASH 102
@ -48,6 +48,7 @@
#define IDC_VC_CANCEL 1041
#define IDC_CV_VSYNC 1042
#define IDC_VC_VIDEO_RESOLUTION 1047
#define IDC_CV_HARDWAREYUV 1050
#define ID_FILE_EXIT 40005
#define ID_HELP_ABOUT 40008
#define ID_EMULATION_START 40009
@ -97,12 +98,12 @@
#define ID_EMULATION_STOP 40082
// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 119
#define _APS_NEXT_COMMAND_VALUE 40083
#define _APS_NEXT_CONTROL_VALUE 1050
#define _APS_NEXT_CONTROL_VALUE 1051
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif

View File

@ -78,6 +78,9 @@ volatile bool g_bPrintfOn = true;
// global exception patching address
uint32 g_HaloHack[4] = {0};
// Dead to Rights hack
uint32 g_DeadToRightsHack[2] = {0};
// Static Function(s)
static int ExitException(LPEXCEPTION_POINTERS e);
@ -155,9 +158,19 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
// Halo Access Adjust 1
if(e->ContextRecord->Eip == 0x0003394C)
if(e->ContextRecord->Eip == 0x0003394C || e->ContextRecord->Eip == 0x0003387C)
{
if(e->ContextRecord->Ecx == 0x803BD800)
// blueshogun96 4/10/2010
// Quite frankly, I don't know how Caustik came up with this hack.
// A similar situation comes up prior to going ingame almost immediately
// after the menus. The hack wasn't applied because the register values
// were different, but the situation looks the same. Also, I don't know
// where the 0x803A6000 came from in the first hack. Is this accomodating
// for size?? Or does this need to stay constant. More information is
// welcome!
if(e->ContextRecord->Ecx == 0x803BD800 || e->ContextRecord->Ecx == 0x803E853C ||
e->ContextRecord->Ecx == 0x813B5018)
{
// Halo BINK skip
{
@ -294,32 +307,19 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
return EXCEPTION_CONTINUE_EXECUTION;
}
if(e->ContextRecord->Eip == 0x1197F4)
{
e->ContextRecord->Eip += 2;
DbgPrintf("EmuMain (0x%X): House of the Dead hack 2 applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// Unreal Championship *NTSC*
//if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
//{
// // Unknown NVIDIA Soundstorm APU register
// // mov eax, ds:0xFE80200C
// if(e->ContextRecord->Eip == 0x2C8E78 )
// {
// // Set EAX to zero
// //e->ContextRecord->Eax = 0;
// // Skip this instruction
// e->ContextRecord->Eip += 5;
// *((DWORD*) 0x2C8E79) = 0x00;
// *((DWORD*) 0x2C8E7A) = 0x00;
// *((DWORD*) 0x2C8E7B) = 0x00;
// *((DWORD*) 0x2C8E7C) = 0x00;
// DbgPrintf("EmuMain (0x%X): Unreal Championship hack 1 applied!\n", GetCurrentThreadId());
// g_bEmuException = false;
// return EXCEPTION_CONTINUE_EXECUTION;
// }
//}
// Zapper *NTSC*
if(e->ExceptionRecord->ExceptionCode == 0xC0000096)
{
@ -342,7 +342,7 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
{
if(e->ContextRecord->Eip == 0x4ED70)
{
// Zapper WBINVD skip
// WBINVD skip
e->ContextRecord->Eip += 2;
DbgPrintf("EmuMain (0x%X): Fusion Frenzy hack 1 was applied!\n", GetCurrentThreadId());
@ -382,6 +382,19 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
if(e->ContextRecord->Eip == 0xB2EFB || e->ContextRecord->Eip == (0xB2EFB + 3) ||
e->ContextRecord->Eip == (0xB2EFB + 6) || e->ContextRecord->Eip == (0xB2EFB + 9))
{
// mov [eax-0xX], edi
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): Phantom Crash hack 2 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
@ -401,6 +414,254 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
return EXCEPTION_CONTINUE_EXECUTION;
}
}
else if(e->ExceptionRecord->ExceptionCode == 0x80000003)
{
if(e->ContextRecord->Eip == 0xDF138)
{
// int 3
e->ContextRecord->Eip++;
DbgPrintf("EmuMain (0x%X): Blood Rayne hack 2 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// JetSetRadio Future *NTSC*
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x48226)
{
// mov edx, [eax]
e->ContextRecord->Eip += 2;
DbgPrintf("EmuMain (0x%X): JetSetRadio Future hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
if(e->ContextRecord->Eip == 0x48233)
{
// call dword ptr [edx+0x10]
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): JetSetRadio Future hack 2 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
if(e->ContextRecord->Eip == 0x47448)
{
// mov edx, [ecx]
// push ecx
// call dword ptr [edx+0x0C]
e->ContextRecord->Eip += 6;
DbgPrintf("EmuMain (0x%X): JetSetRadio Future hack 3 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
//if(e->ContextRecord->Eip == 0x48233)
//{
// // call dword ptr [edx+0x10]
// e->ContextRecord->Eip += 3;
// DbgPrintf("EmuMain (0x%X): JetSetRadio Future hack 2 was applied!\n", GetCurrentThreadId());
// g_bEmuException = false;
// return EXCEPTION_CONTINUE_EXECUTION;
// }
}
// Unreal Championship *NTSC*
if(e->ExceptionRecord->ExceptionCode == 0xC0000096)
{
if(e->ContextRecord->Eip == 0x4DD40)
{
// WBINVD skip
e->ContextRecord->Eip += 2;
DbgPrintf("EmuMain (0x%X): Unreal Championship Hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
else if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x6E94B)
{
// mov ecx, [eax+4]
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): Unreal Championship Hack 2 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
if(e->ContextRecord->Eip == 0x6E954)
{
// mov [eax+4], ecx
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): Unreal Championship Hack 3 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// Frogger Beyond *NTSC*
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x19F9D0)
{
//
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): Frogger Beyond Hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// Rayman Arena *NTSC*
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x18B40C)
{
// call dword ptr [ecx+4]
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): Rayman Arena Hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// Dead to Rights (Region shouldn't matter)
/*if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(g_DeadToRightsHack[0])
{
DbgPrintf("EmuMain (0x%X): Dead to Rights Hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}*/
/* Metal Gear Solid II (NTSC) */
if(e->ExceptionRecord->ExceptionCode == 0xC0000096)
{
if(e->ContextRecord->Eip == 0x4E2A0D)
{
// WBINVD skip
e->ContextRecord->Eip += 2;
DbgPrintf("EmuMain (0x%X): Metal Gear Solid II Hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// Soul Calibur II
if(e->ExceptionRecord->ExceptionCode == 0xC0000096)
{
if(e->ContextRecord->Eip == 0x25452)
{
// WBINVD skip
e->ContextRecord->Eip += 2;
DbgPrintf("EmuMain (0x%X): Soul Calibur II Hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
/* Munch Trial(NTSC)*/
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x254D96)
{
// rep movsd
e->ContextRecord->Eip += 2;
DbgPrintf("EmuMain (0x%X): Munch Trial hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x346B4)
{
// cmp dword ptr [eax+0x208], 0
e->ContextRecord->Eip += 7;
DbgPrintf("EmuMain (0x%X): Xbox Dashboard (3944) hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// Splinter Cell
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x1421A)
{
// mov ecx, [eax+4]
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): Splinter Cell hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// Metal Slug 3
if(e->ExceptionRecord->ExceptionCode == 0xC0000005)
{
if(e->ContextRecord->Eip == 0x1B59BC)
{
// mov [ecx+0x28], eax
e->ContextRecord->Eip += 3;
DbgPrintf("EmuMain (0x%X): Metal Slug 3 hack 1 was applied!\n", GetCurrentThreadId());
g_bEmuException = false;
return EXCEPTION_CONTINUE_EXECUTION;
}
}
// print debug information
{

View File

@ -65,6 +65,9 @@ extern volatile bool g_bEmuSuspended;
// global exception patching address
extern uint32 g_HaloHack[4];
// Dead to Rights hack
extern uint32 g_DeadToRightsHack[2];
// global exception patching address
extern uint32 funcExclude[2048];
@ -80,7 +83,8 @@ extern CHAR *g_strZDrive;
extern HWND g_hEmuWindow;
// thread notification routine
extern PVOID g_pfnThreadNotification;
extern PVOID g_pfnThreadNotification[16];
extern int g_iThreadNotificationCount;
// NOTE: this is an arbitrary latency
#define XINPUT_SETSTATE_LATENCY 4

File diff suppressed because it is too large Load Diff

View File

@ -436,8 +436,8 @@ VOID WINAPI EmuIDirect3DDevice8_DeletePixelShader
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_CreatePixelShader
(
CONST DWORD *pFunction,
DWORD *pHandle
X_D3DPIXELSHADERDEF *pPSDef,
DWORD *pHandle
);
// ******************************************************************
@ -597,6 +597,30 @@ HRESULT WINAPI EmuIDirect3DDevice8_SetVertexData4f
FLOAT d
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetVertexData4ub
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetVertexData4ub
(
INT Register,
BYTE a,
BYTE b,
BYTE c,
BYTE d
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetVertexData4s
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetVertexData4s
(
INT Register,
SHORT a,
SHORT b,
SHORT c,
SHORT d
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetVertexDataColor
// ******************************************************************
@ -1681,7 +1705,7 @@ HRESULT WINAPI EmuIDirect3DDevice8_DrawRectPatch
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_GetProjectionViewportMatrix
(
D3DMATRIX *pProjectionViewport
D3DXMATRIX *pProjectionViewport
);
// ******************************************************************
@ -1720,4 +1744,89 @@ VOID WINAPI EmuD3DDevice_SetStateUP();
// ******************************************************************
void WINAPI EmuIDirect3DDevice8_SetStipple( DWORD* pPattern );
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetSwapCallback
// ******************************************************************
void WINAPI EmuIDirect3DDevice8_SetSwapCallback
(
D3DSWAPCALLBACK pCallback
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_PersistDisplay
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_PersistDisplay();
// ******************************************************************
// * func: EmuIDirect3DDevice8_Unknown1
// ******************************************************************
void WINAPI EmuIDirect3DDevice8_Unknown1();
// ******************************************************************
// * func: EmuIDirect3DDevice8_PrimeVertexCache
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_PrimeVertexCache
(
UINT VertexCount,
WORD *pIndexData
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderState_SampleAlpha
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetRenderState_SampleAlpha
(
DWORD dwSampleAlpha
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetRenderState_Deferred
// ******************************************************************
VOID __fastcall EmuIDirect3DDevice8_SetRenderState_Deferred
(
DWORD State,
DWORD Value
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_DeleteStateBlock
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_DeleteStateBlock
(
DWORD Token
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetModelView
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_SetModelView
(
CONST D3DMATRIX *pModelView,
CONST D3DMATRIX *pInverseModelView,
CONST D3DMATRIX *pComposite
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_FlushVertexCache
// ******************************************************************
void WINAPI EmuIDirect3DDevice8_FlushVertexCache();
// ******************************************************************
// * func: EmuIDirect3DDevice8_BeginPushBuffer
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_BeginPushBuffer
(
X_D3DPushBuffer *pPushBuffer
);
// ******************************************************************
// * func: EmuIDirect3DDevice8_EndPushBuffer
// ******************************************************************
HRESULT WINAPI EmuIDirect3DDevice8_EndPushBuffer();
// ******************************************************************
// * func: EmuXMETAL_StartPush
// ******************************************************************
void WINAPI EmuXMETAL_StartPush(void* Unknown);
#endif

View File

@ -174,7 +174,7 @@ XTL::D3DFORMAT XTL::EmuXB2PC_D3DFormat(X_D3DFORMAT Format)
case 0x30: // Linear (X_D3DFMT_LIN_D16)
case 0x2C: // Swizzled (X_D3DFMT_D16)
return D3DFMT_D16;
return D3DFMT_D16; // TODO: D3DDMT_D16 on Xbox is always lockable
case 0x27: // Swizzled (X_D3DFMT_L6V5U5)
return D3DFMT_L6V5U5;
@ -187,6 +187,9 @@ XTL::D3DFORMAT XTL::EmuXB2PC_D3DFormat(X_D3DFORMAT Format)
case 0x64:
return D3DFMT_VERTEXDATA;
case 0xFFFFFFFF:
return D3DFMT_UNKNOWN; // TODO: Not sure if this counts as swizzled or not...
}
CxbxKrnlCleanup("EmuXB2PC_D3DFormat: Unknown Format (0x%.08X)", Format);
@ -228,6 +231,12 @@ XTL::X_D3DFORMAT XTL::EmuPC2XB_D3DFormat(D3DFORMAT Format)
case D3DFMT_L8:
return 0x13; // Linear
// return 0x00; // Swizzled
case D3DFMT_D16:
case D3DFMT_D16_LOCKABLE:
return 0x2C;
case D3DFMT_UNKNOWN:
return 0xFFFFFFFF;
}
CxbxKrnlCleanup("EmuPC2XB_D3DFormat: Unknown Format (%d)", Format);
@ -260,6 +269,37 @@ DWORD XTL::EmuXB2PC_D3DLock(DWORD Flags)
return NewFlags;
}
// convert from xbox to pc multisample formats
XTL::D3DMULTISAMPLE_TYPE XTL::EmuXB2PC_D3DMultiSampleFormat(DWORD Type)
{
switch(Type)
{
case 0x0011:
return D3DMULTISAMPLE_NONE;
case 0x1021:
case 0x1121:
case 0x2021:
case 0x2012:
return D3DMULTISAMPLE_2_SAMPLES;
case 0x1022:
case 0x1222:
case 0x2022:
case 0x2222:
return D3DMULTISAMPLE_4_SAMPLES;
case 0x1233:
case 0x2233:
return D3DMULTISAMPLE_9_SAMPLES;
}
CxbxKrnlCleanup( "Unknown Multisample Type (0x%X)!\n"
"If this value is greater than 0xFFFF contact blueshogun!" );
return D3DMULTISAMPLE_NONE;
}
// lookup table for converting vertex count to primitive count
UINT XTL::EmuD3DVertexToPrimitive[11][2] =
{
@ -303,12 +343,12 @@ CONST DWORD XTL::EmuD3DRenderStateSimpleEncoded[174] =
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 2
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 4
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 6
X_D3DRSSE_UNK, 0x0004037c, // 8 - D3DRS_SHADEMODE
X_D3DRSSE_UNK, 0x0004037c, // 8 - , D3DRS_SHADEMODE
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 10
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 12
0x0004035c, 0x00040300, // 14 - D3DRS_ZWRITEENABLE, D3DRS_ALPHATESTENABLE
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 16
X_D3DRSSE_UNK, 0x00040344, // 18
X_D3DRSSE_UNK, 0x00040344, // 18 - , D3DRS_SRCBLEND
0x00040348, X_D3DRSSE_UNK, // 20 - D3DRS_DESTBLEND
X_D3DRSSE_UNK, 0x00040354, // 22 - , D3DRS_ZFUNC
0x00040340, 0x0004033c, // 24 - D3DRS_ALPHAREF, D3DRS_ALPHAFUNC
@ -326,9 +366,9 @@ CONST DWORD XTL::EmuD3DRenderStateSimpleEncoded[174] =
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 48
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 50
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 52
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 54
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 56
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 58
0x00040374, 0x00040378, // 54 - D3DRS_STENCILZFAIL, D3DRS_STENCILPASS
0x00040364, 0x00040368, // 56 - D3DRS_STENCILFUNC, D3DRS_STENCILREF
0x0004036c, 0x00040360, // 58 - D3DRS_STENCILMASK, D3DRS_STENCILWRITEMASK
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 60
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 62
X_D3DRSSE_UNK, X_D3DRSSE_UNK, // 64

View File

@ -55,6 +55,9 @@ extern X_D3DFORMAT EmuPC2XB_D3DFormat(D3DFORMAT Format);
// convert from xbox to pc d3d lock flags
extern DWORD EmuXB2PC_D3DLock(DWORD Flags);
// convert from xbox to pc multisample formats
extern D3DMULTISAMPLE_TYPE EmuXB2PC_D3DMultiSampleFormat(DWORD Type);
/**
// convert from pc to xbox texture transform state types (unnecessary so far)
if((uint32)State < 4)
@ -91,6 +94,24 @@ inline D3DBLENDOP EmuXB2PC_D3DBLENDOP(X_D3DBLENDOP Value)
{
case 0x8006:
return D3DBLENDOP_ADD;
case 0x800a:
return D3DBLENDOP_SUBTRACT;
case 0x800b:
return D3DBLENDOP_REVSUBTRACT;
case 0x8007:
return D3DBLENDOP_MIN;
case 0x8008:
return D3DBLENDOP_MAX;
case 0xF006:
{
CxbxKrnlCleanup("D3DBLENDOP_ADDSIGNED is not supported!");
return D3DBLENDOP_ADD;
};
case 0xF005:
{
CxbxKrnlCleanup("D3DBLENDOP_REVSUBTRACTSIGNED is not supported!");
return D3DBLENDOP_REVSUBTRACT;
}
}
CxbxKrnlCleanup("Unknown D3DBLENDOP (0x%.08X)", Value);
@ -98,7 +119,7 @@ inline D3DBLENDOP EmuXB2PC_D3DBLENDOP(X_D3DBLENDOP Value)
return (D3DBLENDOP)Value;
}
// convert from xbox to pc blend types
// convert from xbox to pc blend types
inline D3DBLEND EmuXB2PC_D3DBLEND(X_D3DBLEND Value)
{
if(Value < 2)
@ -129,6 +150,35 @@ inline D3DSHADEMODE EmuXB2PC_D3DSHADEMODE(X_D3DSHADEMODE Value)
return (D3DSHADEMODE)((Value & 0x3) + 1);
}
// convert from xbox to pc stencilop modes
inline D3DSTENCILOP EmuXB2PC_D3DSTENCILOP(X_D3DSTENCILOP Value)
{
switch(Value)
{
case 0x1e00:
return D3DSTENCILOP_KEEP;
case 0:
return D3DSTENCILOP_ZERO;
case 0x1e01:
return D3DSTENCILOP_REPLACE;
case 0x1e02:
return D3DSTENCILOP_INCRSAT;
case 0x1e03:
return D3DSTENCILOP_DECRSAT;
case 0x150a:
return D3DSTENCILOP_INVERT;
case 0x8507:
return D3DSTENCILOP_INCR;
case 0x8508:
return D3DSTENCILOP_DECR;
default:
CxbxKrnlCleanup("Unknown D3DSTENCILOP (0x%.08X)", Value);
}
return (D3DSTENCILOP) Value;
}
// table used for vertex->primitive count conversion
extern UINT EmuD3DVertexToPrimitive[11][2];

View File

@ -0,0 +1,366 @@
// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
// * Cxbx->Win32->CxbxKrnl->EmuD3D8->PixelShader.cpp
// *
// * 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 <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
#define _CXBXKRNL_INTERNAL
#define _XBOXKRNL_DEFEXTRN_
#include "CxbxKrnl/CxbxKrnl.h"
#include "CxbxKrnl/Emu.h"
#include "CxbxKrnl/EmuFS.h"
#include "CxbxKrnl/EmuAlloc.h"
#include "CxbxKrnl/EmuXTL.h"
// PS Texture Modes
char* PS_TextureModes[] =
{
"PS_TEXTUREMODES_NONE", // 0x00
"PS_TEXTUREMODES_PROJECT2D", // 0x01
"PS_TEXTUREMODES_PROJECT3D", // 0x02
"PS_TEXTUREMODES_CUBEMAP", // 0x03
"PS_TEXTUREMODES_PASSTHRU", // 0x04
"PS_TEXTUREMODES_CLIPPLANE", // 0x05
"PS_TEXTUREMODES_BUMPENVMAP", // 0x06
"PS_TEXTUREMODES_BUMPENVMAP_LUM", // 0x07
"PS_TEXTUREMODES_BRDF", // 0x08
"PS_TEXTUREMODES_DOT_ST", // 0x09
"PS_TEXTUREMODES_DOT_ZW", // 0x0A
"PS_TEXTUREMODES_DOT_RFLCT_DIFF", // 0x0B
"PS_TEXTUREMODES_DOT_RFLCT_SPEC", // 0x0C
"PS_TEXTUREMODES_DOT_STR_3D", // 0x0D
"PS_TEXTUREMODES_DOT_STR_CUBE", // 0x0E
"PS_TEXTUREMODES_DPNDNT_AR", // 0x0F
"PS_TEXTUREMODES_DPNDNT_GB", // 0x10
"PS_TEXTUREMODES_DOTPRODUCT", // 0x11
"PS_TEXTUREMODES_DOT_RFLCT_SPEC_CONST", // 0x12
"???", // 0x13
"???", // 0x14
"???", // 0x15
"???", // 0x16
"???", // 0x17
"???", // 0x18
"???", // 0x19
"???", // 0x1A
"???", // 0x1B
"???", // 0x1C
"???", // 0x1D
"???", // 0x1E
"???", // 0x1F
};
// PS DotMapping
char* PS_DotMapping[] =
{
"PS_DOTMAPPING_ZERO_TO_ONE", // 0x00
"PS_DOTMAPPING_MINUS1_TO_1_D3D", // 0x01
"PS_DOTMAPPING_MINUS1_TO_1_GL", // 0x02
"PS_DOTMAPPING_MINUS1_TO_1", // 0x03
"PS_DOTMAPPING_HILO_1", // 0x04
"PS_DOTMAPPING_HILO_HEMISPHERE", // 0x07
};
// PS CompareMode
char* PS_CompareMode[] =
{
"PS_COMPAREMODE_S_LT", // 0x00L
"PS_COMPAREMODE_S_GE", // 0x01L
"PS_COMPAREMODE_T_LT", // 0x00L
"PS_COMPAREMODE_T_GE", // 0x02L
"PS_COMPAREMODE_R_LT", // 0x00L
"PS_COMPAREMODE_R_GE", // 0x04L
"PS_COMPAREMODE_Q_LT", // 0x00L
"PS_COMPAREMODE_Q_GE", // 0x08L
};
// PS CombinerCountFlags
char* PS_CombinerCountFlags[] =
{
"PS_COMBINERCOUNT_MUX_LSB", // 0x0000L, // mux on r0.a lsb
"PS_COMBINERCOUNT_MUX_MSB", // 0x0001L, // mux on r0.a msb
"PS_COMBINERCOUNT_SAME_C0", // 0x0000L, // c0 same in each stage
"PS_COMBINERCOUNT_UNIQUE_C0", // 0x0010L, // c0 unique in each stage
"PS_COMBINERCOUNT_SAME_C1", // 0x0000L, // c1 same in each stage
"PS_COMBINERCOUNT_UNIQUE_C1", // 0x0100L // c1 unique in each stage
};
// PS InputMapping
char* PS_InputMapping[] =
{
"PS_INPUTMAPPING_UNSIGNED_IDENTITY", // 0x00L, // max(0,x) OK for final combiner
"PS_INPUTMAPPING_UNSIGNED_INVERT", // 0x20L, // 1 - max(0,x) OK for final combiner
"PS_INPUTMAPPING_EXPAND_NORMAL", // 0x40L, // 2*max(0,x) - 1 invalid for final combiner
"PS_INPUTMAPPING_EXPAND_NEGATE", // 0x60L, // 1 - 2*max(0,x) invalid for final combiner
"PS_INPUTMAPPING_HALFBIAS_NORMAL", // 0x80L, // max(0,x) - 1/2 invalid for final combiner
"PS_INPUTMAPPING_HALFBIAS_NEGATE", // 0xa0L, // 1/2 - max(0,x) invalid for final combiner
"PS_INPUTMAPPING_SIGNED_IDENTITY", // 0xc0L, // x invalid for final combiner
"PS_INPUTMAPPING_SIGNED_NEGATE", // 0xe0L, // -x invalid for final combiner
};
// PS Register
char* PS_Register[] =
{
"PS_REGISTER_ZERO", // 0x00L, // r
"PS_REGISTER_DISCARD", // 0x00L, // w
"PS_REGISTER_C0", // 0x01L, // r
"PS_REGISTER_C1", // 0x02L, // r
"PS_REGISTER_FOG", // 0x03L, // r
"PS_REGISTER_V0", // 0x04L, // r/w
"PS_REGISTER_V1", // 0x05L, // r/w
"PS_REGISTER_T0", // 0x08L, // r/w
"PS_REGISTER_T1", // 0x09L, // r/w
"PS_REGISTER_T2", // 0x0aL, // r/w
"PS_REGISTER_T3", // 0x0bL, // r/w
"PS_REGISTER_R0", // 0x0cL, // r/w
"PS_REGISTER_R1", // 0x0dL, // r/w
"PS_REGISTER_V1R0_SUM", // 0x0eL, // r
"PS_REGISTER_EF_PROD", // 0x0fL, // r
"PS_REGISTER_ONE", // PS_REGISTER_ZERO | PS_INPUTMAPPING_UNSIGNED_INVERT, // OK for final combiner
"PS_REGISTER_NEGATIVE_ONE", // PS_REGISTER_ZERO | PS_INPUTMAPPING_EXPAND_NORMAL, // invalid for final combiner
"PS_REGISTER_ONE_HALF", // PS_REGISTER_ZERO | PS_INPUTMAPPING_HALFBIAS_NEGATE, // invalid for final combiner
"PS_REGISTER_NEGATIVE_ONE_HALF",// PS_REGISTER_ZERO | PS_INPUTMAPPING_HALFBIAS_NORMAL, // invalid for final combiner
};
// PS Channel
char* PS_Channel[] =
{
"PS_CHANNEL_RGB", // 0x00, // used as RGB source
"PS_CHANNEL_BLUE", // 0x00, // used as ALPHA source
"PS_CHANNEL_ALPHA", // 0x10, // used as RGB or ALPHA source
};
// PS FinalCombinerSetting
char* PS_FinalCombinerSetting[] =
{
"PS_FINALCOMBINERSETTING_CLAMP_SUM", // 0x80, // V1+R0 sum clamped to [0,1]
"PS_FINALCOMBINERSETTING_COMPLEMENT_V1", // 0x40, // unsigned invert mapping
"PS_FINALCOMBINERSETTING_COMPLEMENT_R0", // 0x20, // unsigned invert mapping
};
// PS CombineOutput
char* PS_CombineOutput[] =
{
"PS_COMBINEROUTPUT_IDENTITY", // 0x00L, // y = x
"PS_COMBINEROUTPUT_BIAS", // 0x08L, // y = x - 0.5
"PS_COMBINEROUTPUT_SHIFTLEFT_1", // 0x10L, // y = x*2
"PS_COMBINEROUTPUT_SHIFTLEFT_1_BIAS", // 0x18L, // y = (x - 0.5)*2
"PS_COMBINEROUTPUT_SHIFTLEFT_2", // 0x20L, // y = x*4
"PS_COMBINEROUTPUT_SHIFTRIGHT_1", // 0x30L, // y = x/2
"PS_COMBINEROUTPUT_AB_BLUE_TO_ALPHA", // 0x80L, // RGB only
"PS_COMBINEROUTPUT_CD_BLUE_TO_ALPHA", // 0x40L, // RGB only
"PS_COMBINEROUTPUT_AB_MULTIPLY", // 0x00L,
"PS_COMBINEROUTPUT_AB_DOT_PRODUCT", // 0x02L, // RGB only
"PS_COMBINEROUTPUT_CD_MULTIPLY", // 0x00L,
"PS_COMBINEROUTPUT_CD_DOT_PRODUCT", // 0x01L, // RGB only
"PS_COMBINEROUTPUT_AB_CD_SUM", // 0x00L, // 3rd output is AB+CD
"PS_COMBINEROUTPUT_AB_CD_MUX", // 0x04L, // 3rd output is MUX(AB,CD) based on R0.a
};
// PS GlobalFlags
char* PS_GlobalFlags[] =
{
"PS_GLOBALFLAGS_NO_TEXMODE_ADJUST", // 0x0000L, // don't adjust texture modes
"PS_GLOBALFLAGS_TEXMODE_ADJUST", // 0x0001L, // adjust texture modes according to set texture
};
void XTL::DumpPixelShaderDefToFile( X_D3DPIXELSHADERDEF* pPSDef )
{
static int PshNumber = 0; // Keep track of how many pixel shaders we've attemted to convert.
char szPSDef[512];
sprintf( szPSDef, "PSDef%.03d.txt", PshNumber++ );
FILE* out = fopen( szPSDef, "w" );
if( out )
{
fprintf( out, "PSAphaInputs[8] = 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X\n"
"PSFinalCombinerInputsABCD = 0x%.08X\n"
"PSFinalCombinerInputsEFG = 0x%.08X\n"
"PSConstant0[8] = 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X\n"
"PSConstant1[8] = 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X\n"
"PSAlphaOutputs[8] = 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X\n"
"PSRGBInputs[8] = 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X\n"
"PSCompareMode = 0x%.08X\n"
"PSFinalCombinerConstant0 = 0x%.08X\n"
"PSFinalCombinerConstant1 = 0x%.08X\n"
"PSRGBOutputs[8] = 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X 0x%.08X\n"
"PSCombinerCount = 0x%.08X\n"
"PSTextureModes = 0x%.08X\n"
"PSDotMapping = 0x%.08X\n"
"PSInputTexture = 0x%.08X\n"
"PSC0Mapping = 0x%.08X\n"
"PSC1Mapping = 0x%.08X\n"
"PSFinalCombinerConstants = 0x%.08X\n",
pPSDef->PSAlphaInputs[0], pPSDef->PSAlphaInputs[1], pPSDef->PSAlphaInputs[2], pPSDef->PSAlphaInputs[3],
pPSDef->PSAlphaInputs[4], pPSDef->PSAlphaInputs[5], pPSDef->PSAlphaInputs[6], pPSDef->PSAlphaInputs[7],
pPSDef->PSFinalCombinerInputsABCD,
pPSDef->PSFinalCombinerInputsEFG,
pPSDef->PSConstant0[0], pPSDef->PSConstant0[1], pPSDef->PSConstant0[2], pPSDef->PSConstant0[3],
pPSDef->PSConstant0[4], pPSDef->PSConstant0[5], pPSDef->PSConstant0[6], pPSDef->PSConstant0[7],
pPSDef->PSConstant1[0], pPSDef->PSConstant1[1], pPSDef->PSConstant1[2], pPSDef->PSConstant1[3],
pPSDef->PSConstant1[4], pPSDef->PSConstant1[5], pPSDef->PSConstant1[6], pPSDef->PSConstant1[7],
pPSDef->PSAlphaOutputs[0], pPSDef->PSAlphaOutputs[1], pPSDef->PSAlphaOutputs[2], pPSDef->PSAlphaOutputs[3],
pPSDef->PSAlphaOutputs[4], pPSDef->PSAlphaOutputs[5], pPSDef->PSAlphaOutputs[6], pPSDef->PSAlphaOutputs[7],
pPSDef->PSRGBInputs[0], pPSDef->PSRGBInputs[1], pPSDef->PSRGBInputs[2], pPSDef->PSRGBInputs[3],
pPSDef->PSRGBInputs[4], pPSDef->PSRGBInputs[5], pPSDef->PSRGBInputs[6], pPSDef->PSRGBInputs[7],
pPSDef->PSCompareMode,
pPSDef->PSFinalCombinerConstant0,
pPSDef->PSFinalCombinerConstant1,
pPSDef->PSRGBOutputs[0], pPSDef->PSRGBOutputs[1], pPSDef->PSRGBOutputs[2], pPSDef->PSRGBOutputs[3],
pPSDef->PSRGBOutputs[4], pPSDef->PSRGBOutputs[5], pPSDef->PSRGBOutputs[6], pPSDef->PSRGBOutputs[7],
pPSDef->PSCombinerCount,
pPSDef->PSTextureModes,
pPSDef->PSDotMapping,
pPSDef->PSInputTexture,
pPSDef->PSC0Mapping,
pPSDef->PSC1Mapping,
pPSDef->PSFinalCombinerConstants );
fclose( out );
}
}
// print relevant contents to the debug console
void XTL::PrintPixelShaderDefContents( X_D3DPIXELSHADERDEF* pPSDef )
{
// Show the contents to the user
if( pPSDef )
{
DbgPshPrintf( "\n-----PixelShader Def Contents-----\n" );
if( pPSDef->PSTextureModes )
{
DWORD dwPSTexMode0 = ( pPSDef->PSTextureModes >> 0 ) & 0x1F;
DWORD dwPSTexMode1 = ( pPSDef->PSTextureModes >> 5 ) & 0x1F;
DWORD dwPSTexMode2 = ( pPSDef->PSTextureModes >> 10 ) & 0x1F;
DWORD dwPSTexMode3 = ( pPSDef->PSTextureModes >> 15 ) & 0x1F;
DbgPshPrintf( "PSTextureModes ->\n" );
DbgPshPrintf( "Stage 0: %s\n", PS_TextureModes[dwPSTexMode0] );
DbgPshPrintf( "Stage 1: %s\n", PS_TextureModes[dwPSTexMode1] );
DbgPshPrintf( "Stage 2: %s\n", PS_TextureModes[dwPSTexMode2] );
DbgPshPrintf( "Stage 3: %s\n", PS_TextureModes[dwPSTexMode3] );
}
if( pPSDef->PSDotMapping )
{
DWORD dwPSDMStage1 = ( pPSDef->PSDotMapping >> 0 ) & 0x7;
DWORD dwPSDMStage2 = ( pPSDef->PSDotMapping >> 4 ) & 0x7;
DWORD dwPSDMStage3 = ( pPSDef->PSDotMapping >> 8 ) & 0x7;
DbgPshPrintf( "PSDotMapping ->\n" );
DbgPshPrintf( "Stage 1: %s\n", PS_DotMapping[dwPSDMStage1] );
DbgPshPrintf( "Stage 2: %s\n", PS_DotMapping[dwPSDMStage2] );
DbgPshPrintf( "Stage 3: %s\n", PS_DotMapping[dwPSDMStage3] );
}
if( pPSDef->PSCompareMode )
{
DWORD dwPSCMStage0 = ( pPSDef->PSCompareMode >> 0 ) & 0xF;
DWORD dwPSCMStage1 = ( pPSDef->PSCompareMode >> 4 ) & 0xF;
DWORD dwPSCMStage2 = ( pPSDef->PSCompareMode >> 8 ) & 0xF;
DWORD dwPSCMStage3 = ( pPSDef->PSCompareMode >> 12 ) & 0xF;
DbgPshPrintf( "PSCompareMode ->\n" );
DbgPshPrintf( "Stage 0: %s\n", PS_TextureModes[dwPSCMStage0 == 0 ? 0 : 1] );
DbgPshPrintf( "Stage 1: %s\n", PS_TextureModes[dwPSCMStage1 == 0 ? 2 : 3] );
DbgPshPrintf( "Stage 2: %s\n", PS_TextureModes[dwPSCMStage2 == 0 ? 4 : 5] );
DbgPshPrintf( "Stage 3: %s\n", PS_TextureModes[dwPSCMStage3 == 0 ? 6 : 7] );
}
if( pPSDef->PSInputTexture )
{
DWORD dwPSITStage2 = ( pPSDef->PSInputTexture >> 16 ) & 0x1;
DWORD dwPSITStage3 = ( pPSDef->PSInputTexture >> 20 ) & 0x3;
DbgPshPrintf( "PSInputTexture ->\n" );
DbgPshPrintf( "Stage 2: %s\n", PS_TextureModes[dwPSITStage2] );
DbgPshPrintf( "Stage 3: %s\n", PS_TextureModes[dwPSITStage3] );
}
if( pPSDef->PSCombinerCount )
{
DWORD dwPSCCNumCombiners = ( pPSDef->PSCombinerCount >> 0 ) & 0xF;
DWORD dwPSCCMux = ( pPSDef->PSCombinerCount >> 8 ) & 0x1;
DWORD dwPSCCC0 = ( pPSDef->PSCombinerCount >> 12 ) & 0x1;
DWORD dwPSCCC1 = ( pPSDef->PSCombinerCount >> 16 ) & 0x1;
DbgPshPrintf( "PSCombinerCount ->\n" );
DbgPshPrintf( "Combiners: %d\n", dwPSCCNumCombiners );
DbgPshPrintf( "Mux: %s\n", PS_CombinerCountFlags[dwPSCCMux] );
DbgPshPrintf( "C0: %s\n", PS_CombinerCountFlags[dwPSCCC0 == 0 ? 2 : 3] );
DbgPshPrintf( "C1: %s\n", PS_CombinerCountFlags[dwPSCCC1 == 0 ? 4 : 5] );
}
/*for( int i = 0; i > 7; i++ )
{
if( pPSDef->PSRGBInputs[i] )
{*/
}
}
HRESULT XTL::EmuRecompilePshDef( X_D3DPIXELSHADERDEF* pPSDef, LPD3DXBUFFER* ppRecompiled )
{
char szPshString[2048]; // I'm sure that's big enough...
// Dump the contents of the PixelShader def
#ifdef _DEBUG_TRACK_PS
DumpPixelShaderDefToFile( pPSDef );
// Azurik like to create and destroy the same shader every frame! O_o
// PrintPixelShaderDefContents( pPSDef );
#endif
// First things first, set the pixel shader version
// TODO: ps.1.1 might be a better idea...
sprintf(szPshString, "%s", "ps.1.0\n");
// Handle Texture declarations
if(pPSDef->PSTextureModes != 0)
{
}
return S_OK;
}

View File

@ -0,0 +1,434 @@
// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
// * Cxbx->Win32->CxbxKrnl->EmuD3D8->PixelShader.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 <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
#ifndef PIXELSHADER_H
#define PIXELSHADER_H
#include "Cxbx.h"
/*---------------------------------------------------------------------------*/
/* Texture configuration - The following members of the D3DPixelShaderDef */
/* structure define the addressing modes of each of the four texture stages:*/
/* PSTextureModes */
/* PSDotMapping */
/* PSInputTexture */
/* PSCompareMode */
/*---------------------------------------------------------------------------*/
// =========================================================================================================
// PSTextureModes
// --------.--------.--------.---xxxxx stage0
// --------.--------.------xx.xxx----- stage1
// --------.--------.-xxxxx--.-------- stage2
// --------.----xxxx.x-------.-------- stage3
#define PS_TEXTUREMODES(t0,t1,t2,t3) (((t3)<<15)|((t2)<<10)|((t1)<<5)|(t0))
/*
Texture modes:
NONE :stage inactive
PROJECT2D :argb = texture(s/q, t/q)
PROJECT3D :argb = texture(s/q, t/q, r/q)
CUBEMAP :argb = cubemap(s,t,r)
PASSTHRU :argb = s,t,r,q
CLIPPLANE :pixel not drawn if s,t,r, or q < 0. PSCompareMode affects comparison
BUMPENVMAP :argb=texture(s+mat00*src.r+mat01*src.g,
t+mat10*src.r+mat11*src.g)
mat00 set via D3DTSS_BUMPENVMAT00, etc.
BUMPENVMAP_LUM :argb=texture(s+mat00*src.r+mat01*src.g,
t+mat10*src.r+mat11*src.g);
rgb *= (lum_scale*src.b + lum_bias); (a is not affected)
lum_scale set by D3DTSS_BUMPENVLSCALE
lum_bias set by D3DTSS_BUMPENVLOFFSET
mat00 set via D3DTSS_BUMPENVMAT00, etc.
BRDF :argb = texture(eyeSigma, lightSigma, dPhi)
eyeSigma = Sigma of eye vector in spherical coordinates
lightSigma = Sigma of light vector in spherical coordinates
dPhi = Phi of eye - Phi of light
DOT_ST :argb = texture(<DotResult of stage-1>, (s,t,r).(src.r,src.g,src.b))
DOT_ZW :frag depth = (<DotResult of stage-1>/((s,t,r).(src.r,src.g,src.b))
DOT_RFLCT_DIFF :n = (<DotResult of stage-1>,(s,t,r).(src.r,src.g,src.b),<DotResult of stage+1>)
argb = cubemap(n)
DOT_RFLCT_SPEC :n = (<DotResult of stage-2>,<DotResult of stage-1>,(s,t,r).(src.r,src.g,src.b))
r = 2*n*(n.e)/(n.n) - e where e is eye vector built from q coord of each stage
argb = cubemap(r)
DOT_STR_3D :argb=texture((<DotResult of stage-2>,<DotResult of stage-1>,(s,t,r).(src.r,src.g,src.b)))
DOT_STR_CUBE :argb=cubemap((<DotResult of stage-2>,<DotResult of stage-1>,(s,t,r).(src.r,src.g,src.b)))
DEPENDENT_AR :argb = texture(src.a, src.r)
DEPENDENT_GB :argb = texture(src.g, src.b)
DOTPRODUCT :argb = (s,t,r).(src.r,src.g,src.b)
DOT_RFLCT_SPEC_CONST :n = (<DotResult of stage-2>,<DotResult of stage-1>,(s,t,r).(src.r,src.g,src.b))
r = 2*n*(n.e)/(n.n) - e where e is eye vector set via SetEyeVector()
argb = cubemap(r)
*/
enum PS_TEXTUREMODES
{ // valid in stage 0 1 2 3
PS_TEXTUREMODES_NONE= 0x00L, // * * * *
PS_TEXTUREMODES_PROJECT2D= 0x01L, // * * * *
PS_TEXTUREMODES_PROJECT3D= 0x02L, // * * * *
PS_TEXTUREMODES_CUBEMAP= 0x03L, // * * * *
PS_TEXTUREMODES_PASSTHRU= 0x04L, // * * * *
PS_TEXTUREMODES_CLIPPLANE= 0x05L, // * * * *
PS_TEXTUREMODES_BUMPENVMAP= 0x06L, // - * * *
PS_TEXTUREMODES_BUMPENVMAP_LUM= 0x07L, // - * * *
PS_TEXTUREMODES_BRDF= 0x08L, // - - * *
PS_TEXTUREMODES_DOT_ST= 0x09L, // - - * *
PS_TEXTUREMODES_DOT_ZW= 0x0aL, // - - * *
PS_TEXTUREMODES_DOT_RFLCT_DIFF= 0x0bL, // - - * -
PS_TEXTUREMODES_DOT_RFLCT_SPEC= 0x0cL, // - - - *
PS_TEXTUREMODES_DOT_STR_3D= 0x0dL, // - - - *
PS_TEXTUREMODES_DOT_STR_CUBE= 0x0eL, // - - - *
PS_TEXTUREMODES_DPNDNT_AR= 0x0fL, // - * * *
PS_TEXTUREMODES_DPNDNT_GB= 0x10L, // - * * *
PS_TEXTUREMODES_DOTPRODUCT= 0x11L, // - * * -
PS_TEXTUREMODES_DOT_RFLCT_SPEC_CONST= 0x12L, // - - - *
// 0x13-0x1f reserved
};
// =========================================================================================================
// PSDotMapping
// --------.--------.--------.-----xxx // stage1
// --------.--------.--------.-xxx---- // stage2
// --------.--------.-----xxx.-------- // stage3
#define PS_DOTMAPPING(t0,t1,t2,t3) (((t3)<<8)|((t2)<<4)|(t1))
// Mappings:
// ZERO_TO_ONE :rgb->(r,g,b): 0x0=>0.0, 0xff=>1.0
// MINUS1_TO_1_D3D :rgb->(r,g,b): 0x0=>-128/127, 0x01=>-1.0, 0x80=>0.0, 0xff=>1.0
// MINUS1_TO_1_GL :rgb->(r,g,b): 0x80=>-1.0, 0x7f=>1.0
// MINUS1_TO_1 :rgb->(r,g,b): 0x80=>-128/127, 0x81=>-1.0, 0x0=>0.0, 0x7f=>1.0
// HILO_1 :HL->(H,L,1.0): 0x0000=>0.0, 0xffff=>1.0
// HILO_HEMISPHERE :HL->(H,L,sqrt(1-H*H-L*L)): 0x8001=>-1.0, 0x0=>0.0, 0x7fff=>1.0, 0x8000=>-32768/32767
enum PS_DOTMAPPING
{ // valid in stage 0 1 2 3
PS_DOTMAPPING_ZERO_TO_ONE= 0x00L, // - * * *
PS_DOTMAPPING_MINUS1_TO_1_D3D= 0x01L, // - * * *
PS_DOTMAPPING_MINUS1_TO_1_GL= 0x02L, // - * * *
PS_DOTMAPPING_MINUS1_TO_1= 0x03L, // - * * *
PS_DOTMAPPING_HILO_1= 0x04L, // - * * *
PS_DOTMAPPING_HILO_HEMISPHERE= 0x07L, // - * * *
};
// =========================================================================================================
// PSCompareMode
// --------.--------.--------.----xxxx // stage0
// --------.--------.--------.xxxx---- // stage1
// --------.--------.----xxxx.-------- // stage2
// --------.--------.xxxx----.-------- // stage3
#define PS_COMPAREMODE(t0,t1,t2,t3) (((t3)<<12)|((t2)<<8)|((t1)<<4)|(t0))
enum PS_COMPAREMODE
{
PS_COMPAREMODE_S_LT= 0x00L,
PS_COMPAREMODE_S_GE= 0x01L,
PS_COMPAREMODE_T_LT= 0x00L,
PS_COMPAREMODE_T_GE= 0x02L,
PS_COMPAREMODE_R_LT= 0x00L,
PS_COMPAREMODE_R_GE= 0x04L,
PS_COMPAREMODE_Q_LT= 0x00L,
PS_COMPAREMODE_Q_GE= 0x08L,
};
// =========================================================================================================
// PSInputTexture
// --------.-------x.--------.-------- // stage2
// --------.--xx----.--------.-------- // stage3
//
// Selects the other texture to use as an input in the following texture modes:
// DOT_ST, DOT_STR_3D, DOT_STR_CUBE, DOT_ZW, DOT_RFLCT_SPEC,
// DOT_RFLCT_DIFF, DPNDNT_AR, DPNDNT_GB, BUMPENVMAP,
// BUMPENVMAP_LUM, DOT_PRODUCT
#define PS_INPUTTEXTURE(t0,t1,t2,t3) (((t3)<<20)|((t2)<<16))
/*---------------------------------------------------------------------------------*/
/* Color combiners - The following members of the D3DPixelShaderDef structure */
/* define the state for the eight stages of color combiners: */
/* PSCombinerCount - Number of stages */
/* PSAlphaInputs[8] - Inputs for alpha portion of each stage */
/* PSRGBInputs[8] - Inputs for RGB portion of each stage */
/* PSConstant0[8] - Constant 0 for each stage */
/* PSConstant1[8] - Constant 1 for each stage */
/* PSFinalCombinerConstant0 - Constant 0 for final combiner */
/* PSFinalCombinerConstant1 - Constant 1 for final combiner */
/* PSAlphaOutputs[8] - Outputs for alpha portion of each stage */
/* PSRGBOutputs[8] - Outputs for RGB portion of each stage */
/*---------------------------------------------------------------------------------*/
// =========================================================================================================
// PSCombinerCount
// --------.--------.--------.----xxxx // number of combiners (1-8)
// --------.--------.-------x.-------- // mux bit (0= LSB, 1= MSB)
// --------.--------.---x----.-------- // separate C0
// --------.-------x.--------.-------- // separate C1
#define PS_COMBINERCOUNT(count, flags) (((flags)<<8)|(count))
// count is 1-8, flags contains one or more values from PS_COMBINERCOUNTFLAGS
enum PS_COMBINERCOUNTFLAGS
{
PS_COMBINERCOUNT_MUX_LSB= 0x0000L, // mux on r0.a lsb
PS_COMBINERCOUNT_MUX_MSB= 0x0001L, // mux on r0.a msb
PS_COMBINERCOUNT_SAME_C0= 0x0000L, // c0 same in each stage
PS_COMBINERCOUNT_UNIQUE_C0= 0x0010L, // c0 unique in each stage
PS_COMBINERCOUNT_SAME_C1= 0x0000L, // c1 same in each stage
PS_COMBINERCOUNT_UNIQUE_C1= 0x0100L // c1 unique in each stage
};
// =========================================================================================================
// PSRGBInputs[0-7]
// PSAlphaInputs[0-7]
// PSFinalCombinerInputsABCD
// PSFinalCombinerInputsEFG
// --------.--------.--------.----xxxx // D register
// --------.--------.--------.---x---- // D channel (0= RGB/BLUE, 1= ALPHA)
// --------.--------.--------.xxx----- // D input mapping
// --------.--------.----xxxx.-------- // C register
// --------.--------.---x----.-------- // C channel (0= RGB/BLUE, 1= ALPHA)
// --------.--------.xxx-----.-------- // C input mapping
// --------.----xxxx.--------.-------- // B register
// --------.---x----.--------.-------- // B channel (0= RGB/BLUE, 1= ALPHA)
// --------.xxx-----.--------.-------- // B input mapping
// ----xxxx.--------.--------.-------- // A register
// ---x----.--------.--------.-------- // A channel (0= RGB/BLUE, 1= ALPHA)
// xxx-----.--------.--------.-------- // A input mapping
// examples:
//
// shader.PSRGBInputs[3]= PS_COMBINERINPUTS(
// PS_REGISTER_T0 | PS_INPUTMAPPING_EXPAND_NORMAL | PS_CHANNEL_RGB,
// PS_REGISTER_C0 | PS_INPUTMAPPING_UNSIGNED_IDENTITY | PS_CHANNEL_ALPHA,
// PS_REGISTER_ZERO,
// PS_REGISTER_ZERO);
//
// shader.PSFinalCombinerInputsABCD= PS_COMBINERINPUTS(
// PS_REGISTER_T0 | PS_INPUTMAPPING_UNSIGNED_IDENTITY | PS_CHANNEL_ALPHA,
// PS_REGISTER_ZERO | PS_INPUTMAPPING_EXPAND_NORMAL | PS_CHANNEL_RGB,
// PS_REGISTER_EFPROD | PS_INPUTMAPPING_UNSIGNED_INVERT | PS_CHANNEL_RGB,
// PS_REGISTER_ZERO);
//
// PS_FINALCOMBINERSETTING is set in 4th field of PSFinalCombinerInputsEFG with PS_COMBINERINPUTS
// example:
//
// shader.PSFinalCombinerInputsEFG= PS_COMBINERINPUTS(
// PS_REGISTER_R0 | PS_INPUTMAPPING_UNSIGNED_IDENTITY | PS_CHANNEL_RGB,
// PS_REGISTER_R1 | PS_INPUTMAPPING_UNSIGNED_IDENTITY | PS_CHANNEL_RGB,
// PS_REGISTER_R1 | PS_INPUTMAPPING_UNSIGNED_IDENTITY | PS_CHANNEL_BLUE,
// PS_FINALCOMBINERSETTING_CLAMP_SUM | PS_FINALCOMBINERSETTING_COMPLEMENT_R0);
#define PS_COMBINERINPUTS(a,b,c,d) (((a)<<24)|((b)<<16)|((c)<<8)|(d))
// For PSFinalCombinerInputsEFG,
// a,b,c contain a value from PS_REGISTER, PS_CHANNEL, and PS_INPUTMAPPING for input E,F, and G
// d contains values from PS_FINALCOMBINERSETTING
// For all other inputs,
// a,b,c,d each contain a value from PS_REGISTER, PS_CHANNEL, and PS_INPUTMAPPING
enum PS_INPUTMAPPING
{
PS_INPUTMAPPING_UNSIGNED_IDENTITY= 0x00L, // max(0,x) OK for final combiner
PS_INPUTMAPPING_UNSIGNED_INVERT= 0x20L, // 1 - max(0,x) OK for final combiner
PS_INPUTMAPPING_EXPAND_NORMAL= 0x40L, // 2*max(0,x) - 1 invalid for final combiner
PS_INPUTMAPPING_EXPAND_NEGATE= 0x60L, // 1 - 2*max(0,x) invalid for final combiner
PS_INPUTMAPPING_HALFBIAS_NORMAL= 0x80L, // max(0,x) - 1/2 invalid for final combiner
PS_INPUTMAPPING_HALFBIAS_NEGATE= 0xa0L, // 1/2 - max(0,x) invalid for final combiner
PS_INPUTMAPPING_SIGNED_IDENTITY= 0xc0L, // x invalid for final combiner
PS_INPUTMAPPING_SIGNED_NEGATE= 0xe0L, // -x invalid for final combiner
};
enum PS_REGISTER
{
PS_REGISTER_ZERO= 0x00L, // r
PS_REGISTER_DISCARD= 0x00L, // w
PS_REGISTER_C0= 0x01L, // r
PS_REGISTER_C1= 0x02L, // r
PS_REGISTER_FOG= 0x03L, // r
PS_REGISTER_V0= 0x04L, // r/w
PS_REGISTER_V1= 0x05L, // r/w
PS_REGISTER_T0= 0x08L, // r/w
PS_REGISTER_T1= 0x09L, // r/w
PS_REGISTER_T2= 0x0aL, // r/w
PS_REGISTER_T3= 0x0bL, // r/w
PS_REGISTER_R0= 0x0cL, // r/w
PS_REGISTER_R1= 0x0dL, // r/w
PS_REGISTER_V1R0_SUM= 0x0eL, // r
PS_REGISTER_EF_PROD= 0x0fL, // r
PS_REGISTER_ONE= PS_REGISTER_ZERO | PS_INPUTMAPPING_UNSIGNED_INVERT, // OK for final combiner
PS_REGISTER_NEGATIVE_ONE= PS_REGISTER_ZERO | PS_INPUTMAPPING_EXPAND_NORMAL, // invalid for final combiner
PS_REGISTER_ONE_HALF= PS_REGISTER_ZERO | PS_INPUTMAPPING_HALFBIAS_NEGATE, // invalid for final combiner
PS_REGISTER_NEGATIVE_ONE_HALF= PS_REGISTER_ZERO | PS_INPUTMAPPING_HALFBIAS_NORMAL, // invalid for final combiner
};
// FOG ALPHA is only available in final combiner
// V1R0_SUM and EF_PROD are only available in final combiner (A,B,C,D inputs only)
// V1R0_SUM_ALPHA and EF_PROD_ALPHA are not available
// R0_ALPHA is initialized to T0_ALPHA in stage0
enum PS_CHANNEL
{
PS_CHANNEL_RGB= 0x00, // used as RGB source
PS_CHANNEL_BLUE= 0x00, // used as ALPHA source
PS_CHANNEL_ALPHA= 0x10, // used as RGB or ALPHA source
};
enum PS_FINALCOMBINERSETTING
{
PS_FINALCOMBINERSETTING_CLAMP_SUM= 0x80, // V1+R0 sum clamped to [0,1]
PS_FINALCOMBINERSETTING_COMPLEMENT_V1= 0x40, // unsigned invert mapping
PS_FINALCOMBINERSETTING_COMPLEMENT_R0= 0x20, // unsigned invert mapping
};
// =========================================================================================================
// PSRGBOutputs[0-7]
// PSAlphaOutputs[0-7]
// --------.--------.--------.----xxxx // CD register
// --------.--------.--------.xxxx---- // AB register
// --------.--------.----xxxx.-------- // SUM register
// --------.--------.---x----.-------- // CD output (0= multiply, 1= dot product)
// --------.--------.--x-----.-------- // AB output (0= multiply, 1= dot product)
// --------.--------.-x------.-------- // AB_CD mux/sum select (0= sum, 1= mux)
// --------.------xx.x-------.-------- // Output mapping
// --------.-----x--.--------.-------- // CD blue to alpha
// --------.----x---.--------.-------- // AB blue to alpha
#define PS_COMBINEROUTPUTS(ab,cd,mux_sum,flags) (((flags)<<12)|((mux_sum)<<8)|((ab)<<4)|(cd))
// ab,cd,mux_sum contain a value from PS_REGISTER
// flags contains values from PS_COMBINEROUTPUT
enum PS_COMBINEROUTPUT
{
PS_COMBINEROUTPUT_IDENTITY= 0x00L, // y = x
PS_COMBINEROUTPUT_BIAS= 0x08L, // y = x - 0.5
PS_COMBINEROUTPUT_SHIFTLEFT_1= 0x10L, // y = x*2
PS_COMBINEROUTPUT_SHIFTLEFT_1_BIAS= 0x18L, // y = (x - 0.5)*2
PS_COMBINEROUTPUT_SHIFTLEFT_2= 0x20L, // y = x*4
PS_COMBINEROUTPUT_SHIFTRIGHT_1= 0x30L, // y = x/2
PS_COMBINEROUTPUT_AB_BLUE_TO_ALPHA= 0x80L, // RGB only
PS_COMBINEROUTPUT_CD_BLUE_TO_ALPHA= 0x40L, // RGB only
PS_COMBINEROUTPUT_AB_MULTIPLY= 0x00L,
PS_COMBINEROUTPUT_AB_DOT_PRODUCT= 0x02L, // RGB only
PS_COMBINEROUTPUT_CD_MULTIPLY= 0x00L,
PS_COMBINEROUTPUT_CD_DOT_PRODUCT= 0x01L, // RGB only
PS_COMBINEROUTPUT_AB_CD_SUM= 0x00L, // 3rd output is AB+CD
PS_COMBINEROUTPUT_AB_CD_MUX= 0x04L, // 3rd output is MUX(AB,CD) based on R0.a
};
// AB_CD register output must be DISCARD if either AB_DOT_PRODUCT or CD_DOT_PRODUCT are set
// =========================================================================================================
// PSC0Mapping
// PSC1Mapping
// --------.--------.--------.----xxxx // offset of D3D constant for stage 0
// --------.--------.--------.xxxx---- // offset of D3D constant for stage 1
// --------.--------.----xxxx.-------- // offset of D3D constant for stage 2
// --------.--------.xxxx----.-------- // offset of D3D constant for stage 3
// --------.----xxxx.--------.-------- // offset of D3D constant for stage 4
// --------.xxxx----.--------.-------- // offset of D3D constant for stage 5
// ----xxxx.--------.--------.-------- // offset of D3D constant for stage 6
// xxxx----.--------.--------.-------- // offset of D3D constant for stage 7
#define PS_CONSTANTMAPPING(s0,s1,s2,s3,s4,s5,s6,s7) \
(((DWORD)(s0)&0xf)<< 0) | (((DWORD)(s1)&0xf)<< 4) | \
(((DWORD)(s2)&0xf)<< 8) | (((DWORD)(s3)&0xf)<<12) | \
(((DWORD)(s4)&0xf)<<16) | (((DWORD)(s5)&0xf)<<20) | \
(((DWORD)(s6)&0xf)<<24) | (((DWORD)(s7)&0xf)<<28)
// s0-s7 contain the offset of the D3D constant that corresponds to the
// c0 or c1 constant in stages 0 through 7. These mappings are only used in
// SetPixelShaderConstant().
// =========================================================================================================
// PSFinalCombinerConstants
// --------.--------.--------.----xxxx // offset of D3D constant for C0
// --------.--------.--------.xxxx---- // offset of D3D constant for C1
// --------.--------.-------x.-------- // Adjust texture flag
#define PS_FINALCOMBINERCONSTANTS(c0,c1,flags) (((DWORD)(flags) << 8) | ((DWORD)(c0)&0xf)<< 0) | (((DWORD)(c1)&0xf)<< 4)
// c0 and c1 contain the offset of the D3D constant that corresponds to the
// constants in the final combiner. These mappings are only used in
// SetPixelShaderConstant(). Flags contains values from PS_GLOBALFLAGS
enum PS_GLOBALFLAGS
{
// if this flag is set, the texture mode for each texture stage is adjusted as follows:
// if set texture is a cubemap,
// change PS_TEXTUREMODES_PROJECT2D to PS_TEXTUREMODES_CUBEMAP
// change PS_TEXTUREMODES_PROJECT3D to PS_TEXTUREMODES_CUBEMAP
// change PS_TEXTUREMODES_DOT_STR_3D to PS_TEXTUREMODES_DOT_STR_CUBE
// if set texture is a volume texture,
// change PS_TEXTUREMODES_PROJECT2D to PS_TEXTUREMODES_PROJECT3D
// change PS_TEXTUREMODES_CUBEMAP to PS_TEXTUREMODES_PROJECT3D
// change PS_TEXTUREMODES_DOT_STR_CUBE to PS_TEXTUREMODES_DOT_STR_3D
// if set texture is neither cubemap or volume texture,
// change PS_TEXTUREMODES_PROJECT3D to PS_TEXTUREMODES_PROJECT2D
// change PS_TEXTUREMODES_CUBEMAP to PS_TEXTUREMODES_PROJECT2D
PS_GLOBALFLAGS_NO_TEXMODE_ADJUST= 0x0000L, // don't adjust texture modes
PS_GLOBALFLAGS_TEXMODE_ADJUST= 0x0001L, // adjust texture modes according to set texture
};
// dump pixel shader definition to file
void DumpPixelShaderDefToFile( X_D3DPIXELSHADERDEF* pPSDef );
// print relevant contents to the debug console
void PrintPixelShaderDefContents( X_D3DPIXELSHADERDEF* pDSDef );
// Recompile Xbox PixelShader def
HRESULT EmuRecompilePshDef( X_D3DPIXELSHADERDEF* pPSDef, LPD3DXBUFFER* ppRecompiled );
#ifdef _DEBUG_TRACK_PS
#define DbgPshPrintf if(g_bPrintfOn) printf
#else
inline void null_func_psh(...) { }
#define DbgPshPrintf XTL::null_func_psh
#endif
#endif

View File

@ -267,7 +267,21 @@ extern void XTL::EmuExecutePushBufferRaw
if(!VshHandleIsVertexShader(dwVertexShader))
{
if(dwVertexShader & D3DFVF_XYZRHW) { dwStride += sizeof(FLOAT)*4; }
/*if(dwVertexShader & D3DFVF_XYZRHW) { dwStride += sizeof(FLOAT)*4; }
if(dwVertexShader & D3DFVF_XYZ) { dwStride += sizeof(FLOAT)*3; }
if(dwVertexShader & D3DFVF_XYZB1) { dwStride += sizeof(FLOAT); }
if(dwVertexShader & D3DFVF_XYZB2) { dwStride += sizeof(FLOAT)*2; }
if(dwVertexShader & D3DFVF_XYZB3) { dwStride += sizeof(FLOAT)*3; }
if(dwVertexShader & D3DFVF_XYZB4) { dwStride += sizeof(FLOAT)*4; }*/
if((dwVertexShader & D3DFVF_POSITION_MASK) == D3DFVF_XYZRHW){ dwStride += sizeof(FLOAT)*4; }
if((dwVertexShader & D3DFVF_POSITION_MASK) == D3DFVF_XYZ) { dwStride += sizeof(FLOAT)*3; }
if((dwVertexShader & D3DFVF_POSITION_MASK) == D3DFVF_XYZB1) { dwStride += sizeof(FLOAT)*4; }
if((dwVertexShader & D3DFVF_POSITION_MASK) == D3DFVF_XYZB2) { dwStride += sizeof(FLOAT)*5; }
if((dwVertexShader & D3DFVF_POSITION_MASK) == D3DFVF_XYZB3) { dwStride += sizeof(FLOAT)*6; }
if((dwVertexShader & D3DFVF_POSITION_MASK) == D3DFVF_XYZB4) { dwStride += sizeof(FLOAT)*7; }
if(dwVertexShader & D3DFVF_NORMAL) { dwStride += sizeof(FLOAT)*3; }
if(dwVertexShader & D3DFVF_DIFFUSE) { dwStride += sizeof(DWORD); }
if(dwVertexShader & D3DFVF_SPECULAR) { dwStride += sizeof(DWORD); }
@ -329,7 +343,7 @@ extern void XTL::EmuExecutePushBufferRaw
VertexPatcher VertPatch;
bool bPatched = VertPatch.Apply(&VPDesc);
bool bPatched = VertPatch.Apply(&VPDesc, NULL);
g_pD3DDevice8->DrawPrimitiveUP
(
@ -425,7 +439,7 @@ extern void XTL::EmuExecutePushBufferRaw
VertexPatcher VertPatch;
bool bPatched = VertPatch.Apply(&VPDesc);
bool bPatched = VertPatch.Apply(&VPDesc, NULL);
g_pD3DDevice8->SetIndices(pIndexBuffer, 0);
@ -588,7 +602,7 @@ extern void XTL::EmuExecutePushBufferRaw
VertexPatcher VertPatch;
bool bPatched = VertPatch.Apply(&VPDesc);
bool bPatched = VertPatch.Apply(&VPDesc, NULL);
g_pD3DDevice8->SetIndices(pIndexBuffer, 0);

View File

@ -41,6 +41,9 @@
DWORD *XTL::EmuD3DDeferredRenderState;
DWORD *XTL::EmuD3DDeferredTextureState;
extern uint32 g_BuildVersion;
extern uint32 g_OrigBuildVersion;
// ******************************************************************
// * func: EmuUpdateDeferredStates
// ******************************************************************
@ -153,6 +156,11 @@ void XTL::EmuUpdateDeferredStates()
//**/
}
// For 3925, the actual D3DTSS flags have different values.
bool bHack3925 = (g_BuildVersion == 3925) ? true : false;
int Adjust1 = bHack3925 ? 12 : 0;
int Adjust2 = bHack3925 ? 10 : 0;
// Certain D3DTS values need to be checked on each Draw[Indexed]Vertices
if(EmuD3DDeferredTextureState != 0)
{
@ -160,118 +168,123 @@ void XTL::EmuUpdateDeferredStates()
{
::DWORD *pCur = &EmuD3DDeferredTextureState[v*32];
if(pCur[0] != X_D3DTSS_UNK)
if(pCur[0+Adjust2] != X_D3DTSS_UNK)
{
if(pCur[0] == 5)
if(pCur[0+Adjust2] == 5)
CxbxKrnlCleanup("ClampToEdge is unsupported (temporarily)");
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSU, pCur[0]);
}
if(pCur[1] != X_D3DTSS_UNK)
if(pCur[1+Adjust2] != X_D3DTSS_UNK)
{
if(pCur[1] == 5)
if(pCur[1+Adjust2] == 5)
CxbxKrnlCleanup("ClampToEdge is unsupported (temporarily)");
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSV, pCur[1]);
}
if(pCur[2] != X_D3DTSS_UNK)
if(pCur[2+Adjust2] != X_D3DTSS_UNK)
{
if(pCur[2] == 5)
if(pCur[2+Adjust2] == 5)
CxbxKrnlCleanup("ClampToEdge is unsupported (temporarily)");
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSW, pCur[2]);
}
if(pCur[3] != X_D3DTSS_UNK)
if(pCur[3+Adjust2] != X_D3DTSS_UNK)
{
if(pCur[3] == 4)
if(pCur[3+Adjust2] == 4)
CxbxKrnlCleanup("QuinCunx is unsupported (temporarily)");
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAGFILTER, pCur[3]);
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAGFILTER, pCur[3+Adjust2]);
}
if(pCur[4] != X_D3DTSS_UNK)
if(pCur[4+Adjust2] != X_D3DTSS_UNK)
{
if(pCur[4] == 4)
if(pCur[4+Adjust2] == 4)
CxbxKrnlCleanup("QuinCunx is unsupported (temporarily)");
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MINFILTER, pCur[4]);
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MINFILTER, pCur[4+Adjust2]);
}
if(pCur[5] != X_D3DTSS_UNK)
if(pCur[5+Adjust2] != X_D3DTSS_UNK)
{
if(pCur[5] == 4)
if(pCur[5+Adjust2] == 4)
CxbxKrnlCleanup("QuinCunx is unsupported (temporarily)");
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5]);
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5+Adjust2]);
}
if(pCur[6] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPMAPLODBIAS, pCur[6]);
if(pCur[6+Adjust2] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPMAPLODBIAS, pCur[6+Adjust2]);
if(pCur[7] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXMIPLEVEL, pCur[7]);
if(pCur[7+Adjust2] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXMIPLEVEL, pCur[7+Adjust2]);
if(pCur[8] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXANISOTROPY, pCur[8]);
if(pCur[8+Adjust2] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXANISOTROPY, pCur[8+Adjust2]);
// TODO: Use a lookup table, this is not always a 1:1 map
if(pCur[12] != X_D3DTSS_UNK)
if(pCur[12-Adjust1] != X_D3DTSS_UNK)
{
if(pCur[12] > 12 && !(pCur[12] >= 17 && pCur[12] <= 21) && (pCur[12] != 22) && (pCur[12] != 14) &&
(pCur[12] != 15))
CxbxKrnlCleanup("(Temporarily) Unsupported D3DTSS_COLOROP Value (%d)", pCur[12]);
if(pCur[12-Adjust1] > 12 && !(pCur[12-Adjust1] >= 17 && pCur[12-Adjust1] <= 21) &&
(pCur[12-Adjust1] != 22) && (pCur[12-Adjust1] != 14) &&
(pCur[12-Adjust1] != 15) && (pCur[12-Adjust1] != 13))
CxbxKrnlCleanup("(Temporarily) Unsupported D3DTSS_COLOROP Value (%d)", pCur[12-Adjust1]);
// Dirty Hack: 22 == D3DTOP_DOTPRODUCT3
if( pCur[12] == 22 )
if( pCur[12-Adjust1] == 22 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_DOTPRODUCT3);
else if( pCur[12] == 14 )
else if( pCur[12-Adjust1] == 14 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDTEXTUREALPHA);
else if( pCur[12] == 15 )
else if( pCur[12-Adjust1] == 15 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDFACTORALPHA);
else if( pCur[12-Adjust1] == 13 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDCURRENTALPHA);
else
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, pCur[12]);
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, pCur[12-Adjust1]);
}
if(pCur[13] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG0, pCur[13]);
if(pCur[13-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG0, pCur[13-Adjust1]);
if(pCur[14] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG1, pCur[14]);
if(pCur[14-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG1, pCur[14-Adjust1]);
if(pCur[15] != X_D3DTSS_UNK)
if(pCur[15-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG2, pCur[15]);
// TODO: Use a lookup table, this is not always a 1:1 map (same as D3DTSS_COLOROP)
if(pCur[16] != X_D3DTSS_UNK)
if(pCur[16-Adjust1] != X_D3DTSS_UNK)
{
if(pCur[16] > 12 && pCur[16] != 14)
CxbxKrnlCleanup("(Temporarily) Unsupported D3DTSS_ALPHAOP Value (%d)", pCur[16]);
if(pCur[16-Adjust1] > 12 && pCur[16-Adjust1] != 14 && pCur[16-Adjust1] != 13)
CxbxKrnlCleanup("(Temporarily) Unsupported D3DTSS_ALPHAOP Value (%d)", pCur[16-Adjust1]);
if( pCur[16] == 14 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDTEXTUREALPHA );
if( pCur[16] == 15 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDFACTORALPHA );
if( pCur[16-Adjust1] == 14 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDTEXTUREALPHA);
if( pCur[16-Adjust1] == 15 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDFACTORALPHA);
if( pCur[16-Adjust1] == 13 )
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDCURRENTALPHA);
else
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, pCur[16]);
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, pCur[16-Adjust1]);
}
if(pCur[17] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG0, pCur[17]);
if(pCur[17-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG0, pCur[17-Adjust1]);
if(pCur[18] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG1, pCur[18]);
if(pCur[18-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG1, pCur[18-Adjust1]);
if(pCur[19] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG2, pCur[19]);
if(pCur[19-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG2, pCur[19-Adjust1]);
if(pCur[20] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_RESULTARG, pCur[20]);
if(pCur[20-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_RESULTARG, pCur[20-Adjust1]);
if(pCur[21] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_TEXTURETRANSFORMFLAGS, pCur[21]);
if(pCur[21-Adjust1] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_TEXTURETRANSFORMFLAGS, pCur[21-Adjust1]);
if(pCur[29] != X_D3DTSS_UNK)
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_BORDERCOLOR, pCur[29]);

View File

@ -51,6 +51,7 @@ XTL::X_D3DPRIMITIVETYPE XTL::g_IVBPrimitiveType = XTL::X_D3DPT_INVALID;
UINT XTL::g_IVBTblOffs = 0;
struct XTL::_D3DIVB *XTL::g_IVBTable = 0;
extern DWORD XTL::g_IVBFVF = 0;
extern XTL::X_D3DVertexBuffer *g_pVertexBuffer = NULL;
static unsigned int crctab[256];
@ -144,7 +145,7 @@ void XTL::VertexPatcher::CacheStream(VertexPatchDesc *pPatchDesc,
UINT uiStride;
IDirect3DVertexBuffer8 *pOrigVertexBuffer;
XTL::D3DVERTEXBUFFER_DESC Desc;
void *pCalculateData;
void *pCalculateData = NULL;
uint32 uiKey;
UINT uiLength;
CACHEDSTREAM *pCachedStream = (CACHEDSTREAM *)CxbxMalloc(sizeof(CACHEDSTREAM));
@ -262,12 +263,13 @@ void XTL::VertexPatcher::FreeCachedStream(void *pStream)
}
bool XTL::VertexPatcher::ApplyCachedStream(VertexPatchDesc *pPatchDesc,
UINT uiStream)
UINT uiStream,
bool *pbFatalError)
{
UINT uiStride;
IDirect3DVertexBuffer8 *pOrigVertexBuffer;
XTL::D3DVERTEXBUFFER_DESC Desc;
void *pCalculateData;
void *pCalculateData = NULL;
UINT uiLength;
bool bApplied = false;
uint32 uiKey;
@ -276,7 +278,20 @@ bool XTL::VertexPatcher::ApplyCachedStream(VertexPatchDesc *pPatchDesc,
if(!pPatchDesc->pVertexStreamZeroData)
{
g_pD3DDevice8->GetStreamSource(uiStream, &pOrigVertexBuffer, &uiStride);
if(FAILED(pOrigVertexBuffer->GetDesc(&Desc)))
if(!pOrigVertexBuffer)
{
/*if(!g_pVertexBuffer || !g_pVertexBuffer->EmuVertexBuffer8)
CxbxKrnlCleanup("Unable to retrieve original buffer (Stream := %d)", uiStream);
else
pOrigVertexBuffer = g_pVertexBuffer->EmuVertexBuffer8;*/
if(pbFatalError)
*pbFatalError = true;
return false;
}
if(FAILED(pOrigVertexBuffer->GetDesc(&Desc)))
{
CxbxKrnlCleanup("Could not retrieve original buffer size");
}
@ -731,9 +746,10 @@ bool XTL::VertexPatcher::NormalizeTexCoords(VertexPatchDesc *pPatchDesc, UINT ui
else
{
// Copy stream for patching and caching.
g_pD3DDevice8->GetStreamSource(uiStream, &pOrigVertexBuffer, &uiStride);
XTL::D3DVERTEXBUFFER_DESC Desc;
if(FAILED(pOrigVertexBuffer->GetDesc(&Desc)))
if(!pOrigVertexBuffer || FAILED(pOrigVertexBuffer->GetDesc(&Desc)))
{
CxbxKrnlCleanup("Could not retrieve original FVF buffer size.");
}
@ -883,7 +899,10 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
switch(pPatchDesc->PrimitiveType)
{
case X_D3DPT_QUADLIST:
//EmuWarning("VertexPatcher::PatchPrimitive: Processing D3DPT_QUADLIST");
break;
case X_D3DPT_LINELOOP:
//EmuWarning("VertexPatcher::PatchPrimitive: Processing D3DPT_LINELOOP");
break;
default:
@ -993,13 +1012,13 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
if(pPatchDesc->PrimitiveType == X_D3DPT_QUADLIST)
{
uint08 *pPatch1 = &pPatchedVertexData[pPatchDesc->dwOffset * pStream->uiOrigStride];
uint08 *pPatch2 = &pPatchedVertexData[pPatchDesc->dwOffset + 3 * pStream->uiOrigStride];
uint08 *pPatch3 = &pPatchedVertexData[pPatchDesc->dwOffset + 4 * pStream->uiOrigStride];
uint08 *pPatch4 = &pPatchedVertexData[pPatchDesc->dwOffset + 5 * pStream->uiOrigStride];
uint08 *pPatch2 = &pPatchedVertexData[(pPatchDesc->dwOffset + 3) * pStream->uiOrigStride];
uint08 *pPatch3 = &pPatchedVertexData[(pPatchDesc->dwOffset + 4) * pStream->uiOrigStride];
uint08 *pPatch4 = &pPatchedVertexData[(pPatchDesc->dwOffset + 5) * pStream->uiOrigStride];
uint08 *pOrig1 = &pOrigVertexData[pPatchDesc->dwOffset * pStream->uiOrigStride];
uint08 *pOrig2 = &pOrigVertexData[pPatchDesc->dwOffset + 2 * pStream->uiOrigStride];
uint08 *pOrig3 = &pOrigVertexData[pPatchDesc->dwOffset + 3 * pStream->uiOrigStride];
uint08 *pOrig2 = &pOrigVertexData[(pPatchDesc->dwOffset + 2) * pStream->uiOrigStride];
uint08 *pOrig3 = &pOrigVertexData[(pPatchDesc->dwOffset + 3) * pStream->uiOrigStride];
for(uint32 i = 0;i < pPatchDesc->dwPrimitiveCount/2;i++)
{
@ -1049,7 +1068,7 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
return true;
}
bool XTL::VertexPatcher::Apply(VertexPatchDesc *pPatchDesc)
bool XTL::VertexPatcher::Apply(VertexPatchDesc *pPatchDesc, bool *pbFatalError)
{
bool Patched = false;
// Get the number of streams
@ -1062,7 +1081,7 @@ bool XTL::VertexPatcher::Apply(VertexPatchDesc *pPatchDesc)
{
bool LocalPatched = false;
if(ApplyCachedStream(pPatchDesc, uiStream))
if(ApplyCachedStream(pPatchDesc, uiStream, pbFatalError))
{
m_pStreams[uiStream].bUsedCached = true;
continue;
@ -1136,6 +1155,13 @@ VOID XTL::EmuFlushIVB()
if(bFVF && ((g_CurrentVertexShader & D3DFVF_POSITION_MASK) != D3DFVF_XYZRHW))
{
dwCurFVF = g_CurrentVertexShader;
// HACK: Halo...
if(dwCurFVF == 0)
{
EmuWarning("EmuFlushIVB(): using g_IVBFVF instead of current FVF!");
dwCurFVF = g_IVBFVF;
}
}
else
{
@ -1176,13 +1202,28 @@ VOID XTL::EmuFlushIVB()
DbgPrintf("IVB Position := {%f, %f, %f, %f}\n", g_IVBTable[v].Position.x, g_IVBTable[v].Position.y, g_IVBTable[v].Position.z, g_IVBTable[v].Position.z, g_IVBTable[v].Rhw);
}
else if(dwPos == D3DFVF_XYZB1)
{
*(FLOAT*)pdwVB++ = g_IVBTable[v].Position.x;
*(FLOAT*)pdwVB++ = g_IVBTable[v].Position.y;
*(FLOAT*)pdwVB++ = g_IVBTable[v].Position.z;
*(FLOAT*)pdwVB++ = g_IVBTable[v].Blend1;
if(v == 0)
{
uiStride += (sizeof(FLOAT)*4);
}
DbgPrintf("IVB Position := {%f, %f, %f, %f}\n", g_IVBTable[v].Position.x, g_IVBTable[v].Position.y, g_IVBTable[v].Position.z, g_IVBTable[v].Blend1);
}
else
{
CxbxKrnlCleanup("Unsupported Position Mask (FVF := 0x%.08X)", g_IVBFVF);
CxbxKrnlCleanup("Unsupported Position Mask (FVF := 0x%.08X dwPos := 0x%.08X)", dwCurFVF, dwPos);
}
if(dwPos == D3DFVF_NORMAL)
// if(dwPos == D3DFVF_NORMAL) // <- This didn't look right but if it is, change it back...
if(dwCurFVF & D3DFVF_NORMAL)
{
*(FLOAT*)pdwVB++ = g_IVBTable[v].Normal.x;
*(FLOAT*)pdwVB++ = g_IVBTable[v].Normal.y;
@ -1287,7 +1328,7 @@ VOID XTL::EmuFlushIVB()
VertexPatcher VertPatch;
bool bPatched = VertPatch.Apply(&VPDesc);
bool bPatched = VertPatch.Apply(&VPDesc, NULL);
if(bFVF)
{

View File

@ -82,7 +82,7 @@ class VertexPatcher
VertexPatcher();
~VertexPatcher();
bool Apply(VertexPatchDesc *pPatchDesc);
bool Apply(VertexPatchDesc *pPatchDesc, bool *pbFatalError);
bool Restore();
// Dumps the cache to the console
@ -112,7 +112,8 @@ class VertexPatcher
// Tries to apply a previously patched stream from the cache
bool ApplyCachedStream(VertexPatchDesc *pPatchDesc,
UINT uiStream);
UINT uiStream,
bool *pbFatalError);
// Patches the types of the stream
bool PatchStream(VertexPatchDesc *pPatchDesc, UINT uiStream);
@ -133,6 +134,7 @@ extern struct _D3DIVB
{
XTL::D3DXVECTOR3 Position; // Position
FLOAT Rhw; // Rhw
FLOAT Blend1; // Blend1
XTL::DWORD dwSpecular; // Specular
XTL::DWORD dwDiffuse; // Diffuse
XTL::D3DXVECTOR3 Normal; // Normal

File diff suppressed because it is too large Load Diff

View File

@ -1269,7 +1269,8 @@ static boolean VshConvertShader(VSH_XBOX_SHADER *pShader,
// Make constant registers range from 0 to 192 instead of -96 to 96
if(pIntermediate->Output.Type == IMD_OUTPUT_C)
{
pIntermediate->Output.Address += 96;
//if(pIntermediate->Output.Address < 0)
pIntermediate->Output.Address += 96;
}
for (int j = 0; j < 3; j++)
@ -1283,31 +1284,93 @@ static boolean VshConvertShader(VSH_XBOX_SHADER *pShader,
// Make constant registers range from 0 to 192 instead of -96 to 96
if(pIntermediate->Parameters[j].Parameter.ParameterType == PARAM_C)
{
pIntermediate->Parameters[j].Parameter.Address += 96;
//if(pIntermediate->Parameters[j].Parameter.Address < 0)
pIntermediate->Parameters[j].Parameter.Address += 96;
}
}
}
if(pIntermediate->InstructionType == IMD_MAC && pIntermediate->MAC == MAC_DPH)
{
// 2010/01/12 - revel8n - attempt to alleviate conversion issues relate to the dph instruction
// Replace dph with dp3 and add
if(pIntermediate->Output.Type != IMD_OUTPUT_R)
{
// TODO: Complete dph support
EmuWarning("Can't simulate dph for other than output r registers (yet)\n");
return FALSE;
// attempt to find unused register...
int outRegister = -1;
for (int j = 11; j >= 0; --j)
{
if(!RUsage[j])
{
outRegister = j;
break;
}
}
// return failure if there are no available registers
if (outRegister == -1)
{
return FALSE;
}
VSH_INTERMEDIATE_FORMAT TmpIntermediate = *pIntermediate;
// modify the instructions
// the register value is not needed beyond these instructions so setting the usage flag should not be necessary (??)
pIntermediate->MAC = MAC_DP3;
pIntermediate->Output.Type = IMD_OUTPUT_R;
pIntermediate->Output.Address = outRegister;
VshSetOutputMask(&pIntermediate->Output, TRUE, TRUE, TRUE, TRUE);
TmpIntermediate.MAC = MAC_ADD;
TmpIntermediate.Parameters[0].IsA0X = FALSE;
TmpIntermediate.Parameters[0].Parameter.ParameterType = PARAM_R;
TmpIntermediate.Parameters[0].Parameter.Address = outRegister;
TmpIntermediate.Parameters[0].Parameter.Neg = FALSE;
//VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
VshSetSwizzle(&TmpIntermediate.Parameters[1], SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
//VshSetOutputMask(&TmpIntermediate.Output, FALSE, FALSE, FALSE, TRUE);
VshInsertIntermediate(pShader, &TmpIntermediate, i + 1);
}
VSH_INTERMEDIATE_FORMAT TmpIntermediate = *pIntermediate;
pIntermediate->MAC = MAC_DP3;
TmpIntermediate.MAC = MAC_ADD;
TmpIntermediate.Parameters[0].IsA0X = FALSE;
TmpIntermediate.Parameters[0].Parameter.ParameterType = PARAM_R;
TmpIntermediate.Parameters[0].Parameter.Address = TmpIntermediate.Output.Address;
TmpIntermediate.Parameters[0].Parameter.Neg = FALSE;
VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
VshSetSwizzle(&TmpIntermediate.Parameters[1], SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
VshSetOutputMask(&TmpIntermediate.Output, FALSE, FALSE, FALSE, TRUE);
VshInsertIntermediate(pShader, &TmpIntermediate, i + 1);
else
{
VSH_INTERMEDIATE_FORMAT TmpIntermediate = *pIntermediate;
pIntermediate->MAC = MAC_DP3;
TmpIntermediate.MAC = MAC_ADD;
TmpIntermediate.Parameters[0].IsA0X = FALSE;
TmpIntermediate.Parameters[0].Parameter.ParameterType = PARAM_R;
TmpIntermediate.Parameters[0].Parameter.Address = TmpIntermediate.Output.Address;
TmpIntermediate.Parameters[0].Parameter.Neg = FALSE;
int swizzle = (TmpIntermediate.Output.Mask[0]) | (TmpIntermediate.Output.Mask[1] << 1) | (TmpIntermediate.Output.Mask[2] << 2) | (TmpIntermediate.Output.Mask[3] << 3);
switch (swizzle)
{
case 1:
VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X);
break;
case 2:
VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y);
break;
case 4:
VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z);
break;
case 8:
VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
break;
case 15:
default:
VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W);
break;
}
//VshSetSwizzle(&TmpIntermediate.Parameters[0], SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
VshSetSwizzle(&TmpIntermediate.Parameters[1], SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W);
//VshSetOutputMask(&TmpIntermediate.Output, FALSE, FALSE, FALSE, TRUE);
VshInsertIntermediate(pShader, &TmpIntermediate, i + 1);
}
i++;
}
}
@ -1608,8 +1671,9 @@ static boolean VshAddStreamPatch(VSH_PATCH_DATA *pPatchData)
pStreamPatch->ConvertedStride = pPatchData->ConvertedStride;
pStreamPatch->NbrTypes = pPatchData->TypePatchData.NbrTypes;
pStreamPatch->NeedPatch = pPatchData->NeedPatching;
pStreamPatch->pTypes = (UINT *)CxbxMalloc(pPatchData->TypePatchData.NbrTypes * sizeof(VSH_TYPE_PATCH_DATA));
memcpy(pStreamPatch->pTypes, pPatchData->TypePatchData.Types, pPatchData->TypePatchData.NbrTypes * sizeof(VSH_TYPE_PATCH_DATA));
// 2010/01/12 - revel8n - fixed allocated data size and type
pStreamPatch->pTypes = (UINT *)CxbxMalloc(pPatchData->TypePatchData.NbrTypes * sizeof(UINT)); //VSH_TYPE_PATCH_DATA));
memcpy(pStreamPatch->pTypes, pPatchData->TypePatchData.Types, pPatchData->TypePatchData.NbrTypes * sizeof(UINT)); //VSH_TYPE_PATCH_DATA));
return TRUE;
}
@ -2009,12 +2073,22 @@ extern HRESULT XTL::EmuRecompileVshFunction
DbgVshPrintf("%s", pShaderDisassembly);
DbgVshPrintf("-----------------------\n");
hRet = D3DXAssembleShader(pShaderDisassembly,
// HACK: Azurik. Prevent Direct3D from trying to assemble this.
if(!strcmp(pShaderDisassembly, "vs.1.1\n"))
{
EmuWarning("Cannot assemble empty vertex shader!\n");
hRet = D3DXERR_INVALIDDATA;
}
else
{
hRet = D3DXAssembleShader(pShaderDisassembly,
strlen(pShaderDisassembly),
D3DXASM_SKIPVALIDATION,
NULL,
ppRecompiled,
NULL);
}
if (FAILED(hRet))
{

View File

@ -47,6 +47,7 @@ typedef DWORD X_D3DBLEND;
typedef DWORD X_D3DCMPFUNC;
typedef DWORD X_D3DFILLMODE;
typedef DWORD X_D3DSHADEMODE;
typedef DWORD X_D3DSTENCILOP;
typedef DWORD X_D3DTEXTURESTAGESTATETYPE;
typedef PVOID X_D3DCALLBACK;
@ -403,9 +404,22 @@ typedef struct _D3DVBLANKDATA
}
D3DVBLANKDATA;
typedef struct _D3DSWAPDATA
{
DWORD Swap;
DWORD SwapVBlank;
DWORD MissedVBlanks;
DWORD TimeUntilSwapVBlank;
DWORD TimeBetweenSwapVBlanks;
}
D3DSWAPDATA;
// D3DVBLANKCALLBACK
typedef void (__cdecl * D3DVBLANKCALLBACK)(D3DVBLANKDATA *pData);
// D3DSWAPCALLBACK
typedef void (__cdecl * D3DSWAPCALLBACK)(D3DSWAPDATA *pData);
// deferred render state "unknown" flag
#define X_D3DRS_UNK 0x7fffffff

View File

@ -68,7 +68,7 @@ XTL::X_CDirectSoundStream::_vtbl XTL::X_CDirectSoundStream::vtbl =
/*
STDMETHOD(GetInfo)(THIS_ LPXMEDIAINFO pInfo) PURE;
*/
0xBEEFB001, // 0x08
&XTL::EmuCDirectSoundStream_GetInfo, // 0x08
&XTL::EmuCDirectSoundStream_GetStatus, // 0x0C
&XTL::EmuCDirectSoundStream_Process, // 0x10
&XTL::EmuCDirectSoundStream_Discontinuity, // 0x14
@ -842,10 +842,13 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateBuffer
DWORD dwEmuFlags = 0;
DSBUFFERDESC *pDSBufferDesc = (DSBUFFERDESC*)CxbxMalloc(sizeof(DSBUFFERDESC));
DSBUFFERDESC *pDSBufferDescSpecial = NULL;
bool bIsSpecial = false;
// convert from Xbox to PC DSound
{
DWORD dwAcceptableMask = 0x00000010 | 0x00000020 | 0x00000080 | 0x00000100 | 0x00002000 | 0x00040000 | 0x00080000;
//DWORD dwAcceptableMask = 0x00000010 | 0x00000020 | 0x00000080 | 0x00000100 | 0x00002000 | 0x00040000 | 0x00080000;
DWORD dwAcceptableMask = 0x00000010 | 0x00000020 | 0x00000080 | 0x00000100 | 0x00020000 | 0x00040000 /*| 0x00080000*/;
if(pdsbd->dwFlags & (~dwAcceptableMask))
EmuWarning("Use of unsupported pdsbd->dwFlags mask(s) (0x%.08X)", pdsbd->dwFlags & (~dwAcceptableMask));
@ -891,39 +894,70 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateBuffer
}
else
{
bIsSpecial = true;
dwEmuFlags |= DSB_FLAG_RECIEVEDATA;
EmuWarning("Creating dummy WAVEFORMATEX (pdsbd->lpwfxFormat = NULL)...");
__asm int 3;
// HACK: For Quantum Redshift, create dummy WAVEFORMATEX data.
// HACK: This is a special sound buffer, create dummy WAVEFORMATEX data.
// It's supposed to recieve data rather than generate it. Buffers created
// with flags DSBCAPS_MIXIN, DSBCAPS_FXIN, and DSBCAPS_FXIN2 will have no
// WAVEFORMATEX structure by default.
// TODO: A better response to this scenario if possible.
pDSBufferDesc->lpwfxFormat = (WAVEFORMATEX*)CxbxMalloc(sizeof(WAVEFORMATEX));
pDSBufferDescSpecial = (DSBUFFERDESC*)CxbxMalloc(sizeof(DSBUFFERDESC));
pDSBufferDescSpecial->lpwfxFormat = (WAVEFORMATEX*)CxbxMalloc(sizeof(WAVEFORMATEX));
// pDSBufferDesc->lpwfxFormat->cbSize = sizeof( WAVEFORMATEX );
pDSBufferDesc->lpwfxFormat->nChannels = 2;
pDSBufferDesc->lpwfxFormat->wFormatTag = WAVE_FORMAT_PCM;
pDSBufferDesc->lpwfxFormat->nSamplesPerSec = 48000;
pDSBufferDesc->lpwfxFormat->nBlockAlign = 4;
pDSBufferDesc->lpwfxFormat->nAvgBytesPerSec = 4 * 48000;
pDSBufferDesc->lpwfxFormat->wBitsPerSample = 16;
//memset(pDSBufferDescSpecial->lpwfxFormat, 0, sizeof(WAVEFORMATEX));
//memset(pDSBufferDescSpecial, 0, sizeof(DSBUFFERDESC));
pDSBufferDescSpecial->lpwfxFormat->wFormatTag = WAVE_FORMAT_PCM;
pDSBufferDescSpecial->lpwfxFormat->nChannels = 2;
pDSBufferDescSpecial->lpwfxFormat->nSamplesPerSec = 22050;
pDSBufferDescSpecial->lpwfxFormat->nBlockAlign = 4;
pDSBufferDescSpecial->lpwfxFormat->nAvgBytesPerSec = pDSBufferDescSpecial->lpwfxFormat->nSamplesPerSec *
pDSBufferDescSpecial->lpwfxFormat->nBlockAlign;
pDSBufferDescSpecial->lpwfxFormat->wBitsPerSample = 16;
pDSBufferDescSpecial->dwSize = sizeof(DSBUFFERDESC);
pDSBufferDescSpecial->dwFlags = DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY;
pDSBufferDescSpecial->dwBufferBytes = 3 * pDSBufferDescSpecial->lpwfxFormat->nAvgBytesPerSec;
// pDSBufferDesc->lpwfxFormat = (WAVEFORMATEX*)CxbxMalloc(sizeof(WAVEFORMATEX)/*+pdsbd->lpwfxFormat->cbSize*/);
//// pDSBufferDesc->lpwfxFormat->cbSize = sizeof( WAVEFORMATEX );
// pDSBufferDesc->lpwfxFormat->nChannels = 1;
// pDSBufferDesc->lpwfxFormat->wFormatTag = WAVE_FORMAT_PCM;
// pDSBufferDesc->lpwfxFormat->nSamplesPerSec = 22050;
// pDSBufferDesc->lpwfxFormat->nBlockAlign = 4;
// pDSBufferDesc->lpwfxFormat->nAvgBytesPerSec = 4 * 22050;
// pDSBufferDesc->lpwfxFormat->wBitsPerSample = 16;
// Give this buffer 3 seconds of data if needed
/*if(pdsbd->dwBufferBytes == 0)
pDSBufferDesc->dwBufferBytes = 3 * pDSBufferDesc->lpwfxFormat->nAvgBytesPerSec;*/
}
pDSBufferDesc->guid3DAlgorithm = DS3DALG_DEFAULT;
}
// sanity check
if(pDSBufferDesc->lpwfxFormat->nBlockAlign != (pDSBufferDesc->lpwfxFormat->nChannels*pDSBufferDesc->lpwfxFormat->wBitsPerSample)/8)
{
pDSBufferDesc->lpwfxFormat->nBlockAlign = (2*pDSBufferDesc->lpwfxFormat->wBitsPerSample)/8;
pDSBufferDesc->lpwfxFormat->nAvgBytesPerSec = pDSBufferDesc->lpwfxFormat->nSamplesPerSec * pDSBufferDesc->lpwfxFormat->nBlockAlign;
}
if(!bIsSpecial)
{
if(pDSBufferDesc->lpwfxFormat->nBlockAlign != (pDSBufferDesc->lpwfxFormat->nChannels*pDSBufferDesc->lpwfxFormat->wBitsPerSample)/8)
{
pDSBufferDesc->lpwfxFormat->nBlockAlign = (2*pDSBufferDesc->lpwfxFormat->wBitsPerSample)/8;
pDSBufferDesc->lpwfxFormat->nAvgBytesPerSec = pDSBufferDesc->lpwfxFormat->nSamplesPerSec * pDSBufferDesc->lpwfxFormat->nBlockAlign;
}
}
// TODO: Garbage Collection
*ppBuffer = new X_CDirectSoundBuffer();
(*ppBuffer)->EmuDirectSoundBuffer8 = 0;
(*ppBuffer)->EmuBuffer = 0;
(*ppBuffer)->EmuBufferDesc = pDSBufferDesc;
(*ppBuffer)->EmuBufferDesc = bIsSpecial ? pDSBufferDescSpecial : pDSBufferDesc;
(*ppBuffer)->EmuLockPtr1 = 0;
(*ppBuffer)->EmuLockBytes1 = 0;
(*ppBuffer)->EmuLockPtr2 = 0;
@ -932,10 +966,13 @@ HRESULT WINAPI XTL::EmuDirectSoundCreateBuffer
DbgPrintf("EmuDSound (0x%X): EmuDirectSoundCreateBuffer, *ppBuffer := 0x%.08X, bytes := 0x%.08X\n", GetCurrentThreadId(), *ppBuffer, pDSBufferDesc->dwBufferBytes);
HRESULT hRet = g_pDSound8->CreateSoundBuffer(pDSBufferDesc, &((*ppBuffer)->EmuDirectSoundBuffer8), NULL);
HRESULT hRet = g_pDSound8->CreateSoundBuffer(bIsSpecial ? pDSBufferDescSpecial : pDSBufferDesc, &((*ppBuffer)->EmuDirectSoundBuffer8), NULL);
if(FAILED(hRet))
{
EmuWarning("CreateSoundBuffer Failed!");
(*ppBuffer)->EmuDirectSoundBuffer8 = NULL;
}
// cache this sound buffer
{
@ -1217,24 +1254,27 @@ ULONG WINAPI XTL::EmuIDirectSoundBuffer8_Release
if(pThis != 0)
{
uRet = pThis->EmuDirectSoundBuffer8->Release();
if(!(pThis->EmuFlags & DSB_FLAG_RECIEVEDATA))
{
uRet = pThis->EmuDirectSoundBuffer8->Release();
if(uRet == 0)
{
// remove cache entry
for(int v=0;v<SOUNDBUFFER_CACHE_SIZE;v++)
{
if(g_pDSoundBufferCache[v] == pThis)
g_pDSoundBufferCache[v] = 0;
}
if(uRet == 0)
{
// remove cache entry
for(int v=0;v<SOUNDBUFFER_CACHE_SIZE;v++)
{
if(g_pDSoundBufferCache[v] == pThis)
g_pDSoundBufferCache[v] = 0;
}
if(pThis->EmuBufferDesc->lpwfxFormat != NULL)
CxbxFree(pThis->EmuBufferDesc->lpwfxFormat);
if(pThis->EmuBufferDesc->lpwfxFormat != NULL)
CxbxFree(pThis->EmuBufferDesc->lpwfxFormat);
CxbxFree(pThis->EmuBufferDesc);
CxbxFree(pThis->EmuBufferDesc);
delete pThis;
}
delete pThis;
}
}
}
EmuSwapFS(); // XBox FS
@ -1719,7 +1759,9 @@ HRESULT WINAPI XTL::EmuIDirectSound8_CreateStream
// ******************************************************************
VOID WINAPI XTL::EmuCMcpxStream_Dummy_0x10(DWORD dwDummy1, DWORD dwDummy2)
{
EmuWarning("EmuCMcpxStream_Dummy_0x10 is ignored!");
// Causes deadlock in Halo...
// TODO: Verify that this is a Vista related problem (I HATE Vista!)
// EmuWarning("EmuCMcpxStream_Dummy_0x10 is ignored!");
return;
}
@ -1835,6 +1877,40 @@ ULONG WINAPI XTL::EmuCDirectSoundStream_Release(X_CDirectSoundStream *pThis)
return uRet;
}
// ******************************************************************
// * func: EmuCDirectSoundStream_GetInfo
// ******************************************************************
HRESULT WINAPI XTL::EmuCDirectSoundStream_GetInfo
(
X_CDirectSoundStream* pThis,
LPXMEDIAINFO pInfo
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_GetInfo\n"
"(\n"
" pThis : 0x%.08X\n"
" pInfo : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pInfo);
// TODO: A (real) implementation?
EmuWarning("EmuCDirectSoundStream_GetInfo is not yet supported!");
if( pInfo )
{
pInfo->dwFlags = XMO_STREAMF_FIXED_SAMPLE_SIZE;
pInfo->dwInputSize = 0x40000;
pInfo->dwOutputSize = 0x40000;
pInfo->dwMaxLookahead = 0x4000;
}
EmuSwapFS(); // Xbox FS
return DS_OK;
}
// ******************************************************************
// * func: EmuCDirectSoundStream_GetStatus
// ******************************************************************
@ -2695,7 +2771,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetMode
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuD3D8 (0x%X): EmuIDirectSoundBuffer8_SetFormat\n"
DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetFormat\n"
"(\n"
" pBuffer : 0x%.08X\n"
" dwMode : 0x%.08X\n"
@ -2908,15 +2984,25 @@ ULONG WINAPI XTL::EmuIDirectSoundBuffer8_AddRef
DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer_AddRef\n"
"(\n"
" pThis : 0x%.08X\n"
" pThis : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis);
ULONG ret;
ULONG ret = 0;
if(pThis != 0)
if(pThis->EmuDirectSoundBuffer8 != 0) // HACK: Ignore unsupported codecs.
ret = pThis->EmuDirectSoundBuffer8->AddRef();
{
// HACK: Skip this on unsupported flags
if(pThis->EmuFlags & DSB_FLAG_RECIEVEDATA)
{
EmuWarning("Not adding reference to a potentially pad pointer!");
}
else
{
if(pThis->EmuDirectSoundBuffer8 != 0) // HACK: Ignore unsupported codecs.
ret = pThis->EmuDirectSoundBuffer8->AddRef();
}
}
EmuSwapFS(); // Xbox FS
@ -2944,7 +3030,8 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Pause
// This function wasn't part of the XDK until 4721.
HRESULT ret = S_OK;
if(pThis != NULL)
// Unstable!
/*if(pThis != NULL)
{
if(pThis->EmuDirectSoundBuffer8)
{
@ -2958,7 +3045,7 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_Pause
if(dwPause == X_DSBPAUSE_SYNCHPLAYBACK)
EmuWarning("DSBPAUSE_SYNCHPLAYBACK is not yet supported!");
}
}
}*/
EmuSwapFS(); // Xbox FS
@ -3037,4 +3124,303 @@ HRESULT WINAPI XTL::EmuIDirectSound8_GetOutputLevels
EmuSwapFS();
return S_OK;
}
}
// ******************************************************************
// * func: EmuCDirectSoundStream_SetEG
// ******************************************************************
HRESULT WINAPI XTL::EmuCDirectSoundStream_SetEG
(
LPVOID pThis,
LPVOID pEnvelopeDesc
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetEG\n"
"(\n"
" pThis : 0x%.08X\n"
" pEnvelopeDesc : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pEnvelopeDesc);
// TODO: Implement this...
EmuSwapFS(); // Xbox FS
return S_OK;
}
// ******************************************************************
// * func: EmuIDirectSoundStream_Flush
// ******************************************************************
HRESULT WINAPI XTL::EmuIDirectSoundStream_Flush()
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_Flush()\n", GetCurrentThreadId() );
// TODO: Actually implement
EmuSwapFS();
return S_OK;
}
// ******************************************************************
// * func: EmuIDirectSoundStream_FlushEx
// ******************************************************************
extern "C" HRESULT WINAPI XTL::EmuIDirectSoundStream_FlushEx
(
X_CDirectSoundStream* pThis,
REFERENCE_TIME rtTimeStamp,
DWORD dwFlags
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_FlushEx\n"
"(\n"
" pThis : 0x%.08X\n"
" rtTimeStamp : 0x%.08X\n"
" dwFlags : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, rtTimeStamp, dwFlags);
// TODO: Actually implement
EmuSwapFS(); // Xbox FS
return S_OK;
}
// ******************************************************************
// * func: EmuCDirectSoundStream_SetMode
// ******************************************************************
HRESULT WINAPI XTL::EmuCDirectSoundStream_SetMode
(
X_CDirectSoundStream *pStream,
DWORD dwMode,
DWORD dwApply
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetFormat\n"
"(\n"
" pStream : 0x%.08X\n"
" dwMode : 0x%.08X\n"
" dwApply : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pStream, dwMode, dwApply);
HRESULT hRet = DS_OK;
EmuWarning("EmuCDirectSoundStream_SetMode ignored");
EmuSwapFS(); // XBox FS
return hRet;
}
// ******************************************************************
// * func: EmuXAudioDownloadEffectsImage
// ******************************************************************
HRESULT WINAPI XTL::EmuXAudioDownloadEffectsImage
(
LPCSTR pszImageName,
LPVOID pImageLoc,
DWORD dwFlags,
LPVOID *ppImageDesc
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuXAudioDownloadEffectsImage\n"
"(\n"
" pszImageName : 0x%.08X\n"
" pImageLoc : 0x%.08X\n"
" dwFlags : 0x%.08X\n"
" ppImageDesc : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pszImageName, pImageLoc, dwFlags, ppImageDesc );
EmuSwapFS(); // Xbox FS
return S_OK;
}
// ******************************************************************
// * func: EmuIDirectSoundBuffer8_SetFilter
// ******************************************************************
HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetFilter
(
LPVOID pThis,
X_DSFILTERDESC* pFilterDesc
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetFilter\n"
"(\n"
" pThis : 0x%.08X\n"
" pFilterDesc : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pFilterDesc);
// TODO: Implement
EmuWarning("IDirectSoundBuffer8_SetFilter not yet supported!");
EmuSwapFS(); // Xbox FS
return S_OK;
}
// ******************************************************************
// * func: EmuCDirectSoundStream_SetFilter
// ******************************************************************
HRESULT WINAPI XTL::EmuCDirectSoundStream_SetFilter
(
X_CDirectSoundStream* pThis,
X_DSFILTERDESC* pFilterDesc
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuCDirectSoundStream_SetFilter\n"
"(\n"
" pThis : 0x%.08X\n"
" pFilterDesc : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pFilterDesc);
// TODO: Implement
EmuWarning("CDirectSoundStream_SetFilter not yet supported!");
EmuSwapFS(); // Xbox FS
return S_OK;
}
// ******************************************************************
// * func: EmuIDirectSoundBuffer8_PlayEx
// ******************************************************************
extern "C" HRESULT __stdcall XTL::EmuIDirectSoundBuffer8_PlayEx
(
X_CDirectSoundBuffer *pBuffer,
REFERENCE_TIME rtTimeStamp,
DWORD dwFlags
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_PlayEx\n"
"(\n"
" pBuffer : 0x%.08X\n"
" rtTimeStamp : 0x%.08X\n"
" dwFlags : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pBuffer, rtTimeStamp, dwFlags);
if(pBuffer->EmuDirectSoundBuffer8 == 0)
EmuWarning("pBuffer->EmuDirectSoundBuffer8 == 0");
EmuWarning("PlayEx not yet implemented!");
EmuSwapFS(); // XBox FS
return S_OK;
}
// ******************************************************************
// * func: EmuIDirectSound8_GetCaps
// ******************************************************************
HRESULT WINAPI XTL::EmuIDirectSound8_GetCaps
(
X_CDirectSound* pThis,
X_DSCAPS* pDSCaps
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuIDirectSound8_SetFilter\n"
"(\n"
" pThis : 0x%.08X\n"
" pDSCaps : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pDSCaps);
// Get PC's DirectSound capabilities
DSCAPS DSCapsPC;
ZeroMemory( &DSCapsPC, sizeof( DSCAPS ) );
HRESULT hRet = g_pDSound8->GetCaps( &DSCapsPC );
if(FAILED(hRet))
EmuWarning("Failed to get PC DirectSound caps!");
// Convert PC -> Xbox
if(pDSCaps)
{
// WARNING: This may not be accurate under Windows Vista...
pDSCaps->dwFree2DBuffers = DSCapsPC.dwFreeHwMixingAllBuffers;
pDSCaps->dwFree3DBuffers = DSCapsPC.dwFreeHw3DAllBuffers;
pDSCaps->dwFreeBufferSGEs = 256; // TODO: Verify max on a real Xbox
pDSCaps->dwMemoryAllocated = DSCapsPC.dwFreeHwMemBytes; // TODO: Bytes or MegaBytes?
}
EmuSwapFS(); // Xbox FS
return S_OK;
}
// ******************************************************************
// * func: EmuIDirectSoundStream_SetPitch
// ******************************************************************
HRESULT WINAPI XTL::EmuIDirectSoundStream_SetPitch
(
X_CDirectSoundStream* pThis,
LONG lPitch
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuIDirectSoundStream_SetPitch\n"
"(\n"
" pThis : 0x%.08X\n"
" lPitch : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, lPitch);
HRESULT hRet = S_OK;
EmuWarning("IDirectSoundStream_SetPitch not yet implemented!");
return hRet;
}
// ******************************************************************
// * func: EmuDirectSoundGetSampleTime
// ******************************************************************
DWORD WINAPI XTL::EmuDirectSoundGetSampleTime()
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuDSound (0x%X): EmuDirectSoundGetSampleTime();\n", GetCurrentThreadId());
// FIXME: This is the best I could think of for now.
// Check the XDK documentation for the description of what this function
// can actually do. BTW, this function accesses the NVIDIA SoundStorm APU
// register directly (0xFE80200C).
// TODO: Handle reset at certain event?
// TODO: Wait until a DirectSoundBuffer/Stream is being played?
static DWORD dwStart = GetTickCount();
DWORD dwRet = GetTickCount() - dwStart;
EmuSwapFS();
return 0;
}

View File

@ -99,6 +99,42 @@ typedef struct _XMEDIAPACKET
}
XMEDIAPACKET, *PXMEDIAPACKET, *LPXMEDIAPACKET;
// ******************************************************************
// * XMEDIAINFO
// ******************************************************************
typedef struct _XMEDIAINFO
{
DWORD dwFlags;
DWORD dwInputSize;
DWORD dwOutputSize;
DWORD dwMaxLookahead;
}
XMEDIAINFO, *PXEIDIAINFO, *LPXMEDIAINFO;
// XMEDIAINFO Flags
#define XMO_STREAMF_FIXED_SAMPLE_SIZE 0x00000001 // The object supports only a fixed sample size
#define XMO_STREAMF_FIXED_PACKET_ALIGNMENT 0x00000002 // The object supports only a fixed packet alignment
#define XMO_STREAMF_INPUT_ASYNC 0x00000004 // The object supports receiving input data asynchronously
#define XMO_STREAMF_OUTPUT_ASYNC 0x00000008 // The object supports providing output data asynchronously
#define XMO_STREAMF_IN_PLACE 0x00000010 // The object supports in-place modification of data
#define XMO_STREAMF_MASK 0x0000001F
// ******************************************************************
// * X_DSFILTERDESC
// ******************************************************************
struct X_DSFILTERDESC
{
DWORD dwMode;
DWORD dwQCoefficient;
DWORD adwCoefficients[4];
};
// X_DSFILTERDESC modes
#define DSFILTER_MODE_BYPASS 0x00000000 // The filter is bypassed
#define DSFILTER_MODE_DLS2 0x00000001 // DLS2 mode
#define DSFILTER_MODE_PARAMEQ 0x00000002 // Parametric equalizer mode
#define DSFILTER_MODE_MULTI 0x00000003 // Multifunction mode
// ******************************************************************
// * DSLFODESC
// ******************************************************************
@ -148,6 +184,18 @@ struct X_DSOUTPUTLEVELS
DWORD dwDigitalLowFrequencyRMS;
};
// ******************************************************************
// * X_DSCAPS
// ******************************************************************
struct X_DSCAPS
{
DWORD dwFree2DBuffers;
DWORD dwFree3DBuffers;
DWORD dwFreeBufferSGEs;
DWORD dwMemoryAllocated;
};
typedef struct IDirectSoundStream IDirectSoundStream;
typedef IDirectSoundStream *LPDIRECTSOUNDSTREAM;
@ -186,6 +234,7 @@ struct X_CDirectSoundBuffer
#define DSB_FLAG_ADPCM 0x00000001
#define WAVE_FORMAT_XBOX_ADPCM 0x0069
#define DSB_FLAG_RECIEVEDATA 0x00001000
// ******************************************************************
// * X_CMcpxStream
@ -241,7 +290,12 @@ class X_CDirectSoundStream
{
ULONG (WINAPI *AddRef)(X_CDirectSoundStream *pThis); // 0x00
ULONG (WINAPI *Release)(X_CDirectSoundStream *pThis); // 0x04
DWORD Unknown; // 0x08
HRESULT (WINAPI *GetInfo) // 0x08
(
X_CDirectSoundStream *pThis,
XMEDIAINFO *pInfo
);
HRESULT (WINAPI *GetStatus) // 0x0C
(
@ -656,6 +710,16 @@ HRESULT WINAPI EmuIDirectSoundBuffer8_Play
DWORD dwFlags
);
// ******************************************************************
// * func: EmuIDirectSoundBuffer8_PlayEx
// ******************************************************************
extern "C" HRESULT __stdcall EmuIDirectSoundBuffer8_PlayEx
(
X_CDirectSoundBuffer *pBuffer,
REFERENCE_TIME rtTimeStamp,
DWORD dwFlags
);
// ******************************************************************
// * func: EmuIDirectSoundBuffer8_SetVolume
// ******************************************************************
@ -724,6 +788,15 @@ ULONG WINAPI EmuCDirectSoundStream_AddRef(X_CDirectSoundStream *pThis);
// ******************************************************************
ULONG WINAPI EmuCDirectSoundStream_Release(X_CDirectSoundStream *pThis);
// ******************************************************************
// * EmuCDirectSoundStream_GetInfo
// ******************************************************************
HRESULT WINAPI EmuCDirectSoundStream_GetInfo
(
X_CDirectSoundStream* pThis,
LPXMEDIAINFO pInfo
);
// ******************************************************************
// * func: EmuCDirectSoundStream_GetStatus
// ******************************************************************
@ -1133,4 +1206,90 @@ HRESULT WINAPI EmuIDirectSound8_GetOutputLevels
BOOL bResetPeakValues
);
// ******************************************************************
// * func: EmuCDirectSoundStream_SetEG
// ******************************************************************
HRESULT WINAPI EmuCDirectSoundStream_SetEG
(
LPVOID pThis,
LPVOID pEnvelopeDesc
);
// ******************************************************************
// * func: EmuIDirectSoundStream_Flush
// ******************************************************************
HRESULT WINAPI EmuIDirectSoundStream_Flush();
// ******************************************************************
// * func: EmuIDirectSoundStream_FlushEx
// ******************************************************************
extern "C" HRESULT WINAPI EmuIDirectSoundStream_FlushEx
(
X_CDirectSoundStream* pThis,
REFERENCE_TIME rtTimeStamp,
DWORD dwFlags
);
// ******************************************************************
// * func: EmuCDirectSoundStream_SetMode
// ******************************************************************
HRESULT WINAPI EmuCDirectSoundStream_SetMode
(
X_CDirectSoundStream *pStream,
DWORD dwMode,
DWORD dwApply
);
// ******************************************************************
// * func: EmuXAudioDownloadEffectsImage
// ******************************************************************
HRESULT WINAPI EmuXAudioDownloadEffectsImage
(
LPCSTR pszImageName,
LPVOID pImageLoc,
DWORD dwFlags,
LPVOID *ppImageDesc
);
// ******************************************************************
// * func: EmuIDirectSoundBuffer8_SetFilter
// ******************************************************************
HRESULT WINAPI EmuIDirectSoundBuffer8_SetFilter
(
LPVOID pThis,
X_DSFILTERDESC* pFilterDesc
);
// ******************************************************************
// * func: EmuCDirectSoundStream_SetFilter
// ******************************************************************
HRESULT WINAPI EmuCDirectSoundStream_SetFilter
(
X_CDirectSoundStream* pThis,
X_DSFILTERDESC* pFilterDesc
);
// ******************************************************************
// * func: EmuIDirectSound8_GetCaps
// ******************************************************************
HRESULT WINAPI EmuIDirectSound8_GetCaps
(
X_CDirectSound* pThis,
X_DSCAPS* pDSCaps
);
// ******************************************************************
// * func: EmuIDirectSoundStream_SetPitch
// ******************************************************************
HRESULT WINAPI EmuIDirectSoundStream_SetPitch
(
X_CDirectSoundStream* pThis,
LONG lPitch
);
// ******************************************************************
// * func: EmuDirectSoundGetSampleTime
// ******************************************************************
DWORD WINAPI EmuDirectSoundGetSampleTime();
#endif

View File

@ -75,7 +75,8 @@ typedef struct _PCSTProxyParam
PCSTProxyParam;
// Global Variable(s)
extern PVOID g_pfnThreadNotification = NULL;
extern PVOID g_pfnThreadNotification[16] = { NULL };
extern int g_iThreadNotificationCount = 0;
// PsCreateSystemThread proxy procedure
#pragma warning(push)
@ -108,17 +109,24 @@ static unsigned int WINAPI PCSTProxy
EmuGenerateFS(CxbxKrnl_TLS, CxbxKrnl_TLSData);
// call thread notification routine(s)
if(g_pfnThreadNotification != 0)
if(g_iThreadNotificationCount != 0)
{
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification;
for(int i = 0; i < 16; i++ )
{
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification[i];
DbgPrintf("EmKrnl (0x%X): Calling pfnNotificationRoutine (0x%.08X)\n", GetCurrentThreadId(), pfnNotificationRoutine);
// If the routine doesn't exist, don't execute it!
if(pfnNotificationRoutine == NULL)
continue;
EmuSwapFS(); // Xbox FS
DbgPrintf("EmKrnl (0x%X): Calling pfnNotificationRoutine[%d] (0x%.08X)\n", g_iThreadNotificationCount, GetCurrentThreadId(), pfnNotificationRoutine);
pfnNotificationRoutine(TRUE);
EmuSwapFS(); // Xbox FS
EmuSwapFS(); // Win2k/XP FS
pfnNotificationRoutine(TRUE);
EmuSwapFS(); // Win2k/XP FS
}
}
// use the special calling convention
@ -148,15 +156,24 @@ callComplete:
EmuSwapFS(); // Win2k/XP FS
// call thread notification routine(s)
if(g_pfnThreadNotification != 0)
if(g_iThreadNotificationCount != 0)
{
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification;
for(int i = 0; i < 16; i++ )
{
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification[i];
EmuSwapFS(); // Xbox FS
// If the routine doesn't exist, don't execute it!
if(pfnNotificationRoutine == NULL)
continue;
pfnNotificationRoutine(FALSE);
DbgPrintf("EmKrnl (0x%X): Calling pfnNotificationRoutine[%d] (0x%.08X)\n", g_iThreadNotificationCount, GetCurrentThreadId(), pfnNotificationRoutine);
EmuSwapFS(); // Win2k/XP FS
EmuSwapFS(); // Xbox FS
pfnNotificationRoutine(FALSE);
EmuSwapFS(); // Win2k/XP FS
}
}
CxbxKrnlTerminateThread();
@ -183,6 +200,37 @@ XBSYSAPI EXPORTNUM(1) xboxkrnl::PVOID NTAPI xboxkrnl::AvGetSavedDataAddress()
return NULL;
}
// ******************************************************************
// * 0x0009 HalReadSMCTrayState
// ******************************************************************
XBSYSAPI EXPORTNUM(9) VOID NTAPI xboxkrnl::HalReadSMCTrayState
(
DWORD* State,
DWORD* Count
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuKrnl (0x%X): HalReadSMCTrayState\n"
"(\n"
" State : 0x%.08X\n"
" Count : 0x%.08X\n"
");\n",
GetCurrentThreadId(), State, Count);
#define TRAY_CLOSED_MEDIA_PRESENT 96
#define TRAY_CLOSED_NO_MEDIA 64
#define TRAY_OPEN 16
// TODO: Make this configurable?
// TODO: What is the count parameter for??
*State = TRAY_CLOSED_NO_MEDIA;
// *Count = 1;
EmuSwapFS(); // Xbox FS
}
// ******************************************************************
// * 0x000E ExAllocatePool
// ******************************************************************
@ -501,6 +549,51 @@ XBSYSAPI EXPORTNUM(69) xboxkrnl::NTSTATUS NTAPI xboxkrnl::IoDeleteSymbolicLink
return ret;
}
// ******************************************************************
// * IoDismountVolumeByName
// ******************************************************************
XBSYSAPI EXPORTNUM(91) xboxkrnl::NTSTATUS NTAPI xboxkrnl::IoDismountVolumeByName
(
IN PSTRING VolumeName
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuKrnl (0x%X): IoDismountVolumeByName\n"
"(\n"
" VolumeName : 0x%.08X (%s)\n"
");\n",
GetCurrentThreadId(), VolumeName, VolumeName);
// TODO: Anything?
NTSTATUS ret = STATUS_SUCCESS;
EmuSwapFS(); // Xbox FS
return ret;
}
// ******************************************************************
// * KeBugCheck
// ******************************************************************
XBSYSAPI EXPORTNUM(95) VOID NTAPI xboxkrnl::KeBugCheck
(
IN ULONG BugCheckMode
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuKrnl (0x%X): KeBugCheck\n"
"(\n"
" BugCheckMode : 0x%.08X\n"
");\n",
GetCurrentThreadId(), BugCheckMode);
// TODO: Investigate XapiFiberStartup maybe?
EmuSwapFS(); // Xbox FS
}
// ******************************************************************
// * 0x0063 - KeDelayExecutionThread
// ******************************************************************
@ -659,6 +752,22 @@ XBSYSAPI EXPORTNUM(128) VOID NTAPI xboxkrnl::KeQuerySystemTime
return;
}
// ******************************************************************
// * KeRaiseIrqlToDpcLevel
// ******************************************************************
XBSYSAPI EXPORTNUM(129) xboxkrnl::UCHAR NTAPI xboxkrnl::KeRaiseIrqlToDpcLevel()
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuKrnl (0x%X): KeRaiseIrqlToDpcLevel()\n", GetCurrentThreadId());
// I really tried to avoid adding this...
EmuSwapFS();
return 0;
}
// ******************************************************************
// * 0x0095 - KeSetTimer
// ******************************************************************
@ -680,7 +789,8 @@ XBSYSAPI EXPORTNUM(149) xboxkrnl::BOOLEAN NTAPI xboxkrnl::KeSetTimer
GetCurrentThreadId(), Timer, DueTime, Dpc);
// Call KeSetTimerEx
KeSetTimerEx(Timer, DueTime, 0, Dpc);
// KeSetTimerEx(Timer, DueTime, 0, Dpc);
CxbxKrnlCleanup("KeSetTimer is not implemented!");
EmuSwapFS(); // Xbox FS
@ -1361,6 +1471,17 @@ XBSYSAPI EXPORTNUM(190) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtCreateFile
ObjectAttributes->RootDirectory = g_hCurDir;
DbgPrintf("EmuKrnl (0x%X): NtCreateFile Corrected path...\n", GetCurrentThreadId());
DbgPrintf(" Org:\"%s\"\n", ObjectAttributes->ObjectName->Buffer);
DbgPrintf(" New:\"$XbePath\\%s\"\n", szBuffer);
}
// Going to map Y:\ to current directory as well (dashboard test, 3944)
else if( (szBuffer[0] == 'Y' || szBuffer[0] == 'y') && szBuffer[1] == ':' && szBuffer[2] == '\\')
{
szBuffer += 3;
ObjectAttributes->RootDirectory = g_hCurDir;
DbgPrintf("EmuKrnl (0x%X): NtCreateFile Corrected path...\n", GetCurrentThreadId());
DbgPrintf(" Org:\"%s\"\n", ObjectAttributes->ObjectName->Buffer);
DbgPrintf(" New:\"$XbePath\\%s\"\n", szBuffer);
@ -1749,7 +1870,7 @@ XBSYSAPI EXPORTNUM(206) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtQueueApcThread
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuKrnl (0x%X): NtQueryDirectoryFile\n"
DbgPrintf("EmuKrnl (0x%X): NtQueueApcThread\n"
"(\n"
" ThreadHandle : 0x%.08X\n"
" ApcRoutine : 0x%.08X\n"
@ -1902,6 +2023,9 @@ XBSYSAPI EXPORTNUM(210) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtQueryFullAttributes
NTSTATUS ret = NtDll::NtQueryFullAttributesFile(&NtObjAttr, Attributes);
if(FAILED(ret))
EmuWarning("NtQueryFullAttributesFile failed! (0x%.08X)\n", ret);
EmuSwapFS(); // Xbox FS
return ret;
@ -1932,6 +2056,9 @@ XBSYSAPI EXPORTNUM(211) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtQueryInformationFil
GetCurrentThreadId(), FileHandle, IoStatusBlock, FileInformation,
Length, FileInfo);
// TODO: IIRC, this function is depreciated. Maybe we should just use
// ZwQueryInformationFile instead?
// if(FileInfo != FilePositionInformation && FileInfo != FileNetworkOpenInformation)
// CxbxKrnlCleanup("Unknown FILE_INFORMATION_CLASS 0x%.08X", FileInfo);
@ -1966,7 +2093,7 @@ XBSYSAPI EXPORTNUM(211) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtQueryInformationFil
}
if(FAILED(ret))
EmuWarning("NtQueryInformationFile failed!");
EmuWarning("NtQueryInformationFile failed! (0x%.08X)", ret);
EmuSwapFS(); // Xbox FS
@ -2526,6 +2653,8 @@ XBSYSAPI EXPORTNUM(255) xboxkrnl::NTSTATUS NTAPI xboxkrnl::PsCreateSystemThreadE
GetCurrentThreadId(), ThreadHandle, ThreadExtraSize, KernelStackSize, TlsDataSize, ThreadId,
StartContext1, StartContext2, CreateSuspended, DebugStack, StartRoutine);
static bool bFirstTime = false;
// create thread, using our special proxy technique
{
DWORD dwThreadId;
@ -2579,15 +2708,24 @@ XBSYSAPI EXPORTNUM(258) VOID NTAPI xboxkrnl::PsTerminateSystemThread(IN NTSTATUS
GetCurrentThreadId(), ExitStatus);
// call thread notification routine(s)
if(g_pfnThreadNotification != 0)
if(g_iThreadNotificationCount != 0)
{
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification;
for(int i = 0; i < 16; i++ )
{
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification[i];
EmuSwapFS(); // Xbox FS
// If the routine doesn't exist, don't execute it!
if(pfnNotificationRoutine == NULL)
continue;
pfnNotificationRoutine(FALSE);
DbgPrintf("EmKrnl (0x%X): Calling pfnNotificationRoutine[%d] (0x%.08X)\n", g_iThreadNotificationCount, GetCurrentThreadId(), pfnNotificationRoutine);
EmuSwapFS(); // Win2k/XP FS
EmuSwapFS(); // Xbox FS
pfnNotificationRoutine(FALSE);
EmuSwapFS(); // Win2k/XP FS
}
}
// CxbxKrnlTerminateThread();
@ -2677,7 +2815,7 @@ XBSYSAPI EXPORTNUM(277) VOID NTAPI xboxkrnl::RtlEnterCriticalSection
//printf("CriticalSection->LockCount : %d\n", CriticalSection->LockCount);
// This seems redundant, but xbox software doesn't always do it
//if(CriticalSection->LockCount == -1)
if(CriticalSection->LockCount == -1)
NtDll::RtlInitializeCriticalSection((NtDll::_RTL_CRITICAL_SECTION*)CriticalSection);
NtDll::RtlEnterCriticalSection((NtDll::_RTL_CRITICAL_SECTION*)CriticalSection);

View File

@ -179,14 +179,41 @@ VOID WINAPI XTL::EmuXGSwizzleBox
GetCurrentThreadId(), pSource, RowPitch, SlicePitch, pBox, pDest, Width, Height,
Depth, pPoint, BytesPerPixel);
if(pBox == NULL && pPoint == NULL && RowPitch == 0 && SlicePitch == 0)
{
memcpy(pDest, pSource, Width*Height*Depth*BytesPerPixel);
}
else
{
CxbxKrnlCleanup("Temporarily unsupported swizzle (easy fix)");
}
if(pDest != (LPVOID) 0x80000000)
{
if(pBox == NULL && pPoint == NULL && RowPitch == 0 && SlicePitch == 0)
{
memcpy(pDest, pSource, Width*Height*Depth*BytesPerPixel);
}
else
{
if(pPoint != NULL && (pPoint->u != 0 || pPoint->u != 0 || pPoint->w != 0))
CxbxKrnlCleanup("Temporarily unsupported swizzle (very easy fix)");
DWORD dwMaxY = Height;
DWORD dwMaxZ = Depth;
DWORD dwChunkSize = Width;
uint08 *pSrc = (uint08*)pSource;
uint08 *pDst = (uint08*)pDest;
if(pBox != 0)
{
pSrc += pBox->Top*RowPitch;
pSrc += pBox->Left;
dwMaxY = pBox->Bottom - pBox->Top;
dwChunkSize = pBox->Right - pBox->Left;
}
for(DWORD y=0;y<dwMaxY;y++)
{
memcpy(pSrc, pDst, dwChunkSize);
pSrc += RowPitch;
pDst += RowPitch;
}
}
}
EmuSwapFS(); // Xbox FS
@ -299,3 +326,34 @@ VOID WINAPI XTL::EmuXGUnswizzleRect
dwW = (dwW - dwMaskW) & dwMaskW;
}
}
// ******************************************************************
// * func: EmuXGWriteSurfaceOrTextureToXPR
// ******************************************************************
HRESULT WINAPI XTL::EmuXGWriteSurfaceOrTextureToXPR
(
LPVOID pResource,
const char* cPath,
BOOL bWriteSurfaceAsTexture
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuXGWriteSurfaceOrTextureToXPR\n"
"(\n"
" pResource : 0x%.08X\n"
" cPath : 0x%.08X\n"
" bWriteSurfaceAsTexture : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pResource, cPath, bWriteSurfaceAsTexture);
// TODO: If necessary, either reverse the .xbx and .xpr file formats
// and write the surface/texture to a file, or output a generic .xbx
// file and be done with it.
EmuWarning("(Temporarily) ignoring EmuXGWriteSurfaceOrTextureToXPR. Need file specs.");
EmuSwapFS(); // Xbox FS
return S_OK;
}

View File

@ -98,4 +98,14 @@ VOID WINAPI EmuXGUnswizzleRect
DWORD dwBPP
);
// ******************************************************************
// * func: EmuXGWriteSurfaceOrTextureToXPR
// ******************************************************************
HRESULT WINAPI EmuXGWriteSurfaceOrTextureToXPR
(
LPVOID pResource,
const char* cPath,
BOOL bWriteSurfaceAsTexture
);
#endif

View File

@ -208,3 +208,59 @@ int XTL::EmuThis::Emuioctlsocket(SOCKET s, long cmd, u_long FAR *argp)
return ret;
}
// ******************************************************************
// * func: EmuXOnlineLaunchNewImage
// ******************************************************************
HRESULT WINAPI XOnlineLaunchNewImage
(
LPCSTR lpImagePath,
LPVOID pLaunchData
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("XOnline (0x%X): EmuXOnlineLaunchNewImage\n"
"(\n"
" lpImagePath : 0x%.08X (%s)\n"
" pLaunchData : 0x%.08X\n"
");\n",
GetCurrentThreadId(), lpImagePath, lpImagePath, pLaunchData);
// TODO: Launch another .xbe from Cxbx someday?
EmuSwapFS(); // Xbox FS
return E_FAIL;
}
// ******************************************************************
// * func: EmuXOnlineLogon
// ******************************************************************
HRESULT WINAPI XTL::EmuXOnlineLogon
(
VOID* pUsers,
DWORD* pdwServiceIDs,
DWORD dwServices,
HANDLE hEvent,
HANDLE pHandle
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("XOnline (0x%X): EmuXOnlineLogon\n"
"(\n"
" pUsers : 0x%.08X\n"
" pdwServiceIDs : 0x%.08X\n"
" dwServices : 0x%.08X\n"
" hEvent : 0x%.08X\n"
" pHandle : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pUsers, pdwServiceIDs, dwServices, hEvent, pHandle);
// TODO: What will it take to log on to Xbox Live?
EmuSwapFS(); // Xbox FS
return HRESULT(0x80151000L); // XONLINE_E_LOGON_NO_NETWORK_CONNECTION
}

View File

@ -83,4 +83,26 @@ INT WINAPI EmuXNetStartup
// ******************************************************************
DWORD WINAPI EmuXNetGetEthernetLinkStatus();
// ******************************************************************
// * func: EmuXOnlineLaunchNewImage
// ******************************************************************
HRESULT WINAPI XOnlineLaunchNewImage
(
LPCSTR lpImagePath,
LPVOID pLaunchData
);
// ******************************************************************
// * func: EmuXOnlineLogon
// ******************************************************************
HRESULT WINAPI EmuXOnlineLogon
(
VOID* pUsers,
DWORD* pdwServiceIDs,
DWORD dwServices,
HANDLE hEvent,
HANDLE pHandle
);
#endif

View File

@ -42,6 +42,7 @@ namespace XTL
#include "EmuD3D8\VertexBuffer.h"
#include "EmuD3D8\PushBuffer.h"
#include "EmuD3D8\VertexShader.h"
#include "EmuD3D8\PixelShader.h"
#include "EmuD3D8\State.h"
#include "EmuDInput.h"
#include "EmuDSound.h"

View File

@ -79,7 +79,7 @@ HRESULT WINAPI XTL::EmuXACTEngineCreate
// TODO: Any other form of initialization?
// *ppEngine = (X_XACTEngine*) CxbxMalloc( sizeof( X_XACTEngine ) );
*ppEngine = (X_XACTEngine*) CxbxMalloc( sizeof( X_XACTEngine ) );
EmuSwapFS(); // Xbox FS
@ -98,9 +98,9 @@ void WINAPI XTL::EmuXACTEngineDoWork()
// TODO: Anything else required here?
// AFAIK, this function just calls DirectSoundDoWork()
EmuSwapFS();
EmuDirectSoundDoWork();
EmuSwapFS();
//EmuSwapFS();
//EmuDirectSoundDoWork();
//EmuSwapFS();
EmuSwapFS(); // Xbox FS
}
@ -129,7 +129,7 @@ HRESULT WINAPI XTL::EmuIXACTEngine_RegisterWaveBank
// TODO: Implement
// *ppWaveBank = (X_XACTWaveBank*) CxbxMalloc( sizeof( X_XACTWaveBank ) );
*ppWaveBank = (X_XACTWaveBank*) CxbxMalloc( sizeof( X_XACTWaveBank ) );
EmuSwapFS(); // Xbox FS
@ -158,7 +158,7 @@ HRESULT WINAPI XTL::EmuIXACTEngine_RegisterStreamedWaveBank
// TODO: Implement
// *ppWaveBank = (X_XACTWaveBank*) CxbxMalloc( sizeof( X_XACTWaveBank ) );
*ppWaveBank = (X_XACTWaveBank*) CxbxMalloc( sizeof( X_XACTWaveBank ) );
EmuSwapFS(); // Xbox FS
@ -189,7 +189,7 @@ HRESULT WINAPI XTL::EmuIXACTEngine_CreateSoundBank
// TODO: Implement
// *ppSoundBank = (X_XACTSoundBank*) CxbxMalloc( sizeof( X_XACTSoundBank ) );
*ppSoundBank = (X_XACTSoundBank*) CxbxMalloc( sizeof( X_XACTSoundBank ) );
EmuSwapFS(); // Xbox FS
@ -247,6 +247,8 @@ HRESULT WINAPI XTL::EmuIXACTEngine_CreateSoundSource
");\n",
GetCurrentThreadId(), pThis, dwFlags, ppSoundSource);
*ppSoundSource = (X_XACTSoundSource*) malloc( sizeof( X_XACTSoundSource ) );
EmuSwapFS();
return S_OK;
@ -547,5 +549,86 @@ HRESULT WINAPI XTL::EmuIXACTSoundSource_SetVelocity
EmuSwapFS();
return S_OK;
}
// ******************************************************************
// * EmuIXACTEngine_RegisterNotification
// ******************************************************************
HRESULT WINAPI XTL::EmuIXACTEngine_RegisterNotification
(
X_XACTEngine* pThis,
PCXACT_NOTIFICATION_DESCRIPTION pNotificationDesc
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_RegisterNotification\n"
"(\n"
" pThis : 0x%.08X\n"
" pNotificationDesc : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pNotificationDesc);
EmuSwapFS();
return S_OK;
}
// ******************************************************************
// * EmuIXACTEngine_GetNotification
// ******************************************************************
HRESULT WINAPI XTL::EmuIXACTEngine_GetNotification
(
X_XACTEngine* pThis,
PCXACT_NOTIFICATION_DESCRIPTION pNotificationDesc,
LPVOID pNotification
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_GetNotification\n"
"(\n"
" pThis : 0x%.08X\n"
" pNotificationDesc : 0x%.08X\n"
" pNotification : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pNotificationDesc, pNotification);
// TODO: The contents of XACT_NOTIFICATION can vary from one XDK to the next.
// The definition for 4627 is different than 5558.
EmuSwapFS();
return S_OK;
}
// ******************************************************************
// * EmuIXACTEngine_UnRegisterWaveBank
// ******************************************************************
HRESULT WINAPI XTL::EmuIXACTEngine_UnRegisterWaveBank
(
X_XACTEngine* pThis,
X_XACTWaveBank* pWaveBank
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_UnRegisterWaveBank\n"
"(\n"
" pThis : 0x%.08X\n"
" pWaveBank : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pThis, pWaveBank);
// Even though the documentation doesn't tell us much, I'm
// assuming that after this function is called, the pointer
// to IXACTWaveBank is released.
// if(pWaveBank)
// free(pWaveBank);
EmuSwapFS();
return S_OK;
}

View File

@ -42,6 +42,15 @@
#include <dsound.h>
// ******************************************************************
// * XACT Interfaces
// ******************************************************************
struct X_XACTEngine;
struct X_XACTWaveBank;
struct X_XACTSoundBank;
struct X_XACTSoundSource;
struct X_XACTSoundCue;
// ******************************************************************
// * X_XACT_RUNTIME_PARAMETERS
// ******************************************************************
@ -64,6 +73,32 @@ struct X_XACT_WAVEBANK_STREAMING_PARAMETERS
DWORD dwPacketSizeInMilliSecs; // stream packet size to use for each stream (in ms)
};
// ******************************************************************
// * X_XACT_NOTIFICATION_DESCRIPTION
// ******************************************************************
struct X_XACT_NOTIFICATION_DESCRIPTION
{
WORD wType;
WORD wFlags;
X_XACTSoundBank* pSoundBank;
X_XACTWaveBank* pWaveBank;
DWORD dwSoundCueIndex;
X_XACTSoundCue* pSoundCue;
PVOID pvContext;
HANDLE hEvent;
};
typedef const X_XACT_NOTIFICATION_DESCRIPTION *PCXACT_NOTIFICATION_DESCRIPTION;
//struct X_XACT_NOTIFICATION
//{
// X_XACT_NOTIFICATION_DESCRIPTION Header;
// X_XACT_NOTIFICATION_UNION Data;
// REFERENCE_TIME rtTimeStamp;
//};
//
//typedef const X_XACT_NOTIFICATION *PXACT_NOTIFICATION;
// ******************************************************************
// * X_XACTEngine
// ******************************************************************
@ -289,4 +324,32 @@ HRESULT WINAPI EmuIXACTSoundSource_SetVelocity
DWORD dwApply
);
// ******************************************************************
// * EmuIXACTEngine_RegisterNotification
// ******************************************************************
HRESULT WINAPI EmuIXACTEngine_RegisterNotification
(
X_XACTEngine* pThis,
PCXACT_NOTIFICATION_DESCRIPTION pNotificationDesc
);
// ******************************************************************
// * EmuIXACTEngine_GetNotification
// ******************************************************************
HRESULT WINAPI EmuIXACTEngine_GetNotification
(
X_XACTEngine* pThis,
PCXACT_NOTIFICATION_DESCRIPTION pNotificationDesc,
LPVOID pNotification
);
// ******************************************************************
// * EmuIXACTEngine_UnRegisterWaveBank
// ******************************************************************
HRESULT WINAPI EmuIXACTEngine_UnRegisterWaveBank
(
X_XACTEngine* pThis,
X_XACTWaveBank* pWaveBank
);
#endif

View File

@ -54,6 +54,10 @@ extern SectionList* g_pSectionList;
// Number of sections
extern int g_NumSections;
bool g_bXLaunchNewImageCalled = false;
bool g_bXInputOpenCalled = false;
// ******************************************************************
// * prevent name collisions
// ******************************************************************
@ -64,6 +68,13 @@ namespace NtDll
#include "EmuXTL.h"
XTL::POLLING_PARAMETERS_HANDLE g_pph;
XTL::XINPUT_POLLING_PARAMETERS g_pp;
// Saved launch data
XTL::LAUNCH_DATA g_SavedLaunchData;
// ******************************************************************
// * func: EmuXapiApplyKernelPatches
// ******************************************************************
@ -184,18 +195,21 @@ PVOID WINAPI XTL::EmuRtlAllocateHeap
PVOID pRet = CxbxRtlAlloc(hHeap, dwFlags, dwBytes+0x20);
offs = (BYTE)(RoundUp((uint32)pRet, 0x20) - (uint32)pRet);
if( pRet )
{
offs = (BYTE)(RoundUp((uint32)pRet, 0x20) - (uint32)pRet);
if(offs == 0)
{
offs = 0x20;
}
if(offs == 0)
{
offs = 0x20;
}
pRet = (PVOID)((uint32)pRet + offs);
pRet = (PVOID)((uint32)pRet + offs);
*(BYTE*)((uint32)pRet - 1) = offs;
*(BYTE*)((uint32)pRet - 1) = offs;
DbgPrintf("pRet : 0x%.08X\n", pRet);
DbgPrintf("pRet : 0x%.08X\n", pRet);
}
EmuSwapFS(); // XBox FS
@ -528,11 +542,11 @@ HANDLE WINAPI XTL::EmuXInputOpen
{
if(g_hInputHandle[dwPort] == 0)
{
pph = new POLLING_PARAMETERS_HANDLE();
pph = (POLLING_PARAMETERS_HANDLE*) &g_pph; // new POLLING_PARAMETERS_HANDLE();
if(pPollingParameters != NULL)
{
pph->pPollingParameters = new XINPUT_POLLING_PARAMETERS();
pph->pPollingParameters = (XINPUT_POLLING_PARAMETERS*) &g_pp; // new XINPUT_POLLING_PARAMETERS();
memcpy(pph->pPollingParameters, pPollingParameters, sizeof(XINPUT_POLLING_PARAMETERS));
}
@ -551,7 +565,7 @@ HANDLE WINAPI XTL::EmuXInputOpen
{
if(pph->pPollingParameters == 0)
{
pph->pPollingParameters = new XINPUT_POLLING_PARAMETERS();
pph->pPollingParameters = (XINPUT_POLLING_PARAMETERS*) &g_pp; // new XINPUT_POLLING_PARAMETERS();
}
memcpy(pph->pPollingParameters, pPollingParameters, sizeof(XINPUT_POLLING_PARAMETERS));
@ -560,7 +574,7 @@ HANDLE WINAPI XTL::EmuXInputOpen
{
if(pph->pPollingParameters != 0)
{
delete pph->pPollingParameters;
//delete pph->pPollingParameters;
pph->pPollingParameters = 0;
}
@ -570,6 +584,8 @@ HANDLE WINAPI XTL::EmuXInputOpen
pph->dwPort = dwPort;
}
g_bXInputOpenCalled = true;
EmuSwapFS(); // XBox FS
return (HANDLE)pph;
@ -1167,15 +1183,36 @@ VOID WINAPI XTL::EmuXRegisterThreadNotifyRoutine
if(fRegister)
{
if(g_pfnThreadNotification != NULL)
CxbxKrnlCleanup("Multiple thread notification routines installed (caustik can fix this!)");
// I honestly don't expect this to happen, but if it does...
if(g_iThreadNotificationCount >= 16)
CxbxKrnlCleanup("Too many thread notification routines installed\n"
"If you're reading this message than tell blueshogun you saw it!!!");
g_pfnThreadNotification = pThreadNotification->pfnNotifyRoutine;
// Find an empty spot in the thread notification array
for(int i = 0; i < 16; i++)
{
// If we find one, then add it to the array, and break the loop so
// that we don't accidently register the same routine twice!
if(g_pfnThreadNotification[i] == NULL)
{
g_pfnThreadNotification[i] = pThreadNotification->pfnNotifyRoutine;
g_iThreadNotificationCount++;
break;
}
}
}
else
{
if(g_pfnThreadNotification != NULL)
g_pfnThreadNotification = NULL;
// Go through each routine and nullify the routine passed in.
for(int i = 0; i < 16; i++)
{
if(pThreadNotification->pfnNotifyRoutine == g_pfnThreadNotification[i])
{
g_pfnThreadNotification[i] = NULL;
g_iThreadNotificationCount--;
break;
}
}
}
EmuSwapFS(); // XBox FS
@ -1247,88 +1284,13 @@ LPVOID WINAPI XTL::EmuXLoadSectionA
");\n",
GetCurrentThreadId(), pSectionName, pSectionName );
// Search this .xbe for the section it wants to load.
// TODO: Search this .xbe for the section it wants to load.
// If we find it, return the address of it.
// LPVOID pRet = NULL;
// Get the .xbe header
/*Xbe::Header* pXbeHeader = (Xbe::Header*) 0x00010000;
// Get the number of sections this .xbe has and the
// location of the section headers.
DWORD dwNumSections = pXbeHeader->dwSections;
DWORD dwSectionAddr = pXbeHeader->dwSectionHeadersAddr - pXbeHeader->dwBaseAddr;
// Get section headers.
Xbe::SectionHeader* pSectionHeaders = (Xbe::SectionHeader*) CxbxMalloc( sizeof( Xbe::SectionHeader ) * dwNumSections );
DWORD dwOffset = dwSectionAddr;
for( DWORD i = 0; i < dwNumSections; i++ )
{
memcpy( &pSectionHeaders[i], ((DWORD*) dwOffset), sizeof( Xbe::SectionHeader ) );
dwOffset += sizeof( Xbe::SectionHeader );
}
// Find a match to the section name
DWORD dwSection = -1;
for( DWORD i = 0; i < dwNumSections; i++ )
{
char szSectionName[32];
dwOffset = pSectionHeaders[i].dwSectionNameAddr - pXbeHeader->dwBaseAddr;
sprintf( szSectionName, "%s", ((DWORD*) dwOffset) );
// Do we have a match?
if( !strcmp( szSectionName, pSectionName ) )
{
dwSection = i;
break;
}
}
// If we have a match, get the raw address of this section
// and return a pointer to that address.
if( dwSection != -1 )
{
pRet = (LPVOID) pSectionHeaders[dwSection].dwRawAddr;
}
// Free up the memory
CxbxFree( pSectionHeaders );*/
LPVOID pRet = NULL;
/*int Section = -1;
DbgPrintf( "Sections: %d\n", g_NumSections );
DbgPrintf( "Section List 0x%.08X\n", g_pSectionList );
if( g_pSectionList )
{
for( int i = 0; i < (int) g_NumSections; i++ )
{
if( !strcmp( g_pSectionList[i].szSectionName, pSectionName ) )
{
Section = i;
break;
}
}
for( int i = 0; i < g_NumSections; i++ )
DbgPrintf( "Section #%d: %s\n", i, g_pSectionList[i].szSectionName );
if( Section != -1 )
{
pRet = ((LPVOID) g_pSectionList[Section].dwSectionAddr);
}
__asm int 3;
}
else
{
EmuWarning( "Section List not initialized!" );
__asm int 3;
}*/
// Xbox Dashboard (3944)
if(strcmp("XIPS", pSectionName)==0)
pRet = (void*) 0x11C000;
EmuSwapFS(); // Xbox FS
@ -1375,12 +1337,36 @@ HANDLE WINAPI XTL::EmuXGetSectionHandleA
");\n",
GetCurrentThreadId(), pSectionName, pSectionName );
DWORD* pdwRet = NULL;
// TODO: Implement (if necessary)?
// CxbxKrnlCleanup( "XGetSectionHandleA is not implemented" );
// TODO: Save the name and address of each section contained in
// this .xbe instead of adding this stuff by hand because the section
// address can change from one game region to the next, and some games
// will use the same engine and section name, so accuracy is not
// guarunteed.
// Metal Gear Solid II (NTSC)
if( !strcmp( pSectionName, "Rev24b" ) )
{
pdwRet = (DWORD*) 0x648000;
}
// Metal Slug 3 (NTSC)
if(!strcmp(pSectionName, "newpal"))
pdwRet = (DWORD*) 0x26C000;
if(!strcmp(pSectionName, "msg_font"))
pdwRet = (DWORD*) 0x270000;
if(!strcmp(pSectionName, "se_all"))
pdwRet = (DWORD*) 0x272000;
if(!strcmp(pSectionName, ".XTLID"))
pdwRet = (DWORD*) 0x8C5000;
EmuSwapFS(); // Xbox FS
return NULL;
return (LPVOID) pdwRet;
}
// ******************************************************************
@ -1395,16 +1381,16 @@ LPVOID WINAPI XTL::EmuXLoadSectionByHandle
DbgPrintf("EmuXapi (0x%X): EmuXLoadSectionByHandle\n"
"(\n"
" hSection : 0x%.80X\n"
" hSection : 0x%.08X\n"
");\n",
GetCurrentThreadId(), hSection );
// TODO: Implement (if necessary)?
// CxbxKrnlCleanup( "XLoadSectionByHandle is not implemented" );
// The handle should contain the address of this section by the hack
// used in EmuXGetSectionHandleA.
EmuSwapFS(); // Xbox FS
return NULL;
return (LPVOID) hSection;
}
// ******************************************************************
@ -1419,7 +1405,7 @@ BOOL WINAPI XTL::EmuXFreeSectionByHandle
DbgPrintf("EmuXapi (0x%X): EmuXFreeSectionByHandle\n"
"(\n"
" hSection : 0x%.80X\n"
" hSection : 0x%.08X\n"
");\n",
GetCurrentThreadId(), hSection );
@ -1428,9 +1414,43 @@ BOOL WINAPI XTL::EmuXFreeSectionByHandle
EmuSwapFS(); // Xbox FS
return NULL;
return TRUE;
}
// ******************************************************************
// * func: EmuXGetSectionSize
// ******************************************************************
DWORD WINAPI XTL::EmuXGetSectionSize
(
HANDLE hSection
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuXGetSectionSize\n"
"(\n"
" hSection : 0x%.08X\n"
");\n",
GetCurrentThreadId(), hSection );
DWORD dwSize = 0;
// Metal Slug 3 (NTSC)
if(hSection == (HANDLE) 0x26C000) // newpal
dwSize = 0x31DA;
else if(hSection == (HANDLE) 0x270000) // msg_fong
dwSize = 0x115F;
else if(hSection == (HANDLE) 0x272000) // se_all
dwSize = 0x64F37E;
else if(hSection == (HANDLE) 0x8C5000) // .XTLID
dwSize = 0x480;
EmuSwapFS();
return dwSize;
}
// ******************************************************************
// * func: EmuRtlDestroyHeap
// ******************************************************************
@ -1443,7 +1463,7 @@ PVOID WINAPI XTL::EmuRtlDestroyHeap
DbgPrintf("EmuXapi (0x%X): EmuRtlDestroyHeap\n"
"(\n"
" HeapHandle : 0x%.80X\n"
" HeapHandle : 0x%.08X\n"
");\n",
GetCurrentThreadId(), HeapHandle );
@ -1454,6 +1474,518 @@ PVOID WINAPI XTL::EmuRtlDestroyHeap
return pRet;
}
// ******************************************************************
// * func: EmuQueueUserAPC
// ******************************************************************
DWORD WINAPI XTL::EmuQueueUserAPC
(
PAPCFUNC pfnAPC,
HANDLE hThread,
DWORD dwData
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuQueueUserAPC\n"
"(\n"
" pfnAPC : 0x%.08X\n"
" hThread : 0x%.08X\n"
" dwData : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pfnAPC, hThread, dwData);
DWORD dwRet = 0;
// If necessary, we can just continue to emulate NtQueueApcThread (0xCE).
// I added this because NtQueueApcThread fails in Metal Slug 3.
HANDLE hApcThread = NULL;
if(!DuplicateHandle(GetCurrentProcess(),hThread,GetCurrentProcess(),&hApcThread,THREAD_SET_CONTEXT,FALSE,0))
EmuWarning("DuplicateHandle failed!");
dwRet = QueueUserAPC(pfnAPC, hApcThread, dwData);
if(!dwRet)
EmuWarning("QueueUserAPC failed!");
EmuSwapFS(); // Xbox FS
return dwRet;
}
// ******************************************************************
// * func: EmuGetOverlappedResult
// ******************************************************************
BOOL WINAPI XTL::EmuGetOverlappedResult
(
HANDLE hFile,
LPOVERLAPPED lpOverlapped,
LPDWORD lpNumberOfBytesTransferred,
BOOL bWait
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuGetOverlappedResult\n"
"(\n"
" hFile : 0x%.08X\n"
" lpOverlapped : 0x%.08X\n"
" lpNumberOfBytesTransformed : 0x%.08X\n"
" bWait : 0x%.08X\n"
");\n",
GetCurrentThreadId(), hFile, lpOverlapped, lpNumberOfBytesTransferred, bWait);
BOOL bRet = GetOverlappedResult( hFile, lpOverlapped, lpNumberOfBytesTransferred, bWait );
// if(bWait)
// bRet = TRUE; // Sucker...
EmuSwapFS(); // Xbox FS
return bRet;
}
// ******************************************************************
// * func: EmuXLaunchNewImage
// ******************************************************************
DWORD WINAPI XTL::EmuXLaunchNewImage
(
LPCSTR lpTitlePath,
PLAUNCH_DATA pLaunchData
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuXLaunchNewImage\n"
"(\n"
" lpTitlePath : 0x%.08X (%s)\n"
" pLaunchData : 0x%.08X\n"
");\n",
GetCurrentThreadId(), lpTitlePath, lpTitlePath, pLaunchData);
// If this function succeeds, it doesn't get a chance to return anything.
DWORD dwRet = ERROR_GEN_FAILURE;
// If no path is specified, then the xbe is rebooting to dashboard
if(!lpTitlePath)
CxbxKrnlCleanup("The xbe is rebooting (XLaunchNewImage)");
// Ignore any other attempts to execute other .xbe files (for now).
EmuWarning("Not executing the xbe!");
// Save the launch data
if(pLaunchData != NULL)
{
CopyMemory(&g_SavedLaunchData, pLaunchData, sizeof(LAUNCH_DATA));
// Save the launch data parameters to disk for later.
DbgPrintf("Saving launch data as CxbxLaunchData.bin...\n");
FILE* fp = fopen("CxbxLaunchData.bin", "wb");
fseek(fp, 0, SEEK_SET);
fwrite(pLaunchData, sizeof( LAUNCH_DATA ), 1, fp);
fclose(fp);
}
g_bXLaunchNewImageCalled = true;
// Temporary Hack (Unreal): Jump back to the entry point
uint32* start = (uint32*) 0x21C13B;
EmuSwapFS(); // Xbox FS
__asm
{
/*mov esi, 0;
mov edi, 0;
mov esp, 0;
mov ebp, 0;*/
jmp start;
}
return dwRet;
}
// ******************************************************************
// * func: EmuXGetLaunchInfo
// ******************************************************************
DWORD WINAPI XTL::EmuXGetLaunchInfo
(
PDWORD pdwLaunchDataType,
PLAUNCH_DATA pLaunchData
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuXGetLaunchInfo\n"
"(\n"
" pdwLaunchDataType : 0x%.08X\n"
" pLaunchData : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pdwLaunchDataType, pLaunchData);
DWORD dwRet = E_FAIL;
// Has XLaunchNewImage been called since we've started this round?
if(g_bXLaunchNewImageCalled)
{
// I don't think we'll be emulating any other xbox apps
// other than games anytime soon...
*pdwLaunchDataType = LDT_TITLE;
// Copy saved launch data
CopyMemory(pLaunchData, &g_SavedLaunchData, sizeof(LAUNCH_DATA));
dwRet = ERROR_SUCCESS;
}
FILE* fp = NULL;
// Does CxbxLaunchData.bin exist?
if(!g_bXLaunchNewImageCalled)
fp = fopen("CxbxLaunchData.bin", "rb");
// If it does exist, load it.
if(fp)
{
// Data from Xbox game
*pdwLaunchDataType = LDT_TITLE;
// Read in the contents.
fseek(fp, 0, SEEK_SET);
fread(&g_SavedLaunchData, sizeof(LAUNCH_DATA), 1, fp);
memcpy(pLaunchData, &g_SavedLaunchData, sizeof(LAUNCH_DATA));
// fread(pLaunchData, sizeof(LAUNCH_DATA), 1, fp);
// memcpy(&g_SavedLaunchData, pLaunchData, sizeof(LAUNCH_DATA));
fclose(fp);
// Delete the file once we're done.
DeleteFile("CxbxLaunchData.bin");
// HACK: Initialize XInput from restart
/*if(g_bXInputOpenCalled)
{
EmuSwapFS();
XTL::EmuXInputOpen( NULL, 0, 0, NULL );
EmuSwapFS();
}*/
dwRet = ERROR_SUCCESS;
}
EmuSwapFS(); // Xbox FS
return dwRet;
}
// ******************************************************************
// * func: EmuXSetProcessQuantumLength
// ******************************************************************
VOID WINAPI XTL::EmuXSetProcessQuantumLength
(
DWORD dwMilliseconds
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuXSetProcessQuantumLength\n"
"(\n"
" dwMilliseconds : 0x%.08X\n"
");\n",
GetCurrentThreadId(), dwMilliseconds);
// TODO: Implement?
EmuWarning("XSetProcessQuantumLength is being ignored!");
EmuSwapFS(); // Xbox FS
}
// ******************************************************************
// * func: EmuXGetFileCacheSize
// ******************************************************************
DWORD WINAPI XTL::EmuXGetFileCacheSize()
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuXGetFileCacheSize()\n", GetCurrentThreadId());
// Return the default cache size for now.
// TODO: Save the file cache size if/when set.
DWORD dwRet = 64 * 1024;
EmuSwapFS();
return dwRet;
}
// ******************************************************************
// * func: EmuSignalObjectAndWait
// ******************************************************************
DWORD WINAPI XTL::EmuSignalObjectAndWait
(
HANDLE hObjectToSignal,
HANDLE hObjectToWaitOn,
DWORD dwMilliseconds,
BOOL bAlertable
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuSignalObjectAndWait\n"
"(\n"
" hObjectToSignal : 0x%.08X\n"
" hObjectToWaitOn : 0x%.08X\n"
" dwMilliseconds : 0x%.08X\n"
" bAlertable : 0x%.08X\n"
");\n",
GetCurrentThreadId(), hObjectToSignal, hObjectToWaitOn, dwMilliseconds, bAlertable);
DWORD dwRet = SignalObjectAndWait( hObjectToSignal, hObjectToWaitOn, dwMilliseconds, bAlertable );
EmuSwapFS(); // Xbox FS
return dwRet;
}
// ******************************************************************
// * func: EmuPulseEvent
// ******************************************************************
BOOL WINAPI XTL::EmuPulseEvent( HANDLE hEvent )
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuPulseEvent\n"
"(\n"
" hEvent : 0x%.08X\n"
");\n",
GetCurrentThreadId(), hEvent);
// TODO: This function might be a bit too high level. If it is,
// feel free to implement NtPulseEvent in EmuKrnl.cpp
BOOL bRet = PulseEvent( hEvent );
EmuSwapFS(); // Xbox FS
return bRet;
}
// ******************************************************************
// * func: EmuCreateSemaphore
// ******************************************************************
HANDLE WINAPI XTL::EmuCreateSemaphore
(
LPVOID lpSemaphoreAttributes,
LONG lInitialCount,
LONG lMaximumCount,
LPSTR lpName
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuCreateSemaphore\n"
"(\n"
" lpSemaphoreAttributes : 0x%.08X\n"
" lInitialCount : 0x%.08X\n"
" lMaximumCount : 0x%.08X\n"
" lpName : 0x%.08X (%s)\n"
");\n",
GetCurrentThreadId(), lpSemaphoreAttributes, lInitialCount, lMaximumCount, lpName);
if(lpSemaphoreAttributes)
EmuWarning( "lpSemaphoreAttributes != NULL" );
HANDLE hRet = CreateSemaphore( NULL, lInitialCount, lMaximumCount, lpName );
if( !hRet )
EmuWarning( "CreateSemaphore failed!" );
EmuSwapFS(); // Xbox FS
return hRet;
}
// ******************************************************************
// * func: EmuReleaseSemaphore
// ******************************************************************
BOOL WINAPI XTL::EmuReleaseSemaphore
(
HANDLE hSemaphore,
LONG lReleaseCount,
LPLONG lpPreviousCount
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuReleaseSemaphore\n"
"(\n"
" hSemaphore : 0x%.08X\n"
" lReleaseCount : 0x%.08X\n"
" lpPreviousCount : 0x%.08X\n"
");\n",
GetCurrentThreadId(), hSemaphore, lReleaseCount, lpPreviousCount);
BOOL bRet = ReleaseSemaphore( hSemaphore, lReleaseCount, lpPreviousCount );
if( !bRet )
EmuWarning( "ReleaseSemaphore failed!" );
EmuSwapFS(); // Xbox FS
return bRet;
}
// ******************************************************************
// * func: timeSetEvent
// ******************************************************************
MMRESULT WINAPI XTL::EmutimeSetEvent
(
UINT uDelay,
UINT uResolution,
LPTIMECALLBACK fptc,
DWORD dwUser,
UINT fuEvent
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuReleaseSemaphore\n"
"(\n"
" uDelay : 0x%.08X\n"
" uResolution : 0x%.08X\n"
" fptc : 0x%.08X\n"
" dwUser : 0x%.08X\n"
" fuEvent : 0x%.08X\n"
");\n",
GetCurrentThreadId(), uDelay, uResolution, fptc, dwUser, fuEvent);
MMRESULT Ret = timeSetEvent( uDelay, uResolution, fptc, (DWORD_PTR) dwUser, fuEvent );
EmuSwapFS(); // Xbox FS
return Ret;
}
// ******************************************************************
// * func: timeKillEvent
// ******************************************************************
MMRESULT WINAPI XTL::EmutimeKillEvent
(
UINT uTimerID
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuReleaseSemaphore\n"
"(\n"
" uTimerID : 0x%.08X\n"
");\n",
GetCurrentThreadId(), uTimerID);
MMRESULT Ret = timeKillEvent( uTimerID );
EmuSwapFS(); // Xbox FS
return Ret;
}
// ******************************************************************
// * func: EmuRaiseException
// ******************************************************************
VOID WINAPI XTL::EmuRaiseException
(
DWORD dwExceptionCode, // exception code
DWORD dwExceptionFlags, // continuable exception flag
DWORD nNumberOfArguments, // number of arguments
CONST ULONG_PTR *lpArguments // array of arguments
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuRaiseException\n"
"(\n"
" dwExceptionCode : 0x%.08X\n"
" dwExceptionFlags : 0x%.08X\n"
" nNumberOfArguments: 0x%.08X\n"
" lpArguments : 0x%.08X\n"
");\n",
GetCurrentThreadId(), dwExceptionCode, dwExceptionFlags, nNumberOfArguments, lpArguments);
// TODO: Implement or not?
// RaiseException(dwExceptionCode, dwExceptionFlags, nNumberOfArguments, (*(ULONG_PTR**) &lpArguments));
EmuSwapFS(); // Xbox FS
}
// ******************************************************************
// * func: EmuGetFileAttributesA
// ******************************************************************
DWORD WINAPI XTL::EmuGetFileAttributesA
(
LPCSTR lpFileName // name of file or directory
)
{
EmuSwapFS(); // Win2k/XP FS
DbgPrintf("EmuXapi (0x%X): EmuGetFileAttributesA\n"
"(\n"
" lpFileName : (%s)\n"
");\n",
GetCurrentThreadId(), lpFileName);
// Dues Ex...
// Shave off the D:\ and default to the current directory.
// TODO: Other directories (i.e. Utility)?
char* szBuffer = (char*) lpFileName;
if((szBuffer[0] == 'D' || szBuffer[0] == 'd') && szBuffer[1] == ':' || szBuffer[2] == '\\')
{
szBuffer += 3;
DbgPrintf("EmuXapi (0x%X): GetFileAttributesA Corrected path...\n", GetCurrentThreadId());
DbgPrintf(" Org:\"%s\"\n", lpFileName);
DbgPrintf(" New:\"$XbePath\\%s\"\n", szBuffer);
}
DWORD dwRet = GetFileAttributes(szBuffer);
if(FAILED(dwRet))
EmuWarning("GetFileAttributes failed!");
EmuSwapFS();
return dwRet;
}
// ******************************************************************
// func: EmuVirtualProtect
// ******************************************************************
BOOL WINAPI XTL::EmuVirtualProtect
(
LPVOID lpAddress, // region of committed pages
SIZE_T dwSize, // size of the region
DWORD flNewProtect, // desired access protection
PDWORD lpflOldProtect // old protection
)
{
EmuSwapFS();
DbgPrintf("EmuXapi (0x%X): EmuVirtualProtect\n"
"(\n"
" lpAddress : 0x%.08X\n"
" dwSize : 0x%.08X\n"
" flNewProtect : 0x%.08X\n"
" lpflOldProtect : 0x%.08X\n"
");\n",
GetCurrentThreadId(), lpAddress, dwSize, flNewProtect, lpflOldProtect);
DWORD dwRet = VirtualProtect(lpAddress, dwSize, flNewProtect, lpflOldProtect);
EmuSwapFS();
return dwRet;
}
/* not necessary?
// ******************************************************************
// * func: EmuXCalculateSignatureBegin

View File

@ -291,6 +291,23 @@ XCALCSIG_SIGNATURE, *PXCALCSIG_SIGNATURE;
#define XCALCSIG_FLAG_NON_ROAMABLE (0x00000001)
// ******************************************************************
// * LAUNCH_DATA
// ******************************************************************
#define MAX_LAUNCH_DATA_SIZE 1024 * 3
typedef struct _LAUNCH_DATA
{
BYTE Data[MAX_LAUNCH_DATA_SIZE];
}
LAUNCH_DATA, *PLAUNCH_DATA;
#define LDT_TITLE 0
#define LDT_FROM_DASHBOARD 2
#define LDT_FROM_DEBUGGER_CMDLINE 3
#define LDT_FROM_UPDATE 4
// ******************************************************************
// * func: EmuXapiApplyKernelPatches
// ******************************************************************
@ -594,7 +611,7 @@ LPVOID WINAPI EmuCreateFiber
// ******************************************************************
VOID WINAPI EmuDeleteFiber
(
LPVOID lpFiber
LPVOID lpFiber
);
// ******************************************************************
@ -602,7 +619,7 @@ VOID WINAPI EmuDeleteFiber
// ******************************************************************
LPVOID WINAPI EmuXLoadSectionA
(
LPCSTR pSectionName
LPCSTR pSectionName
);
// ******************************************************************
@ -610,7 +627,7 @@ LPVOID WINAPI EmuXLoadSectionA
// ******************************************************************
BOOL WINAPI EmuXFreeSectionA
(
LPCSTR pSectionName
LPCSTR pSectionName
);
// ******************************************************************
@ -618,7 +635,7 @@ BOOL WINAPI EmuXFreeSectionA
// ******************************************************************
HANDLE WINAPI EmuXGetSectionHandleA
(
LPCSTR pSectionName
LPCSTR pSectionName
);
// ******************************************************************
@ -626,7 +643,7 @@ HANDLE WINAPI EmuXGetSectionHandleA
// ******************************************************************
LPVOID WINAPI EmuXLoadSectionByHandle
(
HANDLE hSection
HANDLE hSection
);
// ******************************************************************
@ -634,7 +651,15 @@ LPVOID WINAPI EmuXLoadSectionByHandle
// ******************************************************************
BOOL WINAPI EmuXFreeSectionByHandle
(
HANDLE hSection
HANDLE hSection
);
// ******************************************************************
// * func: EmuXGetSectionSize
// ******************************************************************
DWORD WINAPI EmuXGetSectionSize
(
HANDLE hSection
);
// ******************************************************************
@ -645,6 +670,146 @@ PVOID WINAPI EmuRtlDestroyHeap
IN HANDLE HeapHandle
);
// ******************************************************************
// * func: EmuQueueUserAPC
// ******************************************************************
DWORD WINAPI EmuQueueUserAPC
(
PAPCFUNC pfnAPC,
HANDLE hThread,
DWORD dwData
);
// ******************************************************************
// * func: EmuGetOverlappedResult
// ******************************************************************
BOOL WINAPI EmuGetOverlappedResult
(
HANDLE hFile,
LPOVERLAPPED lpOverlapped,
LPDWORD lpNumberOfBytesTransferred,
BOOL bWait
);
// ******************************************************************
// * func: EmuXLaunchNewImage
// ******************************************************************
DWORD WINAPI EmuXLaunchNewImage
(
LPCSTR lpTitlePath,
PLAUNCH_DATA pLaunchData
);
// ******************************************************************
// * func: EmuXGetLaunchInfo
// ******************************************************************
DWORD WINAPI EmuXGetLaunchInfo
(
PDWORD pdwLaunchDataType,
PLAUNCH_DATA pLaunchData
);
// ******************************************************************
// * func: EmuXSetProcessQuantumLength
// ******************************************************************
VOID WINAPI EmuXSetProcessQuantumLength
(
DWORD dwMilliseconds
);
// ******************************************************************
// * func: EmuXGetFileCacheSize
// ******************************************************************
DWORD WINAPI EmuXGetFileCacheSize();
// ******************************************************************
// * func: EmuSignalObjectAndWait
// ******************************************************************
DWORD WINAPI EmuSignalObjectAndWait
(
HANDLE hObjectToSignal,
HANDLE hObjectToWaitOn,
DWORD dwMilliseconds,
BOOL bAlertable
);
// ******************************************************************
// * func: EmuPulseEvent
// ******************************************************************
BOOL WINAPI EmuPulseEvent( HANDLE hEvent );
// ******************************************************************
// * func: EmuCreateSemaphore
// ******************************************************************
HANDLE WINAPI EmuCreateSemaphore
(
LPVOID lpSemaphoreAttributes,
LONG lInitialCount,
LONG lMaximumCount,
LPSTR lpName
);
// ******************************************************************
// * func: EmuReleaseSemaphore
// ******************************************************************
BOOL WINAPI EmuReleaseSemaphore
(
HANDLE hSemaphore,
LONG lReleaseCount,
LPLONG lpPreviousCount
);
// ******************************************************************
// * func: timeSetEvent
// ******************************************************************
MMRESULT WINAPI EmutimeSetEvent
(
UINT uDelay,
UINT uResolution,
LPTIMECALLBACK fptc,
DWORD dwUser,
UINT fuEvent
);
// ******************************************************************
// * func: timeKillEvent
// ******************************************************************
MMRESULT WINAPI EmutimeKillEvent
(
UINT uTimerID
);
// ******************************************************************
// * func: EmuRaiseException
// ******************************************************************
VOID WINAPI EmuRaiseException
(
DWORD dwExceptionCode, // exception code
DWORD dwExceptionFlags, // continuable exception flag
DWORD nNumberOfArguments, // number of arguments
CONST ULONG_PTR *lpArguments // array of arguments
);
// ******************************************************************
// * func: EmuGetFileAttributesA
// ******************************************************************
DWORD WINAPI EmuGetFileAttributesA
(
LPCSTR lpFileName // name of file or directory
);
// ******************************************************************
// func: EmuVirtualProtect
// ******************************************************************
BOOL WINAPI EmuVirtualProtect
(
LPVOID lpAddress, // region of committed pages
SIZE_T dwSize, // size of the region
DWORD flNewProtect, // desired access protection
PDWORD lpflOldProtect // old protection
);
// s+
/* not necessary?
// ******************************************************************

View File

@ -60,6 +60,7 @@ extern "C" const char *szHLELastCompileTime = __TIMESTAMP__;
#include "HLEDataBase/D3D8.1.0.5233.inl"
#include "HLEDataBase/D3D8.1.0.5558.inl"
#include "HLEDataBase/D3D8.1.0.5849.inl"
#include "HLEDataBase/D3D8LTCG.1.0.5849.inl"
#include "HLEDataBase/DSound.1.0.3936.inl"
#include "HLEDataBase/DSound.1.0.4361.inl"
#include "HLEDataBase/DSound.1.0.4432.inl"
@ -67,6 +68,7 @@ extern "C" const char *szHLELastCompileTime = __TIMESTAMP__;
#include "HLEDataBase/DSound.1.0.5233.inl"
#include "HLEDataBase/DSound.1.0.5558.inl"
#include "HLEDataBase/DSound.1.0.5849.inl"
#include "HLEDataBase/XG.1.0.3911.inl"
#include "HLEDataBase/XG.1.0.4361.inl"
#include "HLEDataBase/XG.1.0.4627.inl"
#include "HLEDataBase/XG.1.0.5233.inl"
@ -74,6 +76,7 @@ extern "C" const char *szHLELastCompileTime = __TIMESTAMP__;
#include "HLEDataBase/XNet.1.0.3911.inl"
#include "HLEDataBase/XOnline.1.0.4361.inl"
#include "HLEDataBase/XOnline.1.0.4627.inl"
#include "HLEDataBase/XOnline.1.0.5233.inl"
#include "HLEDataBase/XactEng.1.0.4627.inl"
// ******************************************************************
@ -206,6 +209,13 @@ HLEData HLEDataBase[] =
1, 0, 5849,
D3D8_1_0_5849,
D3D8_1_0_5849_SIZE
},
// D3D8LTCG Version 1.0.5849
{
"D3D8LTCG",
1, 0, 5849,
D3D8LTCG_1_0_5849,
D3D8LTCG_1_0_5849_SIZE
},
// DSound Version 1.0.3936
{
@ -255,6 +265,13 @@ HLEData HLEDataBase[] =
1, 0, 5849,
DSound_1_0_5849,
DSound_1_0_5849_SIZE
},
// XG Version 1.0.3911
{
"XGRAPHC",
1, 0, 3911,
XG_1_0_3911,
XG_1_0_3911_SIZE
},
// XG Version 1.0.4361
{
@ -305,6 +322,13 @@ HLEData HLEDataBase[] =
1, 0, 4627,
XOnline_1_0_4627,
XOnline_1_0_4627_SIZE
},
// XOnline(s) Version 1.0.5233
{
"XONLINES",
1, 0, 5233,
XOnline_1_0_5233,
XOnline_1_0_5233_SIZE
},
// XactEng Version 1.0.4627
{
@ -476,10 +500,31 @@ extern uint32 XRefDataBase[] =
-1, // XREF_DirectSound_CDirectSoundBuffer_SetAllParameters
-1, // XREF_DirectSound_CDirectSound_EnableHeadphones
-1, // XREF_DirectSound_CDirectSoundVoice_SetHeadroom
-1, // XREF_DirectSound_CDirectSoundBuffer_SetHeadroom
-1, // XREF_DirectSound_CDirectSound_GetOutputLevels
-1, // XREF_DirectSound_CMcpxBuffer_Pause
-1, // XREF_DirectSound_CDirectSoundBuffer_Pause
-1, // XREF_DirectSound_CMcpxBuffer_GetStatus
-1, // XREF_DirectSound_CDirectSoundBuffer_GetStatus
-1, // XREF_DirectSound_CDirectSoundVoice_SetEG
-1, // XREF_DirectSound_CMcpxVoiceClient_SetEG
-1, // XREF_DirectSound_CMcpxVoiceClient_SetFilter
-1, // XREF_DirectSound_CDirectSoundVoice_SetFilter
-1, // XREF_DirectSound_CDirectSoundBuffer_SetFilter
-1, // XREF_DirectSound_CDirectSoundStream_SetFilter
-1, // XREF_DirectSound_CDirectSoundBuffer_StopEx
-1, // XREF_CMcpxBuffer_Stop2
-1, // XREF_CMcpxAPU_Set3dDopplerFactor
-1, // XREF_CSensaura3d_GetFullHRTFFilterPair
-1, // XREF_CDirectSound_GetCaps
-1, // XREF_CDirectSoundVoice_SetPitch
-1, // XREF_DirectSoundEnterCriticalSection
-1, // XREF_CDirectSoundBuffer_SetMinDistance
-1, // XREF_CDirectSoundBuffer_SetMaxDistance
-1, // XREF_CMcpxVoiceClient_Commit3dSettings
-1, // XREF_CMcpxVoiceClient_SetI3DL2Source
-1, // XREF_CDirectSoundVoice_SetI3DL2Source
-1, // XREF_CDirectSoundVoice_SetMixBinVolumes
// XACT
-1, // XREF_XACT_CEngine_RegisterWaveBank
-1, // XREF_XACT_CEngine_RegisterStreamedWaveBank
@ -487,6 +532,13 @@ extern uint32 XRefDataBase[] =
-1, // XREF_XACT_CEngine_DownloadEffectsImage
-1, // XREF_XACT_CEngine_CreateSoundSource
-1, // XREF_XACT_CSoundBank_GetSoundCueIndexFromFriendlyName
-1, // XREF_XACT_CEngine_RegisterNotification
-1, // XREF_XACT_CEngine_GetNotification
-1, // XREF_XACT_CEngine_UnRegisterWaveBank
// XONLINE
-1, // XREF_XoUpdateLaunchNewImageInternal
-1, // XREF_CXo_XOnlineLogon
-1,
/* not necessary?
-1, //XREF_XAPIXCALCULATESIGNATUREBEGINEX
//*/

View File

@ -52,6 +52,7 @@
#include "HLEDataBase/D3D8.1.0.5233.h"
#include "HLEDataBase/D3D8.1.0.5558.h"
#include "HLEDataBase/D3D8.1.0.5849.h"
#include "HLEDataBase/D3D8LTCG.1.0.5849.h"
#include "HLEDataBase/DSound.1.0.3936.h"
#include "HLEDataBase/DSound.1.0.4361.h"
#include "HLEDataBase/DSound.1.0.4432.h"
@ -66,6 +67,7 @@
#include "HLEDataBase/XNet.1.0.3911.h"
#include "HLEDataBase/XOnline.1.0.4361.h"
#include "HLEDataBase/XOnline.1.0.4627.h"
#include "HLEDataBase/XOnline.1.0.5233.h"
#include "HLEDataBase/XactEng.1.0.4627.h"
// ******************************************************************
@ -125,6 +127,7 @@ enum XRefDataBaseOffset
XREF_D3DCD_LAZYSETSTATEVB,
XREF_D3D_BLOCKONTIME,
XREF_D3D_SETFENCE,
XREF_D3D_KickOffAndWaitForIdle,
XREF_XNINIT,
XREF_FCLOSEDEVICE,
XREF_CLEARSTATEBLOCKFLAGS,
@ -266,10 +269,31 @@ enum XRefDataBaseOffset
XREF_DirectSound_CDirectSoundBuffer_SetAllParameters,
XREF_DirectSound_CDirectSound_EnableHeadphones,
XREF_DirectSound_CDirectSoundVoice_SetHeadroom,
XREF_DirectSound_CDirectSoundBuffer_SetHeadroom,
XREF_DirectSound_CDirectSound_GetOutputLevels,
XREF_DirectSound_CMcpxBuffer_Pause,
XREF_DirectSound_CDirectSoundBuffer_Pause,
XREF_DirectSound_CMcpxBuffer_GetStatus,
XREF_DirectSound_CDirectSoundBuffer_GetStatus,
XREF_DirectSound_CDirectSoundVoice_SetEG,
XREF_DirectSound_CMcpxVoiceClient_SetEG,
XREF_DirectSound_CMcpxVoiceClient_SetFilter,
XREF_DirectSound_CDirectSoundVoice_SetFilter,
XREF_DirectSound_CDirectSoundBuffer_SetFilter,
XREF_DirectSound_CDirectSoundStream_SetFilter,
XREF_DirectSound_CDirectSoundBuffer_StopEx,
XREF_CMcpxBuffer_Stop2,
XREF_CMcpxAPU_Set3dDopplerFactor,
XREF_CSensaura3d_GetFullHRTFFilterPair,
XREF_CDirectSound_GetCaps,
XREF_CDirectSoundVoice_SetPitch,
XREF_DirectSoundEnterCriticalSection,
XREF_CDirectSoundBuffer_SetMinDistance,
XREF_CDirectSoundBuffer_SetMaxDistance,
XREF_CMcpxVoiceClient_Commit3dSettings,
XREF_CMcpxVoiceClient_SetI3DL2Source,
XREF_CDirectSoundVoice_SetI3DL2Source,
XREF_CDirectSoundVoice_SetMixBinVolumes,
// XACT
// +s
XREF_XACT_CEngine_RegisterWaveBank,
@ -278,6 +302,13 @@ enum XRefDataBaseOffset
XREF_XACT_CEngine_DownloadEffectsImage,
XREF_XACT_CEngine_CreateSoundSource,
XREF_XACT_CSoundBank_GetSoundCueIndexFromFriendlyName,
XREF_XACT_CEngine_RegisterNotification,
XREF_XACT_CEngine_GetNotification,
XREF_XACT_CEngine_UnRegisterWaveBank,
// XONLINE
// +s
XREF_XoUpdateLaunchNewImageInternal,
XREF_CXo_XOnlineLogon,
// XAPI
/* not necessary?

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1930,6 +1930,280 @@ SOOVPA<12> IDirect3DDevice8_SetPalette_1_0_4361 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetShaderConstantMode
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_SetShaderConstantMode_1_0_4361 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetShaderConstantMode+0x26 : mov [ebx+0x20D8], eax
{ 0x26, 0x89 }, // (Offset,Value)-Pair #1
{ 0x27, 0x83 }, // (Offset,Value)-Pair #2
{ 0x28, 0x18 }, // (Offset,Value)-Pair #3
{ 0x29, 0x20 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetShaderConstantMode+0x50 : mov dword ptr [eax+0x04], 0x3C
{ 0x50, 0xC7 }, // (Offset,Value)-Pair #5
{ 0x51, 0x40 }, // (Offset,Value)-Pair #6
{ 0x52, 0x04 }, // (Offset,Value)-Pair #7
{ 0x53, 0x3C }, // (Offset,Value)-Pair #8
// IDirect3DDevice8_SetShaderConstantMode+0xE7 : add esi, 0x0124
{ 0xE7, 0x81 }, // (Offset,Value)-Pair #9
{ 0xE8, 0xC6 }, // (Offset,Value)-Pair #10
{ 0xE9, 0x24 }, // (Offset,Value)-Pair #11
{ 0xEA, 0x01 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * IDirect3DDevice8_SetFlickerFilter
// ******************************************************************
SOOVPA<11> IDirect3DDevice8_SetFlickerFilter_1_0_4361 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetFlickerFilter+0x1C : mov eax, [eax+0x2268]
{ 0x1D, 0x80 }, // (Offset,Value)-Pair #2
{ 0x1E, 0x7C }, // (Offset,Value)-Pair #3
{ 0x1F, 0x22 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetFlickerFilter+0x22 : push 0; push esi; push 0x0B; push eax
{ 0x22, 0x6A }, // (Offset,Value)-Pair #5
{ 0x23, 0x00 }, // (Offset,Value)-Pair #6
{ 0x24, 0x56 }, // (Offset,Value)-Pair #7
{ 0x25, 0x6A }, // (Offset,Value)-Pair #8
{ 0x26, 0x0B }, // (Offset,Value)-Pair #9
{ 0x27, 0x50 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetFlickerFilter+0x3F : retn 0x04
{ 0x3F, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x40, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * IDirect3DDevice8_SetFlickerFilter
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_SetSoftDisplayFilter_1_0_4361 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetSoftDisplayFilter+0x25 : mov edx, [eax+0x2268]
{ 0x25, 0x8B }, // (Offset,Value)-Pair #1
{ 0x26, 0x90 }, // (Offset,Value)-Pair #2
{ 0x27, 0x68 }, // (Offset,Value)-Pair #3
{ 0x28, 0x22 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetSoftDisplayFilter+0x2B : push 0; push esi; push 0x0E; push edx
{ 0x2B, 0x6A }, // (Offset,Value)-Pair #5
{ 0x2C, 0x00 }, // (Offset,Value)-Pair #6
{ 0x2D, 0x56 }, // (Offset,Value)-Pair #7
{ 0x2E, 0x6A }, // (Offset,Value)-Pair #8
{ 0x2F, 0x0E }, // (Offset,Value)-Pair #9
{ 0x30, 0x52 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetSoftDisplayFilter+0x4E : retn 0x04
{ 0x4E, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x4F, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * D3DDevice_PrimeVertexCache
// ******************************************************************
SOOVPA<7> D3DDevice_PrimeVertexCache_1_0_4361 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0E, 0xE8 },
{ 0x1E, 0xEE },
{ 0x2E, 0xC1 },
{ 0x3E, 0x24 },
{ 0x4E, 0x8B },
{ 0x5E, 0x04 },
{ 0x6E, 0x04 },
}
};
// ******************************************************************
// * D3DDevice_BeginPush
// ******************************************************************
SOOVPA<7> D3DDevice_BeginPush_1_0_4361 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0x6A },
{ 0x08, 0x00 },
{ 0x10, 0x8B },
{ 0x12, 0x24 },
{ 0x17, 0xE8 },
{ 0x1C, 0x8B },
{ 0x21, 0x01 },
}
};
// ******************************************************************
// * D3DDevice_EndPush
// ******************************************************************
SOOVPA<8> D3DDevice_EndPush_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x00, 0x8B },
{ 0x02, 0x24 },
{ 0x04, 0x8B },
{ 0x0A, 0x89 },
{ 0x0B, 0x01 },
{ 0x0C, 0xC2 },
{ 0x0D, 0x04 },
{ 0x0E, 0x00 },
}
};
// ******************************************************************
// * D3DDevice_Begin
// ******************************************************************
SOOVPA<7> D3DDevice_Begin_1_0_4361 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0xE8 },
{ 0x0C, 0x8B },
{ 0x13, 0xE8 },
{ 0x1A, 0x24 },
{ 0x21, 0x00 },
{ 0x28, 0x89 },
{ 0x2F, 0x00 },
}
};
// ******************************************************************
// * D3DDevice_End
// ******************************************************************
SOOVPA<7> D3DDevice_End_1_0_4361 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0x8B },
{ 0x0E, 0xE8 },
{ 0x16, 0x17 },
{ 0x1E, 0x00 },
{ 0x26, 0x46 },
{ 0x2E, 0x01 },
{ 0x36, 0x08 },
}
};
// ******************************************************************
// * D3DDevice_SetVertexData2f
// ******************************************************************
SOOVPA<8> D3DDevice_SetVertexData2f_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0x8B },
{ 0x0C, 0x72 },
{ 0x13, 0x8B },
{ 0x1A, 0x80 },
{ 0x21, 0x0C },
{ 0x28, 0x89 },
{ 0x2F, 0xC0 },
{ 0x36, 0x00 },
}
};
// ******************************************************************
// * D3DDevice_SetVertexData4f
// ******************************************************************
SOOVPA<7> D3DDevice_SetVertexData4f_1_0_4361 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0A, 0x46 },
{ 0x16, 0x08 },
{ 0x22, 0x09 },
{ 0x2E, 0x24 },
{ 0x3A, 0x24 },
{ 0x46, 0x8B },
{ 0x52, 0x14 },
}
};
// ******************************************************************
// * D3DDevice_SetVertexData4ub
// ******************************************************************
SOOVPA<7> D3DDevice_SetVertexData4ub_1_0_4361 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x08, 0x06 },
{ 0x13, 0x8B },
{ 0x1C, 0x04 },
{ 0x26, 0x0F },
{ 0x30, 0x24 },
{ 0x3A, 0x24 },
{ 0x44, 0x89 },
}
};
// ******************************************************************
// * D3D8_1_0_4361
// ******************************************************************
@ -2743,6 +3017,441 @@ OOVPATable D3D8_1_0_4361[] =
"EmuIDirect3DDevice8_SetPalette"
#endif
},
// IDirect3DDevice8::Reset (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_Reset_1_0_4134,
XTL::EmuIDirect3DDevice8_Reset,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Reset"
#endif
},
// IDirect3D8::KickOffAndWaitForIdle (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3D8_KickOffAndWaitForIdle_1_0_4134,
XTL::EmuIDirect3D8_KickOffAndWaitForIdle,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_KickOffAndWaitForIdle"
#endif
},
// IDirect3DDevice8::SetTextureState_TwoSidedLighting (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetTextureState_TwoSidedLighting_1_0_4134,
XTL::EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting"
#endif
},
// IDirect3DDevice8::SetRenderState_BackFillMode (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_BackFillMode_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_BackFillMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_BackFillMode"
#endif
},
// IDirect3DDevice8::SetTextureState_ColorKeyColor (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetTextureState_ColorKeyColor_1_0_4134,
XTL::EmuIDirect3DDevice8_SetTextureState_ColorKeyColor,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetTextureState_ColorKeyColor"
#endif
},
// IDirect3DDevice8::SetRenderState_FrontFace (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_FrontFace_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_FrontFace,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_FrontFace"
#endif
},
// IDirect3DDevice8::SetRenderState_LogicOp (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_LogicOp_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_LogicOp,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_LogicOp"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilFail (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilFail,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_StencilFail"
#endif
},
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilCullEnable,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_StencilCullEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_RopZCmpAlwaysRead (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead"
#endif
},
// IDirect3DDevice8::SetRenderState_RopZRead (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZRead_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_RopZRead,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_RopZRead"
#endif
},
// IDirect3DDevice8::SetRenderState_DoNotCullUncompressed (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_DoNotCullUncompressed_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed"
#endif
},
// IDirect3DDevice8::SetRenderState_Dxt1NoiseEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_Dxt1NoiseEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_Dxt1NoiseEnable,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_Dxt1NoiseEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_MultiSampleMask (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_MultiSampleMask_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleMask,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_MultiSampleMask"
#endif
},
// IDirect3DDevice8::SetRenderState_MultiSampleMode (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_MultiSampleMode_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_MultiSampleMode"
#endif
},
// IDirect3DDevice8::SetRenderState_MultiSampleRenderTargetMode (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode"
#endif
},
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_ShadowFunc,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_ShadowFunc"
#endif
},
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_YuvEnable,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_YuvEnable"
#endif
},
// IDirect3DDevice8::DrawIndexedVerticesUP (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_DrawIndexedVerticesUP_1_0_4134,
XTL::EmuIDirect3DDevice8_DrawIndexedVerticesUP,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_DrawIndexedVerticesUP"
#endif
},
// IDirect3DDevice8::SetPixelShaderConstant (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetPixelShaderConstant_1_0_4134,
XTL::EmuIDirect3DDevice8_SetPixelShaderConstant,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetPixelShaderConstant"
#endif
},
// IDirect3DDevice8::DeletePixelShader (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_DeletePixelShader_1_0_4134,
XTL::EmuIDirect3DDevice8_DeletePixelShader,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_DeletePixelShader"
#endif
},
// IDirect3DDevice8::SetRenderState_CullModeB (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_CullModeB_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_CullMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_CullModeB"
#endif
},
// D3DDevice_DeleteVertexShader (* unchanged since 4134 *)
{
(OOVPA*)&X_D3DDevice_DeleteVertexShader_1_0_4134,
XTL::EmuIDirect3DDevice8_DeleteVertexShader,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_DeleteVertexShader"
#endif
},
// IDirect3DDevice8_SetScreenSpaceOffset (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetScreenSpaceOffset_1_0_4134,
XTL::EmuIDirect3DDevice8_SetScreenSpaceOffset,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetScreenSpaceOffset"
#endif
},
// D3D::SetFence (XREF) (* unchanged since 4134 *)
{
(OOVPA*)&D3D_SetFence_1_0_4134, 0,
#ifdef _DEBUG_TRACE
"D3D::SetFence (XREF)"
#endif
},
// IDirect3DDevice8::SetRenderState_LineWidth (* unchanged since 4134 *)
{
(OOVPA*)&D3DDevice_SetRenderState_LineWidth_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_LineWidth,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_LineWidth"
#endif
},
// IDirect3DDevice8::SetSwapCallback (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetSwapCallback_1_0_4134,
XTL::EmuIDirect3DDevice8_SetSwapCallback,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetSwapCallback"
#endif
},
// IDirect3DDevice8::GetTile (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_GetTile_1_0_4134,
XTL::EmuIDirect3DDevice8_GetTile,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_GetTile"
#endif
},
// IDirect3DDevice8::SetTile (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetTile_1_0_4134,
XTL::EmuIDirect3DDevice8_SetTileNoWait,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetTile"
#endif
},
// IDirect3DDevice8::IsBusy (* unchanged since 4134 *)
{
(OOVPA*)&D3DDevice_IsBusy_1_0_4134,
XTL::EmuIDirect3DDevice8_IsBusy,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_IsBusy"
#endif
},
// IDirect3DDevice8::GetGammaRamp (* unchanged since 4034 *)
{
(OOVPA*)&IDirect3DDevice8_GetGammaRamp_1_0_4034,
XTL::EmuIDirect3DDevice8_GetGammaRamp,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_GetGammaRamp"
#endif
},
// IDirect3DDevice8::SetShaderConstantMode
{
(OOVPA*)&IDirect3DDevice8_SetShaderConstantMode_1_0_4361,
XTL::EmuIDirect3DDevice8_SetShaderConstantMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetShaderConstantMode"
#endif
},
// IDirect3DDevice8::SetFlickerFilter
{
(OOVPA*)&IDirect3DDevice8_SetFlickerFilter_1_0_4361,
XTL::EmuIDirect3DDevice8_SetFlickerFilter,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetFlickerFilter"
#endif
},
// IDirect3DDevice8::SetSoftDisplayFilter
{
(OOVPA*)&IDirect3DDevice8_SetSoftDisplayFilter_1_0_4361,
XTL::EmuIDirect3DDevice8_SetSoftDisplayFilter,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetSoftDisplayFilter"
#endif
},
// D3DDevice_PrimeVertexCache
{
(OOVPA*)&D3DDevice_PrimeVertexCache_1_0_4361,
XTL::EmuIDirect3DDevice8_PrimeVertexCache,
#ifdef _DEBUG_TRACE
"D3DDevice_PrimeVertexCache"
#endif
},
// D3DDevice_BeginPush
{
(OOVPA*)&D3DDevice_BeginPush_1_0_4361,
XTL::EmuIDirect3DDevice8_BeginPush,
#ifdef _DEBUG_TRACE
"D3DDevice_BeginPush"
#endif
},
// D3DDevice_EndPush
{
(OOVPA*)&D3DDevice_EndPush_1_0_4361,
XTL::EmuIDirect3DDevice8_EndPush,
#ifdef _DEBUG_TRACE
"D3DDevice_EndPush"
#endif
},
// IDirect3DDevice8::Begin
{
(OOVPA*)&D3DDevice_Begin_1_0_4361,
XTL::EmuIDirect3DDevice8_Begin,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Begin"
#endif
},
// IDirect3DDevice8::End
{
(OOVPA*)&D3DDevice_End_1_0_4361,
XTL::EmuIDirect3DDevice8_End,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_End"
#endif
},
// IDirect3DDevice8::SetVertexData2f
{
(OOVPA*)&D3DDevice_SetVertexData2f_1_0_4361,
XTL::EmuIDirect3DDevice8_SetVertexData2f,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVertexData2f"
#endif
},
// IDirect3DDevice8::SetVertexData4f
{
(OOVPA*)&D3DDevice_SetVertexData4f_1_0_4361,
XTL::EmuIDirect3DDevice8_SetVertexData4f,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVertexData4f"
#endif
},
// IDirect3DDevice8::SetVertexData4ub
{
(OOVPA*)&D3DDevice_SetVertexData4ub_1_0_4361,
XTL::EmuIDirect3DDevice8_SetVertexData4ub,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVertexData4ub"
#endif
},
// D3DDevice_GetVertexShaderSize (* unchanged since 3925 *)
{
(OOVPA*)&X_D3DDevice_GetVertexShaderSize_1_0_3925,
XTL::EmuIDirect3DDevice8_GetVertexShaderSize,
#ifdef _DEBUG_TRACE
"D3DDevice_GetVertexShaderSize"
#endif
},
};
// ******************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -123,6 +123,36 @@ SOOVPA<11> IDirect3DDevice8_BeginVisibilityTest_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3D8_CreateDevice
// ******************************************************************
SOOVPA<8> IDirect3D8_CreateDevice_1_0_5028 =
{
0, // Large == 0
8, // Count == 8
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3D8_CreateDevice+0x0A : jnz +0x0A
{ 0x0A, 0x75 }, // (Offset,Value)-Pair #1
{ 0x0B, 0x0A }, // (Offset,Value)-Pair #2
// IDirect3D8_CreateDevice+0x80 : repe stosd
{ 0x80, 0xF3 }, // (Offset,Value)-Pair #3
{ 0x81, 0xAB }, // (Offset,Value)-Pair #4
// IDirect3D8_CreateDevice+0x83 : mov eax, esi
{ 0x83, 0x8B }, // (Offset,Value)-Pair #5
{ 0x84, 0xC6 }, // (Offset,Value)-Pair #6
// IDirect3D8_CreateDevice+0x91 : retn 0x18
{ 0x91, 0xC2 }, // (Offset,Value)-Pair #7
{ 0x92, 0x18 }, // (Offset,Value)-Pair #8
}
};
// ******************************************************************
// * IDirect3DDevice8_EndVisibilityTest
// ******************************************************************
@ -768,7 +798,7 @@ SOOVPA<11> IDirect3DDevice8_GetTile_1_0_4627 =
{ 0x1A, 0xB9 }, // (Offset,Value)-Pair #6
{ 0x1B, 0x06 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_GetTile+0x5F : pop edi; pop esi
// IDirect3DDevice8_GetTile+0x21 : pop edi; pop esi
{ 0x21, 0x5F }, // (Offset,Value)-Pair #8
{ 0x22, 0x5E }, // (Offset,Value)-Pair #9
@ -831,38 +861,6 @@ SOOVPA<7> IDirect3DDevice8_CreateIndexBuffer2_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetPixelShaderConstant
// ******************************************************************
SOOVPA<10> IDirect3DDevice8_SetPixelShaderConstant_1_0_4627 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetPixelShaderConstant+0x17 : test eax, eax
{ 0x17, 0x85 }, // (Offset,Value)-Pair #1
{ 0x18, 0xC0 }, // (Offset,Value)-Pair #2
// IDirect3DDevice8_SetPixelShaderConstant+0x32 : add edi, 0x04
{ 0x32, 0x83 }, // (Offset,Value)-Pair #3
{ 0x33, 0xC7 }, // (Offset,Value)-Pair #4
{ 0x34, 0x04 }, // (Offset,Value)-Pair #5
// IDirect3DDevice8_SetPixelShaderConstant+0x47 : jmp +0x07
{ 0x47, 0xEB }, // (Offset,Value)-Pair #6
{ 0x48, 0x07 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetPixelShaderConstant+0xC7 : fstp [esp+??]
{ 0xC7, 0xD9 }, // (Offset,Value)-Pair #8
{ 0xC8, 0x1C }, // (Offset,Value)-Pair #9
{ 0xC9, 0x24 }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * IDirect3DDevice8_SetPixelShaderConstant
// ******************************************************************
@ -1003,28 +1001,6 @@ SOOVPA<12> IDirect3DDevice8_SetVertexShaderConstantNotInline_1_0_4627 =
}
};
// ******************************************************************
// * D3DDevice_DeletePixelShader@4
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_DeletePixelShader_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x02, 0x24 },
{ 0x06, 0x75 },
{ 0x0A, 0x04 },
{ 0x0E, 0x09 },
{ 0x12, 0x04 },
{ 0x18, 0xC2 },
{ 0x1A, 0x00 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetPixelShader
// ******************************************************************
@ -1794,41 +1770,6 @@ SOOVPA<10> IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_CullModeB
// ******************************************************************
SOOVPA<13> IDirect3DDevice8_SetRenderState_CullModeB_1_0_4627 =
{
0, // Large == 0
13, // Count == 13
XREF_DXSRSCULLMODE, // XRef Is Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetRenderState_CullModeB+0x22 : mov dword ptr [eax], 0x40308
{ 0x22, 0xC7 }, // (Offset,Value)-Pair #1
{ 0x24, 0x08 }, // (Offset,Value)-Pair #2
{ 0x25, 0x03 }, // (Offset,Value)-Pair #3
{ 0x26, 0x04 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetRenderState_CullModeB+0x2D : add eax, 8
{ 0x2D, 0x83 }, // (Offset,Value)-Pair #5
{ 0x2E, 0xC0 }, // (Offset,Value)-Pair #6
{ 0x2F, 0x08 }, // (Offset,Value)-Pair #7
// IDirect3DDevice8_SetRenderState_CullModeB+0x39 : retn 4
{ 0x39, 0xC2 }, // (Offset,Value)-Pair #8
{ 0x3A, 0x04 }, // (Offset,Value)-Pair #9
// IDirect3DDevice8_SetRenderState_CullModeB+0x5C : add edx, 0x404
{ 0x5C, 0x81 }, // (Offset,Value)-Pair #10
{ 0x5D, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x5E, 0x04 }, // (Offset,Value)-Pair #12
{ 0x5F, 0x04 }, // (Offset,Value)-Pair #13
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderState_NormalizeNormalsB
// ******************************************************************
@ -2658,27 +2599,6 @@ SOOVPA<8> X_D3DDevice_GetViewportOffsetAndScale_1_0_4627 =
}
};
// ******************************************************************
// * D3DDevice_DeleteVertexShader
// ******************************************************************
SOOVPA<6> X_D3DDevice_DeleteVertexShader_1_0_4627 =
{
0, // Large == 0
6, // Count == 6
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x02, 0x24 },
{ 0x06, 0xFF },
{ 0x0A, 0x08 },
{ 0x0E, 0x44 },
{ 0x16, 0xC2 },
{ 0x17, 0x04 },
}
};
// ******************************************************************
// * D3DDevice_SelectVertexShaderDirect
// ******************************************************************
@ -3234,28 +3154,6 @@ SOOVPA<7> IDirect3DDevice8_GetDisplayFieldStatus_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3DDevice8_SetScreenSpaceOffset
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_SetScreenSpaceOffset_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not saved
0, // XRef Not Used
{
{ 0x06, 0x56 },
{ 0x07, 0xD8 },
{ 0x08, 0x44 },
{ 0x09, 0x24 },
{ 0x0A, 0x08 },
{ 0x2E, 0x8B },
{ 0x2F, 0x06 },
}
};
// ******************************************************************
// * IDirect3DDevice8_CreateStateBlock
// ******************************************************************
@ -3429,7 +3327,7 @@ SOOVPA<7> D3DDevice_SetPalette_1_0_4627 =
};
// ******************************************************************
// * D3DDevice_SetRenderState_MultiSampleMask@4
// * D3DDevice_SetRenderState_MultiSampleMask
// ******************************************************************
SOOVPA<8> D3DDevice_SetRenderState_MultiSampleMask_1_0_4627 =
{
@ -3452,7 +3350,7 @@ SOOVPA<8> D3DDevice_SetRenderState_MultiSampleMask_1_0_4627 =
};
// ******************************************************************
// * D3DDevice_SetRenderState_LogicOp@4
// * D3DDevice_SetRenderState_LogicOp
// ******************************************************************
SOOVPA<7> D3DDevice_SetRenderState_LogicOp_1_0_4627 =
{
@ -3474,34 +3372,7 @@ SOOVPA<7> D3DDevice_SetRenderState_LogicOp_1_0_4627 =
};
// ******************************************************************
// * D3D::SetFence
// ******************************************************************
SOOVPA<12> D3D_SetFence_1_0_4627 =
{
0, // Large == 0
12, // Count == 12
XREF_D3D_SETFENCE, // Xref Is Saved
0, // Xref Not Used
{
{ 0x0D, 0x72 },
{ 0x0E, 0x0E },
{ 0x31, 0xBA },
{ 0x32, 0x90 },
{ 0x33, 0x1D },
{ 0x34, 0x04 },
{ 0x35, 0x00 },
{ 0x45, 0x83 },
{ 0x46, 0xE1 },
{ 0x47, 0x3F },
{ 0xAA, 0xC2 },
{ 0xAB, 0x04 },
}
};
// ******************************************************************
// * D3DDevice_InsertFence@0
// * D3DDevice_InsertFence
// ******************************************************************
SOOVPA<5> D3DDevice_InsertFence_1_0_4627 =
{
@ -3673,7 +3544,7 @@ SOOVPA<10> IDirect3DDevice8_DrawIndexedVerticesUP_1_0_4627 =
};
// ******************************************************************
// * D3DDevice_SetStipple@4
// * D3DDevice_SetStipple
// ******************************************************************
SOOVPA<7> D3DDevice_SetStipple_1_0_4627 =
{
@ -3694,6 +3565,142 @@ SOOVPA<7> D3DDevice_SetStipple_1_0_4627 =
}
};
// ******************************************************************
// * D3DDevice_PersistDisplay
// ******************************************************************
SOOVPA<8> D3DDevice_PersistDisplay_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x21, 0x8B },
{ 0x3C, 0x8D },
{ 0x5B, 0x74 },
{ 0x7A, 0x42 },
{ 0x99, 0x56 },
{ 0xB8, 0x00 },
{ 0xD7, 0x8B },
{ 0xF6, 0xF9 },
}
};
// ******************************************************************
// * D3DDevice_PersistDisplay
// ******************************************************************
SOOVPA<14> D3DDevice_PersistDisplay_1_0_4928 =
{
0, // Large == 0
14, // Count == 14
-1, // Xref Not Saved
0, // Xref Not Used
{
// D3DDevice_PersistDisplay+0x23 : mov eax, [ebx+0x500]
{ 0x23, 0x8B },
{ 0x24, 0x83 },
{ 0x25, 0x00 },
{ 0x26, 0x05 },
{ 0x27, 0x00 },
{ 0x28, 0x00 },
// D3DDevice_PersistDisplay+0x39 : lea ebp, [ebx+0x23C0]
{ 0x39, 0x8D },
{ 0x3A, 0xAB },
{ 0x3B, 0xC0 },
{ 0x3C, 0x23 },
{ 0x3D, 0x00 },
{ 0x3E, 0x00 },
// D3DDevice_PersistDisplay+0x72 : shl edx, cl
{ 0x72, 0xD3 },
{ 0x73, 0xE2 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetSwapCallback
// ******************************************************************
/* See the comment for the 4134 OOVPA signature for previous notes */
SOOVPA<12> IDirect3DDevice8_SetSwapCallback_1_0_4928 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetVerticalBlankCallback+0x00 : mov eax, [esp+0x04]
{ 0x00, 0x8B }, // (Offset,Value)-Pair #1
{ 0x01, 0x44 }, // (Offset,Value)-Pair #2
{ 0x02, 0x24 }, // (Offset,Value)-Pair #3
{ 0x03, 0x04 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetVerticalBlankCallback+0x04 : mov ecx, [addr]
{ 0x04, 0x8B }, // (Offset,Value)-Pair #5
{ 0x05, 0x0D }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_SetVerticalBlankCallback+0x0A : mov [ecx+0x254C], eax
{ 0x0A, 0x89 }, // (Offset,Value)-Pair #7
{ 0x0B, 0x81 }, // (Offset,Value)-Pair #8
{ 0x0C, 0x4C }, // (Offset,Value)-Pair #9
{ 0x0D, 0x25 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetVerticalBlankCallback+0x10 : retn 0x04
{ 0x10, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x11, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * D3DDevice_SetRenderState_MultiSampleMode
// ******************************************************************
SOOVPA<8> D3DDevice_SetRenderState_MultiSampleMode_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x09, 0x89 },
{ 0x0F, 0x8B },
{ 0x13, 0x00 },
{ 0x1A, 0x00 },
{ 0x1B, 0x75 },
{ 0x21, 0x00 },
{ 0x28, 0x00 },
{ 0x31, 0xC2 },
}
};
// ******************************************************************
// * D3DDevice_SetRenderState_MultiSampleRenderTargetMode
// ******************************************************************
SOOVPA<8> D3DDevice_SetRenderState_MultiSampleRenderTargetMode_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x09, 0x89 },
{ 0x0F, 0x8B },
{ 0x13, 0x00 },
{ 0x1A, 0x00 },
{ 0x1B, 0x74 },
{ 0x21, 0x00 },
{ 0x28, 0x00 },
{ 0x31, 0xC2 },
}
};
// ******************************************************************
// * D3D8_1_0_4627
// ******************************************************************
@ -3718,6 +3725,16 @@ OOVPATable D3D8_1_0_4627[] =
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_CreateDevice"
#endif
},
// IDirect3D8::CreateDevice
{
(OOVPA*)&IDirect3D8_CreateDevice_1_0_5028,
XTL::EmuIDirect3D8_CreateDevice,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_CreateDevice_5028"
#endif
},
// IDirect3D8::CheckDeviceFormat (* unchanged since 4361 *)
{
@ -4015,9 +4032,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_CreateVertexShader"
#endif
},
// IDirect3DDevice8::SetPixelShaderConstant
// IDirect3DDevice8::SetPixelShaderConstant (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetPixelShaderConstant_1_0_4627,
(OOVPA*)&IDirect3DDevice8_SetPixelShaderConstant_1_0_4134,
XTL::EmuIDirect3DDevice8_SetPixelShaderConstant,
@ -4055,9 +4072,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetVertexShaderConstantNotInline"
#endif
},
// IDirect3DDevice8::DeletePixelShader
// IDirect3DDevice8::DeletePixelShader (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_DeletePixelShader_1_0_4627,
(OOVPA*)&IDirect3DDevice8_DeletePixelShader_1_0_4134,
XTL::EmuIDirect3DDevice8_DeletePixelShader,
@ -4355,9 +4372,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetTextureState_BorderColor"
#endif
},
// IDirect3DDevice8::SetTextureState_ColorKeyColor (* unchanged since 4432 *)
// IDirect3DDevice8::SetTextureState_ColorKeyColor (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetTextureState_ColorKeyColor_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetTextureState_ColorKeyColor_1_0_4134,
XTL::EmuIDirect3DDevice8_SetTextureState_ColorKeyColor,
@ -4375,9 +4392,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetRenderState_VertexBlend"
#endif
},
// IDirect3DDevice8::SetRenderState_CullModeB
// IDirect3DDevice8::SetRenderState_CullModeB (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_CullModeB_1_0_4627,
(OOVPA*)&IDirect3DDevice8_SetRenderState_CullModeB_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_CullMode,
@ -4545,9 +4562,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetRenderState_LineWidth"
#endif
},
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable,
@ -4575,9 +4592,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAliasB"
#endif
},
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_ShadowFunc,
@ -4585,9 +4602,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetRenderState_ShadowFunc"
#endif
},
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_YuvEnable,
@ -4935,9 +4952,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_GetViewportOffsetAndScale"
#endif
},
// D3DDevice_DeleteVertexShader
// D3DDevice_DeleteVertexShader (* unchanged since 4134 *)
{
(OOVPA*)&X_D3DDevice_DeleteVertexShader_1_0_4627,
(OOVPA*)&X_D3DDevice_DeleteVertexShader_1_0_4134,
XTL::EmuIDirect3DDevice8_DeleteVertexShader,
@ -5105,9 +5122,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_Release"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilFail (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_StencilFail (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilFail,
@ -5125,9 +5142,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetPixelShader_4721"
#endif
},
// IDirect3DDevice8::Reset
// IDirect3DDevice8::Reset (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_Reset_1_0_4432,
(OOVPA*)&IDirect3DDevice8_Reset_1_0_4134,
XTL::EmuIDirect3DDevice8_Reset,
@ -5155,16 +5172,6 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetPalette"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilFail
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4432,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilFail,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_StencilFail"
#endif
},
// IDirect3DDevice8::SetBackBufferScale
{
(OOVPA*)&IDirect3DDevice8_SetBackBufferScale_1_0_4627,
@ -5205,9 +5212,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_GetDisplayFieldStatus"
#endif
},
// IDirect3DDevice8_SetScreenSpaceOffset
// IDirect3DDevice8_SetScreenSpaceOffset (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetScreenSpaceOffset_1_0_4627,
(OOVPA*)&IDirect3DDevice8_SetScreenSpaceOffset_1_0_4134,
XTL::EmuIDirect3DDevice8_SetScreenSpaceOffset,
@ -5295,9 +5302,9 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetRenderState_LogicOp"
#endif
},
// D3D::SetFence (XREF)
// D3D::SetFence (XREF) (* unchanged since 4134 *)
{
(OOVPA*)&D3D_SetFence_1_0_4627, 0,
(OOVPA*)&D3D_SetFence_1_0_4134, 0,
#ifdef _DEBUG_TRACE
"D3D::SetFence (XREF)"
@ -5333,10 +5340,10 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetPixelShaderConstant_4928"
#endif
},
// IDirect3DDevice8::SetRenderState_TwoSidedLighting (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_TwoSidedLighting (* unchanged since 4134 *)
// Beware of the typo...
{
(OOVPA*)&IDirect3DDevice8_SetTextureState_TwoSidedLighting_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetTextureState_TwoSidedLighting_1_0_4134,
XTL::EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting,
@ -5344,7 +5351,7 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetRenderState_TwoSidedLighting"
#endif
},
// D3DDevice_GetTexture2@4
// D3DDevice_GetTexture2
{
(OOVPA*)&D3DDevice_GetTexture2_1_0_4627,
XTL::EmuIDirect3DDevice8_GetTexture2,
@ -5354,7 +5361,7 @@ OOVPATable D3D8_1_0_4627[] =
#endif
},
// D3D::CDevice::SetStateVB
{
/*{
(OOVPA*)&D3D_CDevice_SetStateVB_1_0_4627,
XTL::EmuD3DDevice_SetStateVB,
@ -5362,9 +5369,9 @@ OOVPATable D3D8_1_0_4627[] =
#ifdef _DEBUG_TRACE
"D3D::CDevice::SetStateVB"
#endif
},
},*/
// D3D::CDevice::SetStateUP
{
/*{
(OOVPA*)&D3D_CDevice_SetStateUP_1_0_4627,
XTL::EmuD3DDevice_SetStateUP,
@ -5372,7 +5379,7 @@ OOVPATable D3D8_1_0_4627[] =
#ifdef _DEBUG_TRACE
"D3D::CDevice::SetStateUP"
#endif
},
},*/
// IDirect3DDevice8::DrawIndexedVerticesUP
{
(OOVPA*)&IDirect3DDevice8_DrawIndexedVerticesUP_1_0_4627,
@ -5393,6 +5400,114 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetStipple"
#endif
},
// IDirect3DDevice8::SetRenderState_RopZCmpAlwaysRead (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead"
#endif
},
// IDirect3DDevice8::SetRenderState_RopZRead (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZRead_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_RopZRead,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_RopZRead"
#endif
},
// IDirect3DDevice8::SetRenderState_DoNotCullUncompressed (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_DoNotCullUncompressed_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed"
#endif
},
// IDirect3DDevice8::DeletePixelShader (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_DeletePixelShader_1_0_4134,
XTL::EmuIDirect3DDevice8_DeletePixelShader,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_DeletePixelShader"
#endif
},
// D3DDevice_PersistDisplay
{
(OOVPA*)&D3DDevice_PersistDisplay_1_0_4627,
XTL::EmuIDirect3DDevice8_PersistDisplay,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice_PersistDisplay"
#endif
},
// D3DDevice_PersistDisplay
{
(OOVPA*)&D3DDevice_PersistDisplay_1_0_4928,
XTL::EmuIDirect3DDevice8_PersistDisplay,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_PersistDisplay_4928"
#endif
},
// IDirect3DDevice8::SetSwapCallback
{
(OOVPA*)&IDirect3DDevice8_SetSwapCallback_1_0_4928,
XTL::EmuIDirect3DDevice8_SetSwapCallback,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetSwapCallback"
#endif
},
// IDirect3DDevice8::SetRenderState_FrontFace (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_FrontFace_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_FrontFace,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_FrontFace"
#endif
},
// IDirect3DDevice8::SetRenderState_MultiSampleMode
{
(OOVPA*)&D3DDevice_SetRenderState_MultiSampleMode_1_0_4627,
XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_MultiSampleMode"
#endif
},
// IDirect3DDevice8::SetRenderState_MultiSampleRenderTargetMode
{
(OOVPA*)&D3DDevice_SetRenderState_MultiSampleRenderTargetMode_1_0_4627,
XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilCullEnable,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_StencilCullEnable"
#endif
},
};
// ******************************************************************

View File

@ -1479,6 +1479,179 @@ SOOVPA<12> IDirect3DDevice8_SetSoftDisplayFilter_1_0_5344 =
}
};
// ******************************************************************
// * IDirect3DDevice8_Unknown1
// ******************************************************************
SOOVPA<9> IDirect3DDevice8_Unknown1_1_0_5233 =
{
0, // Large == 0
9, // Count == 9
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_Unknown1+0x00 : xor eax, eax
{ 0x00, 0x33 },
{ 0x01, 0xC0 },
// IDirect3DDevice8_Unknown1+0x13 : call ds:AvSendTVEncoderOption
{ 0x13, 0xFF },
{ 0x14, 0x15 },
{ 0x15, 0x08 },
{ 0x16, 0x94 },
{ 0x17, 0x19 },
{ 0x18, 0x00 },
// IDirect3DDevice8_Unknown1+0x1E : retn
{ 0x1E, 0xC3 },
}
};
// ******************************************************************
// * D3DDevice_BeginPush
// ******************************************************************
SOOVPA<6> D3DDevice_BeginPush_1_0_5344 =
{
0, // Large == 0
6, // Count == 6
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x06, 0x6A },
{ 0x07, 0x00 },
{ 0x0D, 0x8B },
{ 0x0E, 0x44 },
{ 0x12, 0x89 },
{ 0x16, 0xE9 },
}
};
// ******************************************************************
// * D3DDevice_EndPush
// ******************************************************************
SOOVPA<8> D3DDevice_EndPush_1_0_5344 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x00, 0x8B },
{ 0x02, 0x24 },
{ 0x04, 0x8B },
{ 0x0A, 0x89 },
{ 0x0B, 0x01 },
{ 0x0C, 0xC2 },
{ 0x0D, 0x04 },
{ 0x0E, 0x00 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetVerticalBlankCallback
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_SetVerticalBlankCallback_1_0_5233 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetVerticalBlankCallback+0x00 : mov eax, [esp+0x04]
{ 0x00, 0x8B }, // (Offset,Value)-Pair #1
{ 0x01, 0x44 }, // (Offset,Value)-Pair #2
{ 0x02, 0x24 }, // (Offset,Value)-Pair #3
{ 0x03, 0x04 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetVerticalBlankCallback+0x04 : mov ecx, [addr]
{ 0x04, 0x8B }, // (Offset,Value)-Pair #5
{ 0x05, 0x0D }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_SetVerticalBlankCallback+0x0A : mov [ecx+0x1958], eax
{ 0x0A, 0x89 }, // (Offset,Value)-Pair #7
{ 0x0B, 0x81 }, // (Offset,Value)-Pair #8
{ 0x0C, 0x58 }, // (Offset,Value)-Pair #9
{ 0x0D, 0x19 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetVerticalBlankCallback+0x10 : retn 0x04
{ 0x10, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x11, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * D3DDevice_SetRenderState_SampleAlpha
// ******************************************************************
SOOVPA<7> D3DDevice_SetRenderState_SampleAlpha_1_0_5233 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0B, 0xC1 },
{ 0x15, 0x0B },
{ 0x1C, 0x8B },
{ 0x28, 0x85 },
{ 0x30, 0x07 },
{ 0x3B, 0xC7 },
{ 0x44, 0x83 },
}
};
// ******************************************************************
// * D3DDevice_SetRenderState_MultiSampleMask
// ******************************************************************
SOOVPA<8> D3DDevice_SetRenderState_MultiSampleMask_1_0_5233 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0A, 0xA3 },
{ 0x12, 0x56 },
{ 0x1C, 0x8B },
{ 0x2A, 0x85 },
{ 0x30, 0x01 },
{ 0x3D, 0xC7 },
{ 0x44, 0x78 },
{ 0x4E, 0x04 },
}
};
// ******************************************************************
// * Direct3D_EnumAdapterModes
// ******************************************************************
SOOVPA<8> Direct3D_EnumAdapterModes_1_0_5233 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x20, 0x8B },
{ 0x3E, 0xE3 },
{ 0x5E, 0x75 },
{ 0x7E, 0x00 },
{ 0x9E, 0x00 },
{ 0xBE, 0x0F },
{ 0xE2, 0x89 },
{ 0xFE, 0x5D },
}
};
// ******************************************************************
// * D3D8_1_0_5233
// ******************************************************************
@ -1622,9 +1795,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_AddRef"
#endif
},
// IDirect3DDevice8::Reset (* unchanged since 4432 *)
// IDirect3DDevice8::Reset (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_Reset_1_0_4432,
(OOVPA*)&IDirect3DDevice8_Reset_1_0_4134,
XTL::EmuIDirect3DDevice8_Reset,
@ -1692,9 +1865,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetVertexShaderConstantNotInline"
#endif
},
// IDirect3DDevice8::DeletePixelShader (* unchanged since 4627 *)
// IDirect3DDevice8::DeletePixelShader (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_DeletePixelShader_1_0_4627,
(OOVPA*)&IDirect3DDevice8_DeletePixelShader_1_0_4134,
XTL::EmuIDirect3DDevice8_DeletePixelShader,
@ -1892,9 +2065,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetTextureState_BorderColor"
#endif
},
// IDirect3DDevice8::SetTextureState_ColorKeyColor (* unchanged since 4432 *)
// IDirect3DDevice8::SetTextureState_ColorKeyColor (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetTextureState_ColorKeyColor_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetTextureState_ColorKeyColor_1_0_4134,
XTL::EmuIDirect3DDevice8_SetTextureState_ColorKeyColor,
@ -1922,9 +2095,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_CullMode"
#endif
},
// IDirect3DDevice8::SetRenderState_CullModeB (* unchanged since 4627 *)
// IDirect3DDevice8::SetRenderState_CullModeB (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_CullModeB_1_0_4627,
(OOVPA*)&IDirect3DDevice8_SetRenderState_CullModeB_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_CullMode,
@ -1982,9 +2155,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_FillMode"
#endif
},
// IDirect3DDevice8::SetRenderState_BackFillMode (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_BackFillMode (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_BackFillMode_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_BackFillMode_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_BackFillMode,
@ -2042,9 +2215,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_StencilEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilFail (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_StencilFail (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilFail,
@ -2062,9 +2235,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_LineWidth"
#endif
},
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable,
@ -2072,9 +2245,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilCullEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_StencilCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilCullEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilCullEnable,
@ -2082,9 +2255,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_StencilCullEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_RopZCmpAlwaysRead (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_RopZCmpAlwaysRead (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead,
@ -2092,9 +2265,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_RopZCmpAlwaysRead"
#endif
},
// IDirect3DDevice8::SetRenderState_RopZRead (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_RopZRead (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZRead_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_RopZRead_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_RopZRead,
@ -2102,9 +2275,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_RopZRead"
#endif
},
// IDirect3DDevice8::SetRenderState_DoNotCullUncompressed (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_DoNotCullUncompressed (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_DoNotCullUncompressed_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_DoNotCullUncompressed_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_DoNotCullUncompressed,
@ -2142,9 +2315,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_MultiSampleRenderTargetMode"
#endif
},
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_ShadowFunc,
@ -2152,9 +2325,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetRenderState_ShadowFunc"
#endif
},
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_YuvEnable,
@ -2462,9 +2635,9 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_GetViewportOffsetAndScale"
#endif
},
// IDirect3DDevice8::DeleteVertexShader (* unchanged since 4627 *)
// IDirect3DDevice8::DeleteVertexShader (* unchanged since 4134 *)
{
(OOVPA*)&X_D3DDevice_DeleteVertexShader_1_0_4627,
(OOVPA*)&X_D3DDevice_DeleteVertexShader_1_0_4134,
XTL::EmuIDirect3DDevice8_DeleteVertexShader,
@ -2627,6 +2800,117 @@ OOVPATable D3D8_1_0_5233[] =
"EmuIDirect3DDevice8_SetSoftDisplayFilter_5344"
#endif
},
// IDirect3DDevice8_Unknown1
/*{
(OOVPA*)&IDirect3DDevice8_Unknown1_1_0_5233,
XTL::EmuIDirect3DDevice8_Unknown1,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Unknown1"
#endif
},*/
// IDirect3DDevice8::SetRenderState_TwoSidedLighting (* unchanged since 4134 *)
// Beware of the typo...
{
(OOVPA*)&IDirect3DDevice8_SetTextureState_TwoSidedLighting_1_0_4134,
XTL::EmuIDirect3DDevice8_SetTextureState_TwoSidedLighting,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_TwoSidedLighting"
#endif
},
// IDirect3DDevice8::SetRenderState_FrontFace (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_FrontFace_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_FrontFace,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_FrontFace"
#endif
},
// D3DDevice_SetRenderState_LogicOp (* unchanged since 4627 *)
{
(OOVPA*)&D3DDevice_SetRenderState_LogicOp_1_0_4627,
XTL::EmuIDirect3DDevice8_SetRenderState_LogicOp,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_LogicOp"
#endif
},
// IDirect3DDevice8::BeginPush
{
(OOVPA*)&D3DDevice_BeginPush_1_0_5344,
XTL::EmuIDirect3DDevice8_BeginPush,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_BeginPush"
#endif
},
// IDirect3DDevice8::EndPush
{
(OOVPA*)&D3DDevice_EndPush_1_0_5344,
XTL::EmuIDirect3DDevice8_EndPush,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_EndPush"
#endif
},
// IDirect3DDevice8::SetVerticalBlankCallback
{
(OOVPA*)&IDirect3DDevice8_SetVerticalBlankCallback_1_0_5233,
XTL::EmuIDirect3DDevice8_SetVerticalBlankCallback,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVerticalBlankCallback"
#endif
},
// D3DDevice_SetRenderState_SampleAlpha
{
(OOVPA*)&D3DDevice_SetRenderState_SampleAlpha_1_0_5233,
XTL::EmuIDirect3DDevice8_SetRenderState_SampleAlpha,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_SampleAlpha"
#endif
},
// D3DDevice_SetRenderState_MultiSampleMask
{
(OOVPA*)&D3DDevice_SetRenderState_MultiSampleMask_1_0_5233,
XTL::EmuIDirect3DDevice8_SetRenderState_MultiSampleMask,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_MultiSampleMask"
#endif
},
// IDirect3D8::GetAdapterModeCount (* unchanged since 4361 *)
{
(OOVPA*)&IDirect3D8_GetAdapterModeCount_1_0_4361,
XTL::EmuIDirect3D8_GetAdapterModeCount,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_GetAdapterModeCount"
#endif
},
// Direct3D_EnumAdapterModes
{
(OOVPA*)&Direct3D_EnumAdapterModes_1_0_5233,
XTL::EmuIDirect3D8_EnumAdapterModes,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_EnumAdapterModes"
#endif
},
};
// ******************************************************************

View File

@ -857,6 +857,242 @@ SOOVPA<10> IDirect3DDevice8_DrawVerticesUP_1_0_5558 =
}
};
// ******************************************************************
// * IDirect3DDevice8_CreateIndexBuffer
// ******************************************************************
SOOVPA<10> IDirect3DDevice8_CreateIndexBuffer_1_0_5558 =
{
0, // Large == 0
10, // Count == 10
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x00, 0x50 },
{ 0x06, 0x8B },
{ 0x07, 0x4C },
{ 0x09, 0x04 },
{ 0x0A, 0x33 },
{ 0x0E, 0x0F },
{ 0x12, 0x01 },
{ 0x16, 0x0E },
{ 0x1A, 0x8B },
{ 0x1E, 0x00 },
}
};
// ******************************************************************
// * D3DDevice_CreateIndexBuffer2
// ******************************************************************
SOOVPA<7> D3DDevice_CreateIndexBuffer2_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x05, 0x00 },
{ 0x0C, 0x50 },
{ 0x13, 0xC0 },
{ 0x1A, 0xC9 },
{ 0x21, 0x04 },
{ 0x28, 0xC7 },
{ 0x2F, 0x48 },
}
};
// ******************************************************************
// * D3DDevice_SetVerticalBlankCallback
// ******************************************************************
SOOVPA<7> D3DDevice_SetVerticalBlankCallback_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x01, 0x44 },
{ 0x04, 0x8B },
{ 0x0A, 0x89 },
{ 0x0B, 0x81 },
{ 0x0C, 0xA8 },
{ 0x0D, 0x1D },
{ 0x10, 0xC2 },
}
};
// ******************************************************************
// * IDirect3DDevice8_SetVerticalBlankCallback
// ******************************************************************
SOOVPA<12> IDirect3DDevice8_SetVerticalBlankCallback_1_0_5455 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_SetVerticalBlankCallback+0x00 : mov eax, [esp+0x04]
{ 0x00, 0x8B }, // (Offset,Value)-Pair #1
{ 0x01, 0x44 }, // (Offset,Value)-Pair #2
{ 0x02, 0x24 }, // (Offset,Value)-Pair #3
{ 0x03, 0x04 }, // (Offset,Value)-Pair #4
// IDirect3DDevice8_SetVerticalBlankCallback+0x04 : mov ecx, [addr]
{ 0x04, 0x8B }, // (Offset,Value)-Pair #5
{ 0x05, 0x0D }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_SetVerticalBlankCallback+0x0A : mov [ecx+0x1998], eax
{ 0x0A, 0x89 }, // (Offset,Value)-Pair #7
{ 0x0B, 0x81 }, // (Offset,Value)-Pair #8
{ 0x0C, 0x98 }, // (Offset,Value)-Pair #9
{ 0x0D, 0x19 }, // (Offset,Value)-Pair #10
// IDirect3DDevice8_SetVerticalBlankCallback+0x10 : retn 0x04
{ 0x10, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x11, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * D3DDevice_SetSwapCallback
// ******************************************************************
SOOVPA<7> D3DDevice_SetSwapCallback_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x01, 0x44 },
{ 0x04, 0x8B },
{ 0x0A, 0x89 },
{ 0x0B, 0x81 },
{ 0x0C, 0xA4 },
{ 0x0D, 0x1D },
{ 0x10, 0xC2 },
}
};
// ******************************************************************
// * D3DDevice_SetRenderState_TextureFactor
// ******************************************************************
SOOVPA<7> D3DDevice_SetRenderState_TextureFactor_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x09, 0x80 },
{ 0x14, 0x46 },
{ 0x1F, 0x24 },
{ 0x2A, 0xBA },
{ 0x35, 0x4A },
{ 0x40, 0x5E },
{ 0x4D, 0x5E },
}
};
// ******************************************************************
// * D3DDevice_GetViewport
// ******************************************************************
SOOVPA<7> D3DDevice_GetViewport_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x05, 0x8B },
{ 0x0C, 0x00 },
{ 0x13, 0x50 },
{ 0x1A, 0x08 },
{ 0x21, 0x89 },
{ 0x28, 0x51 },
{ 0x2F, 0x14 },
}
};
// ******************************************************************
// * D3DDevice_Reset
// ******************************************************************
SOOVPA<8> D3DDevice_Reset_1_0_5558 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x13, 0x00 },
{ 0x28, 0x74 },
{ 0x40, 0x5F },
{ 0x55, 0x8B },
{ 0x67, 0x50 },
{ 0x7C, 0x00 },
{ 0x91, 0x3F },
{ 0xA6, 0x04 },
}
};
// ******************************************************************
// * D3DDevice_SetGammaRamp
// ******************************************************************
SOOVPA<7> D3DDevice_SetGammaRamp_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0F, 0x68 },
{ 0x20, 0x34 },
{ 0x31, 0xB4 },
{ 0x42, 0x08 },
{ 0x53, 0xF3 },
{ 0x64, 0xCA },
{ 0x75, 0x07 },
}
};
// ******************************************************************
// * IDirect3DDevice8_GetProjectionViewportMatrix
// ******************************************************************
SOOVPA<7> IDirect3DDevice8_GetProjectionViewportMatrix_1_0_5455 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x02, 0x35 },
{ 0x07, 0x57 },
{ 0x0A, 0x24 },
{ 0x0E, 0x60 },
{ 0x12, 0xB9 },
{ 0x16, 0x00 },
{ 0x1A, 0x5E },
}
};
// ******************************************************************
// * D3D8_1_0_5558
// ******************************************************************
@ -1250,9 +1486,9 @@ OOVPATable D3D8_1_0_5558[] =
"EmuIDirect3DDevice8_SetRenderState_StencilEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_StencilFail (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_StencilFail (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_StencilFail_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_StencilFail,
@ -1300,9 +1536,9 @@ OOVPATable D3D8_1_0_5558[] =
"EmuIDirect3DVertexBuffer8_Lock2"
#endif
},
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable,
@ -1320,9 +1556,9 @@ OOVPATable D3D8_1_0_5558[] =
"EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias"
#endif
},
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_ShadowFunc,
@ -1330,9 +1566,9 @@ OOVPATable D3D8_1_0_5558[] =
"EmuIDirect3DDevice8_SetRenderState_ShadowFunc"
#endif
},
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_YuvEnable,
@ -1491,7 +1727,7 @@ OOVPATable D3D8_1_0_5558[] =
#endif
},
// IDirect3DTexture8::LockRect (* unchanged since 5233 *)
{
/*{
(OOVPA*)&IDirect3DTexture8_LockRect_1_0_5233,
XTL::EmuIDirect3DTexture8_LockRect,
@ -1499,7 +1735,7 @@ OOVPATable D3D8_1_0_5558[] =
#ifdef _DEBUG_TRACE
"EmuIDirect3DTexture8_LockRect"
#endif
},
},*/
// IDirect3DSurface8::LockRect (* unchanged since 3925 *)
{
(OOVPA*)&IDirect3DSurface8_LockRect_1_0_3925,
@ -1723,6 +1959,153 @@ OOVPATable D3D8_1_0_5558[] =
"EmuIDirect3DDevice8_GetTransform"
#endif
},
// IDirect3DDevice8::CreateIndexBuffer2
{
(OOVPA*)&D3DDevice_CreateIndexBuffer2_1_0_5558,
XTL::EmuIDirect3DDevice8_CreateIndexBuffer2,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_CreateIndexBuffer2"
#endif
},
// IDirect3DDevice8::CreateIndexBuffer
{
(OOVPA*)&IDirect3DDevice8_CreateIndexBuffer_1_0_5558,
XTL::EmuIDirect3DDevice8_CreateIndexBuffer,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_CreateIndexBuffer"
#endif
},
// IDirect3D8::GetAdapterModeCount (* unchanged since 4361 *)
{
(OOVPA*)&IDirect3D8_GetAdapterModeCount_1_0_4361,
XTL::EmuIDirect3D8_GetAdapterModeCount,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_GetAdapterModeCount"
#endif
},
// IDirect3D8::EnumAdapterModes (* unchanged since 4361 *)
{
(OOVPA*)&IDirect3D8_EnumAdapterModes_1_0_4361,
XTL::EmuIDirect3D8_EnumAdapterModes,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_EnumAdapterModes"
#endif
},
// D3DDevice_SetVerticalBlankCallback
{
(OOVPA*)&D3DDevice_SetVerticalBlankCallback_1_0_5558,
XTL::EmuIDirect3DDevice8_SetVerticalBlankCallback,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVerticalBlankCallback"
#endif
},
// D3DDevice_SetVerticalBlankCallback
{
(OOVPA*)&IDirect3DDevice8_SetVerticalBlankCallback_1_0_5455,
XTL::EmuIDirect3DDevice8_SetVerticalBlankCallback,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetVerticalBlankCallback (5455)"
#endif
},
// D3DDevice_SetSwapCallback
{
(OOVPA*)&D3DDevice_SetSwapCallback_1_0_5558,
XTL::EmuIDirect3DDevice8_SetSwapCallback,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetSwapCallback"
#endif
},
// IDirect3DDevice8::GetGammaRamp (* unchanged since 4034 *)
{
(OOVPA*)&IDirect3DDevice8_GetGammaRamp_1_0_4034,
XTL::EmuIDirect3DDevice8_GetGammaRamp,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_GetGammaRamp"
#endif
},
// IDirect3DDevice8::SetRenderState_TextureFactor
{
(OOVPA*)&D3DDevice_SetRenderState_TextureFactor_1_0_5558,
XTL::EmuIDirect3DDevice8_SetRenderState_TextureFactor,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_TextureFactor"
#endif
},
// IDirect3DDevice8::SetRenderState_VertexBlend (* unchanged since 4361 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_VertexBlend_1_0_4361,
XTL::EmuIDirect3DDevice8_SetRenderState_VertexBlend,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetRenderState_VertexBlend"
#endif
},
// IDirect3D8::KickOffAndWaitForIdle (* unchanged since 5233 *)
{
(OOVPA*)&IDirect3D8_KickOffAndWaitForIdle_1_0_5233,
XTL::EmuIDirect3D8_KickOffAndWaitForIdle,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_KickOffAndWaitForIdle"
#endif
},
// IDirect3DDevice8::Reset (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_Reset_1_0_4134,
XTL::EmuIDirect3DDevice8_Reset,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_Reset"
#endif
},
// IDirect3DDevice8::SetGammaRamp (* unchanged since 4928 *)
{
(OOVPA*)&IDirect3DDevice8_SetGammaRamp_1_0_4928,
XTL::EmuIDirect3DDevice8_SetGammaRamp,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetGammaRamp"
#endif
},
// IDirect3DDevice8::GetViewport
{
(OOVPA*)&D3DDevice_GetViewport_1_0_5558,
XTL::EmuIDirect3DDevice8_GetViewport,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_GetViewport"
#endif
},
// IDirect3DDevice8_GetProjectionViewportMatrix
{
(OOVPA*)&IDirect3DDevice8_GetProjectionViewportMatrix_1_0_5455,
XTL::EmuIDirect3DDevice8_GetProjectionViewportMatrix,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_GetProjectionViewportMatrix (5455)"
#endif
},
};
// ******************************************************************

View File

@ -841,6 +841,51 @@ SOOVPA<7> IDirect3DDevice8_SetVerticalBlankCallback_1_0_5849 =
}
};
// ******************************************************************
// * D3DDevice_SetViewport
// ******************************************************************
SOOVPA<8> D3DDevice_SetViewport_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x86 },
{ 0x3E, 0x1B },
{ 0x5E, 0x8B },
{ 0x7E, 0x6D },
{ 0x9E, 0x81 },
{ 0xBE, 0x0C },
{ 0xDE, 0x75 },
{ 0xFE, 0x85 },
}
};
// ******************************************************************
// * D3DDevice_BlockUntilVerticalBlank
// ******************************************************************
SOOVPA<7> D3DDevice_BlockUntilVerticalBlank_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x05, 0x6A },
{ 0x08, 0x00 },
{ 0x0D, 0xC0 },
{ 0x12, 0x00 },
{ 0x17, 0x05 },
{ 0x1C, 0x50 },
{ 0x23, 0xC3 },
}
};
// ******************************************************************
// * D3D8_1_0_5849
// ******************************************************************
@ -1176,9 +1221,9 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetRenderState_StencilEnable"
#endif
},
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_OcclusionCullEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_OcclusionCullEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_OcclusionCullEnable,
@ -1196,9 +1241,9 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetRenderState_MultiSampleAntiAlias"
#endif
},
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_ShadowFunc (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_ShadowFunc_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_ShadowFunc,
@ -1206,9 +1251,9 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetRenderState_ShadowFunc"
#endif
},
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4432 *)
// IDirect3DDevice8::SetRenderState_YuvEnable (* unchanged since 4134 *)
{
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4432,
(OOVPA*)&IDirect3DDevice8_SetRenderState_YuvEnable_1_0_4134,
XTL::EmuIDirect3DDevice8_SetRenderState_YuvEnable,
@ -1626,6 +1671,36 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DDevice8_SetRenderTarget"
#endif
},
// IDirect3DDevice8::SetShaderConstantMode (* unchanged since 5233 *)
{
(OOVPA*)&IDirect3DDevice8_SetShaderConstantMode_1_0_5233,
XTL::EmuIDirect3DDevice8_SetShaderConstantMode,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetShaderConstantMode"
#endif
},
// IDirect3DDevice8::SetViewport
{
(OOVPA*)&D3DDevice_SetViewport_1_0_5849,
XTL::EmuIDirect3DDevice8_SetViewport,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_SetViewport"
#endif
},
// IDirect3DDevice8::BlockUntilVerticalBlank
{
(OOVPA*)&D3DDevice_BlockUntilVerticalBlank_1_0_5849,
XTL::EmuIDirect3DDevice8_BlockUntilVerticalBlank,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_BlockUntilVerticalBlank"
#endif
},
};
// ******************************************************************

View File

@ -0,0 +1,45 @@
// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
// * Cxbx->Win32->CxbxKrnl->D3D8LTCG.1.0.5849.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 <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
#ifndef D3D8LTCG_1_0_5849_H
#define D3D8LTCG_1_0_5849_H
#include "OOVPA.h"
extern SOOVPA<13> IDirect3DDevice8_SetRenderState_CullMode_1_0_5849_LTCG;
extern SOOVPA<10> IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_5849_LTCG;
extern OOVPATable D3D8LTCG_1_0_5849[];
extern uint32 D3D8LTCG_1_0_5849_SIZE;
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -65,42 +65,6 @@ SOOVPA<9> DirectSoundCreate_1_0_4361 =
}
};
// ******************************************************************
// * IDirectSound8_AddRef
// ******************************************************************
SOOVPA<12> IDirectSound8_AddRef_1_0_4361 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirectSound8_AddRef+0x04 : lea ecx, [eax-8]
{ 0x04, 0x8D }, // (Offset,Value)-Pair #1
{ 0x05, 0x48 }, // (Offset,Value)-Pair #2
{ 0x06, 0xF8 }, // (Offset,Value)-Pair #3
// IDirectSound8_AddRef+0x07 : neg eax
{ 0x07, 0xF7 }, // (Offset,Value)-Pair #4
{ 0x08, 0xD8 }, // (Offset,Value)-Pair #5
// IDirectSound8_AddRef+0x09 : sbb eax, eax
{ 0x09, 0x1B }, // (Offset,Value)-Pair #6
{ 0x0A, 0xC0 }, // (Offset,Value)-Pair #7
// IDirectSound8_AddRef+0x0D : mov ecx, [eax]
{ 0x0D, 0x8B }, // (Offset,Value)-Pair #8
{ 0x0E, 0x08 }, // (Offset,Value)-Pair #9
// IDirectSound8_AddRef+0x10 : call dword ptr [ecx+4]
{ 0x10, 0xFF }, // (Offset,Value)-Pair #10
{ 0x11, 0x51 }, // (Offset,Value)-Pair #11
{ 0x12, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * IDirectSound8_CreateSoundBuffer
// ******************************************************************
@ -806,6 +770,201 @@ SOOVPA<8> IDirectSoundBuffer8_Stop_1_0_4361 =
}
};
// ******************************************************************
// * DirectSound::CDirectSoundVoiceSettings::SetMixBinVolumes
// ******************************************************************
SOOVPA<7> DirectSound_CDirectSoundVoiceSettings_SetMixBinVolumes_1_0_4361 =
{
0, // Large == 0
7, // Count == 7
XREF_DSSETMIXBINVOLUMESC, // Xref Is Saved
0, // Xref Not Used
{
{ 0x03, 0x24 },
{ 0x08, 0x16 },
{ 0x0D, 0x46 },
{ 0x12, 0x8B },
{ 0x17, 0x42 },
{ 0x1C, 0x3B },
{ 0x21, 0x5E },
}
};
// ******************************************************************
// * DirectSound::CDirectSoundVoice::SetMixBinVolumes
// ******************************************************************
SOOVPA<8> DirectSound_CDirectSoundVoice_SetMixBinVolumes_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
XREF_DSSETMIXBINVOLUMESB, // Xref Is Saved
1, // Xref Is Used
{
{ 0x0D, XREF_DSSETMIXBINVOLUMESC },
{ 0x02, 0x74 },
{ 0x06, 0x74 },
{ 0x0A, 0x4E },
{ 0x11, 0x8B },
{ 0x12, 0x4E },
{ 0x19, 0x5E },
{ 0x1A, 0xC2 },
}
};
// ******************************************************************
// * DirectSound::CDirectSoundBuffer::SetMixBinVolumes
// ******************************************************************
SOOVPA<8> DirectSound_CDirectSoundBuffer_SetMixBinVolumes_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
XREF_DSSETMIXBINVOLUMESA, // Xref Is Saved
1, // Xref Is Used
{
{ 0x32, XREF_DSSETMIXBINVOLUMESB },
{ 0x0C, 0x00 },
{ 0x12, 0x85 },
{ 0x1C, 0x15 },
{ 0x26, 0xEB },
{ 0x30, 0x10 },
{ 0x3A, 0x74 },
{ 0x47, 0x8B },
}
};
// ******************************************************************
// * DirectSound::CDirectSoundBuffer::PlayEx
// ******************************************************************
SOOVPA<8> DirectSound_CDirectSoundBuffer_PlayEx_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
XREF_DirectSound_CDirectSoundBuffer_PlayEx, // Xref Is Saved
1, // Xref Is Used
{
{ 0x3D, XREF_DSOUNDPLAY },
{ 0x0C, 0x00 },
{ 0x16, 0x68 },
{ 0x22, 0x05 },
{ 0x2E, 0x20 },
{ 0x3A, 0x24 },
{ 0x46, 0x0B },
{ 0x52, 0x8B },
}
};
// ******************************************************************
// * IDirectSoundBuffer_PlayEx
// ******************************************************************
SOOVPA<8> IDirectSoundBuffer_PlayEx_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 0x1D, XREF_DirectSound_CDirectSoundBuffer_PlayEx },
{ 0x03, 0x10 },
{ 0x08, 0xFF },
{ 0x0D, 0xC8 },
{ 0x12, 0x83 },
{ 0x17, 0x1B },
{ 0x1C, 0xE8 },
{ 0x21, 0xC2 },
}
};
// ******************************************************************
// * CMcpxBuffer::Stop2
// ******************************************************************
SOOVPA<10> CMcpxBuffer_Stop2_1_0_4361 =
{
0, // Large == 0
10, // Count == 10
XREF_CMcpxBuffer_Stop2, // XRef Is Saved
0, // XRef Is Not Used
{
// CMcpxBuffer_Stop2+0x03 : mov eax, [ebp+arg_0]
{ 0x03, 0x8B },
{ 0x04, 0x45 },
{ 0x05, 0x08 },
// CMcpxBuffer_Stop2+0x14 : mov eax, [esi]
{ 0x14, 0x8B },
{ 0x15, 0x06 },
// CMcpxBuffer_Stop2+0x25 : push [ebp+arg_8]
{ 0x25, 0xFF },
{ 0x26, 0x75 },
{ 0x27, 0x10 },
// CMcpxBuffer_Stop2+0x36 : retn 0xC
{ 0x36, 0xC2 },
{ 0x37, 0x0C },
}
};
// ******************************************************************
// * DirectSound::CDirectSoundBuffer::StopEx
// ******************************************************************
SOOVPA<8> DirectSound_CDirectSoundBuffer_StopEx_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
XREF_DirectSound_CDirectSoundBuffer_StopEx, // Xref Is Saved
1, // Xref Is Used
{
{ 0x3D, XREF_CMcpxBuffer_Stop2 },
{ 0x0C, 0x00 },
{ 0x16, 0x68 },
{ 0x22, 0x05 },
{ 0x2E, 0x20 },
{ 0x3A, 0x24 },
{ 0x46, 0x0B },
{ 0x52, 0x8B },
}
};
// ******************************************************************
// * IDirectSoundBuffer_StopEx
// ******************************************************************
SOOVPA<8> IDirectSoundBuffer_StopEx_1_0_4361 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 0x1D, XREF_DirectSound_CDirectSoundBuffer_StopEx },
{ 0x03, 0x10 },
{ 0x08, 0xFF },
{ 0x0D, 0xC8 },
{ 0x12, 0x83 },
{ 0x17, 0x1B },
{ 0x1C, 0xE8 },
{ 0x21, 0xC2 },
}
};
// ******************************************************************
// * DirectSoundCreate_1_0_4361
// ******************************************************************
@ -857,9 +1016,9 @@ OOVPATable DSound_1_0_4361[] =
"CDirectSoundStream_Pause"
#endif
},
// IDirectSound8::AddRef
// IDirectSound8::AddRef (* unchanged since 3936 *)
{
(OOVPA*)&IDirectSound8_AddRef_1_0_4361,
(OOVPA*)&IDirectSound8_AddRef_1_0_3936,
XTL::EmuIDirectSound8_AddRef,
@ -956,7 +1115,7 @@ OOVPATable DSound_1_0_4361[] =
XTL::EmuIDirectSoundBuffer8_SetCurrentPosition,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer8_SetCurrentPosition"
"EmuIDirectSoundBuffer8_SetCurrentPosition"
#endif
},
// CMcpxBuffer::GetCurrentPosition
@ -982,7 +1141,7 @@ OOVPATable DSound_1_0_4361[] =
XTL::EmuIDirectSoundBuffer8_GetCurrentPosition,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer8_GetCurrentPosition"
"EmuIDirectSoundBuffer8_GetCurrentPosition"
#endif
},
// CMcpxBuffer::Play
@ -1008,7 +1167,7 @@ OOVPATable DSound_1_0_4361[] =
XTL::EmuIDirectSoundBuffer8_Play,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer8_Play"
"EmuIDirectSoundBuffer8_Play"
#endif
},
// CMcpxBuffer::Stop
@ -1018,6 +1177,14 @@ OOVPATable DSound_1_0_4361[] =
#ifdef _DEBUG_TRACE
"CMcpxBuffer_Stop (XREF)"
#endif
},
// CMcpxBuffer_Stop2
{
(OOVPA*)&CMcpxBuffer_Stop2_1_0_4361, 0,
#ifdef _DEBUG_TRACE
"CMcpxBuffer_Stop2 (XREF)"
#endif
},
// CDirectSoundBuffer::Stop
{
@ -1034,9 +1201,79 @@ OOVPATable DSound_1_0_4361[] =
XTL::EmuIDirectSoundBuffer8_Stop,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer8_Stop"
"EmuIDirectSoundBuffer8_Stop"
#endif
},
// CDirectSoundVoiceSettings_SetMixBinVolumes
{
(OOVPA*)&DirectSound_CDirectSoundVoiceSettings_SetMixBinVolumes_1_0_4361, 0,
#ifdef _DEBUG_TRACE
"CDirectSoundVoiceSettings::SetMixBinVolumes (XREF)"
#endif
},
// CDirectSoundVoice_SetMixBinVolumes
{
(OOVPA*)&DirectSound_CDirectSoundVoice_SetMixBinVolumes_1_0_4361, 0,
#ifdef _DEBUG_TRACE
"CDirectSoundVoice::SetMixBinVolumes (XREF)"
#endif
},
// CDirectSoundBuffer_SetMixBinVolumes
{
(OOVPA*)&DirectSound_CDirectSoundBuffer_SetMixBinVolumes_1_0_4361, 0,
#ifdef _DEBUG_TRACE
"CDirectSoundBuffer::SetMixBinVolumes (XREF)"
#endif
},
// DirectSound::CDirectSoundBuffer::PlayEx (XREF)
{
(OOVPA*)&DirectSound_CDirectSoundBuffer_PlayEx_1_0_4361,
0,
#ifdef _DEBUG_TRACE
"DirectSound::CDirectSoundBuffer::PlayEx (XREF)"
#endif
},
// IDirectSoundBuffer_PlayEx
{
(OOVPA*)&IDirectSoundBuffer_PlayEx_1_0_4361,
XTL::EmuIDirectSoundBuffer8_PlayEx,
#ifdef _DEBUG_TRACE
"EmuIDirectSoundBuffer_PlayEx"
#endif
},
// DirectSound::CDirectSoundBuffer::StopEx (XREF)
{
(OOVPA*)&DirectSound_CDirectSoundBuffer_StopEx_1_0_4361,
0,
#ifdef _DEBUG_TRACE
"DirectSound::CDirectSoundBuffer::StopEx (XREF)"
#endif
},
// IDirectSoundBuffer_StopEx
{
(OOVPA*)&IDirectSoundBuffer_StopEx_1_0_4361,
XTL::EmuIDirectSoundBuffer8_StopEx,
#ifdef _DEBUG_TRACE
"EmuIDirectSoundBuffer_StopEx"
#endif
},
// IDirectSoundBuffer_AddRef (* unchanged since 3936 *)
{
(OOVPA*)&IDirectSoundBuffer8_AddRef_1_0_3936,
XTL::EmuIDirectSoundBuffer8_AddRef,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer8_AddRef"
#endif
},
};
// ******************************************************************

View File

@ -572,6 +572,102 @@ SOOVPA<11> IDirectSound8_SetDistanceFactor_1_0_4432 =
}
};
// ******************************************************************
// * CDirectSound::SetPositionA
// ******************************************************************
SOOVPA<11> CDirectSound_SetPositionA_1_0_4432 =
{
0, // Large == 0
11, // Count == 11
XREF_DSSETPOSITIONA, // XRef Is Saved
0, // XRef Not Used
{
// CDirectSound_SetPositionA+0x2B : mov ecx, [ebp+0x08]
{ 0x2B, 0x8B }, // (Offset,Value)-Pair #1
{ 0x2C, 0x4D }, // (Offset,Value)-Pair #2
{ 0x2D, 0x08 }, // (Offset,Value)-Pair #3
// CDirectSound_SetPositionA+0x3F : mov [edx+0x3C], edi
{ 0x3F, 0x89 }, // (Offset,Value)-Pair #4
{ 0x40, 0x7A }, // (Offset,Value)-Pair #5
{ 0x41, 0x3C }, // (Offset,Value)-Pair #6
// CDirectSound_SetPositionA+0x4C : or word ptr [eax+0xA4], 0x01FF
{ 0x4C, 0x80 }, // (Offset,Value)-Pair #7
{ 0x4D, 0x88 }, // (Offset,Value)-Pair #8
{ 0x4E, 0xA4 }, // (Offset,Value)-Pair #9
{ 0x4F, 0x00 }, // (Offset,Value)-Pair #10
{ 0x52, 0xFF }, // (Offset,Value)-Pair #11
}
};
// ******************************************************************
// * CDirectSound::SetVelocity
// ******************************************************************
SOOVPA<15> CDirectSound_SetVelocity_1_0_4432 =
{
0, // Large == 0
15, // Count == 15
XREF_DSSETVELOCITYA, // XRef Is Saved
0, // XRef Not Used
{
// CDirectSound_SetVelocity+0x24 : mov eax, 0x80004005
{ 0x24, 0xB8 }, // (Offset,Value)-Pair #1
{ 0x25, 0x05 }, // (Offset,Value)-Pair #2
{ 0x26, 0x40 }, // (Offset,Value)-Pair #3
{ 0x27, 0x00 }, // (Offset,Value)-Pair #4
{ 0x28, 0x80 }, // (Offset,Value)-Pair #5
// CDirectSound_SetVelocity+0x37 : mov [edx+0x44], edi
{ 0x37, 0x89 }, // (Offset,Value)-Pair #6
{ 0x38, 0x7A }, // (Offset,Value)-Pair #7
{ 0x39, 0x44 }, // (Offset,Value)-Pair #8
// CDirectSound_SetVelocity+0x4C : or dword ptr [eax+0x0A4], 0x40
{ 0x4C, 0x83 }, // (Offset,Value)-Pair #9
{ 0x4D, 0x88 }, // (Offset,Value)-Pair #10
{ 0x4E, 0xA4 }, // (Offset,Value)-Pair #11
{ 0x4F, 0x00 }, // (Offset,Value)-Pair #12
{ 0x52, 0x40 }, // (Offset,Value)-Pair #13
// CDirectSound_SetVelocity+0x73 : retn 0x14
{ 0x73, 0xC2 }, // (Offset,Value)-Pair #14
{ 0x74, 0x14 }, // (Offset,Value)-Pair #15
}
};
// ******************************************************************
// * CDirectSoundVoice::SetPosition
// ******************************************************************
SOOVPA<8> CDirectSoundVoice_SetPosition_1_0_4432 =
{
0, // Large == 0
8, // Count == 8
XREF_DSVOICESETPOSITION, // XRef Is Saved
0, // XRef Not Used
{
// CDirectSoundVoice_SetPosition+0x0F : mov edx, [ebp+arg_4]
{ 0x0F, 0x8B },
{ 0x10, 0x55 },
{ 0x11, 0x0C },
// CDirectSoundVoice_SetPosition+0x12 : mov [ecx+04h], edx
{ 0x12, 0x89 },
{ 0x13, 0x51 },
{ 0x14, 0x04 },
// CDirectSoundVoice_SetPosition+0x4F : retn 14h
{ 0x4F, 0xC2 },
{ 0x50, 0x14 }
}
};
// ******************************************************************
// * DirectSoundCreate_1_0_4432
// ******************************************************************
@ -623,9 +719,9 @@ OOVPATable DSound_1_0_4432[] =
"CDirectSoundStream_Pause"
#endif
},
// IDirectSound8::AddRef (* unchanged since 4361 *)
// IDirectSound8::AddRef (* unchanged since 3936 *)
{
(OOVPA*)&IDirectSound8_AddRef_1_0_4361,
(OOVPA*)&IDirectSound8_AddRef_1_0_3936,
XTL::EmuIDirectSound8_AddRef,
@ -891,6 +987,16 @@ OOVPATable DSound_1_0_4432[] =
"EmuIDirectSound8_DownloadEffectsImage"
#endif
},
// IDirectSoundBuffer_AddRef (* unchanged since 3936 *)
{
(OOVPA*)&IDirectSoundBuffer8_AddRef_1_0_3936,
XTL::EmuIDirectSoundBuffer8_AddRef,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer8_AddRef"
#endif
},
};
// ******************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -1701,6 +1701,28 @@ SOOVPA<8> IDirectSoundBuffer8_SetDopplerFactor_1_0_5558 =
{ 0x21, 0xC2 },
}
};
// ******************************************************************
// * IDirectSoundBuffer_Lock
// ******************************************************************
SOOVPA<8> IDirectSoundBuffer_Lock_1_0_5558 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x04, 0x75 },
{ 0x0A, 0x75 },
{ 0x10, 0x1C },
{ 0x16, 0x18 },
{ 0x1C, 0x1B },
{ 0x22, 0xC8 },
{ 0x2C, 0x5D },
{ 0x2E, 0x20 },
}
};
// ******************************************************************
// * Direct_1_0_5558
@ -2629,6 +2651,16 @@ OOVPATable DSound_1_0_5558[] =
"EmuDirectSoundCreateBuffer"
#endif
},
// IDirectSoundBuffer_Lock
{
(OOVPA*)&IDirectSoundBuffer_Lock_1_0_5558,
XTL::EmuIDirectSoundBuffer8_Lock,
#ifdef _DEBUG_TRACE
"EmuIDirectSoundBuffer8_Lock"
#endif
},
};
// ******************************************************************

View File

@ -247,6 +247,99 @@ SOOVPA<11> CMcpxBuffer_Play_1_0_5849 =
}
};
// ******************************************************************
// * DirectSound::CDirectSoundVoice::SetHeadroom
// ******************************************************************
SOOVPA<7> DirectSound_CDirectSoundVoice_SetHeadroom_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
XREF_DirectSound_CDirectSoundVoice_SetHeadroom, // Xref Is Saved
0, // Xref Not Used
{
{ 0x03, 0x04 },
{ 0x08, 0x48 },
{ 0x0D, 0x24 },
{ 0x12, 0x48 },
{ 0x17, 0x8B },
{ 0x1F, 0x5E },
{ 0x21, 0x08 },
}
};
// ******************************************************************
// * DirectSound::CDirectSoundBuffer::SetHeadroom
// ******************************************************************
SOOVPA<8> DirectSound_CDirectSoundBuffer_SetHeadroom_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
XREF_DirectSound_CDirectSoundBuffer_SetHeadroom, // Xref Is Saved
1, // Xref Is Used
{
{ 0x32, XREF_DirectSound_CDirectSoundVoice_SetHeadroom },
{ 0x0C, 0x00 },
{ 0x12, 0x85 },
{ 0x1C, 0x15 },
{ 0x26, 0xEB },
{ 0x30, 0x10 },
{ 0x3A, 0x74 },
{ 0x47, 0x8B },
}
};
// ******************************************************************
// * IDirectSoundBuffer_SetHeadroom
// ******************************************************************
SOOVPA<8> IDirectSoundBuffer_SetHeadroom_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 0x15, XREF_DirectSound_CDirectSoundBuffer_SetHeadroom },
{ 0x02, 0x24 },
{ 0x06, 0x24 },
{ 0x0A, 0x83 },
{ 0x0E, 0xD9 },
{ 0x12, 0xC8 },
{ 0x19, 0xC2 },
{ 0x1A, 0x08 },
}
};
// ******************************************************************
// * IDirectSoundBuffer_Lock
// ******************************************************************
SOOVPA<8> IDirectSoundBuffer_Lock_1_0_5849 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x04, 0x75 },
{ 0x0A, 0x75 },
{ 0x10, 0x1C },
{ 0x16, 0x18 },
{ 0x1C, 0x1B },
{ 0x22, 0xC8 },
{ 0x2C, 0x5D },
{ 0x2E, 0x20 },
}
};
// ******************************************************************
// * Direct_1_0_5849
// ******************************************************************
@ -566,6 +659,42 @@ OOVPATable DSound_1_0_5849[] =
"EmuIDirectSoundBuffer8_Release"
#endif
},
// DirectSound::CDirectSoundVoice::SetHeadroom (XREF)
{
(OOVPA*)&DirectSound_CDirectSoundVoice_SetHeadroom_1_0_5849,
0,
#ifdef _DEBUG_TRACE
"DirectSound::CDirectSoundVoice::SetHeadroom (XREF)"
#endif
},
// DirectSound::CDirectSoundBuffer::SetHeadroom (XREF)
{
(OOVPA*)&DirectSound_CDirectSoundBuffer_SetHeadroom_1_0_5849,
0,
#ifdef _DEBUG_TRACE
"DirectSound::CDirectSoundBuffer::SetHeadroom (XREF)"
#endif
},
// IDirectSoundBuffer_SetHeadroom
{
(OOVPA*)&IDirectSoundBuffer_SetHeadroom_1_0_5849,
XTL::EmuIDirectSoundBuffer8_SetHeadroom,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer_SetHeadroom"
#endif
},
// IDirectSoundBuffer_Lock
{
(OOVPA*)&IDirectSoundBuffer_Lock_1_0_5849,
XTL::EmuIDirectSoundBuffer8_Lock,
#ifdef _DEBUG_TRACE
"IDirectSoundBuffer_Lock"
#endif
},
};
// ******************************************************************

Binary file not shown.

View File

@ -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->XG.1.0.3911.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 <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
#ifndef XG_1_0_3911_H
#define XG_1_0_3911_H
#include "OOVPA.h"
extern OOVPATable XG_1_0_3911[];
extern uint32 XG_1_0_3911_SIZE;
#endif

View File

@ -0,0 +1,208 @@
// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
// * Cxbx->Win32->CxbxKrnl->XG.1.0.3911.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 <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
// ******************************************************************
// * XGIsSwizzledFormat
// ******************************************************************
SOOVPA<7> XGIsSwizzledFormat_1_0_3911 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0x7F },
{ 0x10, 0x7C },
{ 0x19, 0x0B },
{ 0x22, 0xF8 },
{ 0x2B, 0x83 },
{ 0x34, 0x0A },
{ 0x3D, 0x7F },
}
};
// ******************************************************************
// * XGSwizzleRect
// ******************************************************************
SOOVPA<8> XGSwizzleRect_1_0_3911 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x03 },
{ 0x3E, 0x89 },
{ 0x5E, 0x83 },
{ 0x7E, 0x6C },
{ 0x9E, 0xFF },
{ 0xBE, 0xFF },
{ 0xDE, 0x89 },
{ 0xFE, 0x89 },
}
};
// ******************************************************************
// * XGSwizzleBox
// ******************************************************************
SOOVPA<8> XGSwizzleBox_1_0_3911 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x75 },
{ 0x3E, 0x4D },
{ 0x5E, 0x48 },
{ 0x7E, 0x04 },
{ 0x9E, 0xD8 },
{ 0xC0, 0x83 },
{ 0xDE, 0xAF },
{ 0xFE, 0x45 },
}
};
// ******************************************************************
// * XGUnswizzleRect
// ******************************************************************
SOOVPA<8> XGUnswizzleRect_1_0_3911 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x03 },
{ 0x3E, 0x00 },
{ 0x5E, 0xD2 },
{ 0x7E, 0x75 },
{ 0x9E, 0x70 },
{ 0xC1, 0xE9 },
{ 0xDE, 0x89 },
{ 0xFE, 0x60 },
}
};
// ******************************************************************
// * XGWriteSurfaceOrTextureToXPR
// ******************************************************************
SOOVPA<7> XGWriteSurfaceOrTextureToXPR_1_0_3911 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x3D },
{ 0x3E, 0xE0 },
{ 0x5E, 0x75 },
{ 0x7E, 0x33 },
{ 0x9E, 0xC2 },
{ 0xBE, 0xF0 },
{ 0xDE, 0xFC },
}
};
// ******************************************************************
// * XG_1_0_3911
// ******************************************************************
OOVPATable XG_1_0_3911[] =
{
// XGIsSwizzledFormat
{
(OOVPA*)&XGIsSwizzledFormat_1_0_3911,
XTL::EmuXGIsSwizzledFormat,
#ifdef _DEBUG_TRACE
"XGIsSwizzledFormat"
#endif
},
// XGSwizzleRect
{
(OOVPA*)&XGSwizzleRect_1_0_3911,
XTL::EmuXGSwizzleRect,
#ifdef _DEBUG_TRACE
"EmuXGSwizzleRect"
#endif
},
// XGUnswizzleRect
{
(OOVPA*)&XGUnswizzleRect_1_0_3911,
XTL::EmuXGUnswizzleRect,
#ifdef _DEBUG_TRACE
"EmuXGUnswizzleRect"
#endif
},
// XGSwizzleBox
{
(OOVPA*)&XGSwizzleBox_1_0_3911,
XTL::EmuXGSwizzleBox,
#ifdef _DEBUG_TRACE
"EmuXGSwizzleBox"
#endif
},
// XGWriteSurfaceOrTextureToXPR
{
(OOVPA*)&XGWriteSurfaceOrTextureToXPR_1_0_3911,
XTL::EmuXGWriteSurfaceOrTextureToXPR,
#ifdef _DEBUG_TRACE
"EmuXGWriteSurfaceOrTextureToXPR"
#endif
},
};
// ******************************************************************
// * XG_1_0_3911_SIZE
// ******************************************************************
uint32 XG_1_0_3911_SIZE = sizeof(XG_1_0_3911);

View File

@ -64,6 +64,28 @@ SOOVPA<10> XGSwizzleBox_1_0_4627 =
}
};
// ******************************************************************
// * XGWriteSurfaceOrTextureToXPR
// ******************************************************************
SOOVPA<7> XGWriteSurfaceOrTextureToXPR_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x3D },
{ 0x3E, 0xE0 },
{ 0x5E, 0x75 },
{ 0x7E, 0x33 },
{ 0x9E, 0xC2 },
{ 0xBE, 0xF0 },
{ 0xE2, 0x8B },
}
};
// ******************************************************************
// * XG_1_0_4627
// ******************************************************************
@ -99,6 +121,16 @@ OOVPATable XG_1_0_4627[] =
"EmuXGSwizzleBox"
#endif
},
// XGWriteSurfaceOrTextureToXPR
{
(OOVPA*)&XGWriteSurfaceOrTextureToXPR_1_0_4627,
XTL::EmuXGWriteSurfaceOrTextureToXPR,
#ifdef _DEBUG_TRACE
"EmuXGWriteSurfaceOrTextureToXPR"
#endif
},
};
// ******************************************************************

View File

@ -64,6 +64,52 @@ SOOVPA<12> XnInit_1_0_4627 =
}
};
// ******************************************************************
// * XNetGetEthernetLinkStatus
// ******************************************************************
SOOVPA<8> XNetGetEthernetLinkStatus_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x08, 0x33 },
{ 0x10, 0x8A },
{ 0x19, 0x00 },
{ 0x22, 0x56 },
{ 0x2B, 0xFF },
{ 0x34, 0xF0 },
{ 0x3D, 0x24 },
{ 0x46, 0x5B },
}
};
// ******************************************************************
// * XoUpdateLaunchNewImageInternal
// ******************************************************************
SOOVPA<8> XoUpdateLaunchNewImageInternal_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
XREF_XoUpdateLaunchNewImageInternal, // Xref Is Saved
0, // Xref Not Used
{
{ 0x1E, 0xDB },
{ 0x3E, 0x1B },
{ 0x5E, 0xF6 },
{ 0x81, 0x83 },
{ 0x9E, 0xE8 },
{ 0xBE, 0x50 },
{ 0xDE, 0xE8 },
{ 0xFE, 0x15 },
}
};
// ******************************************************************
// * XOnline_1_0_4627
// ******************************************************************
@ -137,6 +183,23 @@ OOVPATable XOnline_1_0_4627[] =
"Emuioctlsocket"
#endif
},
// XNetGetEthernetLinkStatus
{
(OOVPA*)&XNetGetEthernetLinkStatus_1_0_4627,
XTL::EmuXNetGetEthernetLinkStatus,
#ifdef _DEBUG_TRACE
"XNetGetEthernetLinkStatus"
#endif
},
// XoUpdateLaunchNewImageInternal (XREF)
{
(OOVPA*)&XoUpdateLaunchNewImageInternal_1_0_4627, 0,
#ifdef _DEBUG_TRACE
"XoUpdateLaunchNewImageInternal (XREF)"
#endif
},
};
// ******************************************************************

View File

@ -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->XOnline.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 <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
#ifndef XONLINE_1_0_5233_H
#define XONLINE_1_0_5233_H
#include "OOVPA.h"
extern OOVPATable XOnline_1_0_5233[];
extern uint32 XOnline_1_0_5233_SIZE;
#endif

View File

@ -0,0 +1,233 @@
// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
// * Cxbx->Win32->CxbxKrnl->XOnline.1.0.4627.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 <caustik@caustik.com>
// *
// * All rights reserved
// *
// ******************************************************************
// ******************************************************************
// * XNetStartup
// ******************************************************************
SOOVPA<8> XNetStartup_1_0_5344 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x01, 0xC0 },
{ 0x04, 0x50 },
{ 0x07, 0x24 },
{ 0x0A, 0x68 },
{ 0x0F, 0xE8 },
{ 0x14, 0xC2 },
{ 0x15, 0x04 },
{ 0x16, 0x00 },
}
};
// ******************************************************************
// * XNetGetEthernetLinkStatus
// ******************************************************************
SOOVPA<8> XNetGetEthernetLinkStatus_1_0_5344 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x08, 0x33 },
{ 0x10, 0x8A },
{ 0x19, 0x00 },
{ 0x22, 0x56 },
{ 0x2B, 0xFF },
{ 0x34, 0xF0 },
{ 0x3D, 0x24 },
{ 0x46, 0x5B },
}
};
// ******************************************************************
// * CXo::XOnlineLogon
// ******************************************************************
SOOVPA<8> CXo_XOnlineLogon_1_0_5344 =
{
0, // Large == 0
8, // Count == 8
XREF_CXo_XOnlineLogon, // Xref Is Saved
0, // Xref Not Used
{
{ 0x21, 0xA8 },
{ 0x3E, 0x80 },
{ 0x5E, 0x00 },
{ 0x7E, 0x04 },
{ 0xA2, 0x85 },
{ 0xBE, 0xEC },
{ 0xDE, 0xF9 },
{ 0xFE, 0x33 },
}
};
// ******************************************************************
// * XOnlineLogon
// ******************************************************************
SOOVPA<8> XOnlineLogon_1_0_5344 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 0x0B, XREF_CXo_XOnlineLogon },
{ 0x00, 0x55 },
{ 0x01, 0x8B },
{ 0x02, 0xEC },
{ 0x03, 0x5D },
{ 0x04, 0x8B },
{ 0x05, 0x0D },
{ 0x0A, 0xE9 },
}
};
// ******************************************************************
// * XOnline_1_0_4627
// ******************************************************************
OOVPATable XOnline_1_0_5233[] =
{
// XNetStartup
{
(OOVPA*)&XNetStartup_1_0_5344,
XTL::EmuXNetStartup,
#ifdef _DEBUG_TRACE
"EmuXNetStartup"
#endif
},
// WSAStartup (* unchanged since 4361 *)
{
(OOVPA*)&WSAStartup_1_0_4361,
XTL::EmuWSAStartup,
#ifdef _DEBUG_TRACE
"EmuWSAStartup"
#endif
},
// XnInit (XREF) (* unchanged since 4627 *)
{
(OOVPA*)&XnInit_1_0_4627, 0,
#ifdef _DEBUG_TRACE
"XnInit (XRef)"
#endif
},
// socket
/*{
(OOVPA*)&socket_1_0_4361,
MFPtoFP<XTL::EmuThis>(XTL::EmuThis::Emusocket),
#ifdef _DEBUG_TRACE
"Emusocket"
#endif
},*/
// bind (* unchanged since 4361 *)
{
(OOVPA*)&bind_1_0_4361,
MFPtoFP<XTL::EmuThis>(XTL::EmuThis::Emubind),
#ifdef _DEBUG_TRACE
"Emubind"
#endif
},
// listen
/*{
(OOVPA*)&listen_1_0_4361,
MFPtoFP<XTL::EmuThis>(XTL::EmuThis::Emulisten),
#ifdef _DEBUG_TRACE
"Emulisten"
#endif
},*/
// ioctlsocket (* unchanged since 4361 *)
{
(OOVPA*)&ioctlsocket_1_0_4361,
MFPtoFP<XTL::EmuThis>(XTL::EmuThis::Emuioctlsocket),
#ifdef _DEBUG_TRACE
"Emuioctlsocket"
#endif
},
// XNetGetEthernetLinkStatus
{
(OOVPA*)&XNetGetEthernetLinkStatus_1_0_5344,
XTL::EmuXNetGetEthernetLinkStatus,
#ifdef _DEBUG_TRACE
"EmuXNetGetEthernetLinkStatus"
#endif
},
// CXo::XOnlineLogon (XREF)
{
(OOVPA*)&CXo_XOnlineLogon_1_0_5344,
0,
#ifdef _DEBUG_TRACE
"CXo::XOnlineLogon (XREF) (5344)"
#endif
},
// XOnlineLogon
{
(OOVPA*)&XOnlineLogon_1_0_5344,
XTL::EmuXOnlineLogon,
#ifdef _DEBUG_TRACE
"EmuXOnlineLogon (5344)"
#endif
},
};
// ******************************************************************
// * XOnline_1_0_5233_SIZE
// ******************************************************************
uint32 XOnline_1_0_5233_SIZE = sizeof(XOnline_1_0_5233);

View File

@ -190,7 +190,39 @@ SOOVPA<8> XACT_CEngine_RegisterStreamedWaveBank_1_0_4627 =
};
// ******************************************************************
// * IXACTEngine_RegisterStreamedWaveBank
// * XACT::CEngine::RegisterStreamedWaveBank
// ******************************************************************
SOOVPA<13> XACT_CEngine_RegisterStreamedWaveBank_1_0_4928 =
{
0, // Large == 0
13, // Count == 13
XREF_XACT_CEngine_RegisterStreamedWaveBank, // Xref Is Saved
0, // Xref Not Used
{
// XACT_CEngine_RegisterStreamedWaveBank+0x07 : push 0x7C
{ 0x07, 0x6A }, // (Offset,Value)-Pair #1
{ 0x08, 0x7C }, // (Offset,Value)-Pair #2
// XACT_CEngine_RegisterStreamedWaveBank+0x30 : add esi, 0x8007000E
{ 0x30, 0x81 }, // (Offset,Value)-Pair #3
{ 0x31, 0xC7 }, // (Offset,Value)-Pair #4
{ 0x32, 0x0E }, // (Offset,Value)-Pair #5
{ 0x33, 0x00 }, // (Offset,Value)-Pair #6
{ 0x34, 0x07 }, // (Offset,Value)-Pair #7
{ 0x35, 0x80 }, // (Offset,Value)-Pair #8
// XACT_CEngine_RegisterStreamedWaveBank+0x50 : add ecx, 0x44
{ 0x50, 0x83 }, // (Offset,Value)-Pair #9
{ 0x51, 0xC1 }, // (Offset,Value)-Pair #10
{ 0x52, 0x44 }, // (Offset,Value)-Pair #11
// XACT_CEngine_RegisterStreamedWaveBank+0x71 : retn 0x0C
{ 0x71, 0xC2 }, // (Offset,Value)-Pair #12
{ 0x72, 0x0C }, // (Offset,Value)-Pair #13
}
};
// ******************************************************************
// * IXACTEngine_RegisterStreamedWaveBank
// ******************************************************************
SOOVPA<9> IXACTEngine_RegisterStreamedWaveBank_1_0_4627 =
{
@ -214,6 +246,36 @@ SOOVPA<9> IXACTEngine_RegisterStreamedWaveBank_1_0_4627 =
}
};
// ******************************************************************
// * IXACTEngine_RegisterStreamedWaveBank
// ******************************************************************
SOOVPA<10> IXACTEngine_RegisterStreamedWaveBank_1_0_4928 =
{
0, // Large == 0
10, // Count == 10
-1, // Xref Not Saved
1, // Xref Is Used
{
// IXACTEngine_RegisterStreamedWaveBank+0x22 : call XACT::CEngine::RegisterStreamedWaveBank
{ 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 },
}
};
// ******************************************************************
// * XACT::CEngine::CreateSoundBank
// ******************************************************************
@ -237,6 +299,38 @@ SOOVPA<8> XACT_CEngine_CreateSoundBank_1_0_4627 =
}
};
// ******************************************************************
// * XACT::CEngine::CreateSoundBank
// ******************************************************************
SOOVPA<13> XACT_CEngine_CreateSoundBank_1_0_4928 =
{
0, // Large == 0
13, // Count == 13
XREF_XACT_CEngine_CreateSoundBank, // Xref Is Saved
0, // Xref Not Used
{
// XACT::CEngine::CreateSoundBank+0x02 : push 0x34
{ 0x02, 0x6A }, // (Offset,Value)-Pair #1
{ 0x03, 0x34 }, // (Offset,Value)-Pair #2
// XACT::CEngine::CreateSoundBank+0x2B : add edi, 0x8007000E
{ 0x2B, 0x81 }, // (Offset,Value)-Pair #3
{ 0x2C, 0xC7 }, // (Offset,Value)-Pair #4
{ 0x2D, 0x0E }, // (Offset,Value)-Pair #5
{ 0x2E, 0x00 }, // (Offset,Value)-Pair #6
{ 0x2F, 0x07 }, // (Offset,Value)-Pair #7
{ 0x30, 0x80 }, // (Offset,Value)-Pair #8
// XACT::CEngine::CreateSoundBank+0x4F : add ecx, 0x4C
{ 0x4F, 0x83 }, // (Offset,Value)-Pair #9
{ 0x50, 0xC1 }, // (Offset,Value)-Pair #10
{ 0x51, 0x4C }, // (Offset,Value)-Pair #11
// XACT::CEngine::CreateSoundBank+0x73 : retn 0x10
{ 0x73, 0xC2 }, // (Offset,Value)-Pair #12
{ 0x74, 0x10 }, // (Offset,Value)-Pair #13
}
};
// ******************************************************************
// * IXACTEngine_CreateSoundBank
// ******************************************************************
@ -261,6 +355,35 @@ SOOVPA<8> IXACTEngine_CreateSoundBank_1_0_4627 =
}
};
// ******************************************************************
// * IXACTEngine_CreateSoundBank
// ******************************************************************
SOOVPA<10> IXACTEngine_CreateSoundBank_1_0_4928 =
{
0, // Large == 0
10, // Count == 10
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 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 },
}
};
// ******************************************************************
// * XACT::CEngine::DownloadEffectsImage
// ******************************************************************
@ -404,7 +527,7 @@ SOOVPA<9> IXACTSoundBank_GetSoundCueIndexFromFriendlyName_1_0_4627 =
};
// ******************************************************************
// * IXACTSoundBank_Play@20
// * IXACTSoundBank_Play
// ******************************************************************
SOOVPA<8> IXACTSoundBank_Play_1_0_4627 =
{
@ -426,6 +549,199 @@ SOOVPA<8> IXACTSoundBank_Play_1_0_4627 =
}
};
// ******************************************************************
// * XACT::CEngine::RegisterNotification
// ******************************************************************
SOOVPA<7> XACT_CEngine_RegisterNotification_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
XREF_XACT_CEngine_RegisterNotification, // Xref Is Saved
0, // Xref Not Used
{
{ 0x07, 0x8B },
{ 0x0C, 0x01 },
{ 0x13, 0xF0 },
{ 0x1A, 0xF6 },
{ 0x24, 0xFF },
{ 0x2A, 0x8B },
{ 0x2F, 0x08 },
}
};
// ******************************************************************
// * IXACTEngine_RegisterNotification
// ******************************************************************
SOOVPA<8> IXACTEngine_RegisterNotification_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 0x15, XREF_XACT_CEngine_RegisterNotification },
{ 0x02, 0x24 },
{ 0x06, 0x24 },
{ 0x0A, 0x83 },
{ 0x0E, 0xD9 },
{ 0x12, 0xC8 },
{ 0x19, 0xC2 },
{ 0x1A, 0x08 },
}
};
// ******************************************************************
// * XACT::CEngine::GetNotification
// ******************************************************************
SOOVPA<8> XACT_CEngine_GetNotification_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
XREF_XACT_CEngine_GetNotification, // Xref Is Saved
0, // Xref Not Used
{
{ 0x11, 0x8D },
{ 0x24, 0x5A },
{ 0x37, 0xC0 },
{ 0x4A, 0x8B },
{ 0x5D, 0x04 },
{ 0x74, 0x8B },
{ 0x83, 0x40 },
{ 0x96, 0x0C },
}
};
// ******************************************************************
// * IXACTEngine_GetNotification
// ******************************************************************
SOOVPA<9> IXACTEngine_GetNotification_1_0_4627 =
{
0, // Large == 0
9, // Count == 9
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 0x19, XREF_XACT_CEngine_GetNotification },
{ 0x02, 0x24 },
{ 0x06, 0x24 },
{ 0x0A, 0xFF },
{ 0x0E, 0x83 },
{ 0x12, 0xD9 },
{ 0x16, 0xC8 },
{ 0x1D, 0xC2 },
{ 0x1E, 0x0C },
}
};
// ******************************************************************
// * XACT::CEngine::UnRegisterWaveBank
// ******************************************************************
SOOVPA<8> XACT_CEngine_UnRegisterWaveBank_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
XREF_XACT_CEngine_UnRegisterWaveBank, // Xref Is Saved
0, // Xref Not Used
{
{ 0x07, 0x8B },
{ 0x10, 0x58 },
{ 0x19, 0x8B },
{ 0x22, 0x89 },
{ 0x2C, 0x8B },
{ 0x34, 0x5F },
{ 0x3D, 0xFF },
{ 0x46, 0x08 },
}
};
// ******************************************************************
// * XACT::CEngine::UnRegisterWaveBank
// ******************************************************************
SOOVPA<8> XACT_CEngine_UnRegisterWaveBank_1_0_4928 =
{
0, // Large == 0
8, // Count == 8
XREF_XACT_CEngine_UnRegisterWaveBank, // Xref Is Saved
0, // Xref Not Used
{
// 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 },
}
};
// ******************************************************************
// * IXACTEngine_UnRegisterWaveBank
// ******************************************************************
SOOVPA<8> IXACTEngine_UnRegisterWaveBank_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
1, // Xref Is Used
{
{ 0x15, XREF_XACT_CEngine_UnRegisterWaveBank },
{ 0x02, 0x24 },
{ 0x06, 0x24 },
{ 0x0A, 0x83 },
{ 0x0E, 0xD9 },
{ 0x12, 0xC8 },
{ 0x19, 0xC2 },
{ 0x1A, 0x08 },
}
};
// ******************************************************************
// * IXACTEngine_UnRegisterWaveBank
// ******************************************************************
SOOVPA<8> IXACTEngine_UnRegisterWaveBank_1_0_4928 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
1, // Xref Is Used
{
// IXACTEngine_UnRegisterWaveBank+0x1E : call XACT::CEngine::UnRegisterWaveBank
{ 0x1F, XREF_XACT_CEngine_UnRegisterWaveBank },
{ 0x07, 0xFF },
{ 0x0E, 0x8B },
{ 0x16, 0xF8 },
{ 0x1E, 0xE8 },
{ 0x26, 0xF8 },
{ 0x2E, 0xFF },
{ 0x36, 0x5F },
}
};
// ******************************************************************
// * XactEng_1_0_4627
// ******************************************************************
@ -486,6 +802,14 @@ OOVPATable XactEng_1_0_4627[] =
#ifdef _DEBUG_TRACE
"XACT::CEngine::RegisterStreamedWaveBank (XREF)"
#endif
},
// XACT::CEngine::RegisterStreamedWaveBank (XREF)
{
(OOVPA*)&XACT_CEngine_RegisterStreamedWaveBank_1_0_4928, 0,
#ifdef _DEBUG_TRACE
"XACT::CEngine::RegisterStreamedWaveBank_4928 (XREF)"
#endif
},
// IXACTEngine_RegisterStreamedWaveBank
{
@ -493,7 +817,16 @@ OOVPATable XactEng_1_0_4627[] =
XTL::EmuIXACTEngine_RegisterStreamedWaveBank,
#ifdef _DEBUG_TRACE
"IXACTEngine_RegisterStreamedWaveBank"
"EmuIXACTEngine_RegisterStreamedWaveBank"
#endif
},
// IXACTEngine_RegisterStreamedWaveBank
{
(OOVPA*)&IXACTEngine_RegisterStreamedWaveBank_1_0_4928,
XTL::EmuIXACTEngine_RegisterStreamedWaveBank,
#ifdef _DEBUG_TRACE
"EmuIXACTEngine_RegisterStreamedWaveBank_4928"
#endif
},
// XACT::CEngine::CreateSoundBank (XREF)
@ -503,6 +836,14 @@ OOVPATable XactEng_1_0_4627[] =
#ifdef _DEBUG_TRACE
"XACT::CEngine::CreateSoundBank (XREF)"
#endif
},
// XACT::CEngine::CreateSoundBank (XREF)
{
(OOVPA*)&XACT_CEngine_CreateSoundBank_1_0_4928, 0,
#ifdef _DEBUG_TRACE
"XACT::CEngine::CreateSoundBank_4928 (XREF)"
#endif
},
// IXACTEngine_CreateSoundBank
{
@ -510,7 +851,16 @@ OOVPATable XactEng_1_0_4627[] =
XTL::EmuIXACTEngine_CreateSoundBank,
#ifdef _DEBUG_TRACE
"IXACTEngine_CreateSoundBank"
"EmuIXACTEngine_CreateSoundBank"
#endif
},
// IXACTEngine_CreateSoundBank
{
(OOVPA*)&IXACTEngine_CreateSoundBank_1_0_4928,
XTL::EmuIXACTEngine_CreateSoundBank,
#ifdef _DEBUG_TRACE
"EmuIXACTEngine_CreateSoundBank_4928"
#endif
},
// XACT::CEngine::DownloadEffectsImage (XREF)
@ -528,7 +878,7 @@ OOVPATable XactEng_1_0_4627[] =
XTL::EmuIXACTEngine_DownloadEffectsImage,
#ifdef _DEBUG_TRACE
"IXACTEngine_DownloadEffectsImage"
"EmuIXACTEngine_DownloadEffectsImage"
#endif
},
// XACT::CEngine::CreateSoundSource (XREF)
@ -546,7 +896,7 @@ OOVPATable XactEng_1_0_4627[] =
XTL::EmuIXACTEngine_CreateSoundSource,
#ifdef _DEBUG_TRACE
"IXACTEngine_CreateSoundSource"
"EmuIXACTEngine_CreateSoundSource"
#endif
},
// XACT::CSoundBank::GetSoundCueIndexFromFriendlyName (XREF)
@ -564,7 +914,7 @@ OOVPATable XactEng_1_0_4627[] =
XTL::EmuIXACTSoundBank_GetSoundCueIndexFromFriendlyName,
#ifdef _DEBUG_TRACE
"IXACTSoundBank_GetSoundCueIndexFromFriendlyName"
"EmuIXACTSoundBank_GetSoundCueIndexFromFriendlyName"
#endif
},
// IXACTSoundBank_Play
@ -573,7 +923,79 @@ OOVPATable XactEng_1_0_4627[] =
XTL::EmuIXACTSoundBank_Play,
#ifdef _DEBUG_TRACE
"IXACTSoundBank_Play"
"EmuIXACTSoundBank_Play"
#endif
},
// XACT::CEngine::RegisterNotification
{
(OOVPA*)&XACT_CEngine_RegisterNotification_1_0_4627, 0,
#ifdef _DEBUG_TRACE
"XACT::CEngine::RegisterNotification (XREF)"
#endif
},
// IXACTEngine_RegisterNotification
{
(OOVPA*)&IXACTEngine_RegisterNotification_1_0_4627,
XTL::EmuIXACTEngine_RegisterNotification,
#ifdef _DEBUG_TRACE
"EmuIXACTEngine_RegisterNotification (XREF)"
#endif
},
// XACT::CEngine::GetNotification
{
(OOVPA*)&XACT_CEngine_GetNotification_1_0_4627,
0,
#ifdef _DEBUG_TRACE
"XACT::CEngine::GetNotification (XREF)"
#endif
},
// IXACTEngine_GetNotification
{
(OOVPA*)&IXACTEngine_GetNotification_1_0_4627,
XTL::EmuIXACTEngine_GetNotification,
#ifdef _DEBUG_TRACE
"EmuIXACTEngine_GetNotification"
#endif
},
// XACT::CEngine::UnRegisterWaveBank (XREF)
{
(OOVPA*)&XACT_CEngine_UnRegisterWaveBank_1_0_4627,
0,
#ifdef _DEBUG_TRACE
"XACT::CEngine::UnRegisterWaveBank (XREF)"
#endif
},
// XACT::CEngine::UnRegisterWaveBank (XREF)
{
(OOVPA*)&XACT_CEngine_UnRegisterWaveBank_1_0_4928,
0,
#ifdef _DEBUG_TRACE
"XACT::CEngine::UnRegisterWaveBank_4928 (XREF)"
#endif
},
// IXACTEngine_UnRegisterWaveBank
{
(OOVPA*)&IXACTEngine_UnRegisterWaveBank_1_0_4627,
XTL::EmuIXACTEngine_UnRegisterWaveBank,
#ifdef _DEBUG_TRACE
"IXACTEngine_UnRegisterWaveBank"
#endif
},
// IXACTEngine_UnRegisterWaveBank
{
(OOVPA*)&IXACTEngine_UnRegisterWaveBank_1_0_4928,
XTL::EmuIXACTEngine_UnRegisterWaveBank,
#ifdef _DEBUG_TRACE
"IXACTEngine_UnRegisterWaveBank_4928"
#endif
},
};

View File

@ -1053,6 +1053,81 @@ SOOVPA<11> XFreeSectionA_1_0_3911 =
}
};
// ******************************************************************
// * SignalObjectAndWait
// ******************************************************************
SOOVPA<8> SignalObjectAndWait_1_0_3911 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0x75 },
{ 0x12, 0x8B },
{ 0x19, 0x01 },
{ 0x26, 0x85 },
{ 0x2B, 0x7D },
{ 0x34, 0x00 },
{ 0x3F, 0x83 },
{ 0x46, 0x00 },
}
};
// ******************************************************************
// * PulseEvent
// ******************************************************************
SOOVPA<11> PulseEvent_1_0_3911 =
{
0, // Large == 0
11, // Count == 11
-1, // Xref Not Saved
0, // Xref Not Used
{
// PulseEvent+0x00 : push 0
{ 0x00, 0x6A },
{ 0x01, 0x00 },
// PulseEvent+0x02 : push [esp+8]
{ 0x02, 0xFF },
{ 0x03, 0x74 },
{ 0x04, 0x24 },
{ 0x05, 0x08 },
// PulseEvent+0x06 : call ds:NtPulseEvent
{ 0x06, 0xFF },
{ 0x07, 0x15 },
{ 0x08, 0x54 },
// PulseEvent+0x12 : test eax, eax
{ 0x0C, 0x85 },
{ 0x0D, 0xC0 },
}
};
// ******************************************************************
// * QueueUserAPC
// ******************************************************************
SOOVPA<7> QueueUserAPC_1_0_3911 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x03, 0x74 },
{ 0x08, 0x24 },
{ 0x0F, 0xFF },
{ 0x12, 0x18 },
{ 0x19, 0x33 },
{ 0x1C, 0xC0 },
{ 0x21, 0xC1 },
}
};
// ******************************************************************
// * XAPI_1_0_3911
// ******************************************************************
@ -1378,6 +1453,36 @@ OOVPATable XAPI_1_0_3911[] =
"EmuXFreeSectionA"
#endif
},
// SignalObjectAndWait
{
(OOVPA*)&SignalObjectAndWait_1_0_3911,
XTL::EmuSignalObjectAndWait,
#ifdef _DEBUG_TRACE
"EmuSignalObjectAndWait"
#endif
},
// PulseEvent
{
(OOVPA*)&PulseEvent_1_0_3911,
XTL::EmuPulseEvent,
#ifdef _DEBUG_TRACE
"EmuPulseEvent"
#endif
},
// QueueUserAPC
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
};
// ******************************************************************

View File

@ -360,6 +360,26 @@ OOVPATable XAPI_1_0_4034[] =
"EmuSetThreadPriority"
#endif
},
// SignalObjectAndWait (* unchanged since 3911 *)
{
(OOVPA*)&SignalObjectAndWait_1_0_3911,
XTL::EmuSignalObjectAndWait,
#ifdef _DEBUG_TRACE
"EmuSignalObjectAndWait"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
};
// ******************************************************************

View File

@ -174,6 +174,238 @@ SOOVPA<10> XMountUtilityDrive_1_0_4134 =
}
};
// ******************************************************************
// * QueryPerformanceCounter
// ******************************************************************
SOOVPA<12> QueryPerformanceCounter_1_0_4134 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// QueryPerformanceCounter+0x04 : rdtsc
{ 0x04, 0x0F }, // (Offset,Value)-Pair #1
{ 0x05, 0x31 }, // (Offset,Value)-Pair #2
// QueryPerformanceCounter+0x06 : mov [ecx], eax
{ 0x06, 0x89 }, // (Offset,Value)-Pair #3
{ 0x07, 0x01 }, // (Offset,Value)-Pair #4
// QueryPerformanceCounter+0x08 : mov [ecx+4], eax
{ 0x08, 0x89 }, // (Offset,Value)-Pair #5
{ 0x09, 0x51 }, // (Offset,Value)-Pair #6
{ 0x0A, 0x04 }, // (Offset,Value)-Pair #7
// QueryPerformanceCounter+0x0B : xor eax, eax
{ 0x0B, 0x33 }, // (Offset,Value)-Pair #8
{ 0x0C, 0xC0 }, // (Offset,Value)-Pair #9
// QueryPerformanceCounter+0x0D : inc eax
{ 0x0D, 0x40 }, // (Offset,Value)-Pair #10
// QueryPerformanceCounter+0x0E : retn 0x04
{ 0x0E, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x0F, 0x04 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * QueryPerformanceFrequency
// ******************************************************************
SOOVPA<15> QueryPerformanceFrequency_1_0_4134 =
{
0, // Large == 0
15, // Count == 15
-1, // XRef Not Saved
0, // XRef Not Used
{
// QueryPerformanceFrequency+0x04 : and dword ptr [eax+4], 0
{ 0x04, 0x83 }, // (Offset,Value)-Pair #1
{ 0x05, 0x60 }, // (Offset,Value)-Pair #2
{ 0x06, 0x04 }, // (Offset,Value)-Pair #3
{ 0x07, 0x00 }, // (Offset,Value)-Pair #4
// QueryPerformanceFrequency+0x06 : mov dword ptr [eax], 0x2BB5C755
{ 0x08, 0xC7 }, // (Offset,Value)-Pair #5
{ 0x09, 0x00 }, // (Offset,Value)-Pair #6
{ 0x0A, 0x55 }, // (Offset,Value)-Pair #7
{ 0x0B, 0xC7 }, // (Offset,Value)-Pair #8
{ 0x0C, 0xB5 }, // (Offset,Value)-Pair #9
{ 0x0D, 0x2B }, // (Offset,Value)-Pair #10
// QueryPerformanceFrequency+0x0E : xor eax, eax
{ 0x0E, 0x33 }, // (Offset,Value)-Pair #11
{ 0x0F, 0xC0 }, // (Offset,Value)-Pair #12
// QueryPerformanceFrequency+0x10 : inc eax
{ 0x10, 0x40 }, // (Offset,Value)-Pair #13
// QueryPerformanceFrequency+0x11 : retn 0x04
{ 0x11, 0xC2 }, // (Offset,Value)-Pair #14
{ 0x12, 0x04 }, // (Offset,Value)-Pair #15
}
};
// ******************************************************************
// * XInputPoll
// ******************************************************************
SOOVPA<10> XInputPoll_1_0_4134 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Is Used
{
{ 0x16, 0xF6 }, // (Offset,Value)-Pair #1
{ 0x17, 0x41 }, // (Offset,Value)-Pair #2
{ 0x18, 0x04 }, // (Offset,Value)-Pair #3
{ 0x19, 0x02 }, // (Offset,Value)-Pair #4
{ 0x25, 0x39 }, // (Offset,Value)-Pair #5
{ 0x26, 0x70 }, // (Offset,Value)-Pair #6
{ 0x27, 0x04 }, // (Offset,Value)-Pair #7
{ 0x3A, 0x83 }, // (Offset,Value)-Pair #8
{ 0x3B, 0xC0 }, // (Offset,Value)-Pair #9
{ 0x3C, 0x52 }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * XGetSectionHandleA
// ******************************************************************
SOOVPA<13> XGetSectionHandleA_1_0_4134 =
{
0, // Large == 0
13, // Count == 0
-1, // XRef not saved
0, // XRef not used
{
// XGetSectionaHandleA+0x03 : sub esp, 0x10
{ 0x03, 0x83 },
{ 0x04, 0xEC },
{ 0x05, 0x10 },
// XGetSectionaHandleA+0x24 : imul esi, 0x38
{ 0x24, 0x6B },
{ 0x25, 0xF6 },
{ 0x26, 0x38 },
// XGetSectionaHandleA+0x4F : push 0x490
{ 0x4F, 0x68 },
{ 0x50, 0x90 },
{ 0x51, 0x04 },
{ 0x52, 0x00 },
{ 0x53, 0x00 },
// XGetSectionaHandleA+0x60 : retn 4
{ 0x60, 0xC2 },
{ 0x61, 0x04 }
}
};
// ******************************************************************
// * XLoadSectionByHandle
// ******************************************************************
SOOVPA<11> XLoadSectionByHandle_1_0_4134 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef not saved
0, // XRef not used
{
// XLoadSectionByHandle+0x01 : mov esi, [esp+4+arg_0]
{ 0x01, 0x8B },
{ 0x02, 0x74 },
{ 0x03, 0x24 },
{ 0x04, 0x08 },
// XLoadSectionByHandle+0x0C : test eax, eax
{ 0x0C, 0x85 },
{ 0x0D, 0xC0 },
// XLoadSectionByHandle+0x1A : mov eax, [esi+4]
{ 0x1A, 0x8B },
{ 0x1B, 0x46 },
{ 0x1C, 0x04 },
// XLoadSectionByHandle+0x1E : retn 4
{ 0x1E, 0xC2 },
{ 0x1F, 0x04 }
}
};
// ******************************************************************
// * XFreeSectionByHandle
// ******************************************************************
SOOVPA<11> XFreeSectionByHandle_1_0_4134 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef not saved
0, // XRef not used
{
// XFreeSectionByHandle+0x00 : push esp
{ 0x00, 0xFF },
{ 0x01, 0x74 },
{ 0x02, 0x24 },
{ 0x03, 0x04 },
// XFreeSectionByHandle+0x0A : test eax, eax
{ 0x0A, 0x85 },
{ 0x0B, 0xC0 },
// XFreeSectionByHandle+0x18 : xor eax, eax
{ 0x18, 0x33 },
{ 0x19, 0xC0 },
// XFreeSectionByHandle+0x1A : inc eax
{ 0x1A, 0x40 },
// XFreeSectionByHandle+0x1B : retn 4
{ 0x1B, 0xC2 },
{ 0x1C, 0x04 }
}
};
// ******************************************************************
// * RtlDestroyHeap
// ******************************************************************
SOOVPA<8> RtlDestroyHeap_1_0_4134 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x10, 0x56 },
{ 0x22, 0x75 },
{ 0x34, 0xE0 },
{ 0x46, 0x67 },
{ 0x58, 0x75 },
{ 0x6A, 0xE0 },
{ 0x7C, 0x06 },
{ 0x8E, 0x00 },
}
};
// ******************************************************************
// * XAPI_1_0_4134
// ******************************************************************
@ -321,6 +553,237 @@ OOVPATable XAPI_1_0_4134[] =
"GetTimeZoneInformation"
#endif
},
// RtlCreateHeap (* unchanged since 3911 *)
{
(OOVPA*)&RtlCreateHeap_1_0_3911,
XTL::EmuRtlCreateHeap,
#ifdef _DEBUG_TRACE
"EmuRtlCreateHeap"
#endif
},
// RtlAllocateHeap (* unchanged since 3911 *)
{
(OOVPA*)&RtlAllocateHeap_1_0_3911,
XTL::EmuRtlAllocateHeap,
#ifdef _DEBUG_TRACE
"EmuRtlAllocateHeap"
#endif
},
// RtlFreeHeap (* unchanged since 3911 *)
{
(OOVPA*)&RtlFreeHeap_1_0_3911,
XTL::EmuRtlFreeHeap,
#ifdef _DEBUG_TRACE
"EmuRtlFreeHeap"
#endif
},
//*
// RtlReAllocateHeap (* unchanged since 3911 *)
{
(OOVPA*)&RtlReAllocateHeap_1_0_3911,
XTL::EmuRtlReAllocateHeap,
#ifdef _DEBUG_TRACE
"EmuRtlReAllocateHeap"
#endif
},
//*/
//*
// RtlSizeHeap (* unchanged since 3911 *)
{
(OOVPA*)&RtlSizeHeap_1_0_3911,
XTL::EmuRtlSizeHeap,
#ifdef _DEBUG_TRACE
"EmuRtlSizeHeap"
#endif
},
// XapiBootToDash (* unchanged since 3911 *)
{
(OOVPA*)&XapiBootDash_1_0_3911,
XTL::EmuXapiBootDash,
#ifdef _DEBUG_TRACE
"EmuXapiBootDash"
#endif
},
// XRegisterThreadNotifyRoutine (* unchanged since 3911 *)
{
(OOVPA*)&XRegisterThreadNotifyRoutine_1_0_3911,
XTL::EmuXRegisterThreadNotifyRoutine,
#ifdef _DEBUG_TRACE
"EmuXRegisterThreadNotifyRoutine"
#endif
},
// XGetDeviceChanges (* unchanged since 3911 *)
{
(OOVPA*)&XGetDeviceChanges_1_0_3911,
XTL::EmuXGetDeviceChanges,
#ifdef _DEBUG_TRACE
"EmuXGetDeviceChanges"
#endif
},
// XID_fCloseDevice (* unchanged since 3911 *)
{
(OOVPA*)&XID_fCloseDevice_1_0_3911, 0,
#ifdef _DEBUG_TRACE
"XID_fCloseDevice (XREF)"
#endif
},
// XInputClose (* unchanged since 3911 *)
{
(OOVPA*)&XInputClose_1_0_3911,
XTL::EmuXInputClose,
#ifdef _DEBUG_TRACE
"EmuXInputClose"
#endif
},
// XInputGetCapabilities (* unchanged since 3911 *)
{
(OOVPA*)&XInputGetCapabilities_1_0_3911,
XTL::EmuXInputGetCapabilities,
#ifdef _DEBUG_TRACE
"EmuXInputGetCapabilities"
#endif
},
// GetThreadPriority (* unchanged since 3911 *)
{
(OOVPA*)&GetThreadPriority_1_0_3911,
XTL::EmuGetThreadPriority,
#ifdef _DEBUG_TRACE
"EmuGetThreadPriority"
#endif
},
// XGetDevices (* unchanged since 3911 *)
{
(OOVPA*)&XGetDevices_1_0_3911,
XTL::EmuXGetDevices,
#ifdef _DEBUG_TRACE
"EmuXGetDevices"
#endif
},
// QueryPerformanceCounter
{
(OOVPA*)&QueryPerformanceCounter_1_0_4134,
XTL::EmuQueryPerformanceCounter,
#ifdef _DEBUG_TRACE
"EmuQueryPerformanceCounter"
#endif
},
// QueryPerformanceFrequency
{
(OOVPA*)&QueryPerformanceFrequency_1_0_4134,
XTL::EmuQueryPerformanceFrequency,
#ifdef _DEBUG_TRACE
"EmuQueryPerformanceFrequency"
#endif
},
// XInputPoll
{
(OOVPA*)&XInputPoll_1_0_4134,
XTL::EmuXInputPoll,
#ifdef _DEBUG_TRACE
"EmuXInputPoll"
#endif
},
// XGetSectionHandleA
{
(OOVPA*)&XGetSectionHandleA_1_0_4134,
XTL::EmuXGetSectionHandleA,
#ifdef _DEBUG_TRACE
"EmuXGetSectionHandleA"
#endif
},
// XLoadSectionByHandle
{
(OOVPA*)&XLoadSectionByHandle_1_0_4134,
XTL::EmuXLoadSectionByHandle,
#ifdef _DEBUG_TRACE
"EmuXLoadSectionByHandle"
#endif
},
// XFreeSectionByHandle
{
(OOVPA*)&XFreeSectionByHandle_1_0_4134,
XTL::EmuXFreeSectionByHandle,
#ifdef _DEBUG_TRACE
"EmuXFreeSectionByHandle"
#endif
},
// RtlDestroyHeap
{
(OOVPA*)&RtlDestroyHeap_1_0_4134,
XTL::EmuRtlDestroyHeap,
#ifdef _DEBUG_TRACE
"EmuRtlDestroyHeap"
#endif
},
// SetThreadPriorityBoost (* unchanged since 3911 *)
{
(OOVPA*)&SetThreadPriorityBoost_1_0_3911,
XTL::EmuSetThreadPriorityBoost,
#ifdef _DEBUG_TRACE
"EmuSetThreadPriorityBoost"
#endif
},
// SignalObjectAndWait (* unchanged since 3911 *)
{
(OOVPA*)&SignalObjectAndWait_1_0_3911,
XTL::EmuSignalObjectAndWait,
#ifdef _DEBUG_TRACE
"EmuSignalObjectAndWait"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
};
// ******************************************************************

View File

@ -326,6 +326,42 @@ SOOVPA<12> XInputSetState_1_0_4361 =
}
};
// ******************************************************************
// * XInputSetState
// ******************************************************************
SOOVPA<12> XInputSetState_1_0_4928 =
{
0, // Large == 0
12, // Count == 12
-1, // XRef Not Saved
0, // XRef Not Used
{
// XInputSetState+0x04 : lea eax, [ecx+0x0A3]
{ 0x04, 0x8D }, // (Offset,Value)-Pair #1
{ 0x05, 0x81 }, // (Offset,Value)-Pair #2
{ 0x06, 0xA3 }, // (Offset,Value)-Pair #3
// XInputSetState+0x12 : push 0x57
{ 0x12, 0x6A }, // (Offset,Value)-Pair #4
{ 0x13, 0x57 }, // (Offset,Value)-Pair #5
// XInputSetState+0x15 : jmp +0x19
{ 0x15, 0xEB }, // (Offset,Value)-Pair #6
{ 0x16, 0x19 }, // (Offset,Value)-Pair #7
// XInputSetState+0x28 : mov [edx+0x41], al
{ 0x28, 0x88 }, // (Offset,Value)-Pair #8
{ 0x29, 0x42 }, // (Offset,Value)-Pair #9
{ 0x2A, 0x41 }, // (Offset,Value)-Pair #10
// XInputSetState+0x30 : retn 0x08
{ 0x30, 0xC2 }, // (Offset,Value)-Pair #11
{ 0x31, 0x08 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * CreateThread
// ******************************************************************
@ -515,6 +551,26 @@ OOVPATable XAPI_1_0_4361[] =
#ifdef _DEBUG_TRACE
"EmuRtlFreeHeap"
#endif
},
// RtlReAllocateHeap (* unchanged since 1.0.3911 *)
{
(OOVPA*)&RtlReAllocateHeap_1_0_3911,
XTL::EmuRtlReAllocateHeap,
#ifdef _DEBUG_TRACE
"EmuRtlReAllocateHeap"
#endif
},
// RtlSizeHeap (* unchanged since 1.0.3911 *)
{
(OOVPA*)&RtlSizeHeap_1_0_3911,
XTL::EmuRtlSizeHeap,
#ifdef _DEBUG_TRACE
"EmuRtlSizeHeap"
#endif
},
// QueryPerformanceCounter
{
@ -739,6 +795,36 @@ OOVPATable XAPI_1_0_4361[] =
"EmuGetExitCodeThread"
#endif
},
// SetThreadPriorityBoost (* unchanged since 3911 *)
{
(OOVPA*)&SetThreadPriorityBoost_1_0_3911,
XTL::EmuSetThreadPriorityBoost,
#ifdef _DEBUG_TRACE
"EmuSetThreadPriorityBoost"
#endif
},
// SignalObjectAndWait (* unchanged since 3911 *)
{
(OOVPA*)&SignalObjectAndWait_1_0_3911,
XTL::EmuSignalObjectAndWait,
#ifdef _DEBUG_TRACE
"EmuSignalObjectAndWait"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
};
// ******************************************************************

View File

@ -302,6 +302,46 @@ OOVPATable XAPI_1_0_4432[] =
"EmuSetThreadPriority"
#endif
},
// SignalObjectAndWait (* unchanged since 3911 *)
{
(OOVPA*)&SignalObjectAndWait_1_0_3911,
XTL::EmuSignalObjectAndWait,
#ifdef _DEBUG_TRACE
"EmuSignalObjectAndWait"
#endif
},
// CreateFiber (* unchanged since 3911 *)
{
(OOVPA*)&CreateFiber_1_0_3911,
XTL::EmuCreateFiber,
#ifdef _DEBUG_TRACE
"EmuCreateFiber"
#endif
},
// DeleteFiber (* unchanged since 3911 *)
{
(OOVPA*)&DeleteFiber_1_0_3911,
XTL::EmuDeleteFiber,
#ifdef _DEBUG_TRACE
"EmuDeleteFiber"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
};
// ******************************************************************

View File

@ -284,33 +284,6 @@ SOOVPA<8> XInputClose_1_0_4928 =
}
};
// ******************************************************************
// * XInputPoll
// ******************************************************************
SOOVPA<10> XInputPoll_1_0_4928 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Is Used
{
{ 0x16, 0xF6 }, // (Offset,Value)-Pair #1
{ 0x17, 0x41 }, // (Offset,Value)-Pair #2
{ 0x18, 0x04 }, // (Offset,Value)-Pair #3
{ 0x19, 0x02 }, // (Offset,Value)-Pair #4
{ 0x25, 0x39 }, // (Offset,Value)-Pair #5
{ 0x26, 0x70 }, // (Offset,Value)-Pair #6
{ 0x27, 0x04 }, // (Offset,Value)-Pair #7
{ 0x3A, 0x83 }, // (Offset,Value)-Pair #8
{ 0x3B, 0xC0 }, // (Offset,Value)-Pair #9
{ 0x3C, 0x52 }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * XInputGetState
// ******************************************************************
@ -519,108 +492,63 @@ SOOVPA<12> XInputGetCapabilities2_1_0_4831 =
};
// ******************************************************************
// * XLoadSectionByHandle
// * XInputGetCapabilities3
// ******************************************************************
SOOVPA<11> XLoadSectionByHandle_1_0_4627 =
SOOVPA<12> XInputGetCapabilities3_1_0_4831 =
{
0, // Large == 0
11, // Count == 11
0, // Large == 0
12, // Count == 12
-1, // XRef not saved
0, // XRef not used
-1, // XRef Not Saved
0, // XRef Not Used
{
// XLoadSectionByHandle+0x01 : mov esi, [esp+4+arg_0]
{ 0x01, 0x8B },
{ 0x02, 0x74 },
{ 0x03, 0x24 },
{ 0x04, 0x08 },
{
{ 0x0B, 0x8B }, // (Offset,Value)-Pair #1
{ 0x0C, 0x1D }, // (Offset,Value)-Pair #2
{ 0x0D, 0x14 }, // (Offset,Value)-Pair #3
// XLoadSectionByHandle+0x0C : test eax, eax
{ 0x0C, 0x85 },
{ 0x0D, 0xC0 },
{ 0x25, 0xF6 }, // (Offset,Value)-Pair #4
{ 0x26, 0x46 }, // (Offset,Value)-Pair #5
{ 0x27, 0x04 }, // (Offset,Value)-Pair #6
{ 0x28, 0x02 }, // (Offset,Value)-Pair #7
// XLoadSectionByHandle+0x1A : mov eax, [esi+4]
{ 0x1A, 0x8B },
{ 0x1B, 0x46 },
{ 0x1C, 0x04 },
// XLoadSectionByHandle+0x1E : retn 4
{ 0x1E, 0xC2 },
{ 0x1F, 0x04 }
}
};
// ******************************************************************
// * XFreeSectionByHandle
// ******************************************************************
SOOVPA<11> XFreeSectionByHandle_1_0_4627 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef not saved
0, // XRef not used
{
// XFreeSectionByHandle+0x00 : push esp
{ 0x00, 0xFF },
{ 0x01, 0x74 },
{ 0x02, 0x24 },
{ 0x03, 0x04 },
// XFreeSectionByHandle+0x0A : test eax, eax
{ 0x0A, 0x85 },
{ 0x0B, 0xC0 },
// XFreeSectionByHandle+0x18 : xor eax, eax
{ 0x18, 0x33 },
{ 0x19, 0xC0 },
// XFreeSectionByHandle+0x1A : inc eax
{ 0x1A, 0x40 },
// XFreeSectionByHandle+0x1B : retn 4
{ 0x1B, 0xC2 },
{ 0x1C, 0x04 }
}
{ 0x39, 0xF3 }, // (Offset,Value)-Pair #8
{ 0x3A, 0xAB }, // (Offset,Value)-Pair #9
{ 0xAF, 0xC7 }, // (Offset,Value)-Pair #10
{ 0xB0, 0x45 }, // (Offset,Value)-Pair #11
{ 0xB1, 0xE2 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
// * XGetSectionHandleA
// * XInputGetCapabilities4
// ******************************************************************
SOOVPA<13> XGetSectionHandleA_1_0_4627 =
SOOVPA<12> XInputGetCapabilities4_1_0_4831 =
{
0, // Large == 0
13, // Count == 0
0, // Large == 0
12, // Count == 12
-1, // XRef not saved
0, // XRef not used
-1, // XRef Not Saved
0, // XRef Not Used
{
// XGetSectionaHandleA+0x03 : sub esp, 0x10
{ 0x03, 0x83 },
{ 0x04, 0xEC },
{ 0x05, 0x10 },
{
{ 0x0B, 0x8B }, // (Offset,Value)-Pair #1
{ 0x0C, 0x1D }, // (Offset,Value)-Pair #2
{ 0x0D, 0x9C }, // (Offset,Value)-Pair #3
// XGetSectionaHandleA+0x24 : imul esi, 0x38
{ 0x24, 0x6B },
{ 0x25, 0xF6 },
{ 0x26, 0x38 },
{ 0x25, 0xF6 }, // (Offset,Value)-Pair #4
{ 0x26, 0x46 }, // (Offset,Value)-Pair #5
{ 0x27, 0x04 }, // (Offset,Value)-Pair #6
{ 0x28, 0x02 }, // (Offset,Value)-Pair #7
// XGetSectionaHandleA+0x4F : push 0x490
{ 0x4F, 0x68 },
{ 0x50, 0x90 },
{ 0x51, 0x04 },
{ 0x52, 0x00 },
{ 0x53, 0x00 },
{ 0x39, 0xF3 }, // (Offset,Value)-Pair #8
{ 0x3A, 0xAB }, // (Offset,Value)-Pair #9
// XGetSectionaHandleA+0x60 : retn 4
{ 0x60, 0xC2 },
{ 0x61, 0x04 }
}
{ 0xAF, 0xC7 }, // (Offset,Value)-Pair #10
{ 0xB0, 0x45 }, // (Offset,Value)-Pair #11
{ 0xB1, 0xE2 }, // (Offset,Value)-Pair #12
}
};
// ******************************************************************
@ -695,9 +623,31 @@ SOOVPA<11> XFreeSectionA_1_0_4627 =
};
// ******************************************************************
// * RtlDestroyHeap@4
// * GetOverlappedResult
// ******************************************************************
SOOVPA<8> RtlDestroyHeap_1_0_4627 =
SOOVPA<7> GetOverlappedResult_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0B, 0x75 },
{ 0x18, 0xC0 },
{ 0x27, 0xEB },
{ 0x32, 0x00 },
{ 0x3F, 0xEB },
{ 0x4C, 0x89 },
{ 0x59, 0x56 },
}
};
// ******************************************************************
// * XLaunchNewImageA
// ******************************************************************
SOOVPA<8> XLaunchNewImageA_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
@ -706,14 +656,178 @@ SOOVPA<8> RtlDestroyHeap_1_0_4627 =
0, // Xref Not Used
{
{ 0x10, 0x56 },
{ 0x22, 0x75 },
{ 0x34, 0xE0 },
{ 0x46, 0x67 },
{ 0x58, 0x75 },
{ 0x6A, 0xE0 },
{ 0x7C, 0x06 },
{ 0x8E, 0x00 },
{ 0x1E, 0x80 },
{ 0x3E, 0xC0 },
{ 0x5E, 0xFF },
{ 0x7E, 0xFC },
{ 0x9E, 0x08 },
{ 0xBE, 0x50 },
{ 0xDE, 0x05 },
{ 0xFE, 0x85 },
}
};
// ******************************************************************
// * XLaunchNewImageA
// ******************************************************************
SOOVPA<12> XLaunchNewImageA_1_0_4928 =
{
0, // Large == 0
12, // Count == 12
-1, // Xref Not Saved
0, // Xref Not Used
{
// XLaunchNewImageA+0x03 : sub esp, 0x384
{ 0x03, 0x81 },
{ 0x04, 0xEC },
{ 0x05, 0x84 },
{ 0x06, 0x03 },
{ 0x07, 0x00 },
{ 0x08, 0x00 },
// XLaunchNewImageA+0x33 : cmp al, 0x44
{ 0x33, 0x3C },
{ 0x34, 0x44 },
// XLaunchNewImageA+0x41 : cmp byte ptr [esi+1], 0x3A
{ 0x41, 0x80 },
{ 0x42, 0x7E },
{ 0x43, 0x02 },
{ 0x44, 0x5C },
}
};
// ******************************************************************
// * XGetLaunchInfo
// ******************************************************************
SOOVPA<7> XGetLaunchInfo_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0B, 0x8B },
{ 0x18, 0x15 },
{ 0x25, 0x8B },
{ 0x32, 0x30 },
{ 0x3F, 0x00 },
{ 0x4C, 0x83 },
{ 0x59, 0x5E },
}
};
// ******************************************************************
// * XSetProcessQuantumLength
// ******************************************************************
SOOVPA<7> XSetProcessQuantumLength_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x01, 0xA1 },
{ 0x04, 0x00 },
{ 0x07, 0x4C },
{ 0x0A, 0x8B },
{ 0x0D, 0x8D },
{ 0x10, 0x89 },
{ 0x13, 0xC2 },
}
};
// ******************************************************************
// * timeSetEvent
// ******************************************************************
SOOVPA<7> timeSetEvent_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x1E, 0x8D },
{ 0x3E, 0x89 },
{ 0x5E, 0x15 },
{ 0x7E, 0x3F },
{ 0x9E, 0x03 },
{ 0xBE, 0x32 },
{ 0xDE, 0x89 },
}
};
// ******************************************************************
// * timeKillEvent
// ******************************************************************
SOOVPA<8> timeKillEvent_1_0_4627 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0E, 0x8B },
{ 0x1A, 0xC2 },
{ 0x28, 0x8D },
{ 0x36, 0x56 },
{ 0x44, 0x00 },
{ 0x52, 0x00 },
{ 0x60, 0x5E },
{ 0x6E, 0x00 },
}
};
// ******************************************************************
// * RaiseException
// ******************************************************************
SOOVPA<7> RaiseException_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x09, 0x83 },
{ 0x14, 0x8B },
{ 0x1F, 0xC7 },
{ 0x2A, 0x10 },
{ 0x35, 0x89 },
{ 0x40, 0x5F },
{ 0x4B, 0xFF },
}
};
// ******************************************************************
// * VirtualProtect
// ******************************************************************
SOOVPA<7> VirtualProtect_1_0_4627 =
{
0, // Large == 0
7, // Count == 7
0/*XREF_VirtualProtect*/, // Xref Is Saved
0, // Xref Not Used
{
{ 0x04, 0x8D },
{ 0x0A, 0x24 },
{ 0x10, 0x10 },
{ 0x18, 0x85 },
{ 0x1C, 0x33 },
{ 0x22, 0xE8 },
{ 0x28, 0xC0 },
}
};
@ -902,9 +1016,9 @@ OOVPATable XAPI_1_0_4627[] =
"EmuXInputOpen"
#endif
},
// XInputPoll
// XInputPoll (* unchanged since 4134 *)
{
(OOVPA*)&XInputPoll_1_0_4928,
(OOVPA*)&XInputPoll_1_0_4134,
XTL::EmuXInputPoll,
@ -999,6 +1113,16 @@ OOVPATable XAPI_1_0_4627[] =
#ifdef _DEBUG_TRACE
"EmuXInputSetState"
#endif
},
// XInputSetState
{
(OOVPA*)&XInputSetState_1_0_4928,
XTL::EmuXInputSetState,
#ifdef _DEBUG_TRACE
"EmuXInputSetState (4928)"
#endif
},
/* obsolete?
// XapiThreadStartup (* unchanged since 1.0.4361 *)
@ -1064,9 +1188,29 @@ OOVPATable XAPI_1_0_4627[] =
"EmuXInputGetCapabilities2_4831"
#endif
},
// XGetSectionHandleA
// XInputGetCapabilities3
{
(OOVPA*)&XInputGetCapabilities3_1_0_4831,
XTL::EmuXInputGetCapabilities,
#ifdef _DEBUG_TRACE
"EmuXInputGetCapabilities3_4831"
#endif
},
// XInputGetCapabilities4
{
(OOVPA*)&XInputGetCapabilities4_1_0_4831,
XTL::EmuXInputGetCapabilities,
#ifdef _DEBUG_TRACE
"EmuXInputGetCapabilities4_4831"
#endif
},
// XGetSectionHandleA (* unchanged since 4134 *)
{
(OOVPA*)&XGetSectionHandleA_1_0_4627,
(OOVPA*)&XGetSectionHandleA_1_0_4134,
XTL::EmuXGetSectionHandleA,
@ -1074,9 +1218,9 @@ OOVPATable XAPI_1_0_4627[] =
"EmuXGetSectionHandleA"
#endif
},
// XLoadSectionByHandle
// XLoadSectionByHandle (* unchanged since 4134 *)
{
(OOVPA*)&XLoadSectionByHandle_1_0_4627,
(OOVPA*)&XLoadSectionByHandle_1_0_4134,
XTL::EmuXLoadSectionByHandle,
@ -1084,9 +1228,9 @@ OOVPATable XAPI_1_0_4627[] =
"EmuXLoadSectionByHandle"
#endif
},
// XFreeSectionByHandle
// XFreeSectionByHandle (* unchanged since 4134 *)
{
(OOVPA*)&XFreeSectionByHandle_1_0_4627,
(OOVPA*)&XFreeSectionByHandle_1_0_4134,
XTL::EmuXFreeSectionByHandle,
@ -1198,9 +1342,9 @@ OOVPATable XAPI_1_0_4627[] =
"EmuGetExitCodeThread"
#endif
},
// RtlFreeHeap
// RtlDestroyHeap (* unchanged since 4134 *)
{
(OOVPA*)&RtlDestroyHeap_1_0_4627,
(OOVPA*)&RtlDestroyHeap_1_0_4134,
XTL::EmuRtlDestroyHeap,
@ -1208,6 +1352,108 @@ OOVPATable XAPI_1_0_4627[] =
"EmuRtlDestroyHeap"
#endif
},
// GetOverlappedResult
{
(OOVPA*)&GetOverlappedResult_1_0_4627,
XTL::EmuGetOverlappedResult,
#ifdef _DEBUG_TRACE
"EmuGetOverlappedResult"
#endif
},
// XLaunchNewImageA
{
(OOVPA*)&XLaunchNewImageA_1_0_4627,
XTL::EmuXLaunchNewImage,
#ifdef _DEBUG_TRACE
"EmuXLaunchNewImageA"
#endif
},
// XLaunchNewImageA
{
(OOVPA*)&XLaunchNewImageA_1_0_4928,
XTL::EmuXLaunchNewImage,
#ifdef _DEBUG_TRACE
"EmuXLaunchNewImageA"
#endif
},
// XGetLaunchInfo
{
(OOVPA*)&XGetLaunchInfo_1_0_4627,
XTL::EmuXGetLaunchInfo,
#ifdef _DEBUG_TRACE
"EmuXGetLaunchInfo"
#endif
},
// XSetProcessQuantumLength
{
(OOVPA*)&XSetProcessQuantumLength_1_0_4627,
XTL::EmuXSetProcessQuantumLength,
#ifdef _DEBUG_TRACE
"EmuXSetProcessQuantumLength"
#endif
},
// SignalObjectAndWait (* unchanged since 3911 *)
{
(OOVPA*)&SignalObjectAndWait_1_0_3911,
XTL::EmuSignalObjectAndWait,
#ifdef _DEBUG_TRACE
"EmuSignalObjectAndWait"
#endif
},
// timeSetEvent
{
(OOVPA*)&timeSetEvent_1_0_4627,
XTL::EmutimeSetEvent,
#ifdef _DEBUG_TRACE
"EmutimeSetEvent"
#endif
},
// timeKillEvent
{
(OOVPA*)&timeKillEvent_1_0_4627,
XTL::EmutimeKillEvent,
#ifdef _DEBUG_TRACE
"EmutimeKillEvent"
#endif
},
// RaiseException
{
(OOVPA*)&RaiseException_1_0_4627,
XTL::EmuRaiseException,
#ifdef _DEBUG_TRACE
"EmuRaiseException"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
// VirtualProtect (* unchanged since 4627 *)
{
(OOVPA*)&VirtualProtect_1_0_4627,
XTL::EmuVirtualProtect,
#ifdef _DEBUG_TRACE
"VirtualProtect"
#endif
},
};
// ******************************************************************

View File

@ -83,6 +83,29 @@ SOOVPA<7> XapiInitProcess_1_0_5233 =
}
};
// ******************************************************************
// * XapiInitProcess
// ******************************************************************
SOOVPA<8> XapiInitProcess_1_0_5344 =
{
0, // Large == 0
8, // Count == 8
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x22, 0x6A },
{ 0x3E, 0x01 },
{ 0x5E, 0x7D },
{ 0x7E, 0x8B },
{ 0x9F, 0x68 },
{ 0xBE, 0x01 },
{ 0xDE, 0x6A },
{ 0xFE, 0x02 },
}
};
// ******************************************************************
// * XInitDevices
// ******************************************************************
@ -175,6 +198,27 @@ SOOVPA<7> XInputSetState_1_0_5233 =
}
};
// ******************************************************************
// * XGetFileCacheSize
// ******************************************************************
SOOVPA<6> XGetFileCacheSize_1_0_5344 =
{
0, // Large == 0
6, // Count == 6
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x00, 0xFF },
{ 0x01, 0x15 },
{ 0x06, 0xC1 },
{ 0x07, 0xE0 },
{ 0x08, 0x0C },
{ 0x09, 0xC3 },
}
};
// ******************************************************************
// * XAPI_1_0_5233
// ******************************************************************
@ -199,6 +243,16 @@ OOVPATable XAPI_1_0_5233[] =
#ifdef _DEBUG_TRACE
"EmuXapiInitProcess"
#endif
},
// XapiInitProcess
{
(OOVPA*)&XapiInitProcess_1_0_5344,
XTL::EmuXapiInitProcess,
#ifdef _DEBUG_TRACE
"EmuXapiInitProcess (5344)"
#endif
},
// GetTimeZoneInformation (* unchanged since 3911 *)
{
@ -418,6 +472,34 @@ OOVPATable XAPI_1_0_5233[] =
"EmuXapiBootDash"
#endif
},
// XGetFileCacheSize
{
(OOVPA*)&XGetFileCacheSize_1_0_5344,
XTL::EmuXGetFileCacheSize,
#ifdef _DEBUG_TRACE
"XGetFileCacheSize"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
// VirtualProtect (* unchanged since 4627 *)
{
(OOVPA*)&VirtualProtect_1_0_4627,
XTL::EmuVirtualProtect,
#ifdef _DEBUG_TRACE
"VirtualProtect"
#endif
},
};
// ******************************************************************

View File

@ -192,6 +192,116 @@ SOOVPA<8> XapiInitProcess_1_0_5659 =
}
};
// ******************************************************************
// * CreateSemaphoreA
// ******************************************************************
SOOVPA<7> CreateSemaphoreA_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0A, 0x74 },
{ 0x16, 0x50 },
{ 0x22, 0x10 },
{ 0x31, 0x85 },
{ 0x3A, 0x75 },
{ 0x4A, 0x8B },
{ 0x55, 0x33 },
}
};
// ******************************************************************
// * ReleaseSemaphore
// ******************************************************************
SOOVPA<7> ReleaseSemaphore_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x03, 0x0C },
{ 0x08, 0xFF },
{ 0x0D, 0x15 },
{ 0x12, 0x85 },
{ 0x17, 0xC0 },
{ 0x1C, 0xE8 },
{ 0x21, 0x33 },
}
};
// ******************************************************************
// * XLaunchNewImageA
// ******************************************************************
SOOVPA<7> XLaunchNewImageA_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0xF0 },
{ 0x10, 0xD2 },
{ 0x19, 0x19 },
{ 0x22, 0x52 },
{ 0x2B, 0xE8 },
{ 0x34, 0x6A },
{ 0x3D, 0x10 },
}
};
// ******************************************************************
// * XGetLaunchInfo
// ******************************************************************
SOOVPA<7> XGetLaunchInfo_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0B, 0x8B },
{ 0x18, 0x15 },
{ 0x25, 0x8B },
{ 0x32, 0x30 },
{ 0x3F, 0x00 },
{ 0x4C, 0x83 },
{ 0x59, 0x5E },
}
};
// ******************************************************************
// * GetFileAttributesA
// ******************************************************************
SOOVPA<7> GetFileAttributesA_1_0_5558 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x08, 0x08 },
{ 0x13, 0x8D },
{ 0x1C, 0x50 },
{ 0x26, 0xFF },
{ 0x30, 0x15 },
{ 0x3A, 0x45 },
{ 0x44, 0x83 },
}
};
// ******************************************************************
// * XAPI_1_0_5558
// ******************************************************************
@ -409,6 +519,72 @@ OOVPATable XAPI_1_0_5558[] =
"EmuXapiBootDash"
#endif
},
// CreateSemaphore
{
(OOVPA*)&CreateSemaphoreA_1_0_5558,
XTL::EmuCreateSemaphore,
#ifdef _DEBUG_TRACE
"EmuCreateSemaphoreA"
#endif
},
// ReleaseSemaphore
{
(OOVPA*)&ReleaseSemaphore_1_0_5558,
XTL::EmuReleaseSemaphore,
#ifdef _DEBUG_TRACE
"EmuReleaseSemaphore"
#endif
},
// XLaunchNewImageA
{
(OOVPA*)&XLaunchNewImageA_1_0_5558,
XTL::EmuXLaunchNewImage,
#ifdef _DEBUG_TRACE
"XLaunchNewImageA"
#endif
},
// XGetLaunchInfo
{
(OOVPA*)&XGetLaunchInfo_1_0_5558,
XTL::EmuXGetLaunchInfo,
#ifdef _DEBUG_TRACE
"XGetLaunchInfo"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
// GetFileAttributesA
{
(OOVPA*)&GetFileAttributesA_1_0_5558,
XTL::EmuGetFileAttributesA,
#ifdef _DEBUG_TRACE
"GetFileAttributesA"
#endif
},
// VirtualProtect (* unchanged since 4627 *)
{
(OOVPA*)&VirtualProtect_1_0_4627,
XTL::EmuVirtualProtect,
#ifdef _DEBUG_TRACE
"VirtualProtect"
#endif
},
};
// ******************************************************************

View File

@ -77,6 +77,92 @@ SOOVPA<7> XGetDeviceChanges_1_0_5849 =
}
};
// ******************************************************************
// * GetThreadPriority
// ******************************************************************
SOOVPA<7> GetThreadPriority_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x0D, 0xFF },
{ 0x16, 0x85 },
{ 0x1F, 0x15 },
{ 0x2A, 0x04 },
{ 0x35, 0xF1 },
{ 0x40, 0x8B },
{ 0x4B, 0xB8 },
}
};
// ******************************************************************
// * SetThreadPriorityBoost
// ******************************************************************
SOOVPA<7> SetThreadPriorityBoost_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x07, 0xFF },
{ 0x10, 0xFF },
{ 0x19, 0x20 },
{ 0x22, 0x50 },
{ 0x2C, 0x8B },
{ 0x35, 0x33 },
{ 0x40, 0x33 },
}
};
// ******************************************************************
// * XGetSectionSize
// ******************************************************************
SOOVPA<5> XGetSectionSize_1_0_5849 =
{
0, // Large == 0
5, // Count == 5
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x00, 0x8B },
{ 0x02, 0x24 },
{ 0x04, 0x8B },
{ 0x06, 0x08 },
{ 0x08, 0x04 },
}
};
// ******************************************************************
// * RaiseException
// ******************************************************************
SOOVPA<7> RaiseException_1_0_5849 =
{
0, // Large == 0
7, // Count == 7
-1, // Xref Not Saved
0, // Xref Not Used
{
{ 0x09, 0x83 },
{ 0x14, 0x8B },
{ 0x1F, 0xC7 },
{ 0x2A, 0x10 },
{ 0x35, 0x89 },
{ 0x40, 0x5F },
{ 0x4B, 0xFF },
}
};
// ******************************************************************
// * XAPI_1_0_5849
// ******************************************************************
@ -274,6 +360,91 @@ OOVPATable XAPI_1_0_5849[] =
"EmuXapiBootDash"
#endif
},
// QueueUserAPC (* unchanged since 3911 *)
{
(OOVPA*)&QueueUserAPC_1_0_3911,
XTL::EmuQueueUserAPC,
#ifdef _DEBUG_TRACE
"EmuQueueUserAPC"
#endif
},
// GetThreadPriority
{
(OOVPA*)&GetThreadPriority_1_0_5849,
XTL::EmuGetThreadPriority,
#ifdef _DEBUG_TRACE
"GetThreadPriority"
#endif
},
// SetThreadPriorityBoost
{
(OOVPA*)&SetThreadPriorityBoost_1_0_5849,
XTL::EmuSetThreadPriorityBoost,
#ifdef _DEBUG_TRACE
"SetThreadPriorityBoost"
#endif
},
// GetThreadPriorityBoost
/*{
(OOVPA*)&GetThreadPriorityBoost_1_0_5849,
XTL::EmuGetThreadPriorityBoost,
#ifdef _DEBUG_TRACE
"GetThreadPriorityBoost"
#endif
},*/
// XGetSectionHandleA (* unchanged since 4134 *)
{
(OOVPA*)&XGetSectionHandleA_1_0_4134,
XTL::EmuXGetSectionHandleA,
#ifdef _DEBUG_TRACE
"EmuXGetSectionHandleA"
#endif
},
// XLoadSectionByHandle (* unchanged since 4134 *)
{
(OOVPA*)&XLoadSectionByHandle_1_0_4134,
XTL::EmuXLoadSectionByHandle,
#ifdef _DEBUG_TRACE
"EmuXLoadSectionByHandle"
#endif
},
// XFreeSectionByHandle (* unchanged since 4134 *)
{
(OOVPA*)&XFreeSectionByHandle_1_0_4134,
XTL::EmuXFreeSectionByHandle,
#ifdef _DEBUG_TRACE
"EmuXFreeSectionByHandle"
#endif
},
// XGetSectionSize
{
(OOVPA*)&XGetSectionSize_1_0_5849,
XTL::EmuXGetSectionSize,
#ifdef _DEBUG_TRACE
"XGetSectionSize"
#endif
},
// RaiseException
{
(OOVPA*)&RaiseException_1_0_5849,
XTL::EmuRaiseException,
#ifdef _DEBUG_TRACE
"RaiseException"
#endif
},
};
// ******************************************************************

View File

@ -51,6 +51,9 @@ static void EmuXRefFailure();
uint32 fcount = 0;
uint32 funcExclude[2048] = {0};
uint32 g_BuildVersion;
uint32 g_OrigBuildVersion;
static std::vector<void *> vCacheOut;
static bool bCacheInp = false;
@ -191,6 +194,7 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
uint16 OrigBuildVersion = BuildVersion;
// Aliases - for testing purposes only
if(BuildVersion == 4039) { BuildVersion = 4034; }
if(BuildVersion == 4242) { BuildVersion = 4361; }
if(BuildVersion == 4531) { BuildVersion = 4432; }
if(BuildVersion == 4721) { BuildVersion = 4627; }
@ -201,6 +205,7 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
if(BuildVersion == 5659) { BuildVersion = 5558; }
if(BuildVersion == 5788) { BuildVersion = 5558; }
if(BuildVersion == 5028) { BuildVersion = 4627; }
if(BuildVersion == 5120) { BuildVersion = 5233; }
if(BuildVersion == 5933) { BuildVersion = 5849; } // These XDK versions are pretty much the same
/*
if(BuildVersion == 3944) { BuildVersion = 3925; }
@ -218,12 +223,21 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
*/
char szLibraryName[9] = {0};
char szOrigLibraryName[9] = {0};
for(uint32 c=0;c<8;c++)
{
szLibraryName[c] = pLibraryVersion[v].szName[c];
szOrigLibraryName[c] = pLibraryVersion[v].szName[c];
}
// Test
if(strcmp(szLibraryName, "XGRAPHC") == 0)
{
if(BuildVersion == 4432)
BuildVersion = 4361;
}
// Several 3911 titles has different DSound builds.
if(strcmp(szLibraryName, "DSOUND") == 0)
{
@ -241,8 +255,13 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
// Some 3911 titles have different D3D8 builds
if(strcmp(szLibraryName, "D3D8") == 0)
{
if(BuildVersion == 3948)
if(BuildVersion <= 3948)
BuildVersion = 3925;
// Testing... don't release with this code in it!
// TODO: 5233 and 5558
// if(BuildVersion == 4134)
// BuildVersion = 4627;
}
// Change a few XAPILIB versions to similar counterparts
@ -254,6 +273,12 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
BuildVersion = 4627;
}
// Test (do not release uncommented!)
if(strcmp(szLibraryName, "D3D8LTCG") == 0)
{
strcpy(szLibraryName, "D3D8");
}
// TODO: HACK: These libraries are packed into one database
if(strcmp(szLibraryName, "D3DX8") == 0)
{
@ -346,10 +371,15 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
}
}
}
else if(strcmp("D3D8", szLibraryName) == 0 && MajorVersion == 1 && MinorVersion == 0 &&
else if(strcmp("D3D8", szLibraryName) == 0 /*&& strcmp("D3D8LTCG", szOrigLibraryName)*/ &&
MajorVersion == 1 && MinorVersion == 0 &&
(BuildVersion == 3925 || BuildVersion == 4134 || BuildVersion == 4361 || BuildVersion == 4432
|| BuildVersion == 4627 || BuildVersion == 5233 || BuildVersion == 5558 || BuildVersion == 5849))
{
// Save D3D8 build version
g_BuildVersion = BuildVersion;
g_OrigBuildVersion = OrigBuildVersion;
uint32 lower = pXbeHeader->dwBaseAddr;
uint32 upper = pXbeHeader->dwBaseAddr + pXbeHeader->dwSizeofImage;
@ -369,9 +399,12 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
int patchOffset = 0;
if(BuildVersion == 3925)
{
XTL::EmuD3DDeferredRenderState = (DWORD*)(*(DWORD*)((uint32)pFunc + 0x25) - 0x19F + 72*4); // TODO: Clean up (?)
patchOffset = 142*4 - 72*4; // TODO: Verify
{
XTL::EmuD3DDeferredRenderState = (DWORD*)(*(DWORD*)((uint32)pFunc + 0x25) - 0x1FC + 82*4); // TODO: Clean up (?)
patchOffset = 142*4 - 82*4; // TODO: Verify
//XTL::EmuD3DDeferredRenderState = (DWORD*)(*(DWORD*)((uint32)pFunc + 0x25) - 0x19F + 72*4); // TODO: Clean up (?)
//patchOffset = 142*4 - 72*4; // TODO: Verify
}
else if(BuildVersion == 4134)
{
@ -453,6 +486,86 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
}
}
}
//else if(strcmp("D3D8LTCG", szLibraryName) == 0 && MajorVersion == 1 && MinorVersion == 0 &&
// (BuildVersion == 5849)) // 5849 only so far...
// {
// // Save D3D8 build version
// g_BuildVersion = BuildVersion;
// g_OrigBuildVersion = OrigBuildVersion;
// uint32 lower = pXbeHeader->dwBaseAddr;
// uint32 upper = pXbeHeader->dwBaseAddr + pXbeHeader->dwSizeofImage;
// void *pFunc = 0;
// if(BuildVersion == 5849)
// pFunc = EmuLocateFunction((OOVPA*)&IDirect3DDevice8_SetRenderState_CullMode_1_0_5849_LTCG, lower, upper);
// // locate D3DDeferredRenderState
// if(pFunc != 0)
// {
// // offset for stencil cull enable render state in the deferred render state buffer
// int patchOffset = 0;
// if(BuildVersion == 5849)
// {
// // WARNING: Not thoroughly tested (just seemed very correct right away)
// XTL::EmuD3DDeferredRenderState = (DWORD*)(*(DWORD*)((uint32)pFunc + 0x2B) - 0x24C + 92*4);
// patchOffset = 162*4 - 92*4;
// }
// XRefDataBase[XREF_D3DDEVICE] = *(DWORD*)((DWORD)pFunc + 0x03);
// XRefDataBase[XREF_D3DRS_MULTISAMPLEMODE] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset - 8*4;
// XRefDataBase[XREF_D3DRS_MULTISAMPLERENDERTARGETMODE] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset - 7*4;
// XRefDataBase[XREF_D3DRS_STENCILCULLENABLE] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 0*4;
// XRefDataBase[XREF_D3DRS_ROPZCMPALWAYSREAD] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 1*4;
// XRefDataBase[XREF_D3DRS_ROPZREAD] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 2*4;
// XRefDataBase[XREF_D3DRS_DONOTCULLUNCOMPRESSED] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 3*4;
// for(int v=0;v<44;v++)
// {
// XTL::EmuD3DDeferredRenderState[v] = X_D3DRS_UNK;
// }
// DbgPrintf("HLE: 0x%.08X -> EmuD3DDeferredRenderState\n", XTL::EmuD3DDeferredRenderState);
// }
// else
// {
// XTL::EmuD3DDeferredRenderState = 0;
// CxbxKrnlCleanup("EmuD3DDeferredRenderState was not found!");
// }
// // locate D3DDeferredTextureState
// {
// pFunc = 0;
// if(BuildVersion == 3925)
// pFunc = EmuLocateFunction((OOVPA*)&IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_5849_LTCG, lower, upper);
// if(pFunc != 0)
// {
// if(BuildVersion == 3925) // 0x18F180
// XTL::EmuD3DDeferredTextureState = (DWORD*)(*(DWORD*)((uint32)pFunc + 0x11) - 0x70); // TODO: Verify
// else if(BuildVersion == 4134)
// XTL::EmuD3DDeferredTextureState = (DWORD*)(*(DWORD*)((uint32)pFunc + 0x18) - 0x70); // TODO: Verify
// else
// XTL::EmuD3DDeferredTextureState = (DWORD*)(*(DWORD*)((uint32)pFunc + 0x19) - 0x70);
// for(int s=0;s<4;s++)
// {
// for(int v=0;v<32;v++)
// XTL::EmuD3DDeferredTextureState[v+s*32] = X_D3DTSS_UNK;
// }
// DbgPrintf("HLE: 0x%.08X -> EmuD3DDeferredTextureState\n", XTL::EmuD3DDeferredTextureState);
// }
// else
// {
// XTL::EmuD3DDeferredTextureState = 0;
// CxbxKrnlCleanup("EmuD3DDeferredTextureState was not found!");
// }
// }
// }
}
DbgPrintf("HLE: * Searching HLE database for %s %d.%d.%d...", szLibraryName, MajorVersion, MinorVersion, BuildVersion);

View File

@ -66,7 +66,7 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[367] =
(uint32)PANIC(0x0006), // 0x0006 (6)
(uint32)PANIC(0x0007), // 0x0007 (7)
(uint32)PANIC(0x0008), // 0x0008 (8)
(uint32)PANIC(0x0009), // 0x0009 (9)
(uint32)&xboxkrnl::HalReadSMCTrayState, // 0x0009 (9)
(uint32)PANIC(0x000A), // 0x000A (10)
(uint32)PANIC(0x000B), // 0x000B (11)
(uint32)PANIC(0x000C), // 0x000C (12)
@ -148,11 +148,11 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[367] =
(uint32)PANIC(0x0058), // 0x0058 (88)
(uint32)PANIC(0x0059), // 0x0059 (89)
(uint32)PANIC(0x005A), // 0x005A (90)
(uint32)PANIC(0x005B), // 0x005B (91)
(uint32)&xboxkrnl::IoDismountVolumeByName, // 0x005B (91)
(uint32)PANIC(0x005C), // 0x005C (92)
(uint32)PANIC(0x005D), // 0x005D (93)
(uint32)PANIC(0x005E), // 0x005E (94)
(uint32)PANIC(0x005F), // 0x005F (95)
(uint32)&xboxkrnl::KeBugCheck, // 0x005F (95)
(uint32)PANIC(0x0060), // 0x0060 (96)
(uint32)PANIC(0x0061), // 0x0061 (97)
(uint32)PANIC(0x0062), // 0x0062 (98)
@ -186,7 +186,7 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[367] =
(uint32)&xboxkrnl::KeQueryPerformanceCounter, // 0x007E (126)
(uint32)&xboxkrnl::KeQueryPerformanceFrequency, // 0x007F (127)
(uint32)&xboxkrnl::KeQuerySystemTime, // 0x0080 (128)
(uint32)PANIC(0x0081), // 0x0081 (129)
(uint32)&xboxkrnl::KeRaiseIrqlToDpcLevel, // 0x0081 (129)
(uint32)PANIC(0x0082), // 0x0082 (130)
(uint32)PANIC(0x0083), // 0x0083 (131)
(uint32)PANIC(0x0084), // 0x0084 (132)