I can't save game in Golden Sun: The Lost Age (Spanish)
When I save the game, the game crashes.
Yes, this is a known issue. If you look at the compatibility list you'll find a version you might be able to use: https://wiki.gbatemp.net/wiki/GBARunner2
Yes, this is a known issue. If you look at the compatibility list you'll find a version you might be able to use: https://wiki.gbatemp.net/wiki/GBARunner2
Downloaded as prompted:a903967 (03-06-2019).zip It is still invalid, I think this guide can be modified to not save
Interesting. I'll have to check myself. Did you sram patch your rom with gbata?
Interesting. I'll have to check myself. Did you sram patch your rom with gbata?
Of course, I have tried N methods for this game, and all ended in failure.
I actually CAN save in GS:TLA using version 03-06-2019 and a sram-patched FR rom.
I used ezgba for sram patching, and I'm running on an old first version DS with twilight menu.
However, with this version, there are some lags in battle animations and some sound effects are missing. Nothing game breaking, but that'd still be nice if the save bug could be fixed on the latest versions.
I actually CAN save in GS:TLA using version 03-06-2019 and a sram-patched FR rom.
I used ezgba for sram patching, and I'm running on an old first version DS with twilight menu.
However, with this version, there are some lags in battle animations and some sound effects are missing. Nothing game breaking, but that'd still be nice if the save bug could be fixed on the latest versions.
That's great! Have you tried this same patched rom with any more recent builds found here on github? What flash card are you using?
I actually CAN save in GS:TLA using version 03-06-2019 and a sram-patched FR rom. I used ezgba for sram patching, and I'm running on an old first version DS with twilight menu. However, with this version, there are some lags in battle animations and some sound effects are missing. Nothing game breaking, but that'd still be nice if the save bug could be fixed on the latest versions.
That's great! Have you tried this same patched rom with any more recent builds found here on github? What flash card are you using?
Tried with the latest build with that same rom. Lags and SFX issues are gone with these builds, but I still can't save.
I'm using an R4i-sdhc card, with a custom menu (not sure which one) because gbarunner doesn't start on the R4i default firmware.
I see. Thanks for taking the time to test and report. If you don't mind it would be of help if you could see at what version this saving stopped working. For example if you could see if the version released right after this is not able to save with the game then that would pin point it to a change between these two builds. Also you might need to check the successive build in the sd save branch if that is indeed the branch that the 2019/06/03 is from. I don't remember if it is.
Also if you could provide the checksum of your French GS:TLA before applying the patch then that would help too.
Could try and do that yeah. Might even be able to submit a PR if the change is minor. Haven't looked into C code for a long time but I could try.
I could determine, making local builds, that the breaking change seems to happen between commits be606cd0 and 6fd8f460.
In the first one save works, in the second it doesn't.
I'll try digging further into the diff, but as i said i'm really not familiar with C++ and the NDS devkit.
Well, i have a serious lead but i can't dig it because for some unknown reason, i can't make a local build of the latest master version.
I end up with a black screen with only the blue ribbon instead of the file browser... :/
EDIT: Managed to make a build, now i need to find a way to print some logs anywhere to debug the code. Some help would be appreciated :)
@jbellionjourdan That's great! Unfortunately I'm not able to help you with that, and unless Gericom is available you might need to ask from others who have experience working with gbarunner2 either on the ds(i) hacking discord or those who have sent PR already. @unresolvedsymbol has made his own fork of gbarunner2 and might be able to help you out too: https://github.com/unresolvedsymbol/GBARunner2-DSL-Enhanced
A link to the discord server can be found on twilightmenu++'s github page .
Well, this was in the end a false lead.
It at least allowed me to identify a way to improve my sram-patched rom in order to make it work with the latest build, by making the file compatible with GBARunner's save type detection.
So... Personally i fixed my issue and will be able to enjoy a nice GS:TLA playthrough. But i won't be able to contribute to the project :/
@jbellionjourdan Well at least you found a solution to make it work on the latest build. It would be nice if you could share the steps you did in order for the rom to work so that others can play this on the latest build. This might even work as a solution for the other couple of roms that currently have issues saving.
What i did is :
- Patch rom using ezgba
- Open patched file with a text editor to display its content as hexadecimal (i used sublime text)
- My editor formats the hex data with a space every 4 characters. These spaces will be annoying for next step, strip them away with a search-and-replace (can be long, the editor doesn't like search-and-replace on a file several Mo large)
- Search string
464c4153485f563132330000. This string is the hex representation ofFLASH_V123which is the original save type of an unpatched GS:TLA rom. - Replace it with
5352414d5f465f5631303000which is the hex representation ofSRAM_F_V100(which is our new save type, since we patched the rom to make it save that way). - Save file, enjoy.
This allows the latest GBARunner2 builds to detect that we patched the rom to use SRAM save type.
Well, after some hours of gameplay it suddenly stooped working.
I can't get why, even after restoring a .sav file at an earlier point where it worked before.
Looks like the behavior is completely random, so forget this solution.
In the end I managed to make the above patch work, but it required patching gbarunner executable too.
@jbellionjourdan Could you please explain how you accomplished this? I could add it to the compatibility list for others to follow at least.
In the arm9/source/save/Save.vram.cpp file where the different save types are defined, the save type SRAM_F_V100 that we patched into our rom is defined to expect 32kB save files.
Whereas, GS:TLA creates 64kB save files (because its original save type is FLASH_V123). So, even if we patched it to behave like an SRAM-saving game, it still generates 64kB files.
So, I changed the SRAM save type definition from 32kB to 64kB, which allowed me to build an executable that works for my patched GS:TLA rom.
This is not a solution everyone could use, since it requires being able to build your own patched executable (which would probably be different for each and every target game...). This means installing the nds sdk and understanding how to build a cpp app.
I see and I agree that this would not be expected of the common user to do. At least you have tracked down what the porblem with saving for this game is and hopefully we'll see a fix implemented someday. Thank you for looking this much into it! I figure the specific build you made only works for the French rom right now or is it region aspecific?
Well, I didn't exactly track down the real problem to make the save work with an unpatched rom...
Just a workaround to make a doubly-patched rom (sram patch, then manual patch detailed above) work.
The fix probably isn't region-specific, although I haven't tested it with any other region rom.
I'll see if I can make my patched executable available for download on my fork of the repo.