Initialize commits of HLEDB 2v Xgraphics

This commit is contained in:
jarupxx 2017-10-03 06:39:10 +09:00 committed by Luke Usher
parent e6ffcdb85d
commit cc46eff896
5 changed files with 86 additions and 14 deletions

View File

@ -404,6 +404,7 @@ $(SOLUTIONDIR)Export.bat</Command>
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.5558.inl" />
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.5788.inl" />
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.5849.inl" />
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XG.OOVPA.inl" />
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XNet.1.0.3911.inl" />
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XNet.1.0.4627.inl" />
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XOnline.1.0.4361.inl" />

View File

@ -848,6 +848,9 @@
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XG.1.0.5849.inl">
<Filter>HLEDatabase\XG</Filter>
</None>
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XG.OOVPA.inl">
<Filter>HLEDatabase\XG</Filter>
</None>
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XOnline.1.0.4361.inl">
<Filter>HLEDatabase\XOnline</Filter>
</None>

View File

@ -70,17 +70,7 @@ const char *Sec_XNET = "XNET";
#include "HLEDataBase/Xapi.OOVPA.inl"
#include "HLEDataBase/D3D8.OOVPA.inl"
#include "HLEDataBase/DSound.OOVPA.inl"
#include "HLEDataBase/XG.1.0.3911.inl"
#include "HLEDataBase/XG.1.0.4034.inl"
#include "HLEDataBase/XG.1.0.4361.inl"
#include "HLEDataBase/XG.1.0.4432.inl"
#include "HLEDataBase/XG.1.0.4627.inl"
#include "HLEDataBase/XG.1.0.5028.inl"
#include "HLEDataBase/XG.1.0.5233.inl"
#include "HLEDataBase/XG.1.0.5344.inl"
#include "HLEDataBase/XG.1.0.5558.inl"
#include "HLEDataBase/XG.1.0.5788.inl"
#include "HLEDataBase/XG.1.0.5849.inl"
#include "HLEDataBase/XG.OOVPA.inl"
#include "HLEDataBase/XNet.1.0.3911.inl"
#include "HLEDataBase/XNet.1.0.4627.inl"
#include "HLEDataBase/XOnline.1.0.4361.inl"
@ -155,6 +145,7 @@ const HLEData HLEDataBase[] =
HLE_ENTRY(Lib_XACTENG, XactEng, 5788),
HLE_ENTRY(Lib_XACTENG, XactEng, 5849),
#endif
#if ENABLE_LEGACY_XGRAPHC_DB
HLE_ENTRY(Lib_XGRAPHC, XG, 3911),
HLE_ENTRY(Lib_XGRAPHC, XG, 4034),
HLE_ENTRY(Lib_XGRAPHC, XG, 4361),
@ -166,7 +157,7 @@ const HLEData HLEDataBase[] =
HLE_ENTRY(Lib_XGRAPHC, XG, 5558),
HLE_ENTRY(Lib_XGRAPHC, XG, 5788),
HLE_ENTRY(Lib_XGRAPHC, XG, 5849),
#endif
HLE_ENTRY(Lib_XNETS, XNet, 3911),
HLE_ENTRY(Lib_XNETS, XNet, 4627),
@ -207,8 +198,8 @@ const HLEDataV2 HLEDataBaseV2[] = {
//
{ Lib_XAPILIB,{ Sec_text, Sec_XPP }, XAPILIB_OOVPAV2, XAPILIB_OOVPA_SIZEV2 },
//
//{ Lib_XGRAPHC,{ Sec_XGRPH }, XGRAPHC_OOVPAV2, XGRAPHC_OOVPA_SIZEV2 },
// Support inline functions in .text section
{ Lib_XGRAPHC,{ Sec_text, Sec_XGRPH }, XGRAPHC_OOVPAV2, XGRAPHC_OOVPA_SIZEV2 },
//
//{ Lib_XONLINE,{ Sec_XONLINE }, XONLINES_OOVPAV2, XONLINES_OOVPA_SIZEV2 },

View File

@ -0,0 +1,75 @@
// ******************************************************************
// *
// * .,-::::: .,:: .::::::::. .,:: .:
// * ,;;;'````' `;;; .,;; ;;;'';;' `;;; .,;;
// * [[[ '[[,,[[' [[[__[[\. '[[,,[['
// * $$$ Y$$$P $$""""Y$$ Y$$$P
// * `88bo,__,o oP"``"Yo _88o,,od8P oP"``"Yo,
// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm,
// *
// * Cxbx->Win32->CxbxKrnl->HLEDatabase->XG.OOVPA.inl
// *
// * This file is part of the Cxbx project.
// *
// * Cxbx and Cxbe are free software; you can redistribute them
// * and/or modify them under the terms of the GNU General Public
// * License as published by the Free Software Foundation; either
// * version 2 of the license or (at your option) any later version.
// *
// * This program is distributed in the hope that it will be useful,
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// * GNU General Public License for more details.
// *
// * You should have recieved a copy of the GNU General Public License
// * along with this program; see the file COPYING.
// * If not write to the Free Software Foundation Inc.,
// * 59 Temple Place - Suite 330 Bostom MA 02111-1307 USA.
// *
// * (c) 2017 jarupxx
// *
// * All rights reserved
// *
// ******************************************************************
#ifndef XGRAPHC_OOVPA_INL
#define XGRAPHC_OOVPA_INL
#include "../OOVPA.h"
#include "HLEDataBase/XG.1.0.3911.inl"
#include "HLEDataBase/XG.1.0.4034.inl"
#include "HLEDataBase/XG.1.0.4361.inl"
#include "HLEDataBase/XG.1.0.4432.inl"
#include "HLEDataBase/XG.1.0.4627.inl"
#include "HLEDataBase/XG.1.0.5028.inl"
#include "HLEDataBase/XG.1.0.5233.inl"
#include "HLEDataBase/XG.1.0.5344.inl"
#include "HLEDataBase/XG.1.0.5558.inl"
#include "HLEDataBase/XG.1.0.5788.inl"
#include "HLEDataBase/XG.1.0.5849.inl"
// ******************************************************************
// * XGRAPHC_OOVPA
// ******************************************************************
OOVPATable XGRAPHC_OOVPAV2[] = {
REGISTER_OOVPAS(XFONT_OpenBitmapFontFromMemory, XREF, 4361),
REGISTER_OOVPAS(XGCompressRect, XREF, 3911),
REGISTER_OOVPAS(XGIsSwizzledFormat, PATCH, 3911),
REGISTER_OOVPAS(XGSetIndexBufferHeader, XREF, 3911, 4361),
REGISTER_OOVPAS(XGSetTextureHeader, PATCH, 3911),
REGISTER_OOVPAS(XGSetVertexBufferHeader, XREF, 3911, 4361),
REGISTER_OOVPAS(XGSwizzleBox, PATCH, 3911),
// REGISTER_OOVPAS(XGSwizzleRect, UNPATCHED, 3911), // TODO : Uncomment
REGISTER_OOVPAS(XGUnswizzleBox, UNPATCHED, 3911),
// REGISTER_OOVPAS(XGUnswizzleRect, UNPATCHED, 3911), // TODO : Uncomment
REGISTER_OOVPAS(XGWriteSurfaceOrTextureToXPR, PATCH, 3911),
};
// ******************************************************************
// * XGRAPHC_OOVPA_SIZE
// ******************************************************************
uint32 XGRAPHC_OOVPA_SIZEV2 = sizeof(XGRAPHC_OOVPAV2);
#endif

View File

@ -383,10 +383,12 @@ void EmuHLEIntercept(Xbe::Header *pXbeHeader)
if (bLLE_GPU)
continue;
#if ENABLE_LEGACY_XGRAPHC_DB
if (BuildVersion == 3944)
BuildVersion = 3911;
if (OrigBuildVersion == 4531)
BuildVersion = 4361;
#endif
}
if (strcmp(LibraryName.c_str(), Lib_XACTENG) == 0)
{