To have this be a good experience, it needs to be done with care. I've been thinking about the best way to go about it.
My thoughts so far lean towards storing the codes persistently in JSON format, by game name, and then by code title, each system in a core-named file of its own. JSON is easy to lint, and has lots of tools to work with it, much better than XML or proprietary. cJSON is a good lightweight library for this, and easy to work with. The C side menu is what is probably the most tricky, given the way the OSD works, but a menu string parameter could help it select hard-coded correct code formats. Decoding the codes and turning them into addresses would be done c side, and the final result would be 24 bit address, 16 bit check value, 16 bit replacement value, 4 bit (maybe 8 for convenience?) code index. Then these are sent to the core via HPS. Where the core can choose to use them in a LUT module that sits between the rom storage output and the bus and simply swaps out the data if the address and check word match.
Coding the menu up is almost certainly the hardest part of this though, but at least it's mostly system-wide code. If i'm ever feeling ambitious one day maybe i'll try to tackle that.