mirror of
https://github.com/lindbergh-loader/lindbergh-loader.git
synced 2026-10-14 18:09:34 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0af606d845 | ||
|
|
88e1628382 | ||
|
|
6918990746 | ||
|
|
87dccf51a4 | ||
|
|
81d9185227 | ||
|
|
510d13398e |
@@ -11,7 +11,7 @@ For detailed information on configuration and controls, please see the following
|
|||||||
- [**🚀 General Guide**](docs/guide.md): Information on supported games, known issues, and general configuration.
|
- [**🚀 General Guide**](docs/guide.md): Information on supported games, known issues, and general configuration.
|
||||||
- [**🎮 Controls Guide**](docs/CONTROLS.md): A detailed guide on how to customize your controls using the `controls.ini` file.
|
- [**🎮 Controls Guide**](docs/CONTROLS.md): A detailed guide on how to customize your controls using the `controls.ini` file.
|
||||||
|
|
||||||
If you'd like to support the development work of this emulator, see early development builds or get support from the authors please consider [becoming a patreon here](https://www.patreon.com/LindberghLoader).
|
If you'd like to support the development work of this emulator, see early development builds or get support from the authors please consider [becoming a patreon here](https://www.patreon.com/c/LinuxLoader).
|
||||||
|
|
||||||
If you need any help please ask the community in the [arcade community discord](https://arcade.community). Please only submit issues if they are bugs with the software, ask in the arcade community discord if you're not sure if it's a bug or you're not setting something up properly!
|
If you need any help please ask the community in the [arcade community discord](https://arcade.community). Please only submit issues if they are bugs with the software, ask in the arcade community discord if you're not sure if it's a bug or you're not setting something up properly!
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -3,6 +3,11 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.4]
|
||||||
|
### Added
|
||||||
|
- Force Outrun to render properly in 4:3 when resolution is set to 640x480
|
||||||
|
to match the chihiro version of the game for use on CRT cabinets.
|
||||||
|
|
||||||
## [2.1.3]
|
## [2.1.3]
|
||||||
### Added
|
### Added
|
||||||
- MJ4 Rev. A, MJ4 Rev. F and MJ4 Evolution Rev. B support.
|
- MJ4 Rev. A, MJ4 Rev. F and MJ4 Evolution Rev. B support.
|
||||||
@@ -176,4 +181,4 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Dynamic resolution patching allowing most games to scale properly in HD
|
- Dynamic resolution patching allowing most games to scale properly in HD
|
||||||
- Original cabinet support with pass through of JVS and FFB
|
- Original cabinet support with pass through of JVS and FFB
|
||||||
- Network play
|
- Network play
|
||||||
- Both simple X11 and advanced evdev input system allowing for ready-to-play keyboard and mouse support or mapping of any controller
|
- Both simple X11 and advanced evdev input system allowing for ready-to-play keyboard and mouse support or mapping of any controller
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ extern SDL_Window *sdlWindow;
|
|||||||
int blitWidth = 0;
|
int blitWidth = 0;
|
||||||
int blitHeight = 0;
|
int blitHeight = 0;
|
||||||
|
|
||||||
|
int gameIsOutrunChihiroMode = 0;
|
||||||
|
|
||||||
int fboInitialized = false;
|
int fboInitialized = false;
|
||||||
GLuint fboId = 0;
|
GLuint fboId = 0;
|
||||||
GLuint fboTextureId = 0;
|
GLuint fboTextureId = 0;
|
||||||
@@ -36,6 +38,30 @@ void initBlitting()
|
|||||||
blitSetWidthandHeightSize();
|
blitSetWidthandHeightSize();
|
||||||
blitInitializeFbo();
|
blitInitializeFbo();
|
||||||
dest.gameScale = 1.0f;
|
dest.gameScale = 1.0f;
|
||||||
|
|
||||||
|
if(gGrp == GROUP_OUTRUN && getConfig()->width == 640)
|
||||||
|
gameIsOutrunChihiroMode = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the game is outrun in 640x480 mode we force the game to write to out temp framebuffer directly
|
||||||
|
* to avoid the framebuffer of the window being too small and the edges getting clipped off. So we
|
||||||
|
* hook glBindFramebuffer and if the game tries to bind the default framebuffer, we bind our FBO instead and
|
||||||
|
* set the viewport to 800x480 so the game renders to our FBO. Then in blitStretch we copy from our FBO to the
|
||||||
|
* screen with the correct aspect ratio.
|
||||||
|
*/
|
||||||
|
void glBindFramebufferEXT(GLenum target, GLuint framebuffer) {
|
||||||
|
void (*_glBindFramebufferEXT)(GLenum target, GLuint framebuffer) = dlsym(RTLD_NEXT, "glBindFramebufferEXT");
|
||||||
|
|
||||||
|
if(target == GL_FRAMEBUFFER_EXT && framebuffer == 0 && fboInitialized && gameIsOutrunChihiroMode)
|
||||||
|
{
|
||||||
|
glBindFramebuffer(GL_FRAMEBUFFER, fboId);
|
||||||
|
glViewport(0, 0, 800, 480);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_glBindFramebufferEXT(target, framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void blitSetWidthandHeightSize()
|
void blitSetWidthandHeightSize()
|
||||||
@@ -121,14 +147,18 @@ void blitStretch()
|
|||||||
if (fboInitialized && fboId > 0 && fboTextureId > 0 && sdlWindow)
|
if (fboInitialized && fboId > 0 && fboTextureId > 0 && sdlWindow)
|
||||||
{
|
{
|
||||||
SDL_GetWindowSizeInPixels(sdlWindow, &drawableW, &drawableH);
|
SDL_GetWindowSizeInPixels(sdlWindow, &drawableW, &drawableH);
|
||||||
|
|
||||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
|
||||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fboId);
|
|
||||||
glBlitFramebuffer(0, 0, blitWidth, blitHeight, 0, 0, blitWidth, blitHeight, GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
|
||||||
|
|
||||||
float gameAspect = (float)blitWidth / (float)blitHeight;
|
|
||||||
float windowAspect = (float)drawableW / (float)drawableH;
|
float windowAspect = (float)drawableW / (float)drawableH;
|
||||||
|
|
||||||
|
float gameAspect = 4.0 / 3.0;
|
||||||
|
|
||||||
|
if(!gameIsOutrunChihiroMode)
|
||||||
|
{
|
||||||
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||||
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fboId);
|
||||||
|
glBlitFramebuffer(0, 0, blitWidth, blitHeight, 0, 0, blitWidth, blitHeight, GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
||||||
|
gameAspect = (float)blitWidth / (float)blitHeight;
|
||||||
|
}
|
||||||
|
|
||||||
dest.W = drawableW;
|
dest.W = drawableW;
|
||||||
dest.H = drawableH;
|
dest.H = drawableH;
|
||||||
|
|
||||||
@@ -142,7 +172,7 @@ void blitStretch()
|
|||||||
dest.H = (GLsizei)(drawableW / gameAspect);
|
dest.H = (GLsizei)(drawableW / gameAspect);
|
||||||
dest.Y = (drawableH - dest.H) / 2;
|
dest.Y = (drawableH - dest.H) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
@@ -151,7 +181,14 @@ void blitStretch()
|
|||||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||||
glReadBuffer(GL_COLOR_ATTACHMENT0);
|
glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||||
|
|
||||||
glBlitFramebuffer(0, 0, blitWidth, blitHeight, dest.X, dest.Y, dest.X + dest.W, dest.Y + dest.H, GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
if(gameIsOutrunChihiroMode)
|
||||||
|
{
|
||||||
|
glBlitFramebuffer(80, 0, blitWidth - 80, blitHeight, dest.X, dest.Y, dest.X + dest.W, dest.Y + dest.H, GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
glBlitFramebuffer(0, 0, blitWidth, blitHeight, dest.X, dest.Y, dest.X + dest.W, dest.Y + dest.H, GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
||||||
|
}
|
||||||
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,11 +130,18 @@ void startSDL(int *argcp, char **argv)
|
|||||||
|
|
||||||
strcat(sdlGameTitle, getGameName());
|
strcat(sdlGameTitle, getGameName());
|
||||||
|
|
||||||
|
int windowWidth = gWidth;
|
||||||
|
|
||||||
|
if(gGrp == GROUP_OUTRUN && getConfig()->width == 640)
|
||||||
|
{
|
||||||
|
gWidth = 800;
|
||||||
|
}
|
||||||
|
|
||||||
// Hacky way to make AxA games render the characters properly
|
// Hacky way to make AxA games render the characters properly
|
||||||
if (gId == QUIZ_AXA || gId == QUIZ_AXA_LIVE)
|
if (gId == QUIZ_AXA || gId == QUIZ_AXA_LIVE)
|
||||||
sdlWindow = SDL_CreateWindow(sdlGameTitle, 1024, 768, windowFlags);
|
sdlWindow = SDL_CreateWindow(sdlGameTitle, 1024, 768, windowFlags);
|
||||||
else
|
else
|
||||||
sdlWindow = SDL_CreateWindow(sdlGameTitle, gWidth, gHeight, windowFlags);
|
sdlWindow = SDL_CreateWindow(sdlGameTitle, windowWidth, gHeight, windowFlags);
|
||||||
|
|
||||||
if (!sdlWindow)
|
if (!sdlWindow)
|
||||||
{
|
{
|
||||||
@@ -172,11 +179,11 @@ void startSDL(int *argcp, char **argv)
|
|||||||
|
|
||||||
// If games are any of the LGJ or Primeval Hunt, we prevent the window to resize.
|
// If games are any of the LGJ or Primeval Hunt, we prevent the window to resize.
|
||||||
if ((gGrp == GROUP_LGJ || gId == PRIMEVAL_HUNT) && !getConfig()->fullscreen)
|
if ((gGrp == GROUP_LGJ || gId == PRIMEVAL_HUNT) && !getConfig()->fullscreen)
|
||||||
SDL_SetWindowMaximumSize(sdlWindow, gWidth, gHeight);
|
SDL_SetWindowMaximumSize(sdlWindow, windowWidth, gHeight);
|
||||||
else if (gGrp != GROUP_LGJ)
|
else if (gGrp != GROUP_LGJ)
|
||||||
SDL_SetWindowMaximumSize(sdlWindow, displayMode->w, displayMode->h);
|
SDL_SetWindowMaximumSize(sdlWindow, displayMode->w, displayMode->h);
|
||||||
|
|
||||||
SDL_SetWindowMinimumSize(sdlWindow, gWidth, gHeight);
|
SDL_SetWindowMinimumSize(sdlWindow, windowWidth, gHeight);
|
||||||
|
|
||||||
// Hacky way to make AxA games render the characters properly
|
// Hacky way to make AxA games render the characters properly
|
||||||
if (gId == QUIZ_AXA || gId == QUIZ_AXA_LIVE)
|
if (gId == QUIZ_AXA || gId == QUIZ_AXA_LIVE)
|
||||||
|
|||||||
Reference in New Issue
Block a user