Work in progress? (looks abandoned to me!)

TODO: UI should have 3 components:
1. Password input which looks similar to the game, with clickable selection
2. Bits (checkboxes?) where each value can be toggled on/off, or input somehow
3. Graphical view of the map, showing how each Gate, Missile Tank, and Energy Tank is ordered.
I *think* #3 can/should be static, depicting the sequence of bits as they appear in the password.
Because it looks like that order is actually a good/reasonable sequence to toggle each one in gameplay.

https://nesmaps.com/maps/Metroid/MetroidCompleteMapBG.html

Workplace

  Phone


Password screen:
______ ______
______ ______

0123456789ABC
DEFGHIJKLMNOP
QRSTUVWXYZabc
defghijklmnop
qrstuvwxyz?-

0=000000 1=000001 2=000010 3=000011 4=000100 5=000101 6=000110 7=000111 8=001000 9=001001 A=001010 B=001011 C=001100
D=001101 E=001110 F=001111 G=010000 H=010001 I=010010 J=010011 K=010100 L=010101 M=010110 N=010111 O=011000 P=011001
Q=011010 R=011011 S=011100 T=011101 U=011110 V=011111 W=100000 X=100001 Y=100010 Z=100011 a=100100 b=100101 c=100110
d=100111 e=101000 f=101001 g=101010 h=101011 i=101100 j=101101 k=101110 l=101111 m=110000 n=110001 o=110010 p=110011
q=110100 r=110101 s=110110 t=110111 u=111000 v=111001 w=111010 x=111011 y=111100 z=111101 ?=111110 -=111111
(my bit order here is what looks right to me, but is reverse of what they appear to actually use in the game)


Bits analysis
Input UI is 24 characters of 64 combinations.
144 bits total (18 bytes), but logically still split into bytes.
33 bits remain unaccounted for.
TODO: the last 4 of these might be part of the bit-shifting, but simply not activated in the game?
Byte 17:
-first half is always zero in my testing so far...
-second half is a pseudo-random value from 1-15, used to bit-shift bytes 1-16.
Byte 18 is a check-digit; current best-guess is sum of each byte from 1-17 (before shifting / after de-shifting)
Not inputting a character is equal to "0"
Inputting a "space" character is equal to "-"

below are valid (presumed, not checked for typos though)
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000001 000000000000000000000F--
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000010 00000010 0000000000000000000000yF
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000011 00000011 0000000000000000000000uE
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000100 00000100 0000000000000000000000qD
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000101 00000101 0000000000000000000000mC
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000110 00000110 0000000000000000000000iB
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000111 00000111 0000000000000000000000eA
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001000 00001000 0000000000000000000000a9
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001001 00001001 0000000000000000000000W8
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001010 00001010 0000000000000000000000S7
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001011 00001011 0000000000000000000000O6
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001100 00001100 0000000000000000000000K5
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001101 00001101 0000000000000000000000G4
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001110 00001110 0000000000000000000000C3
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001111 00001111 000000000000000000000082
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 11111111 11111111 000000000000000000000041

10100110 11110011 10001110 10100100 10111001 01100101 00100100 10101001 11010001 01111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 yARpZgIvPIG1aN--0F---mWI
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00000001 00001011 ARpZgIvPIG1aN--0F----08C
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00000011 00001101 -?5Dvnr9Sif80oB--W7--myP
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00000100 00001110 -uKtd7KbooaW38l-?0V--mqN
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00000101 00001111 -mflEEfBbb906HV-y0---mmM
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00000110 00010000 -XJUSTINBAI0CY--u1---miL
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00000111 00010001 -2cyuwakMKa0P5--m3---meK
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001001 00010011 ?5Dvnr9Sif80oB--W7---maJ
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001010 00010100 uKtd7KbooaW38l-?0V---mSH
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001011 00010101 mflEEfBbb906HV-y0----mOG
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001100 00010110 XJUSTINBAI0CY--u1----mKF
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001101 00010111 2cyuwakMKa0P5--m3----mGE
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001111 00011001 5Dvnr9Sif80oB--W7----WCD
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00000010 00001100 Ktd7KbooaW38l-?0V---?04B
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001000 00010010 JUSTINBAILEY------------
10100110 11110011 10001110 10100100 10111001 01100101 00100100 00000001 10010001 01111111 11111111 00000000 11111111 11111111 11111111 11110000 00001110 00011000 -----------------------l

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000011 00000000 00000000 00000000 00000000 00000111 00001010 000000 000000 00001W 0000SA
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000100 00000000 00000000 00000000 00000000 00001111 00010011 000000 000000 000000 W000yJ
00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000000 00000110 00000000 00000000 00000000 00000000 00001010 00100001 001000 000000 00G00O 0000eX
00000011 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000101 10110001 00000000 00000000 00000000 00000000 00001000 11010001 00C000 000000 0105iG 0000ZH
00000011 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000101 11001010 00000000 00000000 00000000 00000000 00001010 11101100 003000 000000 00G1Se 0000hi
00000011 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010001 00010000 00000101 11001110 00000000 00000000 00000000 00000000 00000010 11111001 0C0000 000004 H05pW0 0000Bv
00000011 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00010001 00010000 00001010 00001010 00000001 00000000 00000000 00000000 00001101 01100110 000P00 000000 08Y0K5 0800rc
00000011 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010000 00001001 01011111 00000001 00000000 00000000 00000000 00001000 10110100 00CW00 000000 4109Nm 4000Yq
00010011 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010000 00001001 01100001 00000001 00000000 00000000 00000000 00001000 11000110 01CW00 000000 4109OG 4000Z6
00010011 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010000 00001010 01110101 00000001 00000000 00000000 00000000 00000100 11010111 0J8000 000001 0G2dK1 0000JN
00110011 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010000 00000101 01110111 00000001 00000000 00000000 00000000 00000010 11110010 3CW000 000004 105Tm4 0000Bo
01110011 00100000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010001 00000101 01111100 00000001 00000000 00000000 00000000 00001000 00111110 07CW00 000000 4145V0 4000W?
01110011 00100001 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010001 00001111 00101001 00000010 00000000 00000000 00000000 00001000 11110111 07CX00 000000 414FAG 8000Zt
01110011 00100001 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010001 00001011 10011110 00000010 00000000 00000000 00000000 00000011 01100011 3cGW00 000002 0Y5pm4 0000DZ
01110111 00100001 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010001 00000101 10011111 00000010 00000000 00000000 00000000 00001111 01101110 003kGW 000000 020Y2p u400zk
01110111 00100001 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010101 00000101 10100100 00000010 00000000 00000000 00000000 00000010 01101010 7SX000 000004 1K5f08 00009g
01110111 00100001 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00010101 00001111 00111101 00000011 00000000 00000000 00000000 00000010 00001110 7SX000 000004 1KFFGC 00008E
01110111 00100001 00000000 00000000 00000000 00000000 00000000 00000000 00010010 00010101 00001111 01000100 00000011 00000000 00000000 00000000 00001110 00100011 007SX0 000000 04XKFH 0C00uZ
01110111 00100001 00000000 00000000 00000100 00000000 00000000 00000000 00010010 00010101 00010100 01011110 00000011 00000000 00000000 00000000 00000111 00111111 0Ev200 080000 92eel0 O000S-
01110111 00100001 00000000 00000000 01000100 00000000 00000000 00000000 00010010 00010101 00001110 10001001 00000011 00000000 00000000 00000000 00001101 10101010 00Ev20 028000 092eT4 WO00sg
01110111 00100001 00000000 00000000 01000100 00000000 00000000 00000000 00010010 00010101 00001010 10100100 00000011 00000000 00000000 00000000 00000110 10111010 0To400 4G0000 I5Gga0 m000Qw
01110111 00100001 00000000 00000000 11000100 00000000 00000000 00000000 00010010 00010101 00001110 00111001 00000100 00000000 00000000 00000000 00001001 11010111 03kGW0 1Y0000 2Gg778 8000dN
01110111 00100001 00000000 00000000 11000100 00000010 00000000 00000000 00010010 00010101 00000100 10010110 00000100 00000000 00000000 00000000 00000100 00100111 1t8G00 n08001 8L19O4 0000Gd
01110111 00100001 00000000 00000000 11000100 00000010 00000000 00000000 00010000 00010101 00011001 00010000 00000110 00000000 00000000 00000000 00000110 10111000 0To400 CG2000 G5HaG1 W000Qu
01111111 00100001 00000000 00000000 11000100 00000010 00000000 00000000 00010000 00010101 00010100 00010001 00000110 00000000 00000000 00000000 00001011 11000001 00-a80 0OW400 0WAYWY 3000l1
01111111 00100011 00000000 00000000 11000100 00000010 00000000 00000000 00010000 00010101 00011001 01110110 00000110 00000000 00000000 00000000 00000000 00100010 VoC00C G2000G 5Hbs1W 00000Y
01111111 01100011 00000000 00000000 11000100 00000010 00000000 00000000 00010001 00010101 00011110 10011010 00000111 00000000 00000000 00000000 00000000 10001101 VsC00C G2000H 5HwQ1m 00002D
01111111 01100011 10000000 00000000 11000100 00000010 00000000 00000000 00010001 00010101 00011001 00100000 00001000 00000000 00000000 00000000 00000000 10001111 VsE00C G2000H 5HaW20 00002F
01111111 01100011 10000000 00000001 11000100 00000010 00000000 00000000 00010001 00010111 00011001 00100011 00001000 00000000 00000000 00000000 00000000 10010101 VsE00S G2000H 5naZ20 00002L
01111111 01100010 11001100 00000001 11000100 00000010 00000000 00000000 00010001 00010111 00100101 10000000 00001000 00000000 00000000 00000000 00000000 01001001 VsBC0S G2000H 5oM020 000019
01111111 01100011 10011111 00000001 11000100 00000010 00000000 00000000 00010001 00010111 00110001 10100101 00001000 00000000 00000000 00000000 00000000 01001110 VsEV0S G2000H 5p6b20 00001E
01111111 01100011 10011111 00000001 11000100 00000010 00000000 00000000 00010001 10010111 00110001 11000100 00001000 00000000 00000000 00000000 00000000 11101101 VsEV0S G2000H bp7420 00003j
01111111 11100011 10011111 00000001 11000100 00000010 00000000 00000000 00010001 10010111 00101100 11000110 00001000 00000000 00000000 00000000 00000000 01101010 V?EV0S G2000H bop620 00001g
01111111 11100011 10111111 00000001 11000100 00000010 00000000 00000000 00010001 10010111 00101101 00110000 00001001 00000000 00000000 00000000 00000000 11110110 V?E-0S G2000H boqm2G 00003s
01111111 11100011 11111111 00000001 11000100 00000010 00000000 00000000 00010001 10010111 00110010 00110011 00001001 00000000 00000000 00000000 00000000 00111110 V?F-0S G2000H bp8p2G 00000?
01111111 11100011 11111111 00000111 11000100 00000010 00000000 00000000 00010001 10011111 00111011 00111010 00001010 00000000 00000000 00000000 00000000 01011101 V?F-1y G2000H dpiw2W 00001T
01111111 11100011 11111111 01000111 11000100 00000010 00000000 00000000 00010001 10011111 00111111 10100101 00001010 00000000 00000000 00000000 00000000 00001100 V?F-Hy G2000H dp?b2W 00000C
01111111 11100011 11111111 01011111 11000100 00000010 00000000 00000000 00010001 10011111 01001010 01001011 00001011 00000000 00000000 00000000 00000000 11010110 V?F-Ny G2000H dqfB2m 00003M
01111111 11100011 11111111 01111111 11000100 00000010 00000000 00000000 00010001 10011111 01000110 01101011 00001011 00000000 00000000 00000000 00000000 00010010 V?F-Vy G2000H dqPh2m 00000I
01111111 11100011 11111111 01111111 11000100 00000010 00000000 00000000 00010001 01011111 01000110 01101111 00001011 00000000 00000000 00000000 00000000 11010110 V?F-Vy G2000H NqPl2m 00003M
01111111 11100011 11111111 11111111 11000100 00000010 00000000 00000000 00010001 01011111 01001011 10011001 00001011 00000000 00000000 00000000 00000000 10000101 V?F--y G2000H NqkP2m 000025
01111111 11100011 11111111 11111111 11000100 00000010 00000000 00000000 00010100 01011111 01010000 00000011 00001100 00000000 00000000 00000000 00000000 11111000 V?F--y G2000K Nr0330 00003u
01111111 11100011 11111111 11111111 11000100 00001010 00000000 00000000 00010100 01011111 01010101 00100100 00001100 00000000 00000000 00000000 00000000 00100110 V?F--y GA000K NrKa30 00000c
01111111 11100011 11111111 11111111 11000100 00011010 00000000 00000000 00010100 01011111 01010000 10001100 00001100 00000000 00000000 00000000 00000000 10011001 V?F--y GQ000K Nr2C30 00002P
01111111 11100011 11111111 11111111 11000100 00111010 00000000 00000000 00010100 01011111 01010000 10001110 00001100 00000000 00000000 00000000 00000000 10111011 V?F--y Gw000K Nr2E30 00002x
01111111 11100011 11111111 11111111 11000100 01111010 00000000 00000000 00010100 01011111 01011010 10111001 00001100 00000000 00000000 00000000 00000000 00110000 V?F--y Hw000K Nrgv30 00000m
01111111 11100011 11111111 11111111 11000100 01111010 00000000 00000000 00010100 01011111 01110100 01101010 00001101 00000000 00000000 00010000 00000000 00001100 V?F--y Hw000K NtHg3G 00400C
01111111 11100011 11111111 11111111 11000100 11111010 00000000 00000000 00010100 01011111 01101100 01110100 00001101 00000000 00000000 00010000 00000000 10001110 V?F--y Jw000K Nsnq3G 00402E
01111111 11100011 11111111 11111111 11000100 11111010 00000001 00000000 00010100 01011111 01101100 01110100 00001101 00000000 00000000 00010000 00000000 10001111 V?F--y Jw0G0K Nsnq3G 00402F
01111111 11100011 11111111 11111111 11000100 11111010 00000011 00000000 00010100 01011111 10000101 11000100 00001101 00000000 00000000 00010000 00000000 11111010 V?F--y Jw0m0K NuN43G 00403w
11111111 11100011 11111111 11111111 11000100 11111010 00000011 00000000 00010000 10011111 10010110 01001010 00001110 00000000 00000000 00010000 00000000 01001110 -?F--y Jw0m0G dvPA3W 00401E
11111111 11100111 11111111 11111111 11000100 11111010 00000011 00000000 00010000 10011111 10100100 10111101 00001110 00000000 00000000 00010000 00000000 11010011 -?V--y Jw0m0G dwIz3W 00403J
11111111 11101111 11111111 11111111 11000100 11111010 00000011 00000000 00010000 10111111 10100100 11000110 00001110 00000000 00000000 00010000 00000000 00000100 -?---y Jw0m0G lwJ63W 004004
11111111 11111111 11111111 11111111 11000100 11111010 00000011 00000000 00010000 10111111 10101010 01110001 00001111 00000000 00000000 00010000 00000000 11000110 -----y Jw0m0G lwfn3m 004036
11111111 11111111 11111111 11111111 11101101 11111010 00000011 00000000 00010010 10111111 10011011 10011100 00001111 00000000 00000000 00010000 00000000 00001101 -----? tw0m0I lvkS3m 00400D
11111111 11111111 11111111 11111111 11111111 11111010 00000011 00000000 00010010 10111111 10100100 11000111 00001111 00000000 00000000 00010000 00000000 01010011 ------ -w0m0I lwJ73m 00401J
11111111 11111111 11111111 11111111 11111111 11111011 00000011 00000000 00010010 10111111 10101010 00100111 00010000 00000000 00000000 00010000 00000000 10111011 ------ -x0m0I lwed40 00402x
11111111 11111111 11111111 11111111 11111111 11111011 00000011 00000000 00010010 10111111 11111111 01011010 00010000 00000000 00000000 01010000 00000000 10000011 ------ -x0m0I l-zQ40 00K023
11111111 11111111 11111111 11111111 11111111 11111111 00000011 00000000 00010010 10111111 11111101 01100000 00010000 00000000 00000000 01010000 00000000 10001011 ------ --0m0I l-rW40 00K02B
11111111 11111111 11111111 11111111 11111111 11111111 00000011 00000000 00010000 10111111 11111111 00000001 00010001 00000000 00000000 10010000 00000000 01101101 ------ --0m0G l-y14G 00a01j
11111111 11111111 11111111 11111111 11111111 11111111 00000011 00000000 00010000 10111111 11111111 00000011 00010001 00000000 00000000 10110000 00000000 10001111 ------ --0m0G l-y34G 00i02F
11111111 11111111 11111111 11111111 11111111 11111111 00000011 00000000 00010011 10111111 11111111 00010111 00010001 00000000 00000000 10110000 00000000 10100110 ------ --0m0J l-yN4G 00i02c
11111111 11111111 11111111 11111111 11111111 11111111 00000111 00000000 00010011 10111111 11100101 00100110 00010001 00000000 00000000 10110000 00000000 10011111 ------ --1m0J l?Kc4G 00i02V
11111111 11111111 11111111 11111111 11111111 11111111 00001111 00000000 00010011 10111111 11100000 00110100 00010001 00000000 00000000 10110000 00000000 10110000 ------ --3m0J l?0q4G 00i02m
11111111 11111111 11111111 11111111 11111111 11111111 00011111 00000000 00010011 10111111 11010001 01001000 00010001 00000000 00000000 10110000 00000000 11000101 ------ --7m0J lz584G 00i035
11111111 11111111 11111111 11111111 11111111 11111111 01111111 00000000 00010011 10111111 10101110 01011111 00010001 00000000 00000000 10110000 00000000 00011001 ------ --Vm0J lwvV4G 00i00P
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00010011 10111111 10100101 01100100 00010001 00000000 00000000 10110000 00000000 10010101 ------ ---m0J lwLa4G 00i02L
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000001 00010011 10111111 10000110 01101011 00010001 00000000 00000000 10110000 00000000 01111110 ------ ---m4J luPh4G 00i01?
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 00010011 10111111 10000001 01110000 00010001 00000000 00000000 10110000 00000000 10000000 ------ ---mCJ lu5m4G 00i020
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 00010011 10111111 01011111 10000111 00010001 00000000 00000000 10110000 00000000 01110101 ------ ---mCJ lr?74G 00i01r
01000001 00001000 00000000 00000101 00000000 00000000 00000000 00000000 00000000 10111111 00000000 00000010 00000000 00000000 00000000 00000000 00000000 00001111 GGW01G 000000 lm0200 00000F
01000001 00001000 00000000 00000101 00000000 00000000 00000000 00000000 10000000 10111111 00000000 00000110 00000000 00000000 00000000 00000000 00000000 10010011 GGW01G 000020 lm0600 00002J
01000001 00001000 00000000 00000101 00000000 00000000 00000000 00000000 10000000 10111111 00000000 00100001 00000000 00000000 00000000 00000000 00000000 10101110 GGW01G 000020 lm0X00 00002k
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 000000 000020 000000 000020
00010000 00010010 00000000 01000000 00000000 00100100 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00010000 00010010 00000000 01000000 00000000 00100100 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000111 4180G0 0a0G00 000000 000027
11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11110000 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 11100001 ------ -----m ------ ---m3X
11111111 11111111 11111111 11111111 11111111 11111111 11111111 11110000 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00001110
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 11111111 00000101 10000010 00000001 00000000 00000000 01010000 00000000 00100001 (from NAR save)
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 11111111 00000101 10000101 00000001 00000000 00000000 10110000 00000000 10000100 (from NAR save)
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000011 11111111 11111111 00000000 00000000 00000000 00000000 11110000 00000000 11110001 000000 000003 --y000 00y03n Kraid statue TODO; Kraid boss TODO
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000011 11111111 11111111 00000001 00000000 00000000 00000000 11110000 00000000 11110010 000000 000003 --y100 00y03o after save with no action
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010011 11111111 11111111 00000110 00000000 00000000 00000000 11110000 00000000 00000111 000000 00000J --y600 00y007 after save tube and back
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111122 22223333 33444444 55555566 66661111 11222222 33333344 44445555 55666666 11111122 22223333 33444444 55555566 66661111 11222222 33333344 44445555 55666666
11111111 11011111 11111111 11111111 11111111 11111111 11111111 00000011 10010010 11111111 11111111 11111111 11111111 00000000 00000000 11110000 00000000 01011010 -z---- ---mEI -----m 00y01Q
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 000000 000020 000000 000020
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01110000 10000000 000000 000020 000000 000F3m
TODO set all known bits with this^, then explore to find any missed item/door, periodically making a hard-save and checking for any of them to be set
11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111100 11111111 11111111 11111111 11111111 00000000 00000000 11110000 00000000 01011010 ------ ------ -----m 00y01Q

Testing fidelity -- which bits can be output from a save
11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11110000 11111111 11111111 11111111 11111111 00000000 00000000 11110000 00000000 11010100 ------ -----m -----m 00y03K
11111111 11111111 11111111 11111111 11111111 11111111 00000011 00000000 10000000 11111111 11111111 00000000 11111111 00000000 00000000 11110000 00000000 01101010 ------ --0m20 --y0-m 00y01g
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10010000 11111111 11111111 11111111 11111111 00000000 00000000 11110000 00000000 01111000 ------ ---mEG -----m 00y01u
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10000000 11111111 11111111 11111111 11111111 00000000 00000000 11110000 00000000 01101000 ------ ---mE0 -----m 00y01e
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10000000 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01100110 ------ ---mE0 ------ --y01c
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10000000 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01100110 ------ ---mE0 ------ --y01c
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111111 11111111 11111111 11111111 11111111 11111111 11111111 11110011 10000000 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01010110 ------ ----E0 ------ --y01M
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10000000 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01100110 ------ ---mE0 ------ --y01c
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00001011 10000000 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01101110 ------ ---mk0 ------ --y01k
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10000000 11111111 11111111 00000000 11111111 11111111 11111111 11110000 00000000 01100111 ------ ---mE0 --y0-- --y01d
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000111 10000000 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01101010 ------ ---mU0 ------ --y01g
11111111 11111111 11111111 11111111 11111111 11111111 00000011 00000000 10000000 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01100111 ------ --0m20 ------ --y01d
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 11110011 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 11011001 ------ ---mFp ------ --y03P
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10110011 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 10011001 ------ ---mEp ------ --y02P
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 11010011 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 10111001 ------ ---mFJ ------ --y02v
11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000011 10010011 11111111 11111111 11111111 11111111 11111111 11111111 11110000 00000000 01111001 ------ ---mEJ ------ --y01v
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 10010000 000000 000020 000000 00012G
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000000 000000 000020 000000 000400

TODO: play-through by starting with this:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 11111111 11111111 00000000 00000000 00000000  000000 000000 00000F --003?

11111122 22223333 33444444 55555566 66661111 11222222 33333344 44445555 55666666 11111122 22223333 33444444 55555566 66661111 11222222 33333344 44445555 55666666
0=000000 1=000001 2=000010 3=000011 4=000100 5=000101 6=000110 7=000111 8=001000 9=001001 A=001010 B=001011 C=001100
D=001101 E=001110 F=001111 G=010000 H=010001 I=010010 J=010011 K=010100 L=010101 M=010110 N=010111 O=011000 P=011001
Q=011010 R=011011 S=011100 T=011101 U=011110 V=011111 W=100000 X=100001 Y=100010 Z=100011 a=100100 b=100101 c=100110
d=100111 e=101000 f=101001 g=101010 h=101011 i=101100 j=101101 k=101110 l=101111 m=110000 n=110001 o=110010 p=110011
q=110100 r=110101 s=110110 t=110111 u=111000 v=111001 w=111010 x=111011 y=111100 z=111101 ?=111110 -=111111
D=red door, M=missile tanks, mmmmmmmm=missile inventory, T=time, L=location, E=energy tank, X=special, -=tbd, R=rng, C=check digit, b=brain door
       ^     ^-varia            ^--screw attack                       Norfair--^ ^-------:ice                                             ^ Ridley defeated
       ^-morph ball               ^-high jump boots          Kraid's Hideout--^   ^------:wave                                           ^ Ridley Statue raised
 ^-bomb                                                    Ridley's Hideout--^     ^-----:varia                                         ^ Kraid defeated (statue not raised)
                                                                Elevatored-^        ^----:morph ball                                   ^ Kraid Statue raised
                                                                     Tourian--^^     ^---:screw attack
                                                                        ^-suit        ^--:laser
                                                                                       ^-:high-jump boots
                                                                                        ^:bomb

Brinstar: 13 items (1-8, 12-16)
Norfair: 19 items (9-11, 17-24, 25-32)
Kraid's Hideout: 11 items (33-40, 46-48)
Ridley's Hideout: 7 items (41-45, 55-56)
Tourian: 8 items (49-54, 63-64)

 1 Red Gate (missile door)
 2 Taken Bomb
 3 Red Gate (missile door)
 4 Energy Tank
 5 Red Gate (missile door)
 6 Red Gate (missile door)
 7 Missiles
 8 Taken Morph Ball

 9 Red Gate (missile door)
10 Missiles
11 TBD
12 Energy Tank
13 Taken Varia
14 Red Gate (missile door)
15 Energy Tank
16 Missiles

17 Red Gate (missile door)
18 Missiles
19 Missiles
20 Missiles
21 Missiles
22 Missiles
23 Missiles
24 Missiles

25 Missiles
26 Energy Tank
27 Red Gate (missile door)
28 Missiles
29 Missiles
30 Taken Screw Attack
31 Red Gate (missile door)
32 Taken High Jump

33 Missiles
34 Red Gate (missile door)
35 Red Gate (missile door)
36 Missiles
37 Red Gate (missile door)
38 Missiles
39 Missiles
40 Red Gate (missile door)

41 Red Gate (missile door)
42 Missiles
43 Energy Tank
44 Red Gate (missile door)
45 Missiles
46 Energy Tank
47 Red Gate (missile door)
48 Missiles

49 Zeebetite (Mother Brain door #3)
50 Zeebetite (Mother Brain door #2)
51 Zeebetite (Mother Brain door #1)
52 Red Gate (door #3 in Tourian)
53 Red Gate (door #2 in Tourian)
54 Orange Gate (door #1 in Tourian)
55 Missiles
56 Energy Tank

57-61 input ignored; can be set to 1 or 0; saving will always return the zero value
62 Mother Brain killed. Player sees the post-kill message "TIME BOMB SET GET OUT FAST! TIME", but it is in an incorrect color palette, and there is no timer ticking. If player saves from this point, it will reset all Tourian bits (bits 49-54 and 62-64). Escaping will play the end credits as normal.
63 Zeebetite (Mother Brain door #5)
64 Zeebetite (Mother Brain door #4)

65 Samus body (no visible power suit)
66 input ignored; can be set to 1 or 0; saving will always return the zero value
67 TBD value is kept, same value output when a new code is created, but has no known purpose
68 Elevator used - set the first time any elevator is used, and never unset
69 bug bit; causes the screen to turn black, but sound suggests still in Password screen
70-72 Location:
-70 Ridley's Hideout. If set with 71 or 72, will reset the game.
-71 Kraid's Hideout if 72=0, or Tourian if 72=1. If set with 70, will reset the game.
-72 Norfair if 71=0, or Tourian if 71=1. If set with 70, will reset the game.
73-80 Power Items:
-73 Ice Beam
-74 Wave Beam (ignored if 73 Ice Beam is set)
-75 Varia suit
-76 Maru Mari (Morph Ball)
-77 Screw Attack
-78 Long Beam
-79 High-Jump
-80 Bomb
81-88: missile inventory count (0-255, unsigned tinyint). Having missiles does not cause the count to be visible. If count is above the max, picking up missiles resets it to be the max value.
89-104 time played; least significant byte first. The unit appears to be about 3.5 seconds each, so the maximum time which can be recorded is about 50 hours. When the maximum value is reached, the first byte rolls over but the second one does not.
105-120 TBD value is kept, same value output when a new code is created, but has no known purpose
121-124 Mini-Boss flags
-121 Kraid Statue is raised. If 121 or 122 are set, max Missile storage is increased by 75.
-122 Kraid is defeated (and statue not raised) TODO check if setting both 121 and 122 affects Kraid or the statue room?
-123 Ridley Statue is raised.
-124 Ridley is defeated. Max Missile storage is increased by 75.
DxDEDDMx DM-ExDEM DMMMMMMM MEDMMxDx MDDMDMMD DMEDMEDM bbbDDDME ------bb X--X-LLL XXXXXXXX mmmmmmmm TTTTTTTT TTTTTTTT -------- -------- xXxX---- ----RRRR CCCCCCCC
125-128 TBD (not seen any of these set by the game)
129-136 How many bits the first 16 bytes must be shifted on password-input. The game always chooses a random value from 1-15, but any value from 0-255 is valid.
137-144 check digit; value must match the total sum of each byte from 1 to 17 (mod 256); sum must be taken on the un-shifted values.

For the "magic" password, all of the above is ignored; password must begin with "NARPAS SWORD0 0000", the last 8 characters can be any value.

KR12345
RI 12

Morph Ball, Missiles MA, Gate BR1, Gate BR2,
Energy E1, Gate BR3, Bomb, Gate BR4,
Missiles MB, Energy E2, Gate BR5, Varia,
Energy E3, Missiles MC, Missiles MD, Gate NO1,
Missiles ME, Missiles MF, Missiles MG, Missiles MH,
Missiles MI, Missiles MJ, Missiles MK, Gate NO2,
High Jump, Gate NO3, Screw Attack, Missiles ML,
Missiles MM, Gate NO4, (TODO unverified from here) Energy E4, Missiles MN,

Gate KR1, Missiles MO, Missiles MP, Gate KR2,
Energy E5, Gate KR3, Gate KR4, Missiles MQ,
Missiles MR, Gate KR5, Energy E6, 

Missiles MS,
Gate RI1, Energy E7, Missiles MT, Gate RI2,
Energy E8, Missiles MU

+-------------------------------------------------------------------------------------------+
|                               BR    BR                   BR                               |
|       BR BR2BR BR BR BR BR BR BR    BR BR BR5BR BR BR BR BR                            BR |
| TO                            BR    BR BR BR BR BR BR BR BR BR BR BR MB BR BR E2 BR BR BR |
| TO    TO                      BR    BR                                                 BR |
| TO    TO       BR BR1BR BR BR BR    BR                               BR BR3BR BR BR BR BR |
| TO    TO                      BR    BR             BR          BR                      BR |
| TO    TO1TO TO TO TO TO TO2TO BR BR BR BR BR BR BR BR BR BR BR BR BR BR E1 BR BR BR BR BR |
| TO                         TO BR    BR             BR          BR                      BR |
| TO                         TO BR    BR             BR BR4BR BR BR    NO                NO |
| TO                         TO BR    BR             BR          BR    NO NO NO ME MF NO NO |
| TO TO TO TO TO TO TO TO TO3TO BR    BR BR BR BR BR MA BR BR BR BR    NO NO MI MH MG NO NO |
|                               BR    BR                         ||    NO NO NO1NO NO NO NO |
|                               BR    NO                         NO    NO                NO |
| BR BR BR BR BR BR BR BR E3 BR BR    NO NO NO NO NO MC NO NO NO NO NO NO NO NO NO NO NO NO |
|                BR             BR    NO NO NO NO MD NO MK MJ NO NO NO NO NO NO NO NO NO NO |
|                BR    KR       KR    NO NO NO3NO NO NO                                  NO |
|                BR    KR KR KR KR    NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO2NO NO NO |
|                BR BR KR KR KR KR    NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO |
|                BR || KR KR KR KR    NO          NO NO                   NO E4 NO NO NO NO |
| KR                KR KR       KR    NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO MN NO NO |
| KR KR KR M? KR KR KR?KR M? KR KR    NO          NO NO4NO NO NO       NO NO NO NO NO NO NO |
| KR KR KR KR KR KR KR?KR KR E? KR                NO NO ML MM NO       NO NO             NO |
| KR       KR       KR             KR             NO                RI NO                NO |
| KR       KR KR KR KR?KR KR KR KR KR    RI       RI M? RI RI RI RI RI    RI             RI |
| KR       KR       KR    KR M? KR KR    RI RI RI E??RI RI RI RI RI RI RI RI RI RI RI RI RI |
| KR       KR KR KR KR KR KR    KR KR    RI       RI             RI                      RI |
| KR KR KR?KR M? KR KR KR KR KR KR KR    RI RI RI RI RI RI RI RI RI RI M? RI RI RI RI RI RI |
| KR    KR KR KR KR KR KR KR KR KR KR    RI                      RI                      RI |
|                      E??KR KR KR KR    RI E? RI?RI RI RI RI RI RI RI RI RI RI RI RI RI RI |
|                                  KR    RI RI RI RI RI RI M? RI RI RI RI RI RI RI RI RI RI |
+-------------------------------------------------------------------------------------------+