This page will contain my tutorial (from many, many years ago) that I wrote in the early days of the Sega 8-bit (Sega Master System and Sega Gamegear) emulator, Meka.
I had a spreadsheet – written by a friend using Excel VLOOKUP tables – that would convert almost any of the Action Replay codes into actual addresses in memory.
Using the DZ80 tool, I would disassemble the game via the ROM dump, then work out where the Action Replay code was tweaking the memory. I would convert this into a proper byte patch in memory, which Meka could then use to alter the game’s memory whilst it was running.
90% of the time this would be an exact hit, but sometimes a little jiggery-pokery was required to get to the actual code area that was decreasing the lives/energy counter(s).
This was all done many years before Meka then implemented the numerous code debugging/hacking add-ons.