{"id":18918873,"url":"https://github.com/ullenius/megaman2-password","last_synced_at":"2025-09-04T23:31:59.808Z","repository":{"id":131063079,"uuid":"313759591","full_name":"ullenius/megaman2-password","owner":"ullenius","description":"Mega Man 2 Password Generator written in C","archived":false,"fork":false,"pushed_at":"2023-07-06T12:20:40.000Z","size":49,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-08T10:50:36.304Z","etag":null,"topics":["apache-license-2","c","c99","megaman","megaman2","nes","password-generator"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ullenius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-17T22:33:18.000Z","updated_at":"2024-04-18T15:13:28.000Z","dependencies_parsed_at":"2024-11-08T10:51:14.330Z","dependency_job_id":null,"html_url":"https://github.com/ullenius/megaman2-password","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullenius%2Fmegaman2-password","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullenius%2Fmegaman2-password/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullenius%2Fmegaman2-password/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullenius%2Fmegaman2-password/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ullenius","download_url":"https://codeload.github.com/ullenius/megaman2-password/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232005259,"owners_count":18459033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-license-2","c","c99","megaman","megaman2","nes","password-generator"],"created_at":"2024-11-08T10:34:07.791Z","updated_at":"2024-12-31T15:54:23.726Z","avatar_url":"https://github.com/ullenius.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mega Man 2 Password Generator #\n\n## Overview\n\nA command-line Mega Man 2 password generator written in C. Implements the Shekleton algorithm.\n\n## :desktop_computer: Usage\n```sh\nUsage: mm2pwd [option]\n\n[--etanks \u003cnumber\u003e]\n\nDefeated robot master:\n\t[--airman]\n\t[--bubbleman]\n\t[--crashman]\n\t[--flashman]\n\t[--heatman]\n\t[--metalman]\n\t[--quickman]\n\t[--woodman]\n\n--debug\t Print password as hex integer only\n--help\t Print help text\n```\n\nFor example:\n\n```sh\n$ ./mm2pwd --airman --bubbleman --etanks 2\nA3 B1 C2 D1 D3 E2 E3 E4 E5\n```\n\nWill generate the password for Air Man and Bubble Man defeated and give the player 2 etanks.\n\n## :wrench: How it Works\n\nThe password can be represented as 25 bits stored in 5 [words](https://en.wikipedia.org/wiki/Word_(computer_architecture)#Word_size_choice) of 5 bits each. **A** is stored first. Then words **B-E** are stored in [little-endian](https://en.wikipedia.org/wiki/Endianness) format, that is:\n\n    [ A, E, D, C, B ]\n\nA password always has exactly 9 bits set.\n\nThe **A**-word represents the number of e-tanks. This word only has 1 bit set.\n\nThe other words (**E-B**) are used to represent the robot masters (alive/defeated).\nThe program then performs a [bit rotating left-shift\noperation](https://en.wikipedia.org/wiki/Circular_shift) on the **E-B** words depending on how many etanks there are.\n\nSee Kevin Shekelton's excellent [original](https://github.com/kpshek/mm2pwd) Ruby-version for a more detailed explanation.\n\n## :floppy_disk: Build\nA Makefile is provided. Simply run:\n```sh\n$ make mm2pwd\n```\nto build the binary `mm2pwd`.\n\nTo compile and run the unit tests:\n\n```sh\n$ make test\n```\n\n## Requirements\n1. C99\n2. glibc (for command-line options)\n\n## Credits\nThe [bitmasks](https://en.wikipedia.org/wiki/Mask_(computing)) for the bosses\nare copied from the original Ruby version.The algorithm and the rest of the \ncode is implemented manually through \n[clean-room design](https://en.wikipedia.org/wiki/Clean_room_design)\nbased on the original documentation. The original program was used for \ndebugging the algorithm.\n\n## :scroll: Licence\nCopyright 2020 Anosh D. Ullenius\n\nCopyright 2013 Kevin Shekleton\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullenius%2Fmegaman2-password","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fullenius%2Fmegaman2-password","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullenius%2Fmegaman2-password/lists"}