Fix SRAM logic in libgambatte cartridge.cpp to fix programs like lsdj#3
Open
amitkulk123 wants to merge 1 commit intorileytestut:masterfrom
Open
Fix SRAM logic in libgambatte cartridge.cpp to fix programs like lsdj#3amitkulk123 wants to merge 1 commit intorileytestut:masterfrom
amitkulk123 wants to merge 1 commit intorileytestut:masterfrom
Conversation
Author
|
A better solution than this would probably be to use a more updated submodule like gambatte-libretro, gambatte-speedrun, openemu gambatte-core, etc. but it would require modifying a couple of the cpp files in xcode and I'm not really experienced with that. There's also a more updated commit of the sinamas submodule that may have fixed the issue but that repo has been taken private and hasn't been updated since 3 years ago so wouldn't really recommend trying it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes issue #295
There's an issue with the way libgambatte handles memory sizes of 128 kib in the sinamas submodule. This matters because in certain ROMs like lsdj, the program will only show the load/save option if it correctly detect 128 kib of memory.
To fix this, I removed the sinimas submodule (since it's publicly archived and no longer updated), and changed the memory logic in the
gambatte/libgambatte/src/mem/cartridge.cppfile.Specifically I changed the way rambanks is assigned by using a switch statement:
This is the only file I changed and everything else is the same as the sinamas submodule. I actually got this code from looking at a previous PR where this was fixed but then later revoked.
Also the same logic is used in the
cartridge.cppfile in Provenance and libretro-gambatte and I can confirm that I haven't had any problems with the gambatte core when using either of those.For testing, feel free to grab an lsdj rom from here: https://www.littlesounddj.com/lsd/latest/rom_images/stable/.