Fixed a bug in LGJ when GPU was nVidia and Mesa was set as shader patches.
This commit is contained in:
parent
7ea08b3db3
commit
f67f30cbcd
34
docs/changelog
Normal file
34
docs/changelog
Normal file
@ -0,0 +1,34 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- Let's go Jungle resolution patch.
|
||||
- 2 Spicy resolution patch.
|
||||
- 2 Spicy Patch to allow any IP for Network play.
|
||||
- HOD4 SP CPU Frequency fix.
|
||||
- ID4 and ID5 patches for Network link to allowed any NIC name and any IP.
|
||||
- Harley patch for network link to allowed any NIC name and any IP.
|
||||
- Fixed a bug in Let's go Jungle when GPU was nVidia and Mesa was set as shader patches.
|
||||
|
||||
### [2.0.1] 2025-01-23
|
||||
### Added
|
||||
- HOD4 Custom crosshair.
|
||||
- HOD4 CPU frequency fix (Configurable via config file).
|
||||
- HOD4 New resolution patch that fixes Boss battle and scales from 1280x768 instead of the lower resolution.
|
||||
- Built in Logos and fonts (no more nee to use Lucida/SEGA_KakuGothic-DB-Roman_12 and logo.tga).
|
||||
- Outrun 2 Easy network config from the conf file (can set your IP address in the config file and the loader will set it in the eeprom for you).
|
||||
- Card Emulation for VT3 and R-tuned.
|
||||
- All the now games work inside an SDL window now, unless it is disabled in the conf file.
|
||||
|
||||
## [2.0] - 2024-12-24
|
||||
### Initial Release
|
||||
- First official public release.
|
||||
- Features of the loader:
|
||||
- Dynamic shader modification allowing games to work on Intel, nVidia and AMD
|
||||
- 5.1 Surround Sound Support
|
||||
- Dynamic resolution patching allowing most games to scale properly in HD
|
||||
- Original cabinet support with pass through of JVS and FFB
|
||||
- Network play
|
||||
- Both simple X11 and advanced evdev input system allowing for ready-to-play keyboard and mouse support or mapping of any controller
|
@ -12,7 +12,6 @@
|
||||
#undef __x86_64__
|
||||
#include <arpa/inet.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <link.h>
|
||||
#include <linux/sockios.h>
|
||||
#include <math.h>
|
||||
@ -266,12 +265,6 @@ void __attribute__((constructor)) hook_init()
|
||||
(getConfig()->crc32 == INITIALD_5_EXP_30) || (getConfig()->crc32 == INITIALD_5_EXP_40))) {
|
||||
printf("WARNING: Game %s is unsupported in AMD GPU with ATI driver\n",getGameName());
|
||||
}
|
||||
if (getConfig()->lgjRenderWithMesa &&
|
||||
((getConfig()->crc32 == LETS_GO_JUNGLE) || (getConfig()->crc32 == LETS_GO_JUNGLE_REVA) ||
|
||||
(getConfig()->crc32 == LETS_GO_JUNGLE_SPECIAL)))
|
||||
{
|
||||
getConfig()->GPUVendor = AMD_GPU;
|
||||
}
|
||||
}
|
||||
|
||||
DIR *opendir(const char *dirname)
|
||||
@ -468,10 +461,6 @@ FILE *fopen(const char *restrict pathname, const char *restrict mode)
|
||||
return fileHooks[CPUINFO];
|
||||
}
|
||||
|
||||
if (strcmp(pathname, "/usr/lib/boot/logo_red.tga") == 0)
|
||||
{
|
||||
return _fopen("logo_red.tga", mode);
|
||||
}
|
||||
if (strcmp(pathname, "/usr/lib/boot/SEGA_KakuGothic-DB-Roman_12.tga") == 0)
|
||||
{
|
||||
if (!getConfig()->disableBuiltinFont)
|
||||
|
@ -435,6 +435,7 @@ bool shaderFileInList(const char *pathname, int *idx)
|
||||
{
|
||||
uint32_t gId = getConfig()->crc32;
|
||||
char cwd[256];
|
||||
int gpuVendor = getConfig()->GPUVendor;
|
||||
if (gId == GHOST_SQUAD_EVOLUTION)
|
||||
{
|
||||
if (getConfig()->GPUVendor != NVIDIA_GPU)
|
||||
@ -560,9 +561,7 @@ bool shaderFileInList(const char *pathname, int *idx)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (getConfig()->GPUVendor != NVIDIA_GPU)
|
||||
{
|
||||
if (gId == TOO_SPICY)
|
||||
else if (gId == TOO_SPICY && gpuVendor != NVIDIA_GPU)
|
||||
{
|
||||
for (int x = 0; x < tooSpicyShaderPatchesCount; x++)
|
||||
{
|
||||
@ -575,12 +574,11 @@ bool shaderFileInList(const char *pathname, int *idx)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (gId == THE_HOUSE_OF_THE_DEAD_EX)
|
||||
else if (gId == THE_HOUSE_OF_THE_DEAD_EX && gpuVendor != NVIDIA_GPU)
|
||||
{
|
||||
for (int x = 0; x < hodexShaderPatchesCount; x++)
|
||||
{
|
||||
if ((strcmp(hodexShaderPatches[x].fileName, basename((char *)pathname)) == 0) &&
|
||||
(hodexShaderPatches[x].shaderBufferSize != 0))
|
||||
if ((strcmp(hodexShaderPatches[x].fileName, basename((char *)pathname)) == 0) && (hodexShaderPatches[x].shaderBufferSize != 0))
|
||||
{
|
||||
*idx = x;
|
||||
return true;
|
||||
@ -596,7 +594,8 @@ bool shaderFileInList(const char *pathname, int *idx)
|
||||
ShaderFilesToMod *filesToMod;
|
||||
int filesToModCount;
|
||||
|
||||
if ((gId == LETS_GO_JUNGLE) || (gId == LETS_GO_JUNGLE_REVA) || (gId == LETS_GO_JUNGLE_SPECIAL))
|
||||
if ((gId == LETS_GO_JUNGLE || gId == LETS_GO_JUNGLE_REVA || gId == LETS_GO_JUNGLE_SPECIAL) &&
|
||||
(gpuVendor != NVIDIA_GPU || getConfig()->lgjRenderWithMesa == 1))
|
||||
{
|
||||
filesToMod = lgjShaderFilesToMod;
|
||||
filesToModCount = lgjFilesToModCount;
|
||||
@ -605,32 +604,31 @@ bool shaderFileInList(const char *pathname, int *idx)
|
||||
format = "%s/inc%s";
|
||||
}
|
||||
|
||||
else if ((gId == INITIALD_4_EXP_REVB) || (gId == INITIALD_4_EXP_REVC) || (gId == INITIALD_4_EXP_REVD) ||
|
||||
(gId == INITIALD_4_REVA) || (gId == INITIALD_4_REVB) || (gId == INITIALD_4_REVC) ||
|
||||
(gId == INITIALD_4_REVD) || (gId == INITIALD_4_REVG) || (gId == INITIALD_5_JAP_REVA) ||
|
||||
(gId == INITIALD_5_JAP_REVF) || (gId == INITIALD_5_EXP_30) || (gId == INITIALD_5_EXP_40))
|
||||
else if ((gId == INITIALD_4_EXP_REVB || gId == INITIALD_4_EXP_REVC || gId == INITIALD_4_EXP_REVD || gId == INITIALD_4_REVA ||
|
||||
gId == INITIALD_4_REVB || gId == INITIALD_4_REVC || gId == INITIALD_4_REVD || gId == INITIALD_4_REVG ||
|
||||
gId == INITIALD_5_JAP_REVA || gId == INITIALD_5_JAP_REVF || gId == INITIALD_5_EXP_30 || gId == INITIALD_5_EXP_40) &&
|
||||
gpuVendor != NVIDIA_GPU)
|
||||
{
|
||||
filesToMod = idShaderFilesToMod;
|
||||
filesToModCount = idFilesToModCount;
|
||||
if ((gId == INITIALD_4_REVA) || (gId == INITIALD_4_REVB) || (gId == INITIALD_4_REVC) ||
|
||||
(gId == INITIALD_4_REVD) || (gId == INITIALD_4_REVG))
|
||||
if ((gId == INITIALD_4_REVA) || (gId == INITIALD_4_REVB) || (gId == INITIALD_4_REVC) || (gId == INITIALD_4_REVD) ||
|
||||
(gId == INITIALD_4_REVG))
|
||||
{
|
||||
filesToMod = id4jShaderFilesToMod;
|
||||
filesToModCount = id4FilesToModCount;
|
||||
}
|
||||
searchFolder1 = "/shader/Cg/inc";
|
||||
searchFolder2 = "/data/Shader";
|
||||
if ((gId == INITIALD_5_JAP_REVA) || (gId == INITIALD_5_JAP_REVF) || (gId == INITIALD_5_EXP_30) ||
|
||||
(gId == INITIALD_5_EXP_40))
|
||||
if ((gId == INITIALD_5_JAP_REVA) || (gId == INITIALD_5_JAP_REVF) || (gId == INITIALD_5_EXP_30) || (gId == INITIALD_5_EXP_40))
|
||||
{
|
||||
searchFolder2 = "/data/V5SHADER";
|
||||
}
|
||||
format = "%s%s";
|
||||
}
|
||||
else if ((gId == VIRTUA_TENNIS_3) || (gId == VIRTUA_TENNIS_3_TEST) || (gId == VIRTUA_TENNIS_3_REVA) ||
|
||||
(gId == VIRTUA_TENNIS_3_REVA_TEST) || (gId == VIRTUA_TENNIS_3_REVB) ||
|
||||
(gId == VIRTUA_TENNIS_3_REVB_TEST) || (gId == VIRTUA_TENNIS_3_REVC) ||
|
||||
(gId == VIRTUA_TENNIS_3_REVC_TEST))
|
||||
else if ((gId == VIRTUA_TENNIS_3 || gId == VIRTUA_TENNIS_3_TEST || gId == VIRTUA_TENNIS_3_REVA || gId == VIRTUA_TENNIS_3_REVA_TEST ||
|
||||
gId == VIRTUA_TENNIS_3_REVB || gId == VIRTUA_TENNIS_3_REVB_TEST || gId == VIRTUA_TENNIS_3_REVC ||
|
||||
gId == VIRTUA_TENNIS_3_REVC_TEST) &&
|
||||
gpuVendor != NVIDIA_GPU)
|
||||
{
|
||||
filesToMod = vt3ShaderFilesToMod;
|
||||
filesToModCount = vt3FilesToModCount;
|
||||
@ -658,7 +656,6 @@ bool shaderFileInList(const char *pathname, int *idx)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1098,16 +1095,15 @@ char *cgCreateProgram(uint32_t context, int program_type, const char *program, i
|
||||
const char **args) = dlsym(RTLD_NEXT, "cgCreateProgram");
|
||||
|
||||
uint32_t gId = getConfig()->crc32;
|
||||
if (((gId != VIRTUA_TENNIS_3) && (gId != VIRTUA_TENNIS_3_TEST) && (gId != VIRTUA_TENNIS_3_REVA) &&
|
||||
(gId != VIRTUA_TENNIS_3_REVA_TEST) && (gId != VIRTUA_TENNIS_3_REVB) && (gId != VIRTUA_TENNIS_3_REVB_TEST) &&
|
||||
(gId != VIRTUA_TENNIS_3_REVC) && (gId != VIRTUA_TENNIS_3_REVC_TEST) && (gId != INITIALD_4_EXP_REVB) &&
|
||||
(gId != INITIALD_4_EXP_REVC) && (gId != INITIALD_4_EXP_REVD) && (gId != LETS_GO_JUNGLE) &&
|
||||
(gId != LETS_GO_JUNGLE_REVA) && (gId != LETS_GO_JUNGLE_SPECIAL) && (gId != INITIALD_4_REVA) &&
|
||||
(gId != INITIALD_4_REVB) && (gId != INITIALD_4_REVC) && (gId != INITIALD_4_REVD) && (gId != INITIALD_4_REVG) &&
|
||||
(gId != INITIALD_5_JAP_REVA) && (gId != INITIALD_5_JAP_REVF) && (gId != INITIALD_5_EXP_30) &&
|
||||
(gId != INITIALD_5_EXP_40)) ||
|
||||
if ((gId != VIRTUA_TENNIS_3 && gId != VIRTUA_TENNIS_3_TEST && gId != VIRTUA_TENNIS_3_REVA && gId != VIRTUA_TENNIS_3_REVA_TEST &&
|
||||
gId != VIRTUA_TENNIS_3_REVB && gId != VIRTUA_TENNIS_3_REVB_TEST && gId != VIRTUA_TENNIS_3_REVC &&
|
||||
gId != VIRTUA_TENNIS_3_REVC_TEST && gId != INITIALD_4_EXP_REVB && gId != INITIALD_4_EXP_REVC && gId != INITIALD_4_EXP_REVD &&
|
||||
gId != LETS_GO_JUNGLE && gId != LETS_GO_JUNGLE_REVA && gId != LETS_GO_JUNGLE_SPECIAL && gId != INITIALD_4_REVA &&
|
||||
gId != INITIALD_4_REVB && gId != INITIALD_4_REVC && gId != INITIALD_4_REVD && gId != INITIALD_4_REVG &&
|
||||
gId != INITIALD_5_JAP_REVA && gId != INITIALD_5_JAP_REVF && gId != INITIALD_5_EXP_30 && gId != INITIALD_5_EXP_40) ||
|
||||
(getConfig()->GPUVendor == NVIDIA_GPU))
|
||||
{
|
||||
if ((gId != LETS_GO_JUNGLE && gId != LETS_GO_JUNGLE_REVA && gId != LETS_GO_JUNGLE_SPECIAL) || getConfig()->lgjRenderWithMesa == 0)
|
||||
return _cgCreateProgram(context, program_type, program, profile, entry, args);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user