Here's some javascript to make passwords for Desert Strike on the Mega Drive
Passwords use a simple 26 character alphabet with a cipher ('QMZRHLAJOETBKWVIPFYSCNXGUD'). 1st and 6th characters govern the level (smallest digit of score + 4, then offset forwards and back into the cipher, +/- (level-1)), characters 2-5 store the score in thousands. Final character is a mod 26 checkdigit.
Score cannot be more than 2mil per level.
Special Passwords:
5 Lives Cheat 10 Lives Cheat Note: these particular values (5 and 6 thousand points) are hardcoded to be recognised as cheats. Once you enter them, it affects the starting number of lives, but will fail (won't set the new campaign) and you can subsequently enter a new password while keeping this new number of starting lives. Max score after Campaign 1 Max score after Campaign 2 Max score after Campaign 3 Max score after Campaign 4 Check out RetroAchievements to get achievements while playing this game!