To emulate a save you have to know what the save is. This is as "simple" as doing a text search of the game (seriously, do a search for SRAM, FLASH, EEPROM in games, that will tell you the broad type, the numbers following it will tell you the subtype, this latter part is why earlier versions of VBA may have seen you have to set a save size for pokemon and some other games. If you want to go further then save patching is usually then a couple of small sections that vary in location but not content with the sub type.), however "simple" is more for your several gigahertz PC with hundreds of megs of free memory, not your 16.78MHz ARM7 with 288 kilobytes of the stuff. There are no tricks that I (or. more importantly, flash cart makers) ever found to give this save type up simply either. The main options, assuming the very simple save patch on the PC is not what you are going for, are a database of every game (quite possible), waiting 30 seconds when you first launch a new game to scan and find out (I believe AKAIO had this option in its 3 in 1 support) or leaving it to the end user (various DS flash carts, most notably the original EZ5 models did this when it emulated save types in hardware*), or some combo of the lot.
*the R4 saw updates every other day and was considered easier, hence support for this feature being dropped in later EZ5 kernels. Mind you new games kept working on "savelist" kernels for years after that where others needed patches, the line of thought eventually returned in later DS carts in various fashions when DS anti piracy got serious.
All that said emulating the save types/save protocol in hardware more accurately represents modern thinking in electronics design, in the early 2000s (which is what most flash cart designs ultimately come from) it would have been too hard or too expensive. If I were to design a GBA flash cart* the only thing that would see me still use save patches and SRAM saves are that existing designs use it, it has basically no downsides as far as most of the market is concerned (it works, it is reliable, the saves still work with editors/emulators/original carts and it takes no more skill to apply than pressing a "patch this game" button) and existing designs for GBA flash carts already use this model.
*something I seriously considered during the EZ4 shortage last year, hence knowing all these oddities and other stuff which I have been cluttering up this topic with.