On the Amstrad CPC I wrote many cheat programs in BASIC and had them published as type-ins in the magazines of the day. See the "Hairy Hacking" section here
for some of the magazine articles I've scanned.
When I moved from the CPC to the Amiga back in '91ish I wrote a few more in AmigaBASIC (Mercs and Z-Out spring to mind, but there were others). None were published and I doubt any of them survive today!