XProger / OpenLara

Classic Tomb Raider open-source engine
http://xproger.info/projects/OpenLara/
BSD 2-Clause "Simplified" License
4.64k stars 360 forks source link

[GBA] suggestion for easier sram detection in emulators #415

Closed ITotalJustice closed 2 years ago

ITotalJustice commented 2 years ago

Hi!

this isn't a bug report, just that i noticed that openlara uses sram. most earlier in development gba emulators detect sram using the guide here https://problemkaputt.de/gbatek.htm#gbacartbackupids, which is, searching the entire rom for the string SRAM_V.

of course, major emulators such as mgba and no$gba can detect sram without strings. but to make it easier, adding say this for example

const char* SRAM_STRING = "SRAM_V123";

to main.cpp (i added it here for testing https://github.com/XProger/OpenLara/blob/d9816be0384f1b00655a5f3476ed0cd0b5a1c65c/src/platform/gba/main.cpp#L322).

again, totally optional and really is only useful (i think) for early in development emulators. however, a lot of early in development emulators do test against openlara because it tests some edge cases (vram byte writes) and one of the few games that uses bitmap mode...also its tomb raider on the gba 😄

side note: i built the code from master. i noticed it drops me straight into the first level, and lara cannot move, only pivot. is there a commit that i should build from to have the game be functional?