mirror of
https://github.com/lindbergh-loader/lindbergh-loader.git
synced 2026-10-13 17:48:27 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
feaa6a912e | ||
|
|
b129220822 |
@@ -61,6 +61,8 @@ int selectReply = -1;
|
||||
int jvsFileDescriptor = -1;
|
||||
int jvsPacketSize = -1;
|
||||
|
||||
char serialString[1024] = {0};
|
||||
|
||||
int initBaseboard()
|
||||
{
|
||||
char *sramPath = getConfig()->sramPath;
|
||||
@@ -90,6 +92,26 @@ int initBaseboard()
|
||||
startJVSFrameThread(&jvsFileDescriptor);
|
||||
}
|
||||
|
||||
strcpy(serialString, SERIAL_STRING);
|
||||
|
||||
time_t t = time(NULL); // Get current time
|
||||
struct tm *tm_info = localtime(&t); // Convert to local time structure
|
||||
|
||||
int month = tm_info->tm_mon + 1; // tm_mon is 0-based (0 = Jan, 4 = May)
|
||||
int day = tm_info->tm_mday; // tm_mday is the day of the month
|
||||
|
||||
if (month == 1 && day == 18) {
|
||||
strcpy(serialString, "HAPPY BIRTHDAY!!");
|
||||
}
|
||||
|
||||
if (month == 5 && day == 20) {
|
||||
strcpy(serialString, "HAPPY BIRTHDAY!!");
|
||||
}
|
||||
|
||||
if (month == 5 && day == 21) {
|
||||
strcpy(serialString, "HAPPY BIRTHDAY!!");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -236,7 +258,7 @@ int baseboardIoctl(int fd, unsigned int request, void *data)
|
||||
|
||||
case BASEBOARD_GET_SERIAL:
|
||||
{
|
||||
memcpy(&sharedMemory[serialCommand.destAddress + 96], SERIAL_STRING, strlen(SERIAL_STRING));
|
||||
memcpy(&sharedMemory[serialCommand.destAddress + 96], serialString, strlen(serialString));
|
||||
_data[1] = 1; // Set the status to success
|
||||
}
|
||||
break;
|
||||
|
||||
+14
-29
@@ -185,14 +185,12 @@ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
case OUTRUN_2_SP_SDX_REVA_TEST:
|
||||
case OUTRUN_2_SP_SDX_REVA_TEST2:
|
||||
{
|
||||
if (gWidth != 800 && gHeight != 480)
|
||||
{
|
||||
if ((width >= 800) && (width != 1024))
|
||||
{
|
||||
|
||||
|
||||
width = gWidth;
|
||||
height = gHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -294,26 +292,23 @@ void glTexImage2D(unsigned int target, int level, int internalformat, int width,
|
||||
void (*_glTexImage2D)(unsigned int target, int level, int internalformat, int width, int height, int border, unsigned int format,
|
||||
unsigned int type, const void *pixels) = dlsym(RTLD_NEXT, "glTexImage2D");
|
||||
|
||||
if (gWidth != 800 && gHeight != 480)
|
||||
{
|
||||
|
||||
switch (gId)
|
||||
{
|
||||
case OUTRUN_2_SP_SDX:
|
||||
case OUTRUN_2_SP_SDX_REVA:
|
||||
{
|
||||
void *addr = __builtin_return_address(0);
|
||||
if ((width >= 800) && (width != 1024) && (addr != (void *)0x80d78d5) && (addr != (void *)0x080d7941))
|
||||
{
|
||||
|
||||
width = gWidth;
|
||||
height = gHeight;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||
_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||
}
|
||||
|
||||
void glTexParameteri(unsigned int target, unsigned int pname, int param)
|
||||
@@ -2486,19 +2481,15 @@ int initResolutionPatches()
|
||||
break;
|
||||
case OUTRUN_2_SP_SDX:
|
||||
{
|
||||
if (gWidth <= 800 && gHeight <= 480)
|
||||
break;
|
||||
// If resolution is not the native of the game this patch kind of fix the Sun when the LensGlare effect is
|
||||
// shown.
|
||||
if ((gWidth > 800) && (gHeight > 480))
|
||||
{
|
||||
|
||||
|
||||
patchMemory(0x080e8e72, "9090909090"); // removes a call to a light function
|
||||
patchMemory(0x080e8e83, "9090909090"); // removes a call to a light function
|
||||
if (!getConfig()->outrunLensGlareEnabled)
|
||||
{
|
||||
detourFunction(0x080e8b34, stubReturn); // Completely disables the lens glare effect
|
||||
}
|
||||
}
|
||||
|
||||
setVariable(0x080b913a, 0x44200000);
|
||||
setVariable(0x081dae28, 0x44200000);
|
||||
setVariable(0x081dae30, 0x44200000);
|
||||
@@ -2512,19 +2503,14 @@ int initResolutionPatches()
|
||||
break;
|
||||
case OUTRUN_2_SP_SDX_REVA:
|
||||
{
|
||||
if (gWidth <= 800 && gHeight <= 480)
|
||||
break;
|
||||
// If resolution is not the native of the game this patch kind of fix the Sun when the LensGlare effect is
|
||||
// shown.
|
||||
if ((gWidth > 800) && (gHeight > 480))
|
||||
{
|
||||
|
||||
patchMemory(0x080e8e06, "9090909090"); // removes a call to a light function
|
||||
patchMemory(0x080e8e17, "9090909090"); // removes a call to a light function
|
||||
if (!getConfig()->outrunLensGlareEnabled)
|
||||
{
|
||||
detourFunction(0x080e8ac8, stubReturn); // Completely disables the lens glare effect
|
||||
}
|
||||
}
|
||||
|
||||
setVariable(0x080b913a, 0x44200000);
|
||||
setVariable(0x081dada8, 0x44200000);
|
||||
setVariable(0x081dadb0, 0x44200000);
|
||||
@@ -2550,8 +2536,7 @@ int initResolutionPatches()
|
||||
case OUTRUN_2_SP_SDX_REVA_TEST:
|
||||
case OUTRUN_2_SP_SDX_REVA_TEST2:
|
||||
{
|
||||
if (gWidth <= 800 && gHeight <= 480)
|
||||
break;
|
||||
|
||||
setVariable(0x0804a490, gWidth);
|
||||
setVariable(0x0804a4ad, gHeight);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user