Is anyone aware if any of the modifications introduced by this ROM base use the RAM memory around 0x203C000 and beyond?
I am trying to implement FBI's Pokemon Storage System routine, but some of the bytes it uses are constantly overwritten by the game (for example, 0x203C000 is overwritten by 0x2 as soon as it is changed to anything else). This causes the routine/script to bug and fail. Which bytes are overwritten and with which values changes throughout the playthrough...
It is very likely that one of the routines uses this RAM space, as mentioned in the posts below. It would be great if Leon could share which memory locations are used/free in his ROM base.
For example, the expansion of safe flags and variables uses these locations:
It's pretty clear if you understand the ASM, but that's obviously a bit of a rarity. It repoints the flags into 0x0203C000 - 0x0203C1FF (0x200 bytes in total, giving 8 * 0x200 = 0x1000 flags).
And the vars are repointed into 0x0203C200 - 0x0203C5FF (0x400 bytes in total, giving 0x400 / 2 = 0x200 vars).
This memory is not normally saved, hence the requirement for JPAN's save block hack (which I link to a patch version of in the first post).
If you use both of these routines, you are left with 0x0203C600 - 0x0203CEC4 in the save block, meaning you can place other useful things in it, for example, you could store roaming Pokémon data in it (hint hint, wink wink :P).
A response to someone in that same thread:
I haven't used this, so I can't be sure it is perfect. But a quick scan of the routine shows that it is using 0x0203C000 to store the new flags. This should be fine by itself, but a lot of people use that area of RAM for their custom routines. This is why you need to read any routines you insert and keep track of which areas are RAM are being dedicated to what specific purpose. A flag will not be randomly be set. More likely, you're using 0x0203C000 for some other purpose without realizing it.
I don't think JPAN's saveblock hack goes beyond 0x0203D000. I want to say it is a little under x1000. Obviously it would be best if you knew which areas of RAM you were using, but I guess that isn't an immediate option. Until you can figure it out, try putting it closer to the end of the save area. Like 0x0203CC00 or something.