this happened to me using Recalbox 4.0.2 and I have discussed it in recalbox forums, and at the end I switched to Genesis Plus GX core in which ramcart works properly , but I think that maybe it’s relevant to say it here in case that it is a bug in Picodrive:
I have enabled ramcart in picodrive options to use it with SegaCD games (ramcart it’s even mandatory to play book 3 in Shining Force CD)
but everytime that I exit and then load the game again, the ram cart data is lost.
Ramcart data information reverts to its unformatted initial state, so I even need to format the cart data again (via in-game segacd memory manager) to proceed playing some games that don’t let you play with an unformatted cart.
SegaCD internal data memory works well, which is funny because it shares the same .srm file with the ramcart
I was using Retroarch 1.34 and Picodrive 1.91