Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove GBIX and weird memory limitation #131

Open
Sora-yx opened this issue Nov 30, 2023 · 2 comments
Open

Remove GBIX and weird memory limitation #131

Sora-yx opened this issue Nov 30, 2023 · 2 comments

Comments

@Sora-yx
Copy link
Contributor

Sora-yx commented Nov 30, 2023

I had in experimentation a code that prevent the game to fill the GBIX array so it always treat texture as new, while still being limited to a maximum of 2048 textures, this has the advantage of removing GBIX conflict for textures, making replacement easier.

However, after some tests, it has been discovered that the game crashes when using HD GUI and unlocking a new GameGear game, regardless of the level or how long the game has been running.

image

HD GUI for what I saw load the subtitles PVM ~5 times in the result screen before it actually crashes, I'm guessing GBIX prevent the crash since the game doesn't have to re load the textures.

Now, while this could be fixed on HD GUI side, that wouldn't really fix the original issue, any other mod could potentially do something similar, if not the game itself, so it would be nice to figure out why this error happens and how to fix it. This could even be a D3D8 limit thing, but I find this kind of odd. If the limit cannot be increased, it would be nice to at least prevent the game to crash.

@pkr-sadx
Copy link

The hook on the emblem count screen in HD GUI made it load textures infinitely, which is bad either way so I redid it to hook a different function. It may no longer crash, so here's the DLL from the old version just in case.
HD_GUI_old.zip

@PiKeyAr
Copy link
Member

PiKeyAr commented Aug 27, 2024

Alternative implementation: Hack the game to always load the texture when its GBIX is 0 so the modders could just set the index to 0 while the rest of the GBIX system will remain functional. As far as I know, SA1 DC ignores GBIX 0 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants