MMXPG - Mega Man X Password Generator
Written by Michael Hayes
linktr.ee/intylab
Date Of Last Modification: July 5, 2023
__________

"What is this?"

This is a graphical application written in Python using Tkinter.  It
generates a password for Mega Man X based on what save data you choose.
__________

What is included:

 readme.txt - what you are reading now
  mmxpg.py  - the program itself
 config.py  - a configuration file that you can tweak
   icon.png - program icon
diagram.txt - an attempt to explain the internal password mechanics in
              the form of a wiring diagram
    assets/ - a subfolder containing all the graphics files
__________

Setup:

A. Install Python with the following commands:
   pkg install python
   pkg install python-tkinter
B. Create a folder called "projects" on your Home folder.
C. Unzip mmxpg.zip from this "projects" folder.  It will create a
   subfolder called "mmxpg/" and copy everything into there.
D. Add Execute permissions to the Python script file:
   chmod +x projects/mmxpg/mmxpg.py
E. You will probably want to create a Symbolic Link from your Home
   folder.  Execute the following commands:
   cd
   ln -s projects/mmxpg/mmxpg.sh mmxpg
__________

How to use:

From your Home folder, just type "mmxpg" to begin.

A window will appear with a list of buttons and checkboxes to the left,
and two "screenshot" panes in the middle and to the right.  The middle
pane displays the Stage Select screen with a list of icons around the
border, representing the upgrades you can get in each of the 8 stages.
The pane to the right displays your password and also has two "LED
matrices" which help to illustrate the internal password mechanics.

First, let's get familiar with the command buttons.  They are located in
the four corners of the middle Stage Select pane.

A. The "Help" button in the northwest corner displays brief instructions
   as a series of five consecutive pop-up messages.
B. The "About" button in the southwest corner displays information about
   the program itself.
C. The "Quit" button in the northeast corner is self-explanatory.
D. Finally, we get into the inner workings of the program itself with
   the four "Seed Bits" buttons in the southeast corner.
     I. By default, the Data Bit is raised that signals you have
        finished the first stage.  If you click the 'Z' button, you can
        opt to start at the beginning.  You will receive a warning that
        all other data bits will be cleared if you proceed.
    II. The other buttons are labeled '2', '1', and '0'.  You can click
        these at will.  Try it now, and watch the changes that happen.

To change the Data Bits, try clicking on the icons within the Stage
Select pane.  If need be, re-enable the icons by clicking on the 'Z'
button again.  Watch the password change all the way to the right, and
watch as the lights change as well.  Alternatively, you can use the list
of buttons to the left:

A-D. Dr. Light upgrades raise Data Bits which are represented as blue
     lights in the top row.
E-H. Sub Tanks raise Data Bits which are represented as orange lights in
     the second row.
I-P. Heart Tanks raise Data Bits which are represented as red lights in
     the third and fourth rows.
Q-X. Weapons raise Data Bits which are represented as purple lights in
     the fifth and sixth rows.  As you should know, these also signal
     that the respective stages have been cleared.
  Y. The Dr. Light upgrade in the Armored Armadillo stage, just under
     the "Help" button, raises Data Bit Y, which is represented as
     another blue light, this time in the seventh row.
     * As you probably know, this is the Hadouken upgrade.  It turns out
       the password does retain this information, but there is a little
       bit of code in the ROM to revoke Hadouken after you enter a
       password.  Either a ROM poke or a Game Genie code should bypass
       that and re-enable Hadouken.  I left it in for the sake of
       completion.

Now what about the green and chartreuse lights?  And what about that
second matrix of lights?

    Z. The chartreuse lights in the eighth row are for the Seed Bits.
       The first one is set based on whether or not you have cleared the
       first stage.
  2-0. The other three Seed Bits are chosen randomly when you receive a
       password.  This results in your receiving one of eight different
       passwords for the same data, just to make things confusing.
A'-X'. These lights are duplicated in the second matrix to the right.
       If lit, they reverse all the lights directly above them.  The
       second matrix is here to demonstrate the before & after of
       potential changes.  These lights are labeled A' through X'.

Altogether, the lights in the top six rows in the second matrix, plus
the lights in the bottom three rows of the original matrix (remember
the eighth row of lights is duplicated; that's why you don't see Z', for
example), are used to determine the final password.

How the lights affect the password, I am describing in detail in a
document which I plan to post on GameFAQs very soon.  Included will be
an image of the contents of the diagram.txt file.  I also am planning to
create a video to further illustrate the concept.  The link to my
YouTube page is available from my website.  The link to my website is
available from the link at the top of this document.

For now, let's look at the green lights in the seventh and ninth rows.
These are called Parity Bits.  Parity Bits are used for validation
purposes; that prevents people from getting away with entering random
digits as a password.  They always have to be set based on other Bits
which each one is monitoring:

  3. The rightmost light in the seventh row is lit if an odd number of
     lights in the top two rows are lit.  Otherwise, it is unlit.
  4. The next light to the left is lit if an odd number of lights in the
     third and fourth rows are lit.  Otherwise, it is unlit.
  5. Similarly, the next light to the left is lit if an odd number of
     lights in the fifth and sixth rows are lit.  Otherwise, unlit.
6-9. The lights in the last row are lit if an odd number of lights
     directly above them are lit.  Otherwise, they are unlit.
__________

License stuff

There is no license or warranty of any kind.  I offer this package as a
tool rather than as a product.  You are free to do whatever you want
with this tool.

The standard precaution applies that use of this tool is at your own
risk.  As it is free, I release this tool for your use with the
understanding that neither I nor Midnight Blue International, LLC are
responsible for any detrimental effects to you or your device as a
result of its use, either direct or indirect.

Rather than ask for any monetary donation, I would appreciate your
follows to my channels, particularly on Twitch, Kick, YouTube, and
Instagram.  I also have my own server on Discord and Guilded, but I
only send out invites manually.
__________

EOF
