fixed unitialized glide functions.
- rigged up color combiners - rigged up texture buffer (hwfbe) - rigged up wrapper settings
This commit is contained in:
parent
ca90b950bf
commit
ba4610be61
105
Project64.sln
105
Project64.sln
|
@ -1,72 +1,43 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Source\Common\Common.vcproj", "{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64", "Source\Project64\Project64.vcproj", "{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC} = {731BD205-2826-4631-B7AF-117658E88DBC}
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610} = {3326E128-33AF-422C-BB7C-67CC6B915610}
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RSP", "Source\RSP\RSP.vcproj", "{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D} = {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Settings", "Source\Settings\Settings.vcproj", "{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7zip", "Source\3rd Party\7zip\7zip.vcproj", "{3326E128-33AF-422C-BB7C-67CC6B915610}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTL", "Source\3rd Party\WTL\WTL.vcproj", "{4BC6906B-213E-40D7-9FC7-1A93E228393D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "Source\3rd Party\zlib\zlib.vcproj", "{731BD205-2826-4631-B7AF-117658E88DBC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64Setup", "Source\Installer\Installer.vcproj", "{360A34F3-3172-4B09-8BC9-B3FBEE677863}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18} = {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glide64", "Source\Glide64\Glide64.vcproj", "{A4D13408-A794-4199-8FC7-4A9A32505005}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{462C2608-182F-452C-944F-AF201E19300B} = {462C2608-182F-452C-944F-AF201E19300B}
|
||||
{05B9CB11-12D1-47CD-8E4A-88E12162119B} = {05B9CB11-12D1-47CD-8E4A-88E12162119B}
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82} = {93447136-FACD-4740-8F35-FC46FB4A9E82}
|
||||
{25A25249-C284-4C5A-8DC2-26FC3EB13703} = {25A25249-C284-4C5A-8DC2-26FC3EB13703}
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {2DADDAA5-0F57-46ED-A974-747908DDC7F3}
|
||||
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D} = {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871} = {427F1DCD-3BED-4010-9322-077A4C06D871}
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2} = {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "Source\3rd Party\wx\wx_core.vcproj", "{93447136-FACD-4740-8F35-FC46FB4A9E82}"
|
||||
EndProject
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rd Party", "3rd Party", "{AA8F7F8E-5377-4911-859D-8A8817B0DB26}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wxWidgets", "wxWidgets", "{1379F817-7E3D-4F58-9C22-7E364E46E842}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "Source\3rd Party\wx\wx_base.vcproj", "{427F1DCD-3BED-4010-9322-077A4C06D871}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82} = {93447136-FACD-4740-8F35-FC46FB4A9E82}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "Source\3rd Party\wx\wx_wxjpeg.vcproj", "{93CFEDF3-9A75-4484-B169-D9D8074F5AC2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "Source\3rd Party\wx\wx_wxpng.vcproj", "{05B9CB11-12D1-47CD-8E4A-88E12162119B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "Source\3rd Party\wx\wx_wxzlib.vcproj", "{25A25249-C284-4C5A-8DC2-26FC3EB13703}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glitch64", "Source\Glitch64\Glitch64.vcproj", "{462C2608-182F-452C-944F-AF201E19300B}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Glide", "Glide", "{9FE699A5-41C3-4441-92AB-639B3D77DE26}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GlideHQ", "Source\GlideHQ\GlideHQ.vcproj", "{2DADDAA5-0F57-46ED-A974-747908DDC7F3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||
EndProjectSection
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Source\Common\Common.vcxproj", "{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64", "Source\Project64\Project64.vcxproj", "{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RSP", "Source\RSP\RSP.vcxproj", "{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Settings", "Source\Settings\Settings.vcxproj", "{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7zip", "Source\3rd Party\7zip\7zip.vcxproj", "{3326E128-33AF-422C-BB7C-67CC6B915610}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTL", "Source\3rd Party\WTL\WTL.vcxproj", "{4BC6906B-213E-40D7-9FC7-1A93E228393D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "Source\3rd Party\zlib\zlib.vcxproj", "{731BD205-2826-4631-B7AF-117658E88DBC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64Setup", "Source\Installer\Installer.vcxproj", "{360A34F3-3172-4B09-8BC9-B3FBEE677863}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glide64", "Source\Glide64\Glide64.vcxproj", "{A4D13408-A794-4199-8FC7-4A9A32505005}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "Source\3rd Party\wx\wx_core.vcxproj", "{93447136-FACD-4740-8F35-FC46FB4A9E82}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "Source\3rd Party\wx\wx_base.vcxproj", "{427F1DCD-3BED-4010-9322-077A4C06D871}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "Source\3rd Party\wx\wx_wxjpeg.vcxproj", "{93CFEDF3-9A75-4484-B169-D9D8074F5AC2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "Source\3rd Party\wx\wx_wxpng.vcxproj", "{05B9CB11-12D1-47CD-8E4A-88E12162119B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "Source\3rd Party\wx\wx_wxzlib.vcxproj", "{25A25249-C284-4C5A-8DC2-26FC3EB13703}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glitch64", "Source\Glitch64\Glitch64.vcxproj", "{462C2608-182F-452C-944F-AF201E19300B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GlideHQ", "Source\GlideHQ\GlideHQ.vcxproj", "{2DADDAA5-0F57-46ED-A974-747908DDC7F3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -174,17 +145,17 @@ Global
|
|||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{4BC6906B-213E-40D7-9FC7-1A93E228393D} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{1379F817-7E3D-4F58-9C22-7E364E46E842} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{462C2608-182F-452C-944F-AF201E19300B} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{4BC6906B-213E-40D7-9FC7-1A93E228393D} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{05B9CB11-12D1-47CD-8E4A-88E12162119B} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{25A25249-C284-4C5A-8DC2-26FC3EB13703} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{462C2608-182F-452C-944F-AF201E19300B} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#define _WX_RCDEFS_H
|
||||
|
||||
|
||||
#define WX_MSC_FULL_VER 150030729
|
||||
#define WX_MSC_FULL_VER 160040219
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
// Project started on December 29th, 2001
|
||||
//
|
||||
// Authors:
|
||||
// Dave2001, original author, founded the project in 2001, left it in 2002
|
||||
// Dave2001, original author, founded the project in 2001, left it in 2002ini
|
||||
// Gugaman, joined the project in 2002, left it in 2002
|
||||
// Sergey 'Gonetz' Lipski, joined the project in 2002, main author since fall of 2002
|
||||
// Hiroshi 'KoolSmoky' Morii, joined the project in 2007
|
||||
|
@ -736,7 +736,7 @@ COMBINE cmb;
|
|||
#define SETSHADE_ENV() SETSHADE(rdp.env_color)
|
||||
#define SETSHADE_BYTE(byte) XSHADE_BYTE(byte, CMB_SET)
|
||||
#define SETSHADE_PRIMA() SETSHADE_BYTE((rdp.prim_color & 0xFF))
|
||||
#define SETSHADE_ENVA() SETSHADE_BYTE((rdp.env_color & 0xFF))
|
||||
#define SETSHADE_ENVA() SETSHADE_BYTE((rdp.env_color & 0xFF))
|
||||
#define SETSHADE_1MPRIMA() SETSHADE_BYTE(((~rdp.prim_color) & 0xFF))
|
||||
#define SETSHADE_PRIMLOD() SETSHADE_BYTE((rdp.prim_lodfrac & 0xFF))
|
||||
#define SETSHADE_1MPRIMLOD() SETSHADE_BYTE(((~rdp.prim_lodfrac) & 0xFF))
|
||||
|
@ -15980,17 +15980,17 @@ void InitCombine ()
|
|||
const char *extensions = grGetString (GR_EXTENSION);
|
||||
if (const char * extstr = strstr(extensions, "COMBINE")) {
|
||||
if (!strncmp(extstr, "COMBINE", 7)) {
|
||||
LOG ("extensions ");
|
||||
LOG ("extensions ");
|
||||
char strColorCombineExt[] = "grColorCombineExt";
|
||||
cmb.grColorCombineExt = (GRCOLORCOMBINEEXT) grGetProcAddress(strColorCombineExt);
|
||||
cmb.grColorCombineExt = (GRCOLORCOMBINEEXT) grColorCombineExt;
|
||||
char strAlphaCombineExt[] = "grAlphaCombineExt";
|
||||
cmb.grAlphaCombineExt = (GRCOLORCOMBINEEXT) grGetProcAddress(strAlphaCombineExt);
|
||||
char strTexColorCombineExt[] = "grTexColorCombineExt";
|
||||
cmb.grTexColorCombineExt = (GRTEXCOLORCOMBINEEXT) grGetProcAddress(strTexColorCombineExt);
|
||||
char strTexAlphaCombineExt[] = "grTexAlphaCombineExt";
|
||||
cmb.grTexAlphaCombineExt = (GRTEXCOLORCOMBINEEXT) grGetProcAddress(strTexAlphaCombineExt);
|
||||
char strConstantColorValueExt[] = "grConstantColorValueExt";
|
||||
cmb.grConstantColorValueExt = (GRCONSTANTCOLORVALUEEXT) grGetProcAddress(strConstantColorValueExt);
|
||||
cmb.grAlphaCombineExt = (GRCOLORCOMBINEEXT)grAlphaCombineExt;
|
||||
char strTexColorCombineExt[] = "grTexColorCombineExt";
|
||||
cmb.grTexColorCombineExt = (GRTEXCOLORCOMBINEEXT)grTexColorCombineExt ;
|
||||
char strTexAlphaCombineExt[] = "grTexAlphaCombineExt";
|
||||
cmb.grTexAlphaCombineExt = (GRTEXCOLORCOMBINEEXT) grTexAlphaCombineExt ;
|
||||
char strConstantColorValueExt[] = "grConstantColorValueExt";
|
||||
cmb.grConstantColorValueExt = (GRCONSTANTCOLORVALUEEXT) grConstantColorValueExt;
|
||||
if (cmb.grColorCombineExt && cmb.grAlphaCombineExt &&
|
||||
cmb.grTexColorCombineExt && cmb.grTexAlphaCombineExt)
|
||||
{
|
||||
|
|
|
@ -455,14 +455,6 @@ void ConfigNotebook::set_properties()
|
|||
cbxVRAM->SetToolTip(_("Autodetect VRAM Size:\nSince OpenGL cannot do this reliably at the moment, the option to set this manually is available.\nIf checked, plugin will try to autodetect VRAM size.\nBut if this appears wrong, please uncheck and set it to correct value.\n[Recommended: on]"));
|
||||
spinVRAM->SetMinSize(wxSize(55, 21));
|
||||
cbxFBO->SetToolTip(_("Use frame buffer objects:\nChanges the way FB effects are rendered - with or without usage of the OpenGL Frame Buffer Objects (FBO) extension.\nThe choice depends on game and your video card. FBO off is good for NVIDIA cards, while for ATI cards, it's usually best that FBOs are turned on.\nAlso, some FB effects works only with one of the methods, no matter, which card you have.\nOn the whole, with FBO off, compatibility/ accuracy is a bit better (which is the case for Resident Evil 2).\nHowever, with FBO on with some systems, it can actually be a bit faster in cases.\n[Recommended: video card and game dependant]"));
|
||||
char strConfigWrapperExt[] = "grConfigWrapperExt";
|
||||
GRCONFIGWRAPPEREXT grConfigWrapperExt = (GRCONFIGWRAPPEREXT)grGetProcAddress(strConfigWrapperExt);
|
||||
if (grConfigWrapperExt)
|
||||
{
|
||||
char strQueryResolutionsExt[] = "grQueryResolutionsExt";
|
||||
GRQUERYRESOLUTIONSEXT grQueryResolutionsExt = (GRQUERYRESOLUTIONSEXT)grGetProcAddress(strQueryResolutionsExt);
|
||||
if (grQueryResolutionsExt)
|
||||
{
|
||||
FxI32 size = 0;
|
||||
char ** aRes = grQueryResolutionsExt(&size);
|
||||
if (aRes && size)
|
||||
|
@ -473,7 +465,6 @@ void ConfigNotebook::set_properties()
|
|||
}
|
||||
cmbFSResolution->SetSelection(settings.wrpResolution < size ? settings.wrpResolution : 0);
|
||||
}
|
||||
}
|
||||
#ifdef __WINDOWS__
|
||||
cbxVRAM->SetValue(settings.wrpVRAM == 0);
|
||||
if (cbxVRAM->GetValue())
|
||||
|
@ -491,20 +482,7 @@ void ConfigNotebook::set_properties()
|
|||
#endif
|
||||
cbxFBO->SetValue(settings.wrpFBO > 0);
|
||||
cbxAnisotropic->SetValue(settings.wrpAnisotropic > 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
WrapperSizer_staticbox->Disable();
|
||||
WrapperFBOptionsSizer_staticbox->Disable();
|
||||
lblFSResolution->Disable();
|
||||
cmbFSResolution->Disable();
|
||||
cbxAnisotropic->Disable();
|
||||
cbxVRAM->Disable();
|
||||
lblVRAM->Disable();
|
||||
spinVRAM->Disable();
|
||||
lblMb->Disable();
|
||||
cbxFBO->Disable();
|
||||
}
|
||||
|
||||
|
||||
//emulation settings panel
|
||||
if (settings.advanced_options)
|
||||
|
|
|
@ -97,7 +97,7 @@ the plugin
|
|||
#include "config.h"
|
||||
|
||||
#if defined __VISUALC__
|
||||
typedef unsigned char boolean;
|
||||
typedef unsigned char boolean;
|
||||
#define GLIDE64_TRY __try
|
||||
#define GLIDE64_CATCH __except (EXCEPTION_EXECUTE_HANDLER)
|
||||
#else
|
||||
|
@ -390,24 +390,7 @@ extern GFX_INFO gfx;
|
|||
extern wxWindow * GFXWindow;
|
||||
extern bool no_dlist;
|
||||
|
||||
typedef GrContext_t (FX_CALL *GRWINOPENEXT)( FxU32 hWnd,
|
||||
GrScreenResolution_t resolution,
|
||||
GrScreenRefresh_t refresh,
|
||||
GrColorFormat_t format,
|
||||
GrOriginLocation_t origin,
|
||||
GrPixelFormat_t pixelformat,
|
||||
int nColBuffers,
|
||||
int nAuxBuffers) ;
|
||||
|
||||
typedef void (FX_CALL *GRTEXBUFFEREXT)( GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
GrLOD_t lodmin,
|
||||
GrLOD_t lodmax,
|
||||
GrAspectRatio_t aspect,
|
||||
GrTextureFormat_t fmt,
|
||||
FxU32 evenOdd) ;
|
||||
|
||||
typedef void (FX_CALL *GRAUXBUFFEREXT)( GrBuffer_t buffer ) ;
|
||||
|
||||
typedef void (FX_CALL *GRCOLORCOMBINEEXT) (GrCCUColor_t a,
|
||||
GrCombineMode_t a_mode,
|
||||
|
@ -438,17 +421,9 @@ typedef void (FX_CALL *GRCONSTANTCOLORVALUEEXT)
|
|||
|
||||
typedef void (FX_CALL *GRSTIPPLE)( FxI32 mode) ;
|
||||
|
||||
typedef void (FX_CALL *GRCONFIGWRAPPEREXT)(FxI32, FxI32, FxBool, FxBool);
|
||||
|
||||
typedef GrScreenResolution_t (FX_CALL *GRWRAPPERFULLSCREENRESOLUTIONEXT)(wxUint32*, wxUint32*);
|
||||
|
||||
typedef char ** (FX_CALL *GRQUERYRESOLUTIONSEXT)(FxI32*);
|
||||
|
||||
typedef int (*GETTEXADDR)(int tmu, int texsize);
|
||||
|
||||
extern GRTEXBUFFEREXT grTextureBufferExt;
|
||||
extern GRTEXBUFFEREXT grTextureAuxBufferExt;
|
||||
extern GRAUXBUFFEREXT grAuxBufferExt;
|
||||
extern GRSTIPPLE grStippleModeExt;
|
||||
extern GRSTIPPLE grStipplePatternExt;
|
||||
extern GETTEXADDR GetTexAddr;
|
||||
|
|
|
@ -43,3 +43,74 @@ typedef FxU32 GrCombineMode_t;
|
|||
#define GR_LOD_LOG2_512 0x9
|
||||
|
||||
#define GR_TEXTURE_UMA_EXT 0x06
|
||||
//wrapper specific
|
||||
FX_ENTRY void FX_CALL grConfigWrapperExt(FxI32, FxI32, FxBool, FxBool);
|
||||
FX_ENTRY GrScreenResolution_t FX_CALL grWrapperFullScreenResolutionExt(FxU32*, FxU32*);
|
||||
FX_ENTRY char ** FX_CALL grQueryResolutionsExt(FxI32*);
|
||||
FX_ENTRY FxBool FX_CALL grKeyPressedExt(FxU32 key);
|
||||
FX_ENTRY void FX_CALL grGetGammaTableExt(FxU32, FxU32*, FxU32*, FxU32*);
|
||||
|
||||
FX_ENTRY GrContext_t FX_CALL
|
||||
grSstWinOpenExt(
|
||||
FxU32 hWnd,
|
||||
GrScreenResolution_t screen_resolution,
|
||||
GrScreenRefresh_t refresh_rate,
|
||||
GrColorFormat_t color_format,
|
||||
GrOriginLocation_t origin_location,
|
||||
GrPixelFormat_t pixelformat,
|
||||
int nColBuffers,
|
||||
int nAuxBuffers);
|
||||
|
||||
//color combiner
|
||||
FX_ENTRY void FX_CALL
|
||||
grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
|
||||
GrCCUColor_t b, GrCombineMode_t b_mode,
|
||||
GrCCUColor_t c, FxBool c_invert,
|
||||
GrCCUColor_t d, FxBool d_invert,
|
||||
FxU32 shift, FxBool invert);
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode,
|
||||
GrACUColor_t b, GrCombineMode_t b_mode,
|
||||
GrACUColor_t c, FxBool c_invert,
|
||||
GrACUColor_t d, FxBool d_invert,
|
||||
FxU32 shift, FxBool invert);
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grTexColorCombineExt(GrChipID_t tmu,
|
||||
GrTCCUColor_t a, GrCombineMode_t a_mode,
|
||||
GrTCCUColor_t b, GrCombineMode_t b_mode,
|
||||
GrTCCUColor_t c, FxBool c_invert,
|
||||
GrTCCUColor_t d, FxBool d_invert,
|
||||
FxU32 shift, FxBool invert);
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grTexAlphaCombineExt(GrChipID_t tmu,
|
||||
GrTACUColor_t a, GrCombineMode_t a_mode,
|
||||
GrTACUColor_t b, GrCombineMode_t b_mode,
|
||||
GrTACUColor_t c, FxBool c_invert,
|
||||
GrTACUColor_t d, FxBool d_invert,
|
||||
FxU32 shift, FxBool invert);
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grConstantColorValueExt(GrChipID_t tmu,
|
||||
GrColor_t value);
|
||||
|
||||
//texture buffer
|
||||
FX_ENTRY void FX_CALL grTextureBufferExt( GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
GrLOD_t lodmin,
|
||||
GrLOD_t lodmax,
|
||||
GrAspectRatio_t aspect,
|
||||
GrTextureFormat_t fmt,
|
||||
FxU32 evenOdd);
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grTextureAuxBufferExt( GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
GrLOD_t thisLOD,
|
||||
GrLOD_t largeLOD,
|
||||
GrAspectRatio_t aspectRatio,
|
||||
GrTextureFormat_t format,
|
||||
FxU32 odd_even_mask );
|
||||
FX_ENTRY void FX_CALL grAuxBufferExt( GrBuffer_t buffer );
|
|
@ -316,9 +316,6 @@ void ChangeSize ()
|
|||
|
||||
void ConfigWrapper()
|
||||
{
|
||||
char strConfigWrapperExt[] = "grConfigWrapperExt";
|
||||
GRCONFIGWRAPPEREXT grConfigWrapperExt = (GRCONFIGWRAPPEREXT)grGetProcAddress(strConfigWrapperExt);
|
||||
if (grConfigWrapperExt)
|
||||
grConfigWrapperExt(settings.wrpResolution, settings.wrpVRAM * 1024 * 1024, settings.wrpFBO, settings.wrpAnisotropic);
|
||||
}
|
||||
|
||||
|
@ -638,9 +635,6 @@ void WriteSettings (bool saveEmulationSettings)
|
|||
FlushSettings();
|
||||
}
|
||||
|
||||
GRTEXBUFFEREXT grTextureBufferExt = NULL;
|
||||
GRTEXBUFFEREXT grTextureAuxBufferExt = NULL;
|
||||
GRAUXBUFFEREXT grAuxBufferExt = NULL;
|
||||
GRSTIPPLE grStippleModeExt = NULL;
|
||||
GRSTIPPLE grStipplePatternExt = NULL;
|
||||
FxBool (FX_CALL *grKeyPressed)(FxU32) = NULL;
|
||||
|
@ -878,30 +872,20 @@ int InitGfx ()
|
|||
}
|
||||
//*/
|
||||
|
||||
wxUint32 res_data = settings.res_data;
|
||||
char strWrapperFullScreenResolutionExt[] = "grWrapperFullScreenResolutionExt";
|
||||
wxUint32 res_data = settings.res_data;
|
||||
if (ev_fullscreen)
|
||||
{
|
||||
GRWRAPPERFULLSCREENRESOLUTIONEXT grWrapperFullScreenResolutionExt =
|
||||
(GRWRAPPERFULLSCREENRESOLUTIONEXT)grGetProcAddress(strWrapperFullScreenResolutionExt);
|
||||
if (grWrapperFullScreenResolutionExt) {
|
||||
wxUint32 _width, _height = 0;
|
||||
settings.res_data = grWrapperFullScreenResolutionExt(&_width, &_height);
|
||||
settings.res_data = grWrapperFullScreenResolutionExt((FxU32*)&_width, (FxU32*)&_height);
|
||||
settings.scr_res_x = settings.res_x = _width;
|
||||
settings.scr_res_y = settings.res_y = _height;
|
||||
}
|
||||
res_data = settings.res_data;
|
||||
res_data = settings.res_data;
|
||||
}
|
||||
else if (evoodoo)
|
||||
{
|
||||
GRWRAPPERFULLSCREENRESOLUTIONEXT grWrapperFullScreenResolutionExt =
|
||||
(GRWRAPPERFULLSCREENRESOLUTIONEXT)grGetProcAddress(strWrapperFullScreenResolutionExt);
|
||||
if (grWrapperFullScreenResolutionExt != NULL)
|
||||
{
|
||||
settings.res_data = settings.res_data_org;
|
||||
settings.scr_res_x = settings.res_x = resolutions[settings.res_data][0];
|
||||
settings.scr_res_y = settings.res_y = resolutions[settings.res_data][1];
|
||||
}
|
||||
res_data = settings.res_data | 0x80000000;
|
||||
}
|
||||
|
||||
|
@ -909,11 +893,8 @@ int InitGfx ()
|
|||
|
||||
// Select the window
|
||||
|
||||
if (fb_hwfbe_enabled)
|
||||
/*if (fb_hwfbe_enabled)
|
||||
{
|
||||
char strSstWinOpenExt[] ="grSstWinOpenExt";
|
||||
GRWINOPENEXT grSstWinOpenExt = (GRWINOPENEXT)grGetProcAddress(strSstWinOpenExt);
|
||||
if (grSstWinOpenExt)
|
||||
gfx_context = grSstWinOpenExt (wxPtrToUInt(gfx.hWnd),
|
||||
res_data,
|
||||
GR_REFRESH_60Hz,
|
||||
|
@ -922,7 +903,7 @@ int InitGfx ()
|
|||
fb_emulation_enabled?GR_PIXFMT_RGB_565:GR_PIXFMT_ARGB_8888, //32b color is not compatible with fb emulation
|
||||
2, // Double-buffering
|
||||
1); // 1 auxillary buffer
|
||||
}
|
||||
}*/
|
||||
if (!gfx_context)
|
||||
gfx_context = grSstWinOpen (wxPtrToUInt(gfx.hWnd),
|
||||
res_data,
|
||||
|
@ -988,26 +969,6 @@ int InitGfx ()
|
|||
if (strstr(extensions, "GETGAMMA"))
|
||||
grGet(GR_GAMMA_TABLE_ENTRIES, sizeof(voodoo.gamma_table_size), &voodoo.gamma_table_size);
|
||||
|
||||
if (fb_hwfbe_enabled)
|
||||
{
|
||||
if (char * extstr = (char*)strstr(extensions, "TEXTUREBUFFER"))
|
||||
{
|
||||
if (!strncmp(extstr, "TEXTUREBUFFER", 13))
|
||||
{
|
||||
char strTextureBufferExt[] = "grTextureBufferExt";
|
||||
grTextureBufferExt = (GRTEXBUFFEREXT) grGetProcAddress(strTextureBufferExt);
|
||||
char strTextureAuxBufferExt[] = "grTextureAuxBufferExt";
|
||||
grTextureAuxBufferExt = (GRTEXBUFFEREXT) grGetProcAddress(strTextureAuxBufferExt);
|
||||
char strAuxBufferExt[] = "grAuxBufferExt";
|
||||
grAuxBufferExt = (GRAUXBUFFEREXT) grGetProcAddress(strAuxBufferExt);
|
||||
}
|
||||
}
|
||||
else
|
||||
settings.frame_buffer &= ~fb_hwfbe;
|
||||
}
|
||||
else
|
||||
grTextureBufferExt = 0;
|
||||
|
||||
grStippleModeExt = (GRSTIPPLE)grStippleMode;
|
||||
grStipplePatternExt = (GRSTIPPLE)grStipplePattern;
|
||||
|
||||
|
@ -1572,9 +1533,6 @@ int CALL InitiateGFX (GFX_INFO Gfx_Info)
|
|||
if (fb_depth_render_enabled)
|
||||
ZLUT_init();
|
||||
|
||||
char strConfigWrapperExt[] = "grConfigWrapperExt";
|
||||
GRCONFIGWRAPPEREXT grConfigWrapperExt = (GRCONFIGWRAPPEREXT)grGetProcAddress(strConfigWrapperExt);
|
||||
if (grConfigWrapperExt)
|
||||
grConfigWrapperExt(settings.wrpResolution, settings.wrpVRAM * 1024 * 1024, settings.wrpFBO, settings.wrpAnisotropic);
|
||||
|
||||
grGlideInit ();
|
||||
|
@ -1813,7 +1771,7 @@ void CALL RomOpen (void)
|
|||
evoodoo = 0;
|
||||
|
||||
if (evoodoo)
|
||||
InitGfx ();
|
||||
InitGfx ();
|
||||
}
|
||||
|
||||
if (strstr (extensions, "ROMNAME"))
|
||||
|
|
|
@ -50,102 +50,102 @@
|
|||
|
||||
extern "C" void SwapBlock32 ();
|
||||
extern "C" void SwapBlock64 ();
|
||||
|
||||
const int NumOfFormats = 3;
|
||||
SCREEN_SHOT_FORMAT ScreenShotFormats[NumOfFormats] = { {wxT("BMP"), wxT("bmp"), wxBITMAP_TYPE_BMP}, {wxT("PNG"), wxT("png"), wxBITMAP_TYPE_PNG}, {wxT("JPEG"), wxT("jpeg"), wxBITMAP_TYPE_JPEG} };
|
||||
|
||||
const char *ACmp[] = { "NONE", "THRESHOLD", "UNKNOWN", "DITHER" };
|
||||
|
||||
const char *Mode0[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"1", "NOISE",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0" };
|
||||
|
||||
const char *Mode1[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"CENTER", "K4",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0" };
|
||||
|
||||
const char *Mode2[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"SCALE", "COMBINED_ALPHA",
|
||||
"T0_ALPHA", "T1_ALPHA",
|
||||
"PRIM_ALPHA", "SHADE_ALPHA",
|
||||
"ENV_ALPHA", "LOD_FRACTION",
|
||||
"PRIM_LODFRAC", "K5",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0" };
|
||||
|
||||
const char *Mode3[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"1", "0" };
|
||||
|
||||
const char *Alpha0[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"1", "0" };
|
||||
|
||||
#define Alpha1 Alpha0
|
||||
const char *Alpha2[] = { "LOD_FRACTION", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"PRIM_LODFRAC", "0" };
|
||||
#define Alpha3 Alpha0
|
||||
|
||||
const char *FBLa[] = { "G_BL_CLR_IN", "G_BL_CLR_MEM", "G_BL_CLR_BL", "G_BL_CLR_FOG" };
|
||||
const char *FBLb[] = { "G_BL_A_IN", "G_BL_A_FOG", "G_BL_A_SHADE", "G_BL_0" };
|
||||
const char *FBLc[] = { "G_BL_CLR_IN", "G_BL_CLR_MEM", "G_BL_CLR_BL", "G_BL_CLR_FOG"};
|
||||
const char *FBLd[] = { "G_BL_1MA", "G_BL_A_MEM", "G_BL_1", "G_BL_0" };
|
||||
|
||||
const char *str_zs[] = { "G_ZS_PIXEL", "G_ZS_PRIM" };
|
||||
|
||||
const char *str_yn[] = { "NO", "YES" };
|
||||
const char *str_offon[] = { "OFF", "ON" };
|
||||
|
||||
const char *str_cull[] = { "DISABLE", "FRONT", "BACK", "BOTH" };
|
||||
|
||||
// I=intensity probably
|
||||
const char *str_format[] = { "RGBA", "YUV", "CI", "IA", "I", "?", "?", "?" };
|
||||
const char *str_size[] = { "4bit", "8bit", "16bit", "32bit" };
|
||||
const char *str_cm[] = { "WRAP/NO CLAMP", "MIRROR/NO CLAMP", "WRAP/CLAMP", "MIRROR/CLAMP" };
|
||||
const char *str_lod[] = { "1", "2", "4", "8", "16", "32", "64", "128", "256", "512", "1024", "2048" };
|
||||
const char *str_aspect[] = { "1x8", "1x4", "1x2", "1x1", "2x1", "4x1", "8x1" };
|
||||
|
||||
const char *str_filter[] = { "Point Sampled", "Average (box)", "Bilinear" };
|
||||
|
||||
const char *str_tlut[] = { "TT_NONE", "TT_UNKNOWN", "TT_RGBA_16", "TT_IA_16" };
|
||||
|
||||
const char *str_dither[] = { "Pattern", "~Pattern", "Noise", "None" };
|
||||
|
||||
const char *CIStatus[] = { "ci_main", "ci_zimg", "ci_unknown", "ci_useless",
|
||||
"ci_old_copy", "ci_copy", "ci_copy_self",
|
||||
"ci_zcopy", "ci_aux", "ci_aux_copy" };
|
||||
|
||||
//static variables
|
||||
|
||||
char out_buf[2048];
|
||||
|
||||
wxUint32 frame_count; // frame counter
|
||||
|
||||
int ucode_error_report = TRUE;
|
||||
int wrong_tile = -1;
|
||||
|
||||
const int NumOfFormats = 3;
|
||||
SCREEN_SHOT_FORMAT ScreenShotFormats[NumOfFormats] = { {wxT("BMP"), wxT("bmp"), wxBITMAP_TYPE_BMP}, {wxT("PNG"), wxT("png"), wxBITMAP_TYPE_PNG}, {wxT("JPEG"), wxT("jpeg"), wxBITMAP_TYPE_JPEG} };
|
||||
|
||||
const char *ACmp[] = { "NONE", "THRESHOLD", "UNKNOWN", "DITHER" };
|
||||
|
||||
const char *Mode0[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"1", "NOISE",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0" };
|
||||
|
||||
const char *Mode1[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"CENTER", "K4",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0" };
|
||||
|
||||
const char *Mode2[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"SCALE", "COMBINED_ALPHA",
|
||||
"T0_ALPHA", "T1_ALPHA",
|
||||
"PRIM_ALPHA", "SHADE_ALPHA",
|
||||
"ENV_ALPHA", "LOD_FRACTION",
|
||||
"PRIM_LODFRAC", "K5",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0",
|
||||
"0", "0" };
|
||||
|
||||
const char *Mode3[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"1", "0" };
|
||||
|
||||
const char *Alpha0[] = { "COMBINED", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"1", "0" };
|
||||
|
||||
#define Alpha1 Alpha0
|
||||
const char *Alpha2[] = { "LOD_FRACTION", "TEXEL0",
|
||||
"TEXEL1", "PRIMITIVE",
|
||||
"SHADE", "ENVIORNMENT",
|
||||
"PRIM_LODFRAC", "0" };
|
||||
#define Alpha3 Alpha0
|
||||
|
||||
const char *FBLa[] = { "G_BL_CLR_IN", "G_BL_CLR_MEM", "G_BL_CLR_BL", "G_BL_CLR_FOG" };
|
||||
const char *FBLb[] = { "G_BL_A_IN", "G_BL_A_FOG", "G_BL_A_SHADE", "G_BL_0" };
|
||||
const char *FBLc[] = { "G_BL_CLR_IN", "G_BL_CLR_MEM", "G_BL_CLR_BL", "G_BL_CLR_FOG"};
|
||||
const char *FBLd[] = { "G_BL_1MA", "G_BL_A_MEM", "G_BL_1", "G_BL_0" };
|
||||
|
||||
const char *str_zs[] = { "G_ZS_PIXEL", "G_ZS_PRIM" };
|
||||
|
||||
const char *str_yn[] = { "NO", "YES" };
|
||||
const char *str_offon[] = { "OFF", "ON" };
|
||||
|
||||
const char *str_cull[] = { "DISABLE", "FRONT", "BACK", "BOTH" };
|
||||
|
||||
// I=intensity probably
|
||||
const char *str_format[] = { "RGBA", "YUV", "CI", "IA", "I", "?", "?", "?" };
|
||||
const char *str_size[] = { "4bit", "8bit", "16bit", "32bit" };
|
||||
const char *str_cm[] = { "WRAP/NO CLAMP", "MIRROR/NO CLAMP", "WRAP/CLAMP", "MIRROR/CLAMP" };
|
||||
const char *str_lod[] = { "1", "2", "4", "8", "16", "32", "64", "128", "256", "512", "1024", "2048" };
|
||||
const char *str_aspect[] = { "1x8", "1x4", "1x2", "1x1", "2x1", "4x1", "8x1" };
|
||||
|
||||
const char *str_filter[] = { "Point Sampled", "Average (box)", "Bilinear" };
|
||||
|
||||
const char *str_tlut[] = { "TT_NONE", "TT_UNKNOWN", "TT_RGBA_16", "TT_IA_16" };
|
||||
|
||||
const char *str_dither[] = { "Pattern", "~Pattern", "Noise", "None" };
|
||||
|
||||
const char *CIStatus[] = { "ci_main", "ci_zimg", "ci_unknown", "ci_useless",
|
||||
"ci_old_copy", "ci_copy", "ci_copy_self",
|
||||
"ci_zcopy", "ci_aux", "ci_aux_copy" };
|
||||
|
||||
//static variables
|
||||
|
||||
char out_buf[2048];
|
||||
|
||||
wxUint32 frame_count; // frame counter
|
||||
|
||||
int ucode_error_report = TRUE;
|
||||
int wrong_tile = -1;
|
||||
|
||||
// ** RDP graphics functions **
|
||||
static void undef();
|
||||
static void spnoop();
|
||||
|
@ -360,7 +360,7 @@ void microcheck ()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#ifdef __WINDOWS__
|
||||
static void GetClientSize(int * width, int * height)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
|
@ -372,7 +372,7 @@ static void GetClientSize(int * width, int * height)
|
|||
GFXWindow->GetClientSize(width, height);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void drawNoFullscreenMessage()
|
||||
{
|
||||
|
@ -1163,9 +1163,9 @@ static void rdp_texrect()
|
|||
|
||||
wxUint32 prev_tile = rdp.cur_tile;
|
||||
rdp.cur_tile = tile;
|
||||
|
||||
const float Z = set_sprite_combine_mode ();
|
||||
|
||||
|
||||
const float Z = set_sprite_combine_mode ();
|
||||
|
||||
rdp.texrecting = 0;
|
||||
|
||||
if (!rdp.cur_cache[0])
|
||||
|
@ -1563,23 +1563,23 @@ static void rdp_fullsync()
|
|||
}
|
||||
|
||||
static void rdp_setkeygb()
|
||||
{
|
||||
wxUint32 sB = rdp.cmd1&0xFF;
|
||||
wxUint32 cB = (rdp.cmd1>>8)&0xFF;
|
||||
wxUint32 sG = (rdp.cmd1>>16)&0xFF;
|
||||
wxUint32 cG = (rdp.cmd1>>24)&0xFF;
|
||||
rdp.SCALE = (rdp.SCALE&0xFF0000FF) | (sG<<16) | (sB<<8);
|
||||
rdp.CENTER = (rdp.CENTER&0xFF0000FF) | (cG<<16) | (cB<<8);
|
||||
FRDP("setkeygb. cG=%02lx, sG=%02lx, cB=%02lx, sB=%02lx\n", cG, sG, cB, sB);
|
||||
{
|
||||
wxUint32 sB = rdp.cmd1&0xFF;
|
||||
wxUint32 cB = (rdp.cmd1>>8)&0xFF;
|
||||
wxUint32 sG = (rdp.cmd1>>16)&0xFF;
|
||||
wxUint32 cG = (rdp.cmd1>>24)&0xFF;
|
||||
rdp.SCALE = (rdp.SCALE&0xFF0000FF) | (sG<<16) | (sB<<8);
|
||||
rdp.CENTER = (rdp.CENTER&0xFF0000FF) | (cG<<16) | (cB<<8);
|
||||
FRDP("setkeygb. cG=%02lx, sG=%02lx, cB=%02lx, sB=%02lx\n", cG, sG, cB, sB);
|
||||
}
|
||||
|
||||
static void rdp_setkeyr()
|
||||
{
|
||||
wxUint32 sR = rdp.cmd1&0xFF;
|
||||
wxUint32 cR = (rdp.cmd1>>8)&0xFF;
|
||||
rdp.SCALE = (rdp.SCALE&0x00FFFFFF) | (sR<<24);
|
||||
rdp.CENTER = (rdp.CENTER&0x00FFFFFF) | (cR<<24);
|
||||
FRDP("setkeyr. cR=%02lx, sR=%02lx\n", cR, sR);
|
||||
wxUint32 sR = rdp.cmd1&0xFF;
|
||||
wxUint32 cR = (rdp.cmd1>>8)&0xFF;
|
||||
rdp.SCALE = (rdp.SCALE&0x00FFFFFF) | (sR<<24);
|
||||
rdp.CENTER = (rdp.CENTER&0x00FFFFFF) | (cR<<24);
|
||||
FRDP("setkeyr. cR=%02lx, sR=%02lx\n", cR, sR);
|
||||
}
|
||||
|
||||
static void rdp_setconvert()
|
||||
|
@ -2004,7 +2004,7 @@ static void rdp_loadtile()
|
|||
if (height == 0)
|
||||
return;
|
||||
|
||||
wxUint32 wid_64 = rdp.tiles[tile].line;
|
||||
wxUint32 wid_64 = rdp.tiles[tile].line;
|
||||
wxUIntPtr dst = wxPtrToUInt(rdp.tmem) + (rdp.tiles[tile].t_mem<<3);
|
||||
wxUIntPtr end = wxPtrToUInt(rdp.tmem) + 4096 - (wid_64<<3);
|
||||
asmLoadTile(wxPtrToUInt(gfx.RDRAM), dst, wid_64, height, line_n, offs, end);
|
||||
|
@ -2136,13 +2136,13 @@ static void rdp_fillrect()
|
|||
if (rdp.cur_image && (rdp.cur_image->format != 0) && (rdp.cycle_mode == 3) && (rdp.cur_image->width == lr_x - ul_x) && (rdp.cur_image->height == lr_y - ul_y))
|
||||
{
|
||||
wxUint32 color = rdp.fill_color;
|
||||
if (rdp.ci_size < 3)
|
||||
{
|
||||
color = ((color&1)?0xFF:0) |
|
||||
((wxUint32)((float)((color&0xF800) >> 11) / 31.0f * 255.0f) << 24) |
|
||||
((wxUint32)((float)((color&0x07C0) >> 6) / 31.0f * 255.0f) << 16) |
|
||||
((wxUint32)((float)((color&0x003E) >> 1) / 31.0f * 255.0f) << 8);
|
||||
}
|
||||
if (rdp.ci_size < 3)
|
||||
{
|
||||
color = ((color&1)?0xFF:0) |
|
||||
((wxUint32)((float)((color&0xF800) >> 11) / 31.0f * 255.0f) << 24) |
|
||||
((wxUint32)((float)((color&0x07C0) >> 6) / 31.0f * 255.0f) << 16) |
|
||||
((wxUint32)((float)((color&0x003E) >> 1) / 31.0f * 255.0f) << 8);
|
||||
}
|
||||
grDepthMask (FXFALSE);
|
||||
grBufferClear (color, 0, 0xFFFF);
|
||||
grDepthMask (FXTRUE);
|
||||
|
@ -2151,10 +2151,10 @@ static void rdp_fillrect()
|
|||
return;
|
||||
}
|
||||
|
||||
// Update scissor
|
||||
if (fullscreen)
|
||||
update_scissor ();
|
||||
|
||||
// Update scissor
|
||||
if (fullscreen)
|
||||
update_scissor ();
|
||||
|
||||
if (settings.decrease_fillrect_edge && rdp.cycle_mode == 0)
|
||||
{
|
||||
lr_x--; lr_y--;
|
||||
|
@ -2225,15 +2225,15 @@ static void rdp_fillrect()
|
|||
|
||||
grAlphaBlendFunction (GR_BLEND_ONE, GR_BLEND_ZERO, GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
|
||||
grAlphaTestFunction (GR_CMP_ALWAYS);
|
||||
if (grStippleModeExt)
|
||||
grStippleModeExt(GR_STIPPLE_DISABLE);
|
||||
|
||||
grCullMode(GR_CULL_DISABLE);
|
||||
grFogMode (GR_FOG_DISABLE);
|
||||
grDepthBufferFunction (GR_CMP_ALWAYS);
|
||||
grDepthMask (FXFALSE);
|
||||
|
||||
grAlphaTestFunction (GR_CMP_ALWAYS);
|
||||
if (grStippleModeExt)
|
||||
grStippleModeExt(GR_STIPPLE_DISABLE);
|
||||
|
||||
grCullMode(GR_CULL_DISABLE);
|
||||
grFogMode (GR_FOG_DISABLE);
|
||||
grDepthBufferFunction (GR_CMP_ALWAYS);
|
||||
grDepthMask (FXFALSE);
|
||||
|
||||
rdp.update |= UPDATE_COMBINE | UPDATE_CULL_MODE | UPDATE_FOG_ENABLED | UPDATE_ZBUF_ENABLED;
|
||||
}
|
||||
else
|
||||
|
@ -2253,7 +2253,7 @@ static void rdp_fillrect()
|
|||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
grConstantColorValue((cmb.ccolor&0xFFFFFF00)|(rdp.fog_color&0xFF));
|
||||
grConstantColorValue((cmb.ccolor&0xFFFFFF00)|(rdp.fog_color&0xFF));
|
||||
rdp.update |= UPDATE_COMBINE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -495,7 +495,7 @@ grClipWindow( FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy )
|
|||
|
||||
if (!use_fbo) {
|
||||
int th = height;
|
||||
if (th > screen_height)
|
||||
if (th > screen_height)
|
||||
th = screen_height;
|
||||
maxy = th - maxy;
|
||||
miny = th - miny;
|
||||
|
@ -604,7 +604,7 @@ grSstWinOpenExt(
|
|||
GrScreenRefresh_t refresh_rate,
|
||||
GrColorFormat_t color_format,
|
||||
GrOriginLocation_t origin_location,
|
||||
GrPixelFormat_t /*pixelformat*/,
|
||||
GrPixelFormat_t pixelformat,
|
||||
int nColBuffers,
|
||||
int nAuxBuffers)
|
||||
{
|
||||
|
@ -825,8 +825,8 @@ grSstWinOpen(
|
|||
|
||||
viewport_offset = 0;
|
||||
fullscreen = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TMU_SIZE = (config.vram_size - width * height * 4 * 3) / 2;
|
||||
|
||||
// save screen resolution for hwfbe, after resolution enumeration
|
||||
|
@ -917,11 +917,11 @@ grSstWinOpen(
|
|||
}
|
||||
else
|
||||
{
|
||||
FxU32 _width, _height;
|
||||
g_FullScreenResolutions.getResolution(screen_resolution, &_width, &_height);
|
||||
width = _width;
|
||||
height = _height;
|
||||
videoFlags |= SDL_FULLSCREEN;
|
||||
FxU32 _width, _height;
|
||||
g_FullScreenResolutions.getResolution(screen_resolution, &_width, &_height);
|
||||
width = _width;
|
||||
height = _height;
|
||||
videoFlags |= SDL_FULLSCREEN;
|
||||
fullscreen = 1;
|
||||
}
|
||||
TMU_SIZE = (config.vram_size - width * height * 4 * 3) / 2;
|
||||
|
@ -2448,13 +2448,13 @@ grLfbWriteRegion( GrBuffer_t dst_buffer,
|
|||
FX_ENTRY char ** FX_CALL
|
||||
grQueryResolutionsExt(FxI32 * Size)
|
||||
{
|
||||
LOG("grQueryResolutionsExt\r\n");
|
||||
LOG("grQueryResolutionsExt\r\n");
|
||||
return g_FullScreenResolutions.getResolutionsList(Size);
|
||||
}
|
||||
|
||||
FX_ENTRY GrScreenResolution_t FX_CALL grWrapperFullScreenResolutionExt(FxU32* width, FxU32* height)
|
||||
{
|
||||
LOG("grWrapperFullScreenResolutionExt\r\n");
|
||||
{
|
||||
LOG("grWrapperFullScreenResolutionExt\r\n");
|
||||
g_FullScreenResolutions.getResolution(config.res, width, height);
|
||||
return config.res;
|
||||
}
|
||||
|
@ -2486,7 +2486,7 @@ FX_ENTRY FxBool FX_CALL grKeyPressedExt(FxU32 key)
|
|||
|
||||
FX_ENTRY void FX_CALL grConfigWrapperExt(FxI32 resolution, FxI32 vram, FxBool fbo, FxBool aniso)
|
||||
{
|
||||
LOG("grConfigWrapperExt\r\n");
|
||||
LOG("grConfigWrapperExt\r\n");
|
||||
config.res = resolution;
|
||||
config.vram_size = vram;
|
||||
config.fbo = fbo;
|
||||
|
@ -2506,8 +2506,8 @@ grQueryResolutions( const GrResolution *resTemplate, GrResolution *output )
|
|||
int res_inf = 0;
|
||||
int res_sup = 0xf;
|
||||
int i;
|
||||
int n=0;
|
||||
LOG("grQueryResolutions\r\n");
|
||||
int n=0;
|
||||
LOG("grQueryResolutions\r\n");
|
||||
display_warning("grQueryResolutions");
|
||||
if ((unsigned int)resTemplate->resolution != GR_QUERY_ANY)
|
||||
{
|
||||
|
@ -2538,7 +2538,7 @@ grReset( FxU32 /*what*/ )
|
|||
|
||||
FX_ENTRY void FX_CALL
|
||||
grEnable( GrEnableMode_t mode )
|
||||
{
|
||||
{
|
||||
LOG("grEnable(%d)\r\n", mode);
|
||||
if (mode == GR_TEXTURE_UMA_EXT)
|
||||
UMAmode = 1;
|
||||
|
@ -2547,7 +2547,7 @@ grEnable( GrEnableMode_t mode )
|
|||
FX_ENTRY void FX_CALL
|
||||
grDisable( GrEnableMode_t mode )
|
||||
{
|
||||
LOG("grDisable(%d)\r\n", mode);
|
||||
LOG("grDisable(%d)\r\n", mode);
|
||||
if (mode == GR_TEXTURE_UMA_EXT)
|
||||
UMAmode = 0;
|
||||
}
|
||||
|
@ -2740,16 +2740,16 @@ grTexMultibaseAddress( GrChipID_t /*tmu*/,
|
|||
display_warning("grTexMultibaseAddress");
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void MySleep(FxU32 ms)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef _WIN32
|
||||
Sleep(ms);
|
||||
#else
|
||||
#else
|
||||
SDL_Delay(ms);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
static void CorrectGamma(LPVOID apGammaRamp)
|
||||
{
|
||||
|
@ -2759,13 +2759,13 @@ static void CorrectGamma(LPVOID apGammaRamp)
|
|||
SetDeviceGammaRamp(hdc, apGammaRamp);
|
||||
ReleaseDC(NULL, hdc);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void CorrectGamma(const FxU16 aGammaRamp[3][256])
|
||||
{
|
||||
int res = SDL_SetGammaRamp(aGammaRamp[0], aGammaRamp[1], aGammaRamp[2]);
|
||||
LOG("SDL_SetGammaRamp returned %d\r\n", res);
|
||||
}
|
||||
{
|
||||
int res = SDL_SetGammaRamp(aGammaRamp[0], aGammaRamp[1], aGammaRamp[2]);
|
||||
LOG("SDL_SetGammaRamp returned %d\r\n", res);
|
||||
}
|
||||
#endif
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
|
@ -2781,26 +2781,26 @@ grLoadGammaTable( FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *blue)
|
|||
aGammaRamp[1][i] = (FxU16)((green[i] << 8) & 0xFFFF);
|
||||
aGammaRamp[2][i] = (FxU16)((blue[i] << 8) & 0xFFFF);
|
||||
}
|
||||
CorrectGamma(aGammaRamp);
|
||||
MySleep(1000); //workaround for Mupen64
|
||||
CorrectGamma(aGammaRamp);
|
||||
MySleep(1000); //workaround for Mupen64
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grGetGammaTableExt(FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *blue)
|
||||
{
|
||||
LOG("grGetGammaTableExt()\r\n");
|
||||
LOG("grGetGammaTableExt()\r\n");
|
||||
FxU16 aGammaRamp[3][256];
|
||||
#ifdef _WIN32
|
||||
HDC hdc = GetDC(NULL);
|
||||
if (hdc == NULL)
|
||||
if (hdc == NULL)
|
||||
return;
|
||||
if (GetDeviceGammaRamp(hdc, aGammaRamp) == TRUE)
|
||||
if (GetDeviceGammaRamp(hdc, aGammaRamp) == TRUE)
|
||||
{
|
||||
ReleaseDC(NULL, hdc);
|
||||
#else
|
||||
if (SDL_GetGammaRamp(aGammaRamp[0], aGammaRamp[1], aGammaRamp[2]) != -1)
|
||||
if (SDL_GetGammaRamp(aGammaRamp[0], aGammaRamp[1], aGammaRamp[2]) != -1)
|
||||
{
|
||||
#endif
|
||||
#endif
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
red[i] = aGammaRamp[0][i] >> 8;
|
||||
|
@ -2810,10 +2810,10 @@ grGetGammaTableExt(FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *blue)
|
|||
}
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guGammaCorrectionRGB( FxFloat gammaR, FxFloat gammaG, FxFloat gammaB )
|
||||
{
|
||||
LOG("guGammaCorrectionRGB()\r\n");
|
||||
FX_ENTRY void FX_CALL
|
||||
guGammaCorrectionRGB( FxFloat gammaR, FxFloat gammaG, FxFloat gammaB )
|
||||
{
|
||||
LOG("guGammaCorrectionRGB()\r\n");
|
||||
if (!fullscreen)
|
||||
return;
|
||||
FxU16 aGammaRamp[3][256];
|
||||
|
@ -2823,8 +2823,8 @@ guGammaCorrectionRGB( FxFloat gammaR, FxFloat gammaG, FxFloat gammaB )
|
|||
aGammaRamp[1][i] = (((FxU16)((pow(i/255.0F, 1.0F/gammaG)) * 255.0F + 0.5F)) << 8) & 0xFFFF;
|
||||
aGammaRamp[2][i] = (((FxU16)((pow(i/255.0F, 1.0F/gammaB)) * 255.0F + 0.5F)) << 8) & 0xFFFF;
|
||||
}
|
||||
CorrectGamma(aGammaRamp);
|
||||
}
|
||||
CorrectGamma(aGammaRamp);
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grDitherMode( GrDitherMode_t /*mode*/ )
|
||||
|
|
|
@ -45,10 +45,10 @@ extern "C" {
|
|||
#include "glext.h"
|
||||
#include "wglext.h"
|
||||
}
|
||||
#else
|
||||
#include <stdio.h>
|
||||
//#define printf(...)
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#else
|
||||
#include <stdio.h>
|
||||
//#define printf(...)
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <SDL_opengl.h>
|
||||
#endif // _WIN32
|
||||
#include "glide.h"
|
||||
|
@ -63,7 +63,7 @@ void updateCombiner(int i);
|
|||
void updateCombinera(int i);
|
||||
void remove_tex(unsigned int idmin, unsigned int idmax);
|
||||
void add_tex(unsigned int id);
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
|
||||
extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
|
||||
|
@ -85,7 +85,7 @@ extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
|
|||
extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
|
||||
extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
|
||||
extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
|
||||
extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f;
|
||||
extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f;
|
||||
#endif
|
||||
|
||||
extern int w_buffer_mode;
|
||||
|
|
Loading…
Reference in New Issue