mem eat fix; single-window fix; minor shader fix (segaGT); more segaGT

This commit is contained in:
Aaron Robinson 2004-03-14 11:30:34 +00:00
parent 7175da5c8e
commit 6a10a8301e
12 changed files with 414 additions and 27 deletions

BIN
Cxbx.opt

Binary file not shown.

View File

@ -161,6 +161,11 @@ HRESULT WINAPI EmuIDirect3D8_EnumAdapterModes
// ******************************************************************
VOID WINAPI EmuIDirect3D8_KickOffAndWaitForIdle();
// ******************************************************************
// * func: EmuIDirect3D8_KickOffAndWaitForIdle
// ******************************************************************
VOID WINAPI EmuIDirect3D8_KickOffAndWaitForIdle2(DWORD dwDummy1, DWORD dwDummy2);
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetGammaRamp
// ******************************************************************

View File

@ -34,7 +34,7 @@
#ifndef VERTEXSHADER_H
#define VERTEXSHADER_H
#define _DEBUG_VSH
//#define _DEBUG_VSH
// nv2a microcode header
typedef struct

View File

@ -185,6 +185,7 @@ struct X_D3DResource
// special resource data flags
#define X_D3DRESOURCE_DATA_FLAG_SURFACE 0xEFFFFFFF
#define X_D3DRESOURCE_DATA_FLAG_YUVSURF 0xDFFFFFFF
#define X_D3DRESOURCE_DATA_FLAG_D3DREND 0xCFFFFFFF // D3D Render Target
// special resource lock flags
#define X_D3DRESOURCE_LOCK_FLAG_NOSIZE 0xEFFFFFFF

View File

@ -34,6 +34,14 @@
#ifndef EMUXG_H
#define EMUXG_H
typedef struct _XGPOINT3D
{
DWORD u;
DWORD v;
DWORD w;
}
XGPOINT3D;
// ******************************************************************
// * func: EmuXGIsSwizzledFormat
// ******************************************************************
@ -57,6 +65,23 @@ VOID WINAPI EmuXGSwizzleRect
DWORD BytesPerPixel
);
// ******************************************************************
// * func: EmuXGSwizzleBox
// ******************************************************************
VOID WINAPI EmuXGSwizzleBox
(
LPCVOID pSource,
DWORD RowPitch,
DWORD SlicePitch,
CONST D3DBOX *pBox,
LPVOID pDest,
DWORD Width,
DWORD Height,
DWORD Depth,
CONST XGPOINT3D *pPoint,
DWORD BytesPerPixel
);
// ******************************************************************
// * func: EmuXGUnswizzleRect
// ******************************************************************

View File

@ -165,7 +165,7 @@ uint08 *jpeg2bmp(uint08 *jpeg, uint32 jpegSize, uint32 &bmpSize)
row_stride = cinfo.output_width * cinfo.output_components;
// calculate bitmap size
bmpSize = row_stride*(cinfo.output_width*cinfo.output_height);
bmpSize = row_stride*cinfo.output_height;
// allocate bitmap data
buffer = (uint08*)malloc(bmpSize);

View File

@ -155,7 +155,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
g_pTLS = pTLS;
g_pTLSData = pTLSData;
g_pXbeHeader = pXbeHeader;
g_hEmuParent = hwndParent;
g_hEmuParent = IsWindow(hwndParent) ? hwndParent : NULL;
// For Unicode Conversions
setlocale(LC_ALL, "English");
@ -563,7 +563,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
// _USE_XGMATH Disabled in mesh :[
// halo : dword_0_2E2D18
// halo : 1744F0 (bink)
_asm int 3
//_asm int 3
Entry();
@ -657,7 +657,8 @@ extern "C" CXBXKRNL_API void NTAPI EmuCleanup(const char *szErrorMessage, ...)
freopen("nul", "w", stdout);
}
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
if(g_hEmuParent != NULL)
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
TerminateProcess(GetCurrentProcess(), 0);
@ -723,10 +724,12 @@ extern "C" CXBXKRNL_API void NTAPI EmuSuspend()
{
char szBuffer[256];
GetWindowText(g_hEmuParent, szBuffer, 255 - 10);
HWND hWnd = (g_hEmuParent != NULL) ? g_hEmuParent : g_hEmuWindow;
GetWindowText(hWnd, szBuffer, 255 - 10);
strcat(szBuffer, " (paused)");
SetWindowText(g_hEmuParent, szBuffer);
SetWindowText(hWnd, szBuffer);
}
g_bEmuSuspended = TRUE;
@ -742,11 +745,13 @@ extern "C" CXBXKRNL_API void NTAPI EmuResume()
{
char szBuffer[256];
GetWindowText(g_hEmuParent, szBuffer, 255);
HWND hWnd = (g_hEmuParent != NULL) ? g_hEmuParent : g_hEmuWindow;
GetWindowText(hWnd, szBuffer, 255);
szBuffer[strlen(szBuffer)-9] = '\0';
SetWindowText(g_hEmuParent, szBuffer);
SetWindowText(hWnd, szBuffer);
}
for(int v=0;v<MAXIMUM_XBOX_THREADS;v++)
@ -905,7 +910,8 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
printf("EmuMain (0x%X): Aborting Emulation\n", GetCurrentThreadId());
fflush(stdout);
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
if(g_hEmuParent != NULL)
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
ExitProcess(1);
}
@ -931,8 +937,9 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
{
printf("EmuMain (0x%X): Aborting Emulation\n", GetCurrentThreadId());
fflush(stdout);
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
if(g_hEmuParent != NULL)
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
ExitProcess(1);
}
@ -1176,7 +1183,8 @@ int ExitException(LPEXCEPTION_POINTERS e)
return EXCEPTION_CONTINUE_SEARCH;
}
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
if(g_hEmuParent != NULL)
SendMessage(g_hEmuParent, WM_PARENTNOTIFY, WM_DESTROY, 0);
ExitProcess(1);

View File

@ -324,7 +324,7 @@ static DWORD WINAPI EmuRenderWindow(LPVOID lpVoid)
// create the window
{
DWORD dwStyle = g_XBVideo.GetFullscreen() ? WS_OVERLAPPEDWINDOW : WS_CHILD;
DWORD dwStyle = (g_XBVideo.GetFullscreen() || (g_hEmuParent == 0))? WS_OVERLAPPEDWINDOW : WS_CHILD;
int nTitleHeight = GetSystemMetrics(SM_CYCAPTION);
int nBorderWidth = GetSystemMetrics(SM_CXSIZEFRAME);
@ -358,10 +358,10 @@ static DWORD WINAPI EmuRenderWindow(LPVOID lpVoid)
);
}
ShowWindow(g_hEmuWindow, g_XBVideo.GetFullscreen() ? SW_SHOWDEFAULT : SW_SHOWMAXIMIZED);
ShowWindow(g_hEmuWindow, (g_XBVideo.GetFullscreen() || (g_hEmuParent == 0) ) ? SW_SHOWDEFAULT : SW_SHOWMAXIMIZED);
UpdateWindow(g_hEmuWindow);
if(!g_XBVideo.GetFullscreen())
if(!g_XBVideo.GetFullscreen() && (g_hEmuParent != NULL))
{
SetFocus(g_hEmuParent);
}
@ -409,19 +409,44 @@ void ToggleFauxFullscreen(HWND hWnd)
static bool bIsNormal = true;
static LONG lRestore = 0, lRestoreEx = 0;
static RECT lRect = {0};
if(bIsNormal)
{
SetParent(hWnd, NULL);
if(g_hEmuParent != NULL)
{
SetParent(hWnd, NULL);
}
else
{
lRestore = GetWindowLong(hWnd, GWL_STYLE);
lRestoreEx = GetWindowLong(hWnd, GWL_EXSTYLE);
GetWindowRect(hWnd, &lRect);
}
SetWindowLong(hWnd, GWL_STYLE, WS_POPUP);
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
ShowWindow(hWnd, SW_MAXIMIZE);
}
else
{
SetParent(hWnd, g_hEmuParent);
SetWindowLong(hWnd, GWL_STYLE, WS_CHILD);
ShowWindow(hWnd, SW_MAXIMIZE);
SetFocus(g_hEmuParent);
if(g_hEmuParent != NULL)
{
SetParent(hWnd, g_hEmuParent);
SetWindowLong(hWnd, GWL_STYLE, WS_CHILD);
ShowWindow(hWnd, SW_MAXIMIZE);
SetFocus(g_hEmuParent);
}
else
{
SetWindowLong(hWnd, GWL_STYLE, lRestore);
SetWindowLong(hWnd, GWL_EXSTYLE, lRestoreEx);
ShowWindow(hWnd, SW_RESTORE);
SetWindowPos(hWnd, HWND_NOTOPMOST, lRect.left, lRect.top, lRect.right - lRect.left, lRect.bottom - lRect.top, 0);
SetFocus(hWnd);
}
}
bIsNormal = !bIsNormal;
@ -819,6 +844,8 @@ static DWORD WINAPI EmuCreateDeviceProxy(LPVOID)
// update render target cache
g_pCachedRenderTarget = new XTL::X_D3DSurface();
g_pCachedRenderTarget->Common = 0;
g_pCachedRenderTarget->Data = X_D3DRESOURCE_DATA_FLAG_D3DREND;
g_pD3DDevice8->GetRenderTarget(&g_pCachedRenderTarget->EmuSurface8);
// update z-stencil surface cache
@ -885,6 +912,10 @@ static void EmuVerifyResourceIsRegistered(XTL::X_D3DResource *pResource)
if(pResource->Lock != 0 && pResource->Lock != 0xEEEEEEEE && pResource->Lock != 0xFFFFFFFF)
return;
// Already "Registered" implicitly
if(pResource->Data == X_D3DRESOURCE_DATA_FLAG_D3DREND)
return;
int v=0;
for(v=0;v<16;v++)
@ -1418,6 +1449,32 @@ VOID WINAPI XTL::EmuIDirect3D8_KickOffAndWaitForIdle()
return;
}
// ******************************************************************
// * func: EmuIDirect3D8_KickOffAndWaitForIdle2
// ******************************************************************
VOID WINAPI XTL::EmuIDirect3D8_KickOffAndWaitForIdle2(DWORD dwDummy1, DWORD dwDummy2)
{
EmuSwapFS(); // Win2k/XP FS
// debug trace
#ifdef _DEBUG_TRACE
{
printf("EmuD3D8 (0x%X): EmuIDirect3D8_KickOffAndWaitForIdle\n"
"(\n"
" dwDummy1 : 0x%.08X\n"
" dwDummy2 : 0x%.08X\n"
");\n",
GetCurrentThreadId(), dwDummy1, dwDummy2);
}
#endif
// TODO: Actually do something here?
EmuSwapFS(); // XBox FS
return;
}
// ******************************************************************
// * func: EmuIDirect3DDevice8_SetGammaRamp
// ******************************************************************
@ -2004,7 +2061,7 @@ XTL::X_D3DSurface * WINAPI XTL::EmuIDirect3DDevice8_GetRenderTarget2()
pSurface8->AddRef();
#ifdef _DEBUG_TRACE
printf("EmuD3D8 (0x%X): RenderTarget := 0x%.08X\n", pSurface8);
printf("EmuD3D8 (0x%X): RenderTarget := 0x%.08X\n", GetCurrentThreadId(), pSurface8);
#endif
EmuSwapFS(); // Xbox FS
@ -4112,11 +4169,18 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
{
if(bSwizzled)
{
XTL::EmuXGUnswizzleRect
(
pSrc, dwWidth, dwHeight, dwDepth, LockedRect.pBits,
LockedRect.Pitch, iRect, iPoint, dwBPP
);
if((DWORD)pSrc == 0x80000000)
{
// TODO: Fix or handle this situation..?
}
else
{
XTL::EmuXGUnswizzleRect
(
pSrc, dwWidth, dwHeight, dwDepth, LockedRect.pBits,
LockedRect.Pitch, iRect, iPoint, dwBPP
);
}
}
else if(bCompressed)
{
@ -4753,6 +4817,9 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_GetSurfaceLevel
*ppSurfaceLevel = new X_D3DSurface();
(*ppSurfaceLevel)->Data = 0xB00BBABE;
(*ppSurfaceLevel)->Common = 0;
(*ppSurfaceLevel)->Format = 0;
(*ppSurfaceLevel)->Size = 0;
hRet = pTexture8->GetSurfaceLevel(Level, &((*ppSurfaceLevel)->EmuSurface8));
@ -7048,6 +7115,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_SetRenderTarget
if(pRenderTarget != 0)
{
EmuVerifyResourceIsRegistered(pRenderTarget);
pPCRenderTarget = pRenderTarget->EmuSurface8;
}

View File

@ -1868,6 +1868,10 @@ extern HRESULT XTL::EmuRecompileVshFunction
VSH_XBOX_SHADER *pShader = (VSH_XBOX_SHADER*)malloc(sizeof(VSH_XBOX_SHADER));
HRESULT hRet = 0;
// TODO: support this situation..
if(pFunction == NULL)
return E_FAIL;
*ppRecompiled = NULL;
*pOriginalSize = 0;
if(!pShader)

View File

@ -157,6 +157,62 @@ VOID WINAPI XTL::EmuXGSwizzleRect
return;
}
// ******************************************************************
// * func: EmuXGSwizzleBox
// ******************************************************************
VOID WINAPI XTL::EmuXGSwizzleBox
(
LPCVOID pSource,
DWORD RowPitch,
DWORD SlicePitch,
CONST D3DBOX *pBox,
LPVOID pDest,
DWORD Width,
DWORD Height,
DWORD Depth,
CONST XGPOINT3D *pPoint,
DWORD BytesPerPixel
)
{
EmuSwapFS(); // Win2k/XP FS
// ******************************************************************
// * debug trace
// ******************************************************************
#ifdef _DEBUG_TRACE
{
printf("EmuXapi (0x%X): EmuXGSwizzleBox\n"
"(\n"
" pSource : 0x%.08X\n"
" RowPitch : 0x%.08X\n"
" SlicePitch : 0x%.08X\n"
" pBox : 0x%.08X\n"
" pDest : 0x%.08X\n"
" Width : 0x%.08X\n"
" Height : 0x%.08X\n"
" Depth : 0x%.08X\n"
" pPoint : 0x%.08X\n"
" BytesPerPixel : 0x%.08X\n"
");\n",
GetCurrentThreadId(), pSource, RowPitch, SlicePitch, pBox, pDest, Width, Height,
Depth, pPoint, BytesPerPixel);
}
#endif
if(pBox == NULL && pPoint == NULL && RowPitch == 0 && SlicePitch == 0)
{
memcpy(pDest, pSource, Width*Height*Depth*BytesPerPixel);
}
else
{
EmuCleanup("Temporarily unsupported swizzle (easy fix)");
}
EmuSwapFS(); // Xbox FS
return;
}
// ******************************************************************
// * func: EmuXGUnswizzleRect
// ******************************************************************

View File

@ -257,6 +257,45 @@ SOOVPA<9> IDirect3D8_KickOffAndWaitForIdle_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3D8_KickOffAndWaitForIdle2
// ******************************************************************
SOOVPA<11> IDirect3D8_KickOffAndWaitForIdle2_1_0_4627 =
{
0, // Large == 0
11, // Count == 11
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3D8_KickOffAndWaitForIdle2+0x00 : mov eax, [addr]
{ 0x00, 0xA1 }, // (Offset,Value)-Pair #1
// IDirect3D8_KickOffAndWaitForIdle2+0x05 : mov ecx, [eax+0x30]
{ 0x05, 0x8B }, // (Offset,Value)-Pair #2
{ 0x06, 0x48 }, // (Offset,Value)-Pair #3
{ 0x07, 0x30 }, // (Offset,Value)-Pair #4
// IDirect3D8_KickOffAndWaitForIdle2+0x08 : push 2
{ 0x08, 0x6A }, // (Offset,Value)-Pair #5
{ 0x09, 0x02 }, // (Offset,Value)-Pair #6
// IDirect3D8_KickOffAndWaitForIdle2+0x0A : push ecx
{ 0x0A, 0x51 }, // (Offset,Value)-Pair #7
// IDirect3D8_KickOffAndWaitForIdle2+0x0B : call [addr]
{ 0x0B, 0xE8 }, // (Offset,Value)-Pair #8
// IDirect3D8_KickOffAndWaitForIdle2+0x18 : call [addr]
{ 0x18, 0xE8 }, // (Offset,Value)-Pair #9
// IDirect3D8_KickOffAndWaitForIdle2+0x1D : retn 0x08
{ 0x1D, 0xC2 }, // (Offset,Value)-Pair #10
{ 0x1E, 0x08 }, // (Offset,Value)-Pair #11
}
};
// ******************************************************************
// * IDirect3DDevice8_SetViewport
// ******************************************************************
@ -320,6 +359,39 @@ SOOVPA<12> D3D_CommonSetRenderTarget_1_0_4627 =
}
};
// ******************************************************************
// * D3D_CommonSetRenderTargetB
// ******************************************************************
SOOVPA<11> D3D_CommonSetRenderTargetB_1_0_4627 =
{
0, // Large == 0
11, // Count == 11
XREF_COMMONSETRENDERTARGET, // XRef Not Saved
0, // XRef Not Used
{
// D3D_CommonSetRenderTargetB+0x00 : sub esp, 0x24
{ 0x00, 0x83 }, // (Offset,Value)-Pair #1
{ 0x01, 0xEC }, // (Offset,Value)-Pair #2
{ 0x02, 0x24 }, // (Offset,Value)-Pair #3
// D3D_CommonSetRenderTargetB+0x86 : jmp +0x06
{ 0x8D, 0xEB }, // (Offset,Value)-Pair #4
{ 0x8E, 0x04 }, // (Offset,Value)-Pair #5
// D3D_CommonSetRenderTargetB+0xE4 : and eax, 0x0FFF
{ 0xE4, 0x25 }, // (Offset,Value)-Pair #6
{ 0xE5, 0xFF }, // (Offset,Value)-Pair #7
{ 0xE6, 0x0F }, // (Offset,Value)-Pair #8
{ 0xE7, 0x00 }, // (Offset,Value)-Pair #9
// D3D_CommonSetRenderTargetB+0xF4 : jge +0x06
{ 0xF4, 0x7D }, // (Offset,Value)-Pair #10
{ 0xF5, 0x06 }, // (Offset,Value)-Pair #11
}
};
// ******************************************************************
// * IDirect3DDevice8_SetRenderTarget
// ******************************************************************
@ -525,6 +597,42 @@ SOOVPA<10> IDirect3DDevice8_GetRenderTarget2_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3DDevice8_GetRenderTarget2B
// ******************************************************************
SOOVPA<10> IDirect3DDevice8_GetRenderTarget2B_1_0_4627 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_GetRenderTarget2B+0x00 : mov eax, [addr]
{ 0x00, 0xA1 }, // (Offset,Value)-Pair #1
// IDirect3DDevice8_GetRenderTarget2B+0x05 : push esi
{ 0x05, 0x56 }, // (Offset,Value)-Pair #2
// IDirect3DDevice8_GetRenderTarget2B+0x06 : mov esi, [eax + 0x21B4]
{ 0x06, 0x8B }, // (Offset,Value)-Pair #3
{ 0x07, 0xB0 }, // (Offset,Value)-Pair #4
{ 0x08, 0xB4 }, // (Offset,Value)-Pair #5
{ 0x09, 0x21 }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_GetRenderTarget2B+0x2A : jz + 0x06
{ 0x2A, 0x74 }, // (Offset,Value)-Pair #7
{ 0x2B, 0x06 }, // (Offset,Value)-Pair #8
// IDirect3DDevice8_GetRenderTarget2B+0x2D : call [addr]
{ 0x2D, 0xE8 }, // (Offset,Value)-Pair #9
// IDirect3DDevice8_GetRenderTarget2B+0x37 : retn
{ 0x37, 0xC3 }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * IDirect3DDevice8_GetDepthStencilSurface2
// ******************************************************************
@ -1203,6 +1311,38 @@ SOOVPA<12> IDirect3DDevice8_SetVerticalBlankCallback_1_0_4627 =
}
};
// ******************************************************************
// * IDirect3DDevice8_GetViewport
// ******************************************************************
SOOVPA<10> IDirect3DDevice8_GetViewport_1_0_4627 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Not Used
{
// IDirect3DDevice8_GetViewport+0x05 : push esi; push edi
{ 0x05, 0x56 }, // (Offset,Value)-Pair #1
{ 0x06, 0x57 }, // (Offset,Value)-Pair #2
// IDirect3DDevice8_GetViewport+0x0B : lea esi, [eax+0x0A90]
{ 0x0B, 0x8D }, // (Offset,Value)-Pair #3
{ 0x0C, 0xB0 }, // (Offset,Value)-Pair #4
{ 0x0D, 0x90 }, // (Offset,Value)-Pair #5
{ 0x0E, 0x0A }, // (Offset,Value)-Pair #6
// IDirect3DDevice8_GetViewport+0x11 : mov ecx, 6
{ 0x11, 0xB9 }, // (Offset,Value)-Pair #7
{ 0x12, 0x06 }, // (Offset,Value)-Pair #8
// IDirect3DDevice8_GetViewport+0x1A : retn 0x04
{ 0x1A, 0xC2 }, // (Offset,Value)-Pair #9
{ 0x1B, 0x04 }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * IDirect3DDevice8_SetTextureState_TexCoordIndex
// ******************************************************************
@ -2395,6 +2535,16 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3D8_KickOffAndWaitForIdle"
#endif
},
// IDirect3D8::KickOffAndWaitForIdle2
{
(OOVPA*)&IDirect3D8_KickOffAndWaitForIdle2_1_0_4627,
XTL::EmuIDirect3D8_KickOffAndWaitForIdle2,
#ifdef _DEBUG_TRACE
"EmuIDirect3D8_KickOffAndWaitForIdle2"
#endif
},
// IDirect3DDevice8::GetBackBuffer2
{
(OOVPA*)&IDirect3DDevice8_GetBackBuffer2_1_0_4627,
@ -2433,6 +2583,14 @@ OOVPATable D3D8_1_0_4627[] =
"D3D_CommonSetRenderTarget"
#endif
},
// D3D_CommonSetRenderTargetB
{
(OOVPA*)&D3D_CommonSetRenderTargetB_1_0_4627, 0,
#ifdef _DEBUG_TRACE
"D3D_CommonSetRenderTargetB"
#endif
},
// IDirect3DDevice8::SetRenderTarget
{
(OOVPA*)&IDirect3DDevice8_SetRenderTarget_1_0_4627,
@ -2473,6 +2631,16 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_GetRenderTarget2"
#endif
},
// IDirect3DDevice8::GetRenderTarget2B
{
(OOVPA*)&IDirect3DDevice8_GetRenderTarget2B_1_0_4627,
XTL::EmuIDirect3DDevice8_GetRenderTarget2,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_GetRenderTarget2B"
#endif
},
// IDirect3DDevice8::GetDepthStencilSurface2
{
(OOVPA*)&IDirect3DDevice8_GetDepthStencilSurface2_1_0_4627,
@ -2723,6 +2891,16 @@ OOVPATable D3D8_1_0_4627[] =
"EmuIDirect3DDevice8_SetVerticalBlankCallback"
#endif
},
// IDirect3DDevice8::GetViewport
{
(OOVPA*)&IDirect3DDevice8_GetViewport_1_0_4627,
XTL::EmuIDirect3DDevice8_GetViewport,
#ifdef _DEBUG_TRACE
"EmuIDirect3DDevice8_GetViewport"
#endif
},
// IDirect3DDevice8::SetTextureState_TexCoordIndex
{
(OOVPA*)&IDirect3DDevice8_SetTextureState_TexCoordIndex_1_0_4627,

View File

@ -32,6 +32,38 @@
// *
// ******************************************************************
// ******************************************************************
// * XGSwizzleBox
// ******************************************************************
SOOVPA<10> XGSwizzleBox_1_0_4627 =
{
0, // Large == 0
10, // Count == 10
-1, // XRef Not Saved
0, // XRef Not Used
{
// XGSwizzleBox+0x60 : sub ecx, [eax]
{ 0x60, 0x2B }, // (Offset,Value)-Pair #1
{ 0x61, 0x08 }, // (Offset,Value)-Pair #2
// XGSwizzleBox+0x8E : lea ecx, [ebp+0xD8]
{ 0x8E, 0x8D }, // (Offset,Value)-Pair #3
{ 0x8F, 0x4D }, // (Offset,Value)-Pair #4
{ 0x90, 0xD8 }, // (Offset,Value)-Pair #5
// XGSwizzleBox+0xD5 : shl eax, 2
{ 0xD5, 0xC1 }, // (Offset,Value)-Pair #6
{ 0xD6, 0xE0 }, // (Offset,Value)-Pair #7
{ 0xD7, 0x02 }, // (Offset,Value)-Pair #8
// XGSwizzleBox+0xE2 : test ebx, ebx
{ 0xE2, 0x85 }, // (Offset,Value)-Pair #9
{ 0xE3, 0xDB }, // (Offset,Value)-Pair #10
}
};
// ******************************************************************
// * XG_1_0_4627
// ******************************************************************
@ -57,6 +89,16 @@ OOVPATable XG_1_0_4627[] =
"EmuXGSwizzleRect"
#endif
},
// XGSwizzleBox
{
(OOVPA*)&XGSwizzleBox_1_0_4627,
XTL::EmuXGSwizzleBox,
#ifdef _DEBUG_TRACE
"EmuXGSwizzleBox"
#endif
},
};
// ******************************************************************